You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/01/23 11:27:01 UTC

svn commit: r1234730 - /deltacloud/trunk/server/lib/cimi/model/machine.rb

Author: mfojtik
Date: Mon Jan 23 10:27:00 2012
New Revision: 1234730

URL: http://svn.apache.org/viewvc?rev=1234730&view=rev
Log:
CIMI: Fixed camelcase for Machine creation XML format

Modified:
    deltacloud/trunk/server/lib/cimi/model/machine.rb

Modified: deltacloud/trunk/server/lib/cimi/model/machine.rb
URL: http://svn.apache.org/viewvc/deltacloud/trunk/server/lib/cimi/model/machine.rb?rev=1234730&r1=1234729&r2=1234730&view=diff
==============================================================================
--- deltacloud/trunk/server/lib/cimi/model/machine.rb (original)
+++ deltacloud/trunk/server/lib/cimi/model/machine.rb Mon Jan 23 10:27:00 2012
@@ -82,7 +82,7 @@ class CIMI::Model::Machine < CIMI::Model
     hardware_profile_id = machine_template['machineConfig'][0]["href"].split('/').last
     image_id = machine_template['machineImage'][0]["href"].split('/').last
     additional_params = {}
-    if machine_template.has_key? 'MachineAdmin'
+    if machine_template.has_key? 'machineAdmin'
       additional_params[:keyname] = machine_template['machineAdmin'][0]["href"].split('/').last
     end
     instance = context.driver.create_instance(context.credentials, image_id, {
@@ -212,7 +212,7 @@ class CIMI::Model::Machine < CIMI::Model
 
   def self.convert_instance_actions(instance, context)
     instance.actions.collect do |action|
-      action = :delete if action == :destroy  # In CIMI destroy operation become delete
+      action = :destroy if action == :delete # In CIMI destroy operation become delete
       action = :restart if action == :reboot  # In CIMI reboot operation become restart
       { :href => context.send(:"#{action}_machine_url", instance.id), :rel => "http://www.dmtf.org/cimi/action/#{action}" }
     end