deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1234730 - /deltacloud/trunk/server/lib/cimi/model/machine.rb
Date Mon, 23 Jan 2012 10:27:01 GMT
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



Mime
View raw message