diff options
author | Dan Wendlandt <dan@nicira.com> | 2011-08-28 11:37:19 -0700 |
---|---|---|
committer | Dan Wendlandt <dan@nicira.com> | 2011-08-28 11:37:19 -0700 |
commit | d5b489383710605b10067550417a4e62a5f4f3e1 (patch) | |
tree | 04a2410fc6cf58365b7d6311629a8a9b768fae5e /bin | |
parent | 6f8f9c7b829bf1654305d22745ac2ea1d4dcc089 (diff) | |
download | nova-d5b489383710605b10067550417a4e62a5f4f3e1.tar.gz |
use 'uuid' field in networks table rather than 'bridge'. Specify project_id when creating instance in unit test
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/nova-manage | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index 4628e93b23..0c2cee3ce2 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -681,6 +681,8 @@ class NetworkCommands(object): help='Multi host') @args('--dns1', dest="dns1", metavar="<DNS Address>", help='First DNS') @args('--dns2', dest="dns2", metavar="<DNS Address>", help='Second DNS') + @args('--uuid', dest="net_uuid", metavar="<network uuid>", + help='Network UUID') @args('--project_id', dest="project_id", metavar="<project id>", help='Project id') @args('--priority', dest="priority", metavar="<number>", @@ -689,7 +691,7 @@ class NetworkCommands(object): network_size=None, multi_host=None, vlan_start=None, vpn_start=None, fixed_range_v6=None, gateway_v6=None, bridge=None, bridge_interface=None, dns1=None, dns2=None, - project_id=None, priority=None): + project_id=None, priority=None, uuid=None): """Creates fixed ips for host by range""" # check for certain required inputs @@ -768,7 +770,8 @@ class NetworkCommands(object): dns1=dns1, dns2=dns2, project_id=project_id, - priority=priority) + priority=priority, + uuid=uuid) def list(self): """List all created networks""" @@ -797,13 +800,13 @@ class NetworkCommands(object): def quantum_list(self): """List all created networks with Quantum-relevant fields""" _fmt = "%-32s\t%-10s\t%-10s\t%s , %s" - print _fmt % ( _('bridge / quantum-id'), + print _fmt % ( _('uuid'), _('project'), _('priority'), _('cidr_v4'), _('cidr_v6')) for network in db.network_get_all(context.get_admin_context()): - print _fmt % (network.bridge, + print _fmt % (network.uuid, network.project_id, network.priority, network.cidr, @@ -811,12 +814,15 @@ class NetworkCommands(object): @args('--network', dest="fixed_range", metavar='<x.x.x.x/yy>', help='Network to delete') + @args('--uuid', dest="uuid", metavar='<network uuid>', + help='UUID of network to delete') def delete(self, fixed_range): """Deletes a network""" # delete the network net_manager = utils.import_object(FLAGS.network_manager) - net_manager.delete_network(context.get_admin_context(), fixed_range) + net_manager.delete_network(context.get_admin_context(), fixed_range, + uuid=None) |