|
|
@ -181,16 +181,24 @@ def get_peers():
|
|
|
|
hostname = None
|
|
|
|
hostname = None
|
|
|
|
uuid = None
|
|
|
|
uuid = None
|
|
|
|
state = None
|
|
|
|
state = None
|
|
|
|
|
|
|
|
shortNames = False
|
|
|
|
for row in out.split('\n'):
|
|
|
|
for row in out.split('\n'):
|
|
|
|
if ': ' in row:
|
|
|
|
if ': ' in row:
|
|
|
|
key, value = row.split(': ')
|
|
|
|
key, value = row.split(': ')
|
|
|
|
if key.lower() == 'hostname':
|
|
|
|
if key.lower() == 'hostname':
|
|
|
|
hostname = value
|
|
|
|
hostname = value
|
|
|
|
|
|
|
|
shortNames = False
|
|
|
|
if key.lower() == 'uuid':
|
|
|
|
if key.lower() == 'uuid':
|
|
|
|
uuid = value
|
|
|
|
uuid = value
|
|
|
|
if key.lower() == 'state':
|
|
|
|
if key.lower() == 'state':
|
|
|
|
state = value
|
|
|
|
state = value
|
|
|
|
peers[hostname] = [ uuid, state ]
|
|
|
|
peers[hostname] = [ uuid, state ]
|
|
|
|
|
|
|
|
elif row.lower() == 'other names:':
|
|
|
|
|
|
|
|
shortNames = True
|
|
|
|
|
|
|
|
elif row != '' and shortNames == True:
|
|
|
|
|
|
|
|
peers[row] = [ uuid, state ]
|
|
|
|
|
|
|
|
elif row == '':
|
|
|
|
|
|
|
|
shortNames = False
|
|
|
|
return peers
|
|
|
|
return peers
|
|
|
|
|
|
|
|
|
|
|
|
def get_volumes():
|
|
|
|
def get_volumes():
|
|
|
|