On Thu, 2012-09-20 at 12:53 +0300, [email protected] wrote:
> From: marios <[email protected]>
> 
> 
> Signed-off-by: marios <[email protected]>

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


Reply via email to