bosh_vsphere_cpi 1.2546.0 → 1.2549.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/vsphere_cpi +5 -2
- data/lib/cloud/vsphere/client.rb +8 -5
- data/lib/cloud/vsphere/config.rb +18 -18
- data/lib/cloud/vsphere/version.rb +1 -1
- metadata +8 -8
data/bin/vsphere_cpi
CHANGED
@@ -33,8 +33,11 @@ Bosh::Clouds::Config.configure(OpenStruct.new(
|
|
33
33
|
db: db,
|
34
34
|
))
|
35
35
|
|
36
|
-
|
36
|
+
cloud_properties = cpi_config['cloud']['properties']
|
37
|
+
cloud_properties['soap_log'] = StringIO.new
|
37
38
|
|
38
|
-
|
39
|
+
cpi = Bosh::Clouds::VSphere.new(cloud_properties)
|
40
|
+
|
41
|
+
cli = Bosh::Cpi::Cli.new(cpi, cloud_properties['soap_log'], STDOUT)
|
39
42
|
|
40
43
|
cli.run(ARGF.read)
|
data/lib/cloud/vsphere/client.rb
CHANGED
@@ -15,20 +15,23 @@ module VSphereCloud
|
|
15
15
|
|
16
16
|
def initialize(host, options = {})
|
17
17
|
http_client = HTTPClient.new
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
soap_log = options['soap_log']
|
19
|
+
case soap_log
|
20
|
+
when String
|
21
|
+
log_file = File.open(soap_log, 'w')
|
21
22
|
log_file.sync = true
|
22
23
|
http_client.debug_dev = log_file
|
24
|
+
when IO, StringIO
|
25
|
+
http_client.debug_dev = soap_log
|
23
26
|
end
|
24
27
|
http_client.send_timeout = 14400
|
25
28
|
http_client.receive_timeout = 14400
|
26
29
|
http_client.connect_timeout = 4
|
27
30
|
http_client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
28
31
|
|
29
|
-
@soap_stub = Soap::StubAdapter.new(host,
|
32
|
+
@soap_stub = Soap::StubAdapter.new(host, 'vim.version.version6', http_client)
|
30
33
|
|
31
|
-
@service_instance = Vim::ServiceInstance.new(
|
34
|
+
@service_instance = Vim::ServiceInstance.new('ServiceInstance', soap_stub)
|
32
35
|
@service_content = service_instance.content
|
33
36
|
@metrics_cache = {}
|
34
37
|
@lock = Mutex.new
|
data/lib/cloud/vsphere/config.rb
CHANGED
@@ -148,27 +148,27 @@ module VSphereCloud
|
|
148
148
|
schema = Membrane::SchemaParser.parse do
|
149
149
|
{
|
150
150
|
'agent' => dict(String, Object), # passthrough to the agent
|
151
|
-
optional('cpi_log') => String,
|
152
|
-
optional('soap_log') => String,
|
151
|
+
optional('cpi_log') => enum(String, Object),
|
152
|
+
optional('soap_log') => enum(String, Object),
|
153
153
|
optional('mem_overcommit_ratio') => Numeric,
|
154
154
|
optional('copy_disks') => bool,
|
155
155
|
'vcenters' => [{
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
156
|
+
'host' => String,
|
157
|
+
'user' => String,
|
158
|
+
'password' => String,
|
159
|
+
'datacenters' => [{
|
160
|
+
'name' => String,
|
161
|
+
'vm_folder' => String,
|
162
|
+
'template_folder' => String,
|
163
|
+
optional('use_sub_folder') => bool,
|
164
|
+
'disk_path' => String,
|
165
|
+
'datastore_pattern' => String,
|
166
|
+
'persistent_datastore_pattern' => String,
|
167
|
+
optional('allow_mixed_datastores') => bool,
|
168
|
+
'clusters' => [enum(String,
|
169
|
+
dict(String, { 'resource_pool' => String }))]
|
170
|
+
}]
|
171
|
+
}]
|
172
172
|
}
|
173
173
|
end
|
174
174
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh_vsphere_cpi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2549.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bosh_common
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.2549.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.2549.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: bosh_cpi
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 1.
|
37
|
+
version: 1.2549.0
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.
|
45
|
+
version: 1.2549.0
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: membrane
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,7 +173,7 @@ dependencies:
|
|
173
173
|
version: '0'
|
174
174
|
description: ! 'BOSH VSphere CPI
|
175
175
|
|
176
|
-
|
176
|
+
0d3835'
|
177
177
|
email: support@cloudfoundry.com
|
178
178
|
executables:
|
179
179
|
- vsphere_cpi
|
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
257
257
|
version: '0'
|
258
258
|
segments:
|
259
259
|
- 0
|
260
|
-
hash:
|
260
|
+
hash: 3279731338419233172
|
261
261
|
requirements: []
|
262
262
|
rubyforge_project:
|
263
263
|
rubygems_version: 1.8.23
|