Permalink
Browse files

Fix Params related to network configuration

  • Loading branch information...
1 parent 1052a24 commit e27b2eec64db400dd1c1b070b62382269c07b363 @chirag-jog chirag-jog committed Feb 2, 2013
Showing with 9 additions and 4 deletions.
  1. +9 −4 lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb
View
13 lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb
@@ -10,7 +10,7 @@ def validate_instantiate_vapp_template_options options
unless valid_opts.all? { |opt| options.has_key?(opt) }
raise ArgumentError.new("Required data missing: #{(valid_opts - options.keys).map(&:inspect).join(", ")}")
end
-
+
catalog_item_uri = options[:catalog_item_uri]
# Figure out the template_uri
@@ -49,8 +49,13 @@ def generate_instantiate_vapp_template_request(options)
if options[:network_uri]
# TODO - implement properly
xml.NetworkConfigSection {
- xml.NetworkConfig {
- xml.NetworkAssociation( :href => options[:network_uri] )
+ xml.tag!("ovf:Info"){ "Configuration parameters for logical networks" }
+ xml.NetworkConfig("networkName" => options[:network_name]) {
+ # xml.NetworkAssociation( :href => options[:network_uri] )
+ xml.Configuration {
+ xml.ParentNetwork("name" => options[:network_name], "href" => options[:network_uri])
+ xml.FenceMode("bridged")
+ }
}
}
end
@@ -67,7 +72,7 @@ class Real
def instantiate_vapp_template options = {}
validate_instantiate_vapp_template_options options
-
+ puts "XML Request: #{generate_instantiate_vapp_template_request(options)}"
request(
:body => generate_instantiate_vapp_template_request(options),
:expects => 201,

0 comments on commit e27b2ee

Please sign in to comment.