# File lib/cimi/model/machine.rb, line 71 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 }) from_instance(instance, context) end