Add support for new status field
Change-Id: I559498d9ce3be7f8e19231195f618e1b46c3110c
This commit is contained in:
@@ -108,15 +108,20 @@ class LibraAPI(object):
|
|||||||
def status_lb(self, args):
|
def status_lb(self, args):
|
||||||
resp, body = self._get('/loadbalancers/{0}'.format(args.id))
|
resp, body = self._get('/loadbalancers/{0}'.format(args.id))
|
||||||
column_names = ['ID', 'Name', 'Protocol', 'Port', 'Algorithm',
|
column_names = ['ID', 'Name', 'Protocol', 'Port', 'Algorithm',
|
||||||
'Status', 'Created', 'Updated', 'IPs', 'Nodes',
|
'Status', 'Status Description', 'Created', 'Updated',
|
||||||
'Persistence Type', 'Connection Throttle']
|
'IPs', 'Nodes', 'Persistence Type',
|
||||||
|
'Connection Throttle']
|
||||||
columns = ['id', 'name', 'protocol', 'port', 'algorithm', 'status',
|
columns = ['id', 'name', 'protocol', 'port', 'algorithm', 'status',
|
||||||
'created', 'updated', 'virtualIps', 'nodes',
|
'statusDescription', 'created', 'updated', 'virtualIps',
|
||||||
'sessionPersistence', 'connectionThrottle']
|
'nodes', 'sessionPersistence', 'connectionThrottle']
|
||||||
if 'sessionPersistence' not in body:
|
if 'sessionPersistence' not in body:
|
||||||
body['sessionPersistence'] = 'None'
|
body['sessionPersistence'] = 'None'
|
||||||
if 'connectionThrottle' not in body:
|
if 'connectionThrottle' not in body:
|
||||||
body['connectionThrottle'] = 'None'
|
body['connectionThrottle'] = 'None'
|
||||||
|
if 'statusDescription' in body:
|
||||||
|
body['statusDescription'] = body['statusDescription'].rstrip()
|
||||||
|
else:
|
||||||
|
body['statusDescription'] = 'None'
|
||||||
self._render_dict(column_names, columns, body)
|
self._render_dict(column_names, columns, body)
|
||||||
|
|
||||||
def virtualips_lb(self, args):
|
def virtualips_lb(self, args):
|
||||||
|
Reference in New Issue
Block a user