From: marios <[email protected]>
Signed-off-by: marios <[email protected]> --- server/lib/cimi/models/machine.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/lib/cimi/models/machine.rb b/server/lib/cimi/models/machine.rb index 6758d4a..53dc6a9 100644 --- a/server/lib/cimi/models/machine.rb +++ b/server/lib/cimi/models/machine.rb @@ -49,9 +49,9 @@ class CIMI::Model::Machine < CIMI::Model::Base def self.create_from_json(body, context) json = JSON.parse(body) - hardware_profile_id = xml['machineTemplate']['machineConfig']["href"].split('/').last - image_id = xml['machineTemplate']['machineImage']["href"].split('/').last - instance = context.create_instance(context.credentials, image_id, { :hwp_id => hardware_profile_id }) + hardware_profile_id = json['machineTemplate']['machineConfig']["href"].split('/').last + image_id = json['machineTemplate']['machineImage']["href"].split('/').last + instance = context.driver.create_instance(context.credentials, image_id, { :hwp_id => hardware_profile_id }) from_instance(instance, context) end -- 1.7.11.7
