deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martha.c.ch...@gmail.com
Subject [PATCH 1/2] changed routing_group to forwarding_group
Date Mon, 18 Feb 2013 12:27:00 GMT
From: NjeriChelimo <martha.c.chumo@gmail.com>

---
 server/lib/cimi/models/network.rb |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/server/lib/cimi/models/network.rb b/server/lib/cimi/models/network.rb
index f415664..e9d133f 100644
--- a/server/lib/cimi/models/network.rb
+++ b/server/lib/cimi/models/network.rb
@@ -55,7 +55,7 @@ class CIMI::Model::Network < CIMI::Model::Base
   def self.create(request_body, context, type)
     input = (type == :xml)? XmlSimple.xml_in(request_body, {"ForceArray"=>false,"NormaliseSpace"=>2})
: JSON.parse(request_body)
     if input["networkTemplate"]["href"] #template by reference
-      network_config, routing_group = get_by_reference(input, context)
+      network_config, forwarding_group = get_by_reference(input, context)
     else
       if input["networkTemplate"]["networkConfig"]["href"] # configuration by reference
         network_config = CIMI::Model::NetworkConfiguration.find(context.href_id(input["networkTemplate"]["networkConfig"]["href"],
@@ -63,10 +63,10 @@ class CIMI::Model::Network < CIMI::Model::Base
       else #configuration by value
         network_config = get_by_value(request_body, type)
       end
-      routing_group = CIMI::Model::RoutingGroup.find(context.href_id(input["networkTemplate"]["routingGroup"]["href"],
-                                                                     :routing_groups), context)
+      forwarding_group = CIMI::Model::ForwardingGroup.find(context.href_id(input["networkTemplate"]["forwardingGroup"]["href"],
+                                                                     :forwarding_groups),
context)
     end
-    params = {:network_config => network_config, :routing_group => routing_group, :name=>input["name"],
+    params = {:network_config => network_config, :forwarding_group => forwarding_group,
:name=>input["name"],
               :description=>input["description"], :env=>context}
     raise CIMI::Model::BadRequest.new("Bad request - missing required parameters. Client
sent: #{request_body} which produced #{params.inspect}")  if params.has_value?(nil)
     context.driver.create_network(context.credentials, params)
@@ -93,8 +93,8 @@ class CIMI::Model::Network < CIMI::Model::Base
   def self.get_by_reference(input, context)
     network_template = CIMI::Model::NetworkTemplate.find(context.href_id(input["networkTemplate"]["href"],
:network_templates), context)
     network_config = CIMI::Model::NetworkConfiguration.find(context.href_id(network_template.network_config.href,
:network_configurations), context)
-    routing_group = CIMI::Model::RoutingGroup.find(context.href_id(network_template.routing_group.href,
:routing_groups), context)
-    return network_config, routing_group
+    forwarding_group = CIMI::Model::ForwardingGroup.find(context.href_id(network_template.forwarding_group.href,
:forwarding_groups), context)
+    return network_config, forwarding_group
   end
 
   def self.get_by_value(request_body, type)
-- 
1.7.9.5


Mime
View raw message