You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2013/02/20 01:46:46 UTC
[1/2] git commit: CIMI webapp: changed routing_group to
forwarding_group
CIMI webapp: changed routing_group to forwarding_group
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/ac171276
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/ac171276
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/ac171276
Branch: refs/heads/master
Commit: ac171276ea88382bafdf43ad685172d5eee9d0be
Parents: dde256a
Author: NjeriChelimo <ma...@gmail.com>
Authored: Mon Feb 18 15:27:00 2013 +0300
Committer: David Lutterkort <lu...@redhat.com>
Committed: Tue Feb 19 16:32:18 2013 -0800
----------------------------------------------------------------------
server/lib/cimi/models/network.rb | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/ac171276/server/lib/cimi/models/network.rb
----------------------------------------------------------------------
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)