Merge "Use utils method when getting instance metadata and system metadata"

This commit is contained in:
Jenkins 2014-01-30 22:58:22 +00:00 committed by Gerrit Code Review
commit 640903c709
4 changed files with 5 additions and 4 deletions

View File

@ -64,7 +64,7 @@ def handle_password(req, meta_data):
conductor_api = conductor.API()
instance = conductor_api.instance_get_by_uuid(ctxt, meta_data.uuid)
sys_meta = utils.metadata_to_dict(instance['system_metadata'])
sys_meta = utils.instance_sys_meta(instance)
sys_meta.update(convert_password(ctxt, req.body))
conductor_api.instance_update(ctxt, meta_data.uuid,
system_metadata=sys_meta)

View File

@ -416,7 +416,7 @@ def info_from_instance(context, instance_ref, network_info,
instance_info["image_meta"] = image_meta_props
# add instance metadata
instance_info['metadata'] = instance_ref['metadata']
instance_info['metadata'] = utils.instance_meta(instance_ref)
instance_info.update(kw)
return instance_info

View File

@ -34,6 +34,7 @@ from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.openstack.common import loopingcall
from nova.openstack.common import timeutils
from nova import utils
from nova.virt.baremetal import baremetal_states
from nova.virt.baremetal import base
from nova.virt.baremetal import db
@ -324,7 +325,7 @@ class PXE(base.NodeDriver):
image=get_image_file_path(instance),
key=ssh_key,
net=net_config,
metadata=instance['metadata'],
metadata=utils.instance_meta(instance),
admin_password=admin_password,
files=injected_files,
partition=partition,

View File

@ -205,7 +205,7 @@ class Tilera(base.NodeDriver):
image=get_image_file_path(instance),
key=ssh_key,
net=net_config,
metadata=instance['metadata'],
metadata=utils.instance_meta(instance),
admin_password=admin_password,
files=injected_files,
partition=partition,