You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by ma...@redhat.com on 2012/11/13 18:49:40 UTC

[PATCH] CIMI - Fix hwp.name bug (.name vs .id) in machine_configs

From: marios <ma...@redhat.com>


Signed-off-by: marios <ma...@redhat.com>
---
 server/lib/cimi/models/machine_configuration.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/cimi/models/machine_configuration.rb b/server/lib/cimi/models/machine_configuration.rb
index d53ccaf..5f77bf7 100644
--- a/server/lib/cimi/models/machine_configuration.rb
+++ b/server/lib/cimi/models/machine_configuration.rb
@@ -56,7 +56,7 @@ class CIMI::Model::MachineConfiguration < CIMI::Model::Base
       :created => Time.now.xmlschema,  # FIXME: DC hardware_profile has no mention about created_at
       :memory => (memory if memory),
       :disks => (  [ { :capacity => storage, :format => (profile.storage.respond_to?(:format) ? profile.storage.format : "unknown")  } ] if storage ), #no format attr for hwp - may be added if providers support...,
-      :id => context.machine_configuration_url(profile.name)
+      :id => context.machine_configuration_url(profile.id)
     }
     self.new(machine_hash)
   end
-- 
1.7.11.7


Re: [PATCH] CIMI - Fix hwp.name bug (.name vs .id) in machine_configs

Posted by Michal Fojtik <mf...@redhat.com>.
On 11/13/2012 06:49 PM, marios@redhat.com wrote:

ACK. Nice catch!

   -- Michal

> From: marios <ma...@redhat.com>
>
>
> Signed-off-by: marios <ma...@redhat.com>
> ---
>   server/lib/cimi/models/machine_configuration.rb | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/server/lib/cimi/models/machine_configuration.rb b/server/lib/cimi/models/machine_configuration.rb
> index d53ccaf..5f77bf7 100644
> --- a/server/lib/cimi/models/machine_configuration.rb
> +++ b/server/lib/cimi/models/machine_configuration.rb
> @@ -56,7 +56,7 @@ class CIMI::Model::MachineConfiguration < CIMI::Model::Base
>         :created => Time.now.xmlschema,  # FIXME: DC hardware_profile has no mention about created_at
>         :memory => (memory if memory),
>         :disks => (  [ { :capacity => storage, :format => (profile.storage.respond_to?(:format) ? profile.storage.format : "unknown")  } ] if storage ), #no format attr for hwp - may be added if providers support...,
> -      :id => context.machine_configuration_url(profile.name)
> +      :id => context.machine_configuration_url(profile.id)
>       }
>       self.new(machine_hash)
>     end
>


-- 

Michal Fojtik <mf...@redhat.com>
Deltacloud API, CloudForms