You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by ma...@apache.org on 2012/03/12 12:13:44 UTC

[4/4] git commit: CIMI - Adds network configuration calls for mock driver

CIMI - Adds network configuration calls for mock driver


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/82a0a48c
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/82a0a48c
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/82a0a48c

Branch: refs/heads/master
Commit: 82a0a48cb7a9c718d2e2e611c97ff0f5c9866286
Parents: 8db4de1
Author: marios <ma...@redhat.com>
Authored: Fri Mar 9 19:36:55 2012 +0200
Committer: marios <ma...@redhat.com>
Committed: Fri Mar 9 19:40:31 2012 +0200

----------------------------------------------------------------------
 server/lib/cimi/model/network_configuration.rb |    7 +++----
 server/lib/cimi/server.rb                      |    2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/82a0a48c/server/lib/cimi/model/network_configuration.rb
----------------------------------------------------------------------
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

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/82a0a48c/server/lib/cimi/server.rb
----------------------------------------------------------------------
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