bosh_vcloud_cpi 0.11.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/lib/cloud/vcloud/steps/save_agent_env.rb +7 -4
- data/lib/cloud/vcloud/steps/stemcell_info.rb +4 -2
- metadata +7 -10
- data/lib/cloud/vcloud/version.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b76d0b8d822089eeb0bbb208ef9852e8f603ae85
|
4
|
+
data.tar.gz: 65515e75dcb915ee3c625463591d496126ede813
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36b47a7f7b0be4a0f5d55e9b44d8ca79a6c69cea568f32ed378a1c48876149e5a3e028bedbf65a64692754ee2d7a50ad69dfe3e4d72012aa755c6cf05667cc4e
|
7
|
+
data.tar.gz: 50a4ea6a31b4a10651e86f11f58111b9779117b9fbdebbd38ebbca2212377556e642e24ce3bfc206ee85f1f7875ecd8a3bb110f2985232c0e298fd6080051601
|
data/README.md
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
require 'common/common'
|
2
2
|
require 'yajl'
|
3
|
+
require 'open3'
|
3
4
|
|
4
5
|
module VCloudCloud
|
5
6
|
module Steps
|
6
7
|
class SaveAgentEnv < Step
|
8
|
+
NO_ERROR_SHELL_OUTPUT_HACK = 'no-error'
|
9
|
+
|
7
10
|
def perform(&block)
|
8
11
|
vm = client.reload state[:vm]
|
9
12
|
metadata_link = "#{vm.metadata_link.href}/#{state[:env_metadata_key]}"
|
@@ -16,11 +19,11 @@ module VCloudCloud
|
|
16
19
|
env_path = File.join tmpdir, 'env'
|
17
20
|
iso_path = File.join tmpdir, 'env.iso'
|
18
21
|
File.open(env_path, 'w') { |f| f.write env_json }
|
19
|
-
command = "#{create_iso_cmd} -o #{iso_path} #{env_path} 2>&1"
|
20
|
-
|
21
|
-
message = "command `#{command}`:
|
22
|
+
command = "#{create_iso_cmd} -o #{iso_path} #{env_path} 2>&1 && >&2 printf #{NO_ERROR_SHELL_OUTPUT_HACK}"
|
23
|
+
_, stdout, stderr = Open3.popen3("#{command}")
|
24
|
+
message = "command `#{command}`: output `#{stdout.readlines}`"
|
22
25
|
@logger.debug message
|
23
|
-
raise message unless
|
26
|
+
raise message unless stderr.readlines.include? NO_ERROR_SHELL_OUTPUT_HACK
|
24
27
|
|
25
28
|
metadata = VCloudSdk::Xml::WrapperFactory.create_instance 'MetadataValue'
|
26
29
|
metadata.value = env_json
|
@@ -4,8 +4,10 @@ module VCloudCloud
|
|
4
4
|
def perform(image, &block)
|
5
5
|
tmpdir = state[:stemcell_dir] = Dir.mktmpdir
|
6
6
|
# examine files in the tarball
|
7
|
-
|
8
|
-
|
7
|
+
_, stderr, status = Open3.capture3("tar -C #{tmpdir} -xzf #{File.absolute_path(image)}")
|
8
|
+
|
9
|
+
raise "Invalid stemcell image: #{stderr}" unless status.success?
|
10
|
+
|
9
11
|
files = Dir.glob File.join(tmpdir, '*.ovf')
|
10
12
|
# stemcell should only include one .ovf file
|
11
13
|
raise "Invalid stemcell image: having #{files.length} .ovf files" if files.length != 1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh_vcloud_cpi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- VMware
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bosh_common
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: httpclient
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 2.
|
75
|
+
version: 2.7.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 2.
|
82
|
+
version: 2.7.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rest-client
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,9 +122,7 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
description:
|
126
|
-
BOSH vCloud CPI
|
127
|
-
3754cd
|
125
|
+
description: BOSH vCloud CPI
|
128
126
|
email: support@cloudfoundry.com
|
129
127
|
executables: []
|
130
128
|
extensions: []
|
@@ -164,7 +162,6 @@ files:
|
|
164
162
|
- lib/cloud/vcloud/steps/upload_media_files.rb
|
165
163
|
- lib/cloud/vcloud/steps/upload_template_files.rb
|
166
164
|
- lib/cloud/vcloud/vcd_client.rb
|
167
|
-
- lib/cloud/vcloud/version.rb
|
168
165
|
- lib/cloud/vcloud/xml/constants.rb
|
169
166
|
- lib/cloud/vcloud/xml/wrapper.rb
|
170
167
|
- lib/cloud/vcloud/xml/wrapper_classes/admin_catalog.rb
|