vcloud-net_launcher 0.4.0 → 0.5.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/.gitignore +1 -0
- data/CHANGELOG.md +12 -0
- data/README.md +1 -34
- data/jenkins.sh +2 -12
- data/jenkins_tests.sh +32 -0
- data/lib/vcloud/net_launcher/net_launch.rb +0 -2
- data/lib/vcloud/net_launcher/version.rb +1 -1
- data/lib/vcloud/net_launcher.rb +0 -1
- data/spec/integration/net_launcher/net_launch_spec.rb +2 -2
- data/spec/integration/net_launcher/org_vdc_network_spec.rb +2 -2
- data/vcloud-net_launcher.gemspec +1 -1
- metadata +6 -7
- data/jenkins_integration_tests.sh +0 -12
- data/tools/fog_credentials.rb +0 -17
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## 0.5.0 (2014-08-08)
|
2
|
+
|
3
|
+
This release bumps the dependency to vCloud Core 0.9.0:
|
4
|
+
|
5
|
+
- New vcloud-login tool for fetching session tokens without the need to
|
6
|
+
store your password in a plaintext FOG_RC file.
|
7
|
+
- Deprecate the use of :vcloud_director_password in a plaintext FOG_RC
|
8
|
+
file. A warning will be printed to STDERR at load time. Please use
|
9
|
+
vcloud-login instead.
|
10
|
+
- This gem no longer directly references fog, instead using vCloud Core's
|
11
|
+
API for its interaction with the vCloud API.
|
12
|
+
|
1
13
|
## 0.4.0 (2014-07-25)
|
2
14
|
|
3
15
|
- Remove the command line option to enable fog mocking.
|
data/README.md
CHANGED
@@ -24,40 +24,7 @@ The form to run the command is
|
|
24
24
|
|
25
25
|
## Credentials
|
26
26
|
|
27
|
-
|
28
|
-
credentials that allow it to talk to a vCloud Director environment.
|
29
|
-
|
30
|
-
1. Create a '.fog' file in your home directory.
|
31
|
-
|
32
|
-
For example:
|
33
|
-
|
34
|
-
test_credentials:
|
35
|
-
vcloud_director_host: 'host.api.example.com'
|
36
|
-
vcloud_director_username: 'username@org_name'
|
37
|
-
vcloud_director_password: ''
|
38
|
-
|
39
|
-
2. Obtain a session token. First, curl the API:
|
40
|
-
|
41
|
-
curl -D- -d '' \
|
42
|
-
-H 'Accept: application/*+xml;version=5.1' -u '<username>@<org_name>' \
|
43
|
-
https://<host.api.example.com>/api/sessions
|
44
|
-
|
45
|
-
This will prompt for your password.
|
46
|
-
|
47
|
-
From the headers returned, the value of the `x-vcloud-authorization` header is your
|
48
|
-
session token, and this will be valid for 30 minutes idle - any activity will extend
|
49
|
-
its life by another 30 minutes.
|
50
|
-
|
51
|
-
3. Specify your credentials and session token at the beginning of the command. For example:
|
52
|
-
|
53
|
-
FOG_CREDENTIAL=test_credentials \
|
54
|
-
FOG_VCLOUD_TOKEN=AAAABBBBBCCCCCCDDDDDDEEEEEEFFFFF= \
|
55
|
-
vcloud-net-launch
|
56
|
-
|
57
|
-
You may find it easier to export one or both of the values as environment variables.
|
58
|
-
|
59
|
-
**NB** It is also possible to sidestep the need for the session token by saving your
|
60
|
-
password in the fog file. This is **not recommended**.
|
27
|
+
Please see the [vcloud-tools usage documentation](http://gds-operations.github.io/vcloud-tools/usage/).
|
61
28
|
|
62
29
|
##Supports
|
63
30
|
|
data/jenkins.sh
CHANGED
@@ -1,15 +1,5 @@
|
|
1
|
-
#!/bin/bash
|
1
|
+
#!/bin/bash
|
2
2
|
set -e
|
3
3
|
|
4
|
-
|
5
|
-
bundle install --path "${HOME}/bundles/${JOB_NAME}"
|
6
|
-
bundle exec rake
|
7
|
-
|
8
|
-
# Obtain the integration test parameters
|
9
|
-
git clone git@github.gds:gds/vcloud-tools-testing-config.git
|
10
|
-
mv vcloud-tools-testing-config/vcloud_tools_testing_config.yaml spec/integration/
|
11
|
-
rm -rf vcloud-tools-testing-config
|
12
|
-
|
13
|
-
RUBYOPT="-r ./tools/fog_credentials" bundle exec rake integration
|
14
|
-
|
4
|
+
./jenkins_tests.sh
|
15
5
|
bundle exec rake publish_gem
|
data/jenkins_tests.sh
ADDED
@@ -0,0 +1,32 @@
|
|
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
|
+
git clean -ffdx
|
20
|
+
bundle install --path "${HOME}/bundles/${JOB_NAME}"
|
21
|
+
bundle exec rake
|
22
|
+
|
23
|
+
# Obtain the integration test parameters
|
24
|
+
git clone git@github.gds:gds/vcloud-tools-testing-config.git
|
25
|
+
mv vcloud-tools-testing-config/vcloud_tools_testing_config.yaml spec/integration/
|
26
|
+
rm -rf vcloud-tools-testing-config
|
27
|
+
|
28
|
+
# Never log token to STDOUT.
|
29
|
+
set +x
|
30
|
+
eval $(printenv API_PASSWORD | bundle exec vcloud-login)
|
31
|
+
|
32
|
+
bundle exec rake integration
|
data/lib/vcloud/net_launcher.rb
CHANGED
@@ -40,9 +40,9 @@ module Vcloud
|
|
40
40
|
after(:each) do
|
41
41
|
unless ENV['VCLOUD_TOOLS_RSPEC_NO_DELETE_VAPP']
|
42
42
|
File.delete @minimum_data_yaml
|
43
|
-
|
43
|
+
api_interface = Vcloud::Core::ApiInterface.new
|
44
44
|
provisioned_network_id = @found_networks[0][:href].split('/').last
|
45
|
-
expect(
|
45
|
+
expect(api_interface.delete_network(provisioned_network_id)).to be(true)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
@@ -69,7 +69,7 @@ describe Vcloud::Core::OrgVdcNetwork do
|
|
69
69
|
|
70
70
|
after(:all) do
|
71
71
|
unless ENV['VCLOUD_TOOLS_RSPEC_NO_DELETE_ORG_VDC_NETWORK']
|
72
|
-
Vcloud::
|
72
|
+
Vcloud::Core::ApiInterface.new.delete_network(@net.id) if @net
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
@@ -140,7 +140,7 @@ describe Vcloud::Core::OrgVdcNetwork do
|
|
140
140
|
|
141
141
|
after(:all) do
|
142
142
|
unless ENV['VCLOUD_TOOLS_RSPEC_NO_DELETE_ORG_VDC_NETWORK']
|
143
|
-
Vcloud::
|
143
|
+
Vcloud::Core::ApiInterface.new.delete_network(@net.id) if @net
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
data/vcloud-net_launcher.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.required_ruby_version = '>= 1.9.3'
|
24
24
|
|
25
|
-
s.add_runtime_dependency 'vcloud-core', '~> 0.
|
25
|
+
s.add_runtime_dependency 'vcloud-core', '~> 0.9.0'
|
26
26
|
s.add_development_dependency 'gem_publisher', '1.2.0'
|
27
27
|
s.add_development_dependency 'pry'
|
28
28
|
s.add_development_dependency 'rake'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcloud-net_launcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.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-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: vcloud-core
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.9.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: 0.
|
29
|
+
version: 0.9.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: gem_publisher
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -158,7 +158,7 @@ files:
|
|
158
158
|
- bin/vcloud-net-launch
|
159
159
|
- examples/vcloud-net-launch/example-config.yaml
|
160
160
|
- jenkins.sh
|
161
|
-
-
|
161
|
+
- jenkins_tests.sh
|
162
162
|
- lib/vcloud/net_launcher.rb
|
163
163
|
- lib/vcloud/net_launcher/cli.rb
|
164
164
|
- lib/vcloud/net_launcher/net_launch.rb
|
@@ -175,7 +175,6 @@ files:
|
|
175
175
|
- spec/vcloud/net_launcher/cli_spec.rb
|
176
176
|
- spec/vcloud/net_launcher/net_launch_schema_spec.rb
|
177
177
|
- spec/vcloud/net_launcher/net_launch_spec.rb
|
178
|
-
- tools/fog_credentials.rb
|
179
178
|
- vcloud-net_launcher.gemspec
|
180
179
|
homepage: http://github.com/gds-operations/vcloud-net_launcher
|
181
180
|
licenses:
|
@@ -198,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
197
|
version: '0'
|
199
198
|
segments:
|
200
199
|
- 0
|
201
|
-
hash:
|
200
|
+
hash: 2206298197213467124
|
202
201
|
requirements: []
|
203
202
|
rubyforge_project:
|
204
203
|
rubygems_version: 1.8.23
|
@@ -1,12 +0,0 @@
|
|
1
|
-
#!/bin/bash -x
|
2
|
-
set -e
|
3
|
-
|
4
|
-
git clean -ffdx
|
5
|
-
bundle install --path "${HOME}/bundles/${JOB_NAME}"
|
6
|
-
|
7
|
-
# Obtain the integration test parameters
|
8
|
-
git clone git@github.gds:gds/vcloud-tools-testing-config.git
|
9
|
-
mv vcloud-tools-testing-config/vcloud_tools_testing_config.yaml spec/integration/
|
10
|
-
rm -rf vcloud-tools-testing-config
|
11
|
-
|
12
|
-
RUBYOPT="-r ./tools/fog_credentials" bundle exec rake integration
|
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
|
-
}
|