deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik ...@mifo.sk>
Subject Re: [PATCH 2/4] CIMI - Adds network configuration calls for mock driver
Date Mon, 12 Mar 2012 09:55:26 GMT
On Mar 9, 2012, at 6:42 PM, marios@redhat.com wrote:

ACK.

 -- Michal

> From: marios <marios@redhat.com>
> 
> 
> Signed-off-by: marios <marios@redhat.com>
> ---
> server/lib/cimi/model/network_configuration.rb |    7 +++----
> server/lib/cimi/server.rb                      |    2 +-
> 2 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/server/lib/cimi/model/network_configuration.rb b/server/lib/cimi/model/network_configuration.rb
> index b329919..1b04548 100644
> --- a/server/lib/cimi/model/network_configuration.rb
> +++ b/server/lib/cimi/model/network_configuration.rb
> @@ -34,17 +34,16 @@ class CIMI::Model::NetworkConfiguration < CIMI::Model::Base
>   def self.find(id, context)
>     network_configs = []
>     if id==:all
> -
> +      network_configs = context.driver.network_configurations(context.credentials, {:env=>context})
>     else
> -
> +      network_configs = context.driver.network_configurations(context.credentials, {:env=>context,
:id=>id})
>     end
>     network_configs
>   end
> -require 'cimi/model/network_configuration_collection'
> +
>   def self.create_from_xml(request_body, context)
>   end
> 
>   def self.create_from_json(request_body, context)
>   end
> -
> end
> diff --git a/server/lib/cimi/server.rb b/server/lib/cimi/server.rb
> index 2a90c0e..9dd0b3f 100644
> --- a/server/lib/cimi/server.rb
> +++ b/server/lib/cimi/server.rb
> @@ -565,7 +565,7 @@ global_collection :network_configurations do
>     param :id, :string, :required
>     control do
>       network_config = NetworkConfiguration.find(params[:id], self)
> -      respond_to do
> +      respond_to do |format|
>         format.xml { network_config.to_xml }
>         format.json { network_config.to_json }
>       end
> -- 
> 1.7.6.5
> 


Mime
View raw message