Commit 79fd5318 authored by Stratos Psomadakis's avatar Stratos Psomadakis
Browse files

pep8 fixes

parent 8bad2e9b
......@@ -139,7 +139,7 @@ class Command(NoArgsCommand):
user.username if displayname else Omit,
user.realname,
active, admin, uuid,
auth_display
auth_display,
])
fields = (format(elem) for elem in elems)
......
......@@ -110,18 +110,18 @@ class Command(BaseCommand):
displayname = options['displayname']
headers = filter(lambda x: x is not Omit,
['id',
'name',
'flavor',
'owner_uuid',
'owner_name' if displayname else Omit,
'mac_prefix',
'dhcp',
'state',
'link',
'vms',
'public',
])
['id',
'name',
'flavor',
'owner_uuid',
'owner_name' if displayname else Omit,
'mac_prefix',
'dhcp',
'state',
'link',
'vms',
'public',
])
if options['ipv6']:
headers.extend(['IPv6 Subnet', 'IPv6 Gateway'])
......
......@@ -110,8 +110,9 @@ class Command(BaseCommand):
self.stdout.write(l.ljust(18) + ': ' + f.ljust(20) + '\n')
self.stdout.write('\n')
for nic in vm.nics.all():
self.stdout.write("nic/%d: IPv4: %s, MAC: %s, IPv6:%s, Network: %s\n"\
% (nic.index, nic.ipv4, nic.mac, nic.ipv6, nic.network))
params = (nic.index, nic.ipv4, nic.mac, nic.ipv6, nic.network)
self.stdout.write("nic/%d: IPv4: %s, MAC: %s, IPv6:%s,"
" Network: %s\n" % params)
client = vm.get_client()
try:
......
......@@ -126,14 +126,14 @@ class Command(BaseCommand):
cache = ImageCache()
headers = filter(lambda x: x is not Omit,
['id',
'name',
'owner_uuid',
'owner_name' if displayname else Omit,
'flavor',
'image',
'state',
'backend',
['id',
'name',
'owner_uuid',
'owner_name' if displayname else Omit,
'flavor',
'image',
'state',
'backend',
])
uuids = list(set([server.userid for server in servers]))
......@@ -165,7 +165,7 @@ class Command(BaseCommand):
image,
state,
str(server.backend),
])
])
table.append(fields)
separator = " | " if options['csv'] else None
......
......@@ -79,6 +79,7 @@ PLANKTON_META = ('container_format', 'disk_format', 'name', 'properties',
TRANSLATE_UUIDS = getattr(settings, 'TRANSLATE_UUIDS', False)
def get_displaynames(names):
try:
auth_url = settings.ASTAKOS_URL
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment