my command prints following output:
-------------------------------------------------------------------------
Producing details for server state
------------------------------------------------------------------------
power:ok
fault:none
state:assigned
load:normal
I read the python Dictionary documentation:
myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}
myCat['size']
output: fat
Like python Dictionary. How do I print power state, load
so what I want to here is, i have to redirect output file to like this:
Note: the command line output lines are random (length of file output is not constant)
serverstate = {'powerstate': 'ok', 'load': 'normal'}
so that I will print serverstate['powerstate']. I will get the value.
Please advise. If i am in wrong track.