deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: [PATCH core] RHEV-M: Switched to rbovirt gem
Date Wed, 08 Feb 2012 11:33:44 GMT
ACK but as we said please remember to:


On 08/02/12 13:26, mfojtik@redhat.com wrote:
> From: Michal Fojtik <mfojtik@redhat.com>
> 
> +      params[:memory] = (opts[:hwp_memory] * 1024 * 1024) if opts[:hwp_memory]


opts[:hwp_memory].to_i

  cos 1.8.7 doesn't like it




> +      params[:cores] = opts[:hwp_cpu] if opts[:hwp_cpu]
> +      params[:user_data] = opts[:user_data].gsub(/\n/,'') if opts[:user_data]
> +      convert_instance(client, client.create_vm(params))
>      end
>    end
>  
> @@ -224,7 +209,7 @@ class RHEVMDriver < Deltacloud::BaseDriver
>    def new_client(credentials)
>      url, datacenter = api_provider.split(';')
>      safely do
> -      ::RHEVM::Client.new(credentials.user, credentials.password, url, datacenter)
> +      OVIRT::Client.new(credentials.user, credentials.password, url, datacenter)
>      end
>    end
>  
> @@ -260,7 +245,7 @@ class RHEVMDriver < Deltacloud::BaseDriver
>      end
>      # If IP retrieval failed, fallback to VNC and MAC address
>      if public_addresses.empty?
> -      public_addresses = inst.macs.collect { |mac_address| InstanceAddress.new(mac_address,
:type => :mac) }
> +      public_addresses = inst.interfaces.map { |interface| InstanceAddress.new(interface.mac,
:type => :mac) }
>      end
>      if inst.vnc
>        public_addresses << InstanceAddress.new(inst.vnc[:address], :port =>
inst.vnc[:port], :type => :vnc)
> @@ -271,7 +256,7 @@ class RHEVMDriver < Deltacloud::BaseDriver
>        :state => state,
>        :image_id => inst.template.id,
>        :realm_id => inst.cluster.id,
> -      :owner_id => inst.username,
> +      :owner_id => client.credentials[:username],
>        :launch_time => inst.creation_time,
>        :instance_profile => profile,
>        :hardware_profile_id => profile.id,


Mime
View raw message