diff options
| author | Trey Morris <trey.morris@rackspace.com> | 2011-02-01 14:11:21 -0600 |
|---|---|---|
| committer | Trey Morris <trey.morris@rackspace.com> | 2011-02-01 14:11:21 -0600 |
| commit | 620eba09a96f25a059249c23a5e73efd18aaf89a (patch) | |
| tree | 9a1d2a929d32e3fc052ad0231088d7f3b2ce4444 /nova/virt | |
| parent | 0c7893e4119bcccdfdfdcdef0931fcc8802688e8 (diff) | |
| download | nova-620eba09a96f25a059249c23a5e73efd18aaf89a.tar.gz nova-620eba09a96f25a059249c23a5e73efd18aaf89a.tar.xz nova-620eba09a96f25a059249c23a5e73efd18aaf89a.zip | |
forgot context param for network_get_all
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/xenapi/vmops.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 68fa1ecd6..da2e5c672 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -95,9 +95,10 @@ class VMOps(object): VMHelper.create_vbd(self._session, vm_ref, vdi_ref, 0, True) # write network info - network = db.network_get_by_instance(context.get_admin_context(), + admin_context = context.get_admin_context() + network = db.network_get_by_instance(admin_context, instance['id']) - for network in db.network_get_all(): + for network in db.network_get_all(admin_context): mapping = {'label': network['label'], 'gateway': network['gateway'], 'mac': instance.mac_address, |
