diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2010-12-21 18:57:11 +0000 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2010-12-21 18:57:11 +0000 |
| commit | aa0639b00c3cd4b7bd5dd7dc9027e86d0f43150a (patch) | |
| tree | 947f17a7c19e6474bcea611167c9a55c181cc5e6 | |
| parent | fb24146290e6cf49397441d36878652da376f66d (diff) | |
| download | nova-aa0639b00c3cd4b7bd5dd7dc9027e86d0f43150a.tar.gz nova-aa0639b00c3cd4b7bd5dd7dc9027e86d0f43150a.tar.xz nova-aa0639b00c3cd4b7bd5dd7dc9027e86d0f43150a.zip | |
change virtualization to not get network through project
| -rw-r--r-- | nova/virt/libvirt_conn.py | 4 | ||||
| -rw-r--r-- | nova/virt/xenapi/vmops.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py index feef1390c..9be363661 100644 --- a/nova/virt/libvirt_conn.py +++ b/nova/virt/libvirt_conn.py @@ -488,8 +488,8 @@ class LibvirtConnection(object): def to_xml(self, instance, rescue=False): # TODO(termie): cache? logging.debug('instance %s: starting toXML method', instance['name']) - network = db.project_get_network(context.get_admin_context(), - instance['project_id']) + network = db.network_get_by_instance(context.get_admin_context(), + instance['id']) # FIXME(vish): stick this in db instance_type = instance['instance_type'] instance_type = instance_types.INSTANCE_TYPES[instance_type] diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 3034df9e1..de40815e2 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -54,8 +54,8 @@ class VMOps(object): raise Exception('Attempted to create non-unique name %s' % instance.name) - bridge = db.project_get_network(context.get_admin_context(), - instance.project_id).bridge + bridge = db.network_get_by_instance(context.get_admin_context(), + instance['id'])['bridge'] network_ref = \ NetworkHelper.find_network_with_bridge(self._session, bridge) |
