diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-02-09 02:45:21 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-02-09 02:45:21 +0000 |
| commit | ba708eaa7fbeb78e683bd576850643fe46ddd693 (patch) | |
| tree | ff6e96c428c2a4f909a9bd179aeebb8a6c312e3e /nova/virt | |
| parent | b833c9e4053ba622626bdc701fbec3d9032cdd28 (diff) | |
| parent | 1eb36726e2c7107aa5f99fe1b7b528a82e4a28b9 (diff) | |
| download | nova-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.py | 8 |
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 |
