deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [4/5] git commit: CIMI: Fixed exception when no machine_admin parameter set
Date Wed, 22 Feb 2012 12:33:39 GMT
CIMI: Fixed exception when no machine_admin parameter set

If backend does not support MachineAdmin, the field in CIMI
client form is disabled and no 'machine_admin' variable is sent.
Previously we check if this param is empty, but this will throw
Exception in case when this param does not exists.


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/d3426a99
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/d3426a99
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/d3426a99

Branch: refs/heads/master
Commit: d3426a9910e1e953c0bc113dc279fa53195ae173
Parents: a1341cf
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Feb 22 13:23:04 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Wed Feb 22 13:23:04 2012 +0100

----------------------------------------------------------------------
 clients/cimi/lib/entities/machine.rb |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d3426a99/clients/cimi/lib/entities/machine.rb
----------------------------------------------------------------------
diff --git a/clients/cimi/lib/entities/machine.rb b/clients/cimi/lib/entities/machine.rb
index d795996..c17925b 100644
--- a/clients/cimi/lib/entities/machine.rb
+++ b/clients/cimi/lib/entities/machine.rb
@@ -91,10 +91,10 @@ class CIMI::Frontend::Machine < CIMI::Frontend::Entity
       xml.Machine(:xmlns => CIMI::Frontend::CMWG_NAMESPACE) {
         xml.name params[:machine][:name]
         xml.description params[:machine][:description]
-        xml.MachineTemplate {
-          xml.MachineConfig( :href => params[:machine][:machine_configuration] )
-          xml.MachineImage( :href => params[:machine][:machine_image] )
-          xml.MachineAdmin( :href => params[:machine][:machine_admin] ) unless params[:machine][:machine_admin].empty?
+        xml.machineTemplate {
+          xml.machineConfig( :href => params[:machine][:machine_configuration] )
+          xml.machineImage( :href => params[:machine][:machine_image] )
+          xml.machineAdmin( :href => params[:machine][:machine_admin] ) unless params[:machine][:machine_admin].nil?
         }
       }
     end.to_xml


Mime
View raw message