vcloud-net_launcher 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  /Gemfile.lock
2
2
  /coverage/
3
3
  spec/integration/vcloud_tools_testing_config.yaml
4
+ .yardoc/
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
- vCloud Net Launcher is based around [fog](http://fog.io/). To use it you'll need to give it
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 -x
1
+ #!/bin/bash
2
2
  set -e
3
3
 
4
- git clean -ffdx
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
@@ -1,5 +1,3 @@
1
- require 'fog'
2
-
3
1
  module Vcloud
4
2
  module NetLauncher
5
3
  class NetLaunch
@@ -1,5 +1,5 @@
1
1
  module Vcloud
2
2
  module NetLauncher
3
- VERSION = '0.4.0'
3
+ VERSION = '0.5.0'
4
4
  end
5
5
  end
@@ -8,7 +8,6 @@ require 'pp'
8
8
 
9
9
  require 'vcloud/net_launcher/version'
10
10
 
11
- require 'vcloud/fog'
12
11
  require 'vcloud/core'
13
12
 
14
13
  require 'vcloud/net_launcher/cli'
@@ -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
- fog_interface = Vcloud::Fog::ServiceInterface.new
43
+ api_interface = Vcloud::Core::ApiInterface.new
44
44
  provisioned_network_id = @found_networks[0][:href].split('/').last
45
- expect(fog_interface.delete_network(provisioned_network_id)).to be(true)
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::Fog::ServiceInterface.new.delete_network(@net.id) if @net
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::Fog::ServiceInterface.new.delete_network(@net.id) if @net
143
+ Vcloud::Core::ApiInterface.new.delete_network(@net.id) if @net
144
144
  end
145
145
  end
146
146
 
@@ -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.6.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.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-07-25 00:00:00.000000000 Z
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.6.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.6.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
- - jenkins_integration_tests.sh
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: 792051475262227984
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
@@ -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
- }