summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorArmando Migliaccio <armando.migliaccio@citrix.com>2011-02-17 19:49:48 +0000
committerArmando Migliaccio <armando.migliaccio@citrix.com>2011-02-17 19:49:48 +0000
commit43df95d1d8a4e8de094ca0a430eb7ac913803f8f (patch)
tree70e81ce941cb05041db623e69c6823dc26e23d00 /bin
parent39ffe46a749ad8f4a390f8e4c36c871845af2fc0 (diff)
parent35e2d24e4bdaf2d72155114b7e97821c8a4696d1 (diff)
Rebased at lp:nova 688
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nova-manage19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/nova-manage b/bin/nova-manage
index 7835ca551..86f7b8eff 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -499,6 +499,18 @@ class NetworkCommands(object):
vlan_start=int(vlan_start),
vpn_start=int(vpn_start))
+ def list(self):
+ """List all created networks"""
+ print "%-18s\t%-15s\t%-15s\t%-15s" % (_('network'),
+ _('netmask'),
+ _('start address'),
+ 'DNS')
+ for network in db.network_get_all(context.get_admin_context()):
+ print "%-18s\t%-15s\t%-15s\t%-15s" % (network.cidr,
+ network.netmask,
+ network.dhcp_start,
+ network.dns)
+
class ServiceCommands(object):
"""Enable and disable running services"""
@@ -579,6 +591,13 @@ class VolumeCommands(object):
ctxt = context.get_admin_context()
volume = db.volume_get(ctxt, param2id(volume_id))
host = volume['host']
+
+ if not host:
+ print "Volume not yet assigned to host."
+ print "Deleting volume from database and skipping rpc."
+ db.volume_destroy(ctxt, param2id(volume_id))
+ return
+
if volume['status'] == 'in-use':
print "Volume is in-use."
print "Detach volume from instance and then try again."