deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: [PATCH] passing realm option when creating a new VM
Date Thu, 07 Feb 2013 13:43:14 GMT
On 02/07, Oved Ourfali wrote:

ACK.

One thought, we do have 'realm' defined for the Machine entity as
resourceMetadata. Is this element supposed to work also for the
MachineCreate entity?

  -- Michal

> ---
>  server/lib/cimi/models/machine.rb | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/server/lib/cimi/models/machine.rb b/server/lib/cimi/models/machine.rb
> index 6e075e8..9164847 100644
> --- a/server/lib/cimi/models/machine.rb
> +++ b/server/lib/cimi/models/machine.rb
> @@ -70,6 +70,7 @@ class CIMI::Model::Machine < CIMI::Model::Base
>        additional_params[:initial_state] = machine_template["initialState"].strip
>      end
>      additional_params[:name] = json['name'] if json['name']
> +    additional_params[:realm_id] = json['realm'] if json['realm']
>      instance = context.driver.create_instance(context.credentials, image_id, {
>        :hwp_id => hardware_profile_id
>      }.merge(additional_params))
> @@ -99,6 +100,7 @@ class CIMI::Model::Machine < CIMI::Model::Base
>        additional_params[:initial_state] = xml["machineTemplate"][0]["initialState"].first.strip
>      end
>      additional_params[:name] = xml['name'][0] if xml['name']
> +    additional_params[:realm_id] = xml['realm'][0] if xml['realm']
>      instance = context.driver.create_instance(context.credentials, image_id, {
>        :hwp_id => hardware_profile_id
>      }.merge(additional_params))
> -- 
> 1.7.11.2
> 

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

Mime
View raw message