vcloud-walker 3.2.3 → 3.3.0
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.
- data/CHANGELOG.md +10 -0
- data/README.md +1 -35
- data/jenkins.sh +2 -9
- data/jenkins_tests.sh +29 -0
- data/lib/vcloud/walker/version.rb +1 -1
- data/vcloud-walker.gemspec +1 -1
- metadata +6 -7
- data/jenkins_integration_tests.sh +0 -5
- data/tools/fog_credentials.rb +0 -17
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## 3.3.0 (2014-08-08)
|
2
|
+
|
3
|
+
Depend on vCloud Core version 0.7.0, which:
|
4
|
+
|
5
|
+
- Includes a new vcloud-login tool for fetching session tokens without the
|
6
|
+
need to store your password in a plaintext FOG_RC file.
|
7
|
+
- Deprecates the use of :vcloud_director_password in a plaintext FOG_RC file.
|
8
|
+
A warning will be printed to STDERR at load time. Please use vcloud-login
|
9
|
+
instead.
|
10
|
+
|
1
11
|
## 3.2.3 (2014-07-14)
|
2
12
|
|
3
13
|
Bugfixes:
|
data/README.md
CHANGED
@@ -52,41 +52,7 @@ networks and vdcs within an organization.
|
|
52
52
|
|
53
53
|
## Credentials
|
54
54
|
|
55
|
-
|
56
|
-
credentials that allow it to talk to a vCloud Director environment.
|
57
|
-
|
58
|
-
1. Create a '.fog' file in your home directory.
|
59
|
-
|
60
|
-
For example:
|
61
|
-
|
62
|
-
test_credentials:
|
63
|
-
vcloud_director_host: 'host.api.example.com'
|
64
|
-
vcloud_director_username: 'username@org_name'
|
65
|
-
vcloud_director_password: ''
|
66
|
-
|
67
|
-
2. Obtain a session token. First, curl the API:
|
68
|
-
|
69
|
-
curl -D- -d '' \
|
70
|
-
-H 'Accept: application/*+xml;version=5.1' -u '<username>@<org_name>' \
|
71
|
-
https://<host.api.example.com>/api/sessions
|
72
|
-
|
73
|
-
This will prompt for your password.
|
74
|
-
|
75
|
-
From the headers returned, the value of the `x-vcloud-authorization` header is your
|
76
|
-
session token, and this will be valid for 30 minutes idle - any activity will extend
|
77
|
-
its life by another 30 minutes.
|
78
|
-
|
79
|
-
3. Specify your credentials and session token at the beginning of the command. For example:
|
80
|
-
|
81
|
-
FOG_CREDENTIAL=test_credentials \
|
82
|
-
FOG_VCLOUD_TOKEN=AAAABBBBBCCCCCCDDDDDDEEEEEEFFFFF= \
|
83
|
-
vcloud-walk organization
|
84
|
-
|
85
|
-
You may find it easier to export one or both of the values as environment variables.
|
86
|
-
|
87
|
-
**NB** It is also possible to sidestep the need for the session token by saving your
|
88
|
-
password in the fog file. This is **not recommended**.
|
89
|
-
|
55
|
+
Please see the [vcloud-tools usage documentation](http://gds-operations.github.io/vcloud-tools/usage/).
|
90
56
|
|
91
57
|
### Output
|
92
58
|
|
data/jenkins.sh
CHANGED
@@ -1,12 +1,5 @@
|
|
1
|
-
#!/bin/bash
|
1
|
+
#!/bin/bash
|
2
2
|
set -e
|
3
3
|
|
4
|
-
|
5
|
-
git clean -fdx
|
6
|
-
|
7
|
-
bundle install --path "${HOME}/bundles/${JOB_NAME}"
|
8
|
-
bundle exec rake
|
9
|
-
|
10
|
-
RUBYOPT="-r ./tools/fog_credentials" bundle exec rake integration
|
11
|
-
|
4
|
+
./jenkins_tests.sh
|
12
5
|
bundle exec rake publish_gem
|
data/jenkins_tests.sh
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
set -eu
|
3
|
+
|
4
|
+
function cleanup {
|
5
|
+
rm $FOG_RC
|
6
|
+
}
|
7
|
+
|
8
|
+
# Override default of ~/.fog and delete afterwards.
|
9
|
+
export FOG_RC=$(mktemp /tmp/vcloud_fog_rc.XXXXXXXXXX)
|
10
|
+
trap cleanup EXIT
|
11
|
+
|
12
|
+
cat <<EOF >${FOG_RC}
|
13
|
+
${FOG_CREDENTIAL}:
|
14
|
+
vcloud_director_host: '${API_HOST}'
|
15
|
+
vcloud_director_username: '${API_USERNAME}'
|
16
|
+
vcloud_director_password: ''
|
17
|
+
EOF
|
18
|
+
|
19
|
+
rm -f Gemfile.lock
|
20
|
+
git clean -fdx
|
21
|
+
|
22
|
+
bundle install --path "${HOME}/bundles/${JOB_NAME}"
|
23
|
+
bundle exec rake
|
24
|
+
|
25
|
+
# Never log token to STDOUT.
|
26
|
+
set +x
|
27
|
+
eval $(printenv API_PASSWORD | bundle exec vcloud-login)
|
28
|
+
|
29
|
+
bundle exec rake integration
|
data/vcloud-walker.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.add_runtime_dependency 'fog', '>= 1.21.0'
|
24
24
|
s.add_runtime_dependency 'json', '~> 1.8.0'
|
25
|
-
s.add_runtime_dependency 'vcloud-core', '~> 0.
|
25
|
+
s.add_runtime_dependency 'vcloud-core', '~> 0.7.0'
|
26
26
|
s.add_development_dependency 'gem_publisher', '1.2.0'
|
27
27
|
s.add_development_dependency 'json_spec', '~> 1.1.1'
|
28
28
|
s.add_development_dependency 'rake'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcloud-walker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.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-
|
12
|
+
date: 2014-08-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.
|
53
|
+
version: 0.7.0
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.7.0
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: gem_publisher
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,7 +194,7 @@ files:
|
|
194
194
|
- docs/examples/networks.json
|
195
195
|
- docs/examples/vdcs.json
|
196
196
|
- jenkins.sh
|
197
|
-
-
|
197
|
+
- jenkins_tests.sh
|
198
198
|
- lib/vcloud/walker.rb
|
199
199
|
- lib/vcloud/walker/cli.rb
|
200
200
|
- lib/vcloud/walker/fog_interface.rb
|
@@ -229,7 +229,6 @@ files:
|
|
229
229
|
- spec/vcloud/walker/resource/vdcs_spec.rb
|
230
230
|
- spec/vcloud/walker/resource/vm_spec.rb
|
231
231
|
- spec/vcloud/walker_spec.rb
|
232
|
-
- tools/fog_credentials.rb
|
233
232
|
- vcloud-walker.gemspec
|
234
233
|
homepage: https://github.com/gds-operations/vcloud-walker
|
235
234
|
licenses:
|
@@ -252,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
251
|
version: '0'
|
253
252
|
segments:
|
254
253
|
- 0
|
255
|
-
hash:
|
254
|
+
hash: -2616587424835710718
|
256
255
|
requirements: []
|
257
256
|
rubyforge_project:
|
258
257
|
rubygems_version: 1.8.23
|
data/tools/fog_credentials.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# Initialiser for getting vCloud credentials into Fog from Jenkins build
|
2
|
-
# parameters, without needing to write them to disk. To be used with:
|
3
|
-
#
|
4
|
-
# RUBYOPT="-r ./tools/fog_credentials" bundle exec integration
|
5
|
-
#
|
6
|
-
# Replace with FOG_VCLOUD_TOKEN support when we have a tool:
|
7
|
-
#
|
8
|
-
# https://www.pivotaltracker.com/story/show/68989754
|
9
|
-
#
|
10
|
-
require 'bundler/setup'
|
11
|
-
require 'fog'
|
12
|
-
|
13
|
-
Fog.credentials = {
|
14
|
-
:vcloud_director_host => ENV['API_HOST'],
|
15
|
-
:vcloud_director_username => ENV['API_USERNAME'],
|
16
|
-
:vcloud_director_password => ENV['API_PASSWORD'],
|
17
|
-
}
|