change data type from string to dict
Change-Id: I365ee0d163a233576134e5e699c1dfd8f49ca1f0 Signed-off-by: Zhou Ya <zhou.ya@zte.com.cn>
This commit is contained in:
@@ -486,7 +486,7 @@ class Controller(controller.BaseController):
|
||||
Adds a new host to Daisy
|
||||
|
||||
:param req: The WSGI/Webob Request object
|
||||
:param image_meta: Mapping of metadata about host
|
||||
:param host_meta: Mapping of metadata about host
|
||||
|
||||
:raises HTTPBadRequest if x-host-name is missing
|
||||
"""
|
||||
@@ -560,6 +560,11 @@ class Controller(controller.BaseController):
|
||||
|
||||
host_meta = registry.add_host_metadata(req.context, host_meta)
|
||||
|
||||
for ironic_keyword in ['cpu', 'system', 'memory',
|
||||
'pci', 'disk', 'devices']:
|
||||
if host_meta[ironic_keyword]:
|
||||
host_meta[ironic_keyword] = eval(host_meta[ironic_keyword])
|
||||
|
||||
return {'host_meta': host_meta}
|
||||
|
||||
@utils.mutating
|
||||
|
||||
Reference in New Issue
Block a user