Added availability zone support to the Create Server API
This commit is contained in:
@@ -882,6 +882,14 @@ class ServiceCommands(object):
|
|||||||
services = [s for s in services if s['host'] == host]
|
services = [s for s in services if s['host'] == host]
|
||||||
if service:
|
if service:
|
||||||
services = [s for s in services if s['binary'] == service]
|
services = [s for s in services if s['binary'] == service]
|
||||||
|
print_format = "%-16s %-36s %-16s %-10s %-5s %-10s"
|
||||||
|
print print_format % (
|
||||||
|
_('Binary'),
|
||||||
|
_('Host'),
|
||||||
|
_('Zone'),
|
||||||
|
_('Status'),
|
||||||
|
_('State'),
|
||||||
|
_('Updated_At'))
|
||||||
for svc in services:
|
for svc in services:
|
||||||
delta = now - (svc['updated_at'] or svc['created_at'])
|
delta = now - (svc['updated_at'] or svc['created_at'])
|
||||||
alive = (delta.seconds <= 15)
|
alive = (delta.seconds <= 15)
|
||||||
@@ -889,9 +897,9 @@ class ServiceCommands(object):
|
|||||||
active = 'enabled'
|
active = 'enabled'
|
||||||
if svc['disabled']:
|
if svc['disabled']:
|
||||||
active = 'disabled'
|
active = 'disabled'
|
||||||
print "%-10s %-10s %-8s %s %s" % (svc['host'], svc['binary'],
|
print print_format % (svc['binary'], svc['host'],
|
||||||
active, art,
|
svc['availability_zone'], active, art,
|
||||||
svc['updated_at'])
|
svc['updated_at'])
|
||||||
|
|
||||||
@args('--host', dest='host', metavar='<host>', help='Host')
|
@args('--host', dest='host', metavar='<host>', help='Host')
|
||||||
@args('--service', dest='service', metavar='<service>',
|
@args('--service', dest='service', metavar='<service>',
|
||||||
|
|||||||
Reference in New Issue
Block a user