summaryrefslogtreecommitdiffstats
path: root/nova/virt
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-02-09 02:45:21 +0000
committerGerrit Code Review <review@openstack.org>2013-02-09 02:45:21 +0000
commitba708eaa7fbeb78e683bd576850643fe46ddd693 (patch)
treeff6e96c428c2a4f909a9bd179aeebb8a6c312e3e /nova/virt
parentb833c9e4053ba622626bdc701fbec3d9032cdd28 (diff)
parent1eb36726e2c7107aa5f99fe1b7b528a82e4a28b9 (diff)
downloadnova-ba708eaa7fbeb78e683bd576850643fe46ddd693.tar.gz
nova-ba708eaa7fbeb78e683bd576850643fe46ddd693.tar.xz
nova-ba708eaa7fbeb78e683bd576850643fe46ddd693.zip
Merge "Remove nova.db call from baremetal PXE driver"
Diffstat (limited to 'nova/virt')
-rw-r--r--nova/virt/baremetal/pxe.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/nova/virt/baremetal/pxe.py b/nova/virt/baremetal/pxe.py
index a169e13e5..9a8a4fed0 100644
--- a/nova/virt/baremetal/pxe.py
+++ b/nova/virt/baremetal/pxe.py
@@ -167,11 +167,9 @@ def get_pxe_config_file_path(instance):
def get_partition_sizes(instance):
- type_id = instance['instance_type_id']
- root_mb = instance['root_gb'] * 1024
-
- # NOTE(deva): is there a way to get swap_mb directly from instance?
- swap_mb = instance_types.get_instance_type(type_id)['swap']
+ instance_type = instance_types.extract_instance_type(instance)
+ root_mb = instance_type['root_gb'] * 1024
+ swap_mb = instance_type['swap']
# NOTE(deva): For simpler code paths on the deployment side,
# we always create a swap partition. If the flavor