On Dec 5, 2011, at 5:15 PM, [email protected] wrote: ACK. Good catch.
-- Michal > From: marios <[email protected]> > > > Signed-off-by: marios <[email protected]> > --- > server/lib/cimi/model/machine.rb | 14 +++++++------- > 1 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/server/lib/cimi/model/machine.rb > b/server/lib/cimi/model/machine.rb > index cff2dd5..54d9418 100644 > --- a/server/lib/cimi/model/machine.rb > +++ b/server/lib/cimi/model/machine.rb > @@ -70,16 +70,16 @@ 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 > + 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 > > def self.create_from_xml(body, context) > xml = XmlSimple.xml_in(body) > - hardware_profile_id = > xml['MachineTemplate'][0]['MachineConfig'][0]["href"].split('/').last > - image_id = > xml['MachineTemplate'][0]['MachineImage'][0]["href"].split('/').last > + hardware_profile_id = > xml['machineTemplate'][0]['machineConfig'][0]["href"].split('/').last > + image_id = > xml['machineTemplate'][0]['machineImage'][0]["href"].split('/').last > instance = context.driver.create_instance(context.credentials, image_id, > { :hwp_id => hardware_profile_id }) > from_instance(instance, context) > end > @@ -145,11 +145,11 @@ class CIMI::Model::Machine < CIMI::Model::Base > machine_conf = MachineConfiguration.find(profile.name, context) > storage_override = profile.overrides.find { |p, v| p == :storage } > [ > - { :capacity => { > + { :capacity => { > :quantity => storage_override.nil? ? > machine_conf.disks.first[:capacity][:quantity] : storage_override[1], > :units => machine_conf.disks.first[:capacity][:units] > - } > - } > + } > + } > ] > end > > -- > 1.7.6.4 > ------------------------------------------------------ Michal Fojtik, [email protected] Deltacloud API: http://deltacloud.org
