deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: [PATCH 3/4] CIMI: Fixes/Updates Address entities
Date Tue, 25 Sep 2012 00:10:34 GMT
On Thu, 2012-09-20 at 12:53 +0300, marios@redhat.com wrote:
> From: marios <marios@redhat.com>
> 
> 
> Signed-off-by: marios <marios@redhat.com>

NAK; there's a syntax error:

> diff --git a/server/lib/cimi/models/address.rb b/server/lib/cimi/models/address.rb
> index f9e10a1..861a466 100644
> --- a/server/lib/cimi/models/address.rb
> +++ b/server/lib/cimi/models/address.rb
>  
> @@ -69,4 +69,30 @@ class CIMI::Model::Address < CIMI::Model::Base
>      context.driver.delete_address(context.credentials, id)
>    end
>  
> +  private
> +
> +  def self.from_address(address, context)
> +    self.new(
> +      :name => address.id,
> +      :id => context.address_url(address.id),
> +      :description => "Address #{address.id}",
> +      :ip => address.id,
> +      :allocation => "dynamic", #or "static"
> +      :default_gateway => "unkown", #wtf
> +      :dns => "unknown", #wtf
> +      :protocol => protocol_from_address(address.id),
> +      :mask => "unknown",
> +      :resource => (address.instance_id) ? {:href=> context.machine_url(address.instance_id)}
: nil,
> +      :network => nil, #unknown

The trailing ',' is not well-received by the Ruby interpreter.

David



Mime
View raw message