diff --git a/main.py b/main.py index 9ef2bf8..af03c90 100644 --- a/main.py +++ b/main.py @@ -4,7 +4,7 @@ import logging from time import sleep # Local deps -import listServers +import listServers, relativeUsage # Debugging stuffs logging.basicConfig() @@ -105,10 +105,10 @@ channel.send('exit' + '\n') # Using lower level cmd since we're not going to get ssh.close() - - ## Calculating blade usage by percentage. ## # Keep in mind the querying of the data took a while, a minute or so. +relativeUsage.relativeUsage(encPowerUsageAC, servers) +print(servers) breakpoint() print() diff --git a/relativeUsage.py b/relativeUsage.py new file mode 100644 index 0000000..9d57c4d --- /dev/null +++ b/relativeUsage.py @@ -0,0 +1,5 @@ +# Current data: [[1, 'tty-lab-1', '', 'OK', 'On', 'Off', 144], [2, 'tty-lab-2', 'CZ320263P9', 'OK', 'On', 'Off', 86], [3, 'tty-lab-3', 'CZJ14410KP', 'Failed', 'On', 'Off', 129], [4, 'kspve1', 'CZJ14410KK', 'OK', 'On', 'Off', 87], [5, 'kspve2-2', '', 'OK', 'On', 'Off', 87], [6, 'kspve3', '', 'OK', 'On', 'Off', 82], [7, 'plaes-blade', '', 'OK', 'On', 'Off', 81], [8, 'Ringly-01', 'CZ3402Y48C', 'OK', 'On', 'Off', 124], [9, 'toomas-lepik', 'CZ3217FNYE', 'OK', 'On', 'Off', 132], [10, 'toomas-lepik2', 'CZ3217FFSS', 'OK', 'On', 'Off', 101], [12, 'erki-naumanis', '', 'OK', 'On', 'Off', 88]] + +def relativeUsage(encPowerUsageAC, servers): + + return servers \ No newline at end of file