From e8bcf413e1b6953f8a4af1269f5a121cd7bef348 Mon Sep 17 00:00:00 2001 From: Chirag Jog Date: Sat, 2 Feb 2013 12:08:33 +0530 Subject: [PATCH] Fix Params related to network configuration --- .../requests/compute/instantiate_vapp_template.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb b/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb index 7683f98a4..a1ecc0b03 100644 --- a/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb +++ b/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb @@ -10,7 +10,7 @@ module Fog 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 @@ module Fog 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 @@ module Fog 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,