fog-vcloud-director 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 514a98d2a454438da4fe30d96a6d0cdad5c887bc
4
- data.tar.gz: 5ce51eedb33d580d41edc21112a4173816cdc7b9
3
+ metadata.gz: 913ed39261e178054786fdcb90f170cb43ca0c87
4
+ data.tar.gz: 9ea9e050da023be0d5b3e93f069e65c4dd2549ee
5
5
  SHA512:
6
- metadata.gz: 8fd4c6491d595e78692a39086e54a13d2f20e031d9f1d9b49bfaeafb11cc9505c76166c78d965bff459d65b0f5490d094a01c781b203b7886f351d9a9271a8a2
7
- data.tar.gz: 78a26f8829d2843dbd51bb6922ef13ab66b396c28ec1e88c1c6ce722c0ab8fea0505bd14ace2e7c040ca46ccbb07ef29182ef38d7afcb3513d162944d4aa100e
6
+ metadata.gz: 8956eb13998032800002dc62c0e6a0eb0076e3ec6f1ce61cc08758869ec23ed2e750c07000c2f49347eaea6bba0549f6fb6a0769a59e49a9ed3cb742168cabb4
7
+ data.tar.gz: 9e7838788a6667565cae3defb7e2ae69c1eca432144da0c611ab9cf862dbe3a36676728368707f18681e4c37a30662652b3b9907311a69339d2d1ece143404b2
@@ -44,18 +44,17 @@ module Fog
44
44
  options
45
45
  end
46
46
 
47
- def generate_instantiate_vapp_template_request(options ={})
48
-
47
+ def generate_instantiate_vapp_template_request(options ={})
49
48
  #overriding some params so they work with new standardised generator
50
- # options[:InstantiationParams] =
51
- # {
52
- # :NetworkConfig =>
53
- # [{
54
- # :networkName => options[:network_name],
55
- # :networkHref => options[:network_uri],
56
- # :fenceMode => 'bridged'
57
- # }]
58
- # } unless options[:InstantiationParams]
49
+ options[:InstantiationParams] =
50
+ {
51
+ :NetworkConfig =>
52
+ [{
53
+ :networkName => options[:network_name],
54
+ :networkHref => options[:network_uri],
55
+ # :fenceMode => "bridged"
56
+ }]
57
+ } unless options[:InstantiationParams]
59
58
  options[:name] = options.delete(:vapp_name) if options[:vapp_name]
60
59
  options[:Description] = options.delete(:description) unless options[:Description]
61
60
  if options[:vms_config] then
@@ -63,14 +62,9 @@ module Fog
63
62
  options[:source_vms].each_with_index {|vm, i|options[:source_vms][i][:StorageProfileHref] = options[:source_vms][i].delete(:storage_profile_href) }
64
63
  end
65
64
  options[:Source] = options.delete(:template_uri) if options[:template_uri]
66
-
67
-
65
+ options[:source_vms].each_with_index { |_, i| options[:source_vms][i][:href] = vapp_template_vm_end_point(options[:source_vms][i].delete(:vm_id)) if options[:source_vms][i].has_key?(:vm_id) }
68
66
 
69
-
70
67
  Fog::Generators::Compute::VcloudDirector::InstantiateVappTemplateParams.new(options).generate_xml
71
-
72
-
73
-
74
68
  end
75
69
 
76
70
  def xmlns
@@ -94,6 +88,10 @@ module Fog
94
88
  end_point + ( vapp_template_id ? "vAppTemplate/#{vapp_template_id}" : "vAppTemplate" )
95
89
  end
96
90
 
91
+ def vapp_template_vm_end_point(vm_id = nil)
92
+ end_point + ( vm_id ? "vAppTemplate/#{vm_id}" : "vAppTemplate" )
93
+ end
94
+
97
95
  def endpoint
98
96
  end_point
99
97
  end
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module VcloudDirector
3
- VERSION = "0.1.6".freeze
3
+ VERSION = "0.1.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-vcloud-director
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luka Zakrajšek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-22 00:00:00.000000000 Z
11
+ date: 2016-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
@@ -450,7 +450,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
450
450
  version: '0'
451
451
  requirements: []
452
452
  rubyforge_project:
453
- rubygems_version: 2.4.8
453
+ rubygems_version: 2.5.1
454
454
  signing_key:
455
455
  specification_version: 4
456
456
  summary: Module for the 'fog' gem to support vCloud Director.