summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nova-manage37
1 files changed, 21 insertions, 16 deletions
diff --git a/bin/nova-manage b/bin/nova-manage
index 8e6419c0b..1b29d7196 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -611,6 +611,8 @@ class FixedIpCommands(object):
try:
fixed_ip = db.fixed_ip_get_by_address(ctxt, address)
+ if fixed_ip is None:
+ raise exception.NotFound('Could not find address')
db.fixed_ip_update(ctxt, fixed_ip['address'],
{'reserved': reserved})
except exception.NotFound as ex:
@@ -763,23 +765,26 @@ class NetworkCommands(object):
def list(self):
"""List all created networks"""
- print "%-18s\t%-15s\t%-15s\t%-15s\t%-15s\t%-15s\t%-15s" % (
- _('IPv4'),
- _('IPv6'),
- _('start address'),
- _('DNS1'),
- _('DNS2'),
- _('VlanID'),
- 'project')
+ _fmt = "%-5s\t%-18s\t%-15s\t%-15s\t%-15s\t%-15s\t%-15s\t%-15s\t%-15s"
+ print _fmt % (_('id'),
+ _('IPv4'),
+ _('IPv6'),
+ _('start address'),
+ _('DNS1'),
+ _('DNS2'),
+ _('VlanID'),
+ _('project'),
+ _("uuid"))
for network in db.network_get_all(context.get_admin_context()):
- print "%-18s\t%-15s\t%-15s\t%-15s\t%-15s\t%-15s\t%-15s" % (
- network.cidr,
- network.cidr_v6,
- network.dhcp_start,
- network.dns1,
- network.dns2,
- network.vlan,
- network.project_id)
+ print _fmt % (network.id,
+ network.cidr,
+ network.cidr_v6,
+ network.dhcp_start,
+ network.dns1,
+ network.dns2,
+ network.vlan,
+ network.project_id,
+ network.uuid)
@args('--network', dest="fixed_range", metavar='<x.x.x.x/yy>',
help='Network to delete')