vagrant-vcloud 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -4
- data/lib/vagrant-vcloud/action.rb +1 -0
- data/lib/vagrant-vcloud/action/build_vapp.rb +1 -1
- data/lib/vagrant-vcloud/action/forward_ports.rb +1 -1
- data/lib/vagrant-vcloud/action/handle_nat_port_collisions.rb +1 -1
- data/lib/vagrant-vcloud/action/read_ssh_info.rb +1 -1
- data/lib/vagrant-vcloud/action/read_state.rb +1 -1
- data/lib/vagrant-vcloud/action/unmap_port_forwardings.rb +1 -1
- data/lib/vagrant-vcloud/config.rb +4 -0
- data/lib/vagrant-vcloud/driver/base.rb +6 -0
- data/lib/vagrant-vcloud/driver/meta.rb +3 -0
- data/lib/vagrant-vcloud/driver/version_5_1.rb +61 -61
- data/lib/vagrant-vcloud/version.rb +1 -1
- metadata +31 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c063c6be550a2cc4edc377537aa3131e5151b7be
|
4
|
+
data.tar.gz: 6dc78ac5e15f8a82dd04cc096e309fa82f20665e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa89f867841f3aa6c3db196be9ba3731bef0387958c5c1de89f6bfc0dcb3bd657d351199deb70a7ed2ed93a1ab828d2b3bc5f36428767d2c327c7e704cb20f6a
|
7
|
+
data.tar.gz: 045e357b328c4ec61015865353009d2fec8fc4cc4b1f54b489fe9fc402510a0d2a64d1bc8af5973d93f94ccc94f57aa840d91785f7f9981750b14e31241055a2
|
data/README.md
CHANGED
@@ -1,9 +1,6 @@
|
|
1
|
-
[Vagrant](http://www.vagrantup.com) provider for VMware vCloud Director®
|
1
|
+
[Vagrant](http://www.vagrantup.com) provider for VMware vCloud Director® [](http://badge.fury.io/rb/vagrant-vcloud) [](https://codeclimate.com/github/frapposelli/vagrant-vcloud)
|
2
2
|
=============
|
3
3
|
|
4
|
-
[Version 0.4.3](../../releases/tag/v0.4.3) has been released!
|
5
|
-
-------------
|
6
|
-
|
7
4
|
Please note that this software is still Alpha/Beta quality and is not recommended for production usage.
|
8
5
|
|
9
6
|
We have a wide array of boxes available at [Vagrant Cloud](https://vagrantcloud.com/gosddc) you can use them directly or you can roll your own as you please, make sure to install VMware tools in it.
|
@@ -29,7 +29,7 @@ module VagrantPlugins
|
|
29
29
|
cfg = @env[:machine].provider_config
|
30
30
|
cnx = cfg.vcloud_cnx.driver
|
31
31
|
vapp_id = @env[:machine].get_vapp_id
|
32
|
-
vm_name = @env[:machine].name
|
32
|
+
vm_name = cfg.name ? cfg.name.to_sym : @env[:machine].name
|
33
33
|
|
34
34
|
# FIXME: why are we overriding this here ?
|
35
35
|
# It's already been taken care during the initial
|
@@ -43,7 +43,7 @@ module VagrantPlugins
|
|
43
43
|
vapp_id = env[:machine].get_vapp_id
|
44
44
|
|
45
45
|
@logger.debug('Getting VM info...')
|
46
|
-
vm_name = env[:machine].name
|
46
|
+
vm_name = cfg.name ? cfg.name.to_sym : env[:machine].name
|
47
47
|
vm = cnx.get_vapp(vapp_id)
|
48
48
|
vm_info = vm[:vms_hash][vm_name.to_sym]
|
49
49
|
|
@@ -42,7 +42,7 @@ module VagrantPlugins
|
|
42
42
|
cfg = env[:machine].provider_config
|
43
43
|
cnx = cfg.vcloud_cnx.driver
|
44
44
|
vapp_id = env[:machine].get_vapp_id
|
45
|
-
vm_name = env[:machine].name
|
45
|
+
vm_name = cfg.name ? cfg.name.to_sym : env[:machine].name
|
46
46
|
|
47
47
|
@logger.debug('Getting vApp information...')
|
48
48
|
vm = cnx.get_vapp(vapp_id)
|
@@ -19,7 +19,7 @@ module VagrantPlugins
|
|
19
19
|
cfg = env[:machine].provider_config
|
20
20
|
cnx = cfg.vcloud_cnx.driver
|
21
21
|
vapp_id = env[:machine].get_vapp_id
|
22
|
-
vm_name = env[:machine].name
|
22
|
+
vm_name = cfg.name ? cfg.name.to_sym : env[:machine].name
|
23
23
|
|
24
24
|
if env[:machine].id.nil?
|
25
25
|
@logger.info("VM [#{vm_name}] is not created yet")
|
@@ -31,7 +31,7 @@ module VagrantPlugins
|
|
31
31
|
cfg = env[:machine].provider_config
|
32
32
|
cnx = cfg.vcloud_cnx.driver
|
33
33
|
vapp_id = env[:machine].get_vapp_id
|
34
|
-
vm_name = env[:machine].name
|
34
|
+
vm_name = cfg.name ? cfg.name.to_sym : env[:machine].name
|
35
35
|
|
36
36
|
cfg.org = cnx.get_organization_by_name(cfg.org_name)
|
37
37
|
cfg.vdc_network_id = cfg.org[:networks][cfg.vdc_network_name]
|
@@ -288,6 +288,9 @@ module VagrantPlugins
|
|
288
288
|
# Create a new HTTP client
|
289
289
|
clnt = HTTPClient.new
|
290
290
|
|
291
|
+
# Set SSL proto to TLSv1
|
292
|
+
clnt.ssl_config.ssl_version = :TLSv1
|
293
|
+
|
291
294
|
# Disable SSL cert verification
|
292
295
|
clnt.ssl_config.verify_mode = (OpenSSL::SSL::VERIFY_NONE)
|
293
296
|
|
@@ -401,6 +404,9 @@ module VagrantPlugins
|
|
401
404
|
# Create a new HTTP client
|
402
405
|
clnt = HTTPClient.new
|
403
406
|
|
407
|
+
# Set SSL proto to TLSv1
|
408
|
+
clnt.ssl_config.ssl_version = :TLSv1
|
409
|
+
|
404
410
|
# Disable SSL cert verification
|
405
411
|
clnt.ssl_config.verify_mode = (OpenSSL::SSL::VERIFY_NONE)
|
406
412
|
|
@@ -123,6 +123,9 @@ module VagrantPlugins
|
|
123
123
|
# Create a new HTTP client
|
124
124
|
clnt = HTTPClient.new
|
125
125
|
|
126
|
+
# Set SSL proto to TLSv1
|
127
|
+
clnt.ssl_config.ssl_version = :TLSv1
|
128
|
+
|
126
129
|
# Disable SSL cert verification
|
127
130
|
clnt.ssl_config.verify_mode = (OpenSSL::SSL::VERIFY_NONE)
|
128
131
|
|
@@ -734,7 +734,7 @@ module VagrantPlugins
|
|
734
734
|
"VApp Task[operationName='vdcInstantiateVapp']"
|
735
735
|
).first
|
736
736
|
|
737
|
-
task_id = URI(task['href']).path.gsub(
|
737
|
+
task_id = URI(task['href']).path.gsub('/api/task/', '')
|
738
738
|
|
739
739
|
{ :vapp_id => vapp_id, :task_id => task_id }
|
740
740
|
end
|
@@ -750,76 +750,76 @@ module VagrantPlugins
|
|
750
750
|
# - network_config: hash of the network configuration for the vapp
|
751
751
|
def compose_vapp_from_vm(vdc, vapp_name, vapp_description, vm_list = {}, network_config = {})
|
752
752
|
builder = Nokogiri::XML::Builder.new do |xml|
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
753
|
+
xml.ComposeVAppParams(
|
754
|
+
'xmlns' => 'http://www.vmware.com/vcloud/v1.5',
|
755
|
+
'xmlns:ovf' => 'http://schemas.dmtf.org/ovf/envelope/1',
|
756
|
+
'name' => vapp_name,
|
757
|
+
'deploy' => 'false',
|
758
|
+
'powerOn' => 'false') {
|
759
|
+
xml.Description vapp_description
|
760
|
+
xml.InstantiationParams {
|
761
|
+
xml.NetworkConfigSection {
|
762
|
+
xml['ovf'].Info 'Configuration parameters for logical networks'
|
763
|
+
xml.NetworkConfig('networkName' => network_config[:name]) {
|
764
|
+
xml.Configuration {
|
765
|
+
if network_config[:fence_mode] != 'bridged'
|
766
|
+
xml.IpScopes {
|
767
|
+
xml.IpScope {
|
768
|
+
xml.IsInherited(network_config[:is_inherited] || 'false')
|
769
|
+
xml.Gateway network_config[:gateway]
|
770
|
+
xml.Netmask network_config[:netmask]
|
771
|
+
xml.Dns1 network_config[:dns1] if network_config[:dns1]
|
772
|
+
xml.Dns2 network_config[:dns2] if network_config[:dns2]
|
773
|
+
xml.DnsSuffix network_config[:dns_suffix] if network_config[:dns_suffix]
|
774
|
+
xml.IpRanges {
|
775
|
+
xml.IpRange {
|
776
|
+
xml.StartAddress network_config[:start_address]
|
777
|
+
xml.EndAddress network_config[:end_address]
|
778
|
+
}
|
778
779
|
}
|
779
780
|
}
|
780
781
|
}
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
782
|
+
end
|
783
|
+
xml.ParentNetwork("href" => "#{@api_url}/network/#{network_config[:parent_network]}")
|
784
|
+
xml.FenceMode network_config[:fence_mode]
|
785
|
+
if network_config[:fence_mode] != 'bridged'
|
786
|
+
xml.Features {
|
787
|
+
xml.FirewallService {
|
788
|
+
xml.IsEnabled(network_config[:enable_firewall] || "false")
|
789
|
+
}
|
790
|
+
xml.NatService {
|
791
|
+
xml.IsEnabled "true"
|
792
|
+
xml.NatType "portForwarding"
|
793
|
+
xml.Policy(network_config[:nat_policy_type] || "allowTraffic")
|
794
|
+
}
|
794
795
|
}
|
795
|
-
|
796
|
-
|
796
|
+
end
|
797
|
+
}
|
797
798
|
}
|
798
799
|
}
|
799
800
|
}
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
801
|
+
vm_list.each do |vm_name, vm_id|
|
802
|
+
xml.SourcedItem {
|
803
|
+
xml.Source('href' => "#{@api_url}/vAppTemplate/vm-#{vm_id}", 'name' => vm_name)
|
804
|
+
xml.InstantiationParams {
|
805
|
+
xml.NetworkConnectionSection(
|
806
|
+
'xmlns:ovf' => 'http://schemas.dmtf.org/ovf/envelope/1',
|
807
|
+
'type' => 'application/vnd.vmware.vcloud.networkConnectionSection+xml',
|
808
|
+
'href' => "#{@api_url}/vAppTemplate/vm-#{vm_id}/networkConnectionSection/") {
|
809
|
+
xml['ovf'].Info 'Network config for sourced item'
|
810
|
+
xml.PrimaryNetworkConnectionIndex '0'
|
811
|
+
xml.NetworkConnection('network' => network_config[:name]) {
|
812
|
+
xml.NetworkConnectionIndex '0'
|
813
|
+
xml.IsConnected 'true'
|
814
|
+
xml.IpAddressAllocationMode(network_config[:ip_allocation_mode] || 'POOL')
|
815
|
+
}
|
815
816
|
}
|
816
817
|
}
|
818
|
+
xml.NetworkAssignment('containerNetwork' => network_config[:name], 'innerNetwork' => network_config[:name])
|
817
819
|
}
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
xml.AllEULAsAccepted 'true'
|
822
|
-
}
|
820
|
+
end
|
821
|
+
xml.AllEULAsAccepted 'true'
|
822
|
+
}
|
823
823
|
end
|
824
824
|
|
825
825
|
params = {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-vcloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Rapposelli
|
@@ -9,174 +9,174 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 0.6.4
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 0.6.4
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: log4r
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - ~>
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: 1.1.10
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - ~>
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: 1.1.10
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: nokogiri
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - ~>
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '1.6'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - ~>
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '1.6'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: httpclient
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - ~>
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 2.3.4.1
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - ~>
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: 2.3.4.1
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: ruby-progressbar
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- - ~>
|
74
|
+
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: 1.1.1
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- - ~>
|
81
|
+
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: 1.1.1
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: netaddr
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - ~>
|
88
|
+
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: 1.5.0
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - ~>
|
95
|
+
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: 1.5.0
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: awesome_print
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - ~>
|
102
|
+
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: 1.2.0
|
105
105
|
type: :runtime
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- - ~>
|
109
|
+
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: 1.2.0
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: terminal-table
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- - ~>
|
116
|
+
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: 1.4.5
|
119
119
|
type: :runtime
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- - ~>
|
123
|
+
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: 1.4.5
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: rake
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- -
|
130
|
+
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: rspec-core
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
|
-
- - ~>
|
144
|
+
- - "~>"
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: 2.12.2
|
147
147
|
type: :development
|
148
148
|
prerelease: false
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- - ~>
|
151
|
+
- - "~>"
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: 2.12.2
|
154
154
|
- !ruby/object:Gem::Dependency
|
155
155
|
name: rspec-expectations
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- - ~>
|
158
|
+
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: 2.12.1
|
161
161
|
type: :development
|
162
162
|
prerelease: false
|
163
163
|
version_requirements: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
|
-
- - ~>
|
165
|
+
- - "~>"
|
166
166
|
- !ruby/object:Gem::Version
|
167
167
|
version: 2.12.1
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: rspec-mocks
|
170
170
|
requirement: !ruby/object:Gem::Requirement
|
171
171
|
requirements:
|
172
|
-
- - ~>
|
172
|
+
- - "~>"
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: 2.12.1
|
175
175
|
type: :development
|
176
176
|
prerelease: false
|
177
177
|
version_requirements: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
|
-
- - ~>
|
179
|
+
- - "~>"
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: 2.12.1
|
182
182
|
description: Enables Vagrant to manage machines with VMware vCloud Director®.
|
@@ -187,8 +187,8 @@ executables: []
|
|
187
187
|
extensions: []
|
188
188
|
extra_rdoc_files: []
|
189
189
|
files:
|
190
|
-
- .gitignore
|
191
|
-
- .rubocop.yml
|
190
|
+
- ".gitignore"
|
191
|
+
- ".rubocop.yml"
|
192
192
|
- Gemfile
|
193
193
|
- LICENSE
|
194
194
|
- README.md
|
@@ -253,19 +253,18 @@ require_paths:
|
|
253
253
|
- lib
|
254
254
|
required_ruby_version: !ruby/object:Gem::Requirement
|
255
255
|
requirements:
|
256
|
-
- -
|
256
|
+
- - ">="
|
257
257
|
- !ruby/object:Gem::Version
|
258
258
|
version: '0'
|
259
259
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
260
260
|
requirements:
|
261
|
-
- -
|
261
|
+
- - ">="
|
262
262
|
- !ruby/object:Gem::Version
|
263
263
|
version: '0'
|
264
264
|
requirements: []
|
265
265
|
rubyforge_project:
|
266
|
-
rubygems_version: 2.
|
266
|
+
rubygems_version: 2.0.14
|
267
267
|
signing_key:
|
268
268
|
specification_version: 4
|
269
269
|
summary: VMware vCloud Director® provider
|
270
270
|
test_files: []
|
271
|
-
has_rdoc:
|