diff options
| author | Hisaharu Ishii <ishii.hisaharu@lab.ntt.co.jp> | 2011-01-26 15:17:52 +0900 |
|---|---|---|
| committer | Hisaharu Ishii <ishii.hisaharu@lab.ntt.co.jp> | 2011-01-26 15:17:52 +0900 |
| commit | 166591fda420cb39d38738e4cef77a8b030b9591 (patch) | |
| tree | d1e2aa5895d1a2367e132a7081f0d3eef64d51cc | |
| parent | a44e97d04123905e6ffb822f895531b2c2821a3d (diff) | |
| parent | 521d872d332486e2d30a7b4cec06a3b4f3ffbe87 (diff) | |
| download | nova-166591fda420cb39d38738e4cef77a8b030b9591.tar.gz nova-166591fda420cb39d38738e4cef77a8b030b9591.tar.xz nova-166591fda420cb39d38738e4cef77a8b030b9591.zip | |
Merged with vish branch
| -rw-r--r-- | nova/virt/libvirt_conn.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py index 10b108c1b..29e318cfd 100644 --- a/nova/virt/libvirt_conn.py +++ b/nova/virt/libvirt_conn.py @@ -643,9 +643,6 @@ class LibvirtConnection(object): def to_xml(self, instance, rescue=False): # TODO(termie): cache? LOG.debug(_('instance %s: starting toXML method'), instance['name']) - network = db.project_get_network(context.get_admin_context(), - instance['project_id']) - LOG.debug(_('instance %s: starting toXML method'), instance['name']) network = db.network_get_by_instance(context.get_admin_context(), instance['id']) # FIXME(vish): stick this in db @@ -885,8 +882,8 @@ class FirewallDriver(object): raise NotImplementedError() def _ra_server_for_instance(self, instance): - network = db.project_get_network(context.get_admin_context(), - instance['project_id']) + network = db.network_get_by_instance(context.get_admin_context(), + instance['id']) return network['ra_server'] @@ -1375,6 +1372,6 @@ class IptablesFirewallDriver(FirewallDriver): instance['id']) def _dhcp_server_for_instance(self, instance): - network = db.project_get_network(context.get_admin_context(), - instance['project_id']) + network = db.network_get_by_instance(context.get_admin_context(), + instance['id']) return network['gateway'] |
