vcloud-net_launcher 0.0.1 → 0.0.2
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 +0 -1
- data/CHANGELOG.md +9 -0
- data/README.md +44 -3
- data/Rakefile +8 -10
- data/lib/vcloud/net_launcher/version.rb +1 -1
- data/vcloud-net_launcher.gemspec +4 -3
- metadata +43 -26
data/.gitignore
CHANGED
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -19,9 +19,17 @@ Or install it yourself as:
|
|
19
19
|
|
20
20
|
## Usage
|
21
21
|
|
22
|
-
|
22
|
+
The form to run the command is
|
23
|
+
vcloud-net-launch networks.yaml
|
23
24
|
|
24
|
-
|
25
|
+
### Credentials
|
26
|
+
|
27
|
+
vCloud Net Launcher is based around [fog]. To use it you'll need to give it credentials that allow it to talk to a VMware
|
28
|
+
environment. Fog offers two ways to do this.
|
29
|
+
|
30
|
+
#### 1. Create a `.fog` file containing your credentials
|
31
|
+
|
32
|
+
To use this method, you need a `.fog` file in your home directory.
|
25
33
|
|
26
34
|
For example:
|
27
35
|
|
@@ -44,10 +52,36 @@ Unfortunately current usage of fog requires the password in this file. Multiple
|
|
44
52
|
|
45
53
|
You can then pass the `FOG_CREDENTIAL` environment variable at the start of your command. The value of the `FOG_CREDENTIAL` environment variable is the name of the credential set in your fog file which you wish to use. For instance:
|
46
54
|
|
47
|
-
FOG_CREDENTIAL=test2 vcloud-net-launch
|
55
|
+
FOG_CREDENTIAL=test2 vcloud-net-launch networks.yaml
|
56
|
+
|
57
|
+
To understand more about `.fog` files, visit the 'Credentials' section here => http://fog.io/about/getting_started.html.
|
48
58
|
|
49
59
|
An example configuration file is located in [examples/vcloud-net-launch][example_yaml]
|
50
60
|
|
61
|
+
#### 2. Log on externally and supply your session token
|
62
|
+
|
63
|
+
You can choose to log on externally by interacting independently with the API and supplying your session token to the
|
64
|
+
tool by setting the `FOG_VCLOUD_TOKEN` ENV variable. This option reduces the risk footprint by allowing the user to
|
65
|
+
store their credentials in safe storage. The default token lifetime is '30 minutes idle' - any activity extends the life by another 30 mins.
|
66
|
+
|
67
|
+
A basic example of this would be the following:
|
68
|
+
|
69
|
+
curl
|
70
|
+
-D-
|
71
|
+
-d ''
|
72
|
+
-H 'Accept: application/*+xml;version=5.1' -u '<user>@<org>'
|
73
|
+
https://host.com/api/sessions
|
74
|
+
|
75
|
+
This will prompt for your password.
|
76
|
+
|
77
|
+
From the headers returned, select the header below
|
78
|
+
|
79
|
+
x-vcloud-authorization: AAAABBBBBCCCCCCDDDDDDEEEEEEFFFFF=
|
80
|
+
|
81
|
+
Use token as ENV var FOG_VCLOUD_TOKEN
|
82
|
+
|
83
|
+
FOG_VCLOUD_TOKEN=AAAABBBBBCCCCCCDDDDDDEEEEEEFFFFF= vcloud-net-launch networks.yaml
|
84
|
+
|
51
85
|
|
52
86
|
##Supports
|
53
87
|
|
@@ -76,6 +110,12 @@ will need to be removed from the file before it is corrected and run again.
|
|
76
110
|
|
77
111
|
vCloud Net Launcher uses vCloud Core. If you want to use the latest version of vCloud Core, or a local version, you can export some variables. See the Gemfile for details.
|
78
112
|
|
113
|
+
## Debugging
|
114
|
+
|
115
|
+
`export EXCON_DEBUG=true` - this will print out the API requests and responses.
|
116
|
+
|
117
|
+
`export DEBUG=true` - this will show you the stack trace when there is an exception instead of just the message.
|
118
|
+
|
79
119
|
## Testing
|
80
120
|
|
81
121
|
Default target: `bundle exec rake` runs the integration tests.
|
@@ -101,4 +141,5 @@ The easiest thing to do is create a local shell script called
|
|
101
141
|
Then run this before you run the integration tests.
|
102
142
|
|
103
143
|
[example_yaml]: ../examples/vcloud-net-launch/
|
144
|
+
[fog]: http://fog.io/
|
104
145
|
|
data/Rakefile
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
require 'cucumber/rake/task'
|
2
2
|
require 'rspec/core/rake_task'
|
3
|
+
require 'gem_publisher'
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
Cucumber::Rake::Task.new(:features) do |t|
|
7
|
-
t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty --no-source -x"
|
8
|
-
t.fork = false
|
9
|
-
end
|
5
|
+
task :default => [:feature]
|
10
6
|
|
11
7
|
RSpec::Core::RakeTask.new(:spec) do |task|
|
12
8
|
# Set a bogus Fog credential, otherwise it's possible for the unit
|
@@ -16,13 +12,15 @@ RSpec::Core::RakeTask.new(:spec) do |task|
|
|
16
12
|
task.pattern = FileList['spec/vcloud/**/*_spec.rb']
|
17
13
|
end
|
18
14
|
|
19
|
-
|
20
|
-
t.
|
15
|
+
Cucumber::Rake::Task.new(:feature) do |t|
|
16
|
+
t.cucumber_opts = "--format pretty --no-source"
|
17
|
+
t.fork = false
|
21
18
|
end
|
22
19
|
|
23
|
-
|
20
|
+
RSpec::Core::RakeTask.new(:integration) do |t|
|
21
|
+
t.pattern = FileList['spec/integration/**/*_spec.rb']
|
22
|
+
end
|
24
23
|
|
25
|
-
require "gem_publisher"
|
26
24
|
task :publish_gem do |t|
|
27
25
|
gem = GemPublisher.publish_if_updated("vcloud-net_launcher.gemspec", :rubygems)
|
28
26
|
puts "Published #{gem}" if gem
|
data/vcloud-net_launcher.gemspec
CHANGED
@@ -22,11 +22,12 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.required_ruby_version = '>= 1.9.2'
|
24
24
|
|
25
|
-
s.add_runtime_dependency 'vcloud-core', '>= 0.0.9'
|
26
25
|
s.add_runtime_dependency 'methadone'
|
27
|
-
s.
|
28
|
-
s.add_development_dependency '
|
26
|
+
s.add_runtime_dependency 'vcloud-core', '>= 0.0.12'
|
27
|
+
s.add_development_dependency 'aruba', '~> 0.5.3'
|
29
28
|
s.add_development_dependency 'cucumber', '~> 1.3.10'
|
30
29
|
s.add_development_dependency 'gem_publisher', '1.2.0'
|
30
|
+
s.add_development_dependency 'rake'
|
31
|
+
s.add_development_dependency 'rspec', '~> 2.14.1'
|
31
32
|
end
|
32
33
|
|
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.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,24 +9,8 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: vcloud-core
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 0.0.9
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.0.9
|
30
14
|
- !ruby/object:Gem::Dependency
|
31
15
|
name: methadone
|
32
16
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,29 +28,29 @@ dependencies:
|
|
44
28
|
- !ruby/object:Gem::Version
|
45
29
|
version: '0'
|
46
30
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
31
|
+
name: vcloud-core
|
48
32
|
requirement: !ruby/object:Gem::Requirement
|
49
33
|
none: false
|
50
34
|
requirements:
|
51
35
|
- - ! '>='
|
52
36
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
54
|
-
type: :
|
37
|
+
version: 0.0.12
|
38
|
+
type: :runtime
|
55
39
|
prerelease: false
|
56
40
|
version_requirements: !ruby/object:Gem::Requirement
|
57
41
|
none: false
|
58
42
|
requirements:
|
59
43
|
- - ! '>='
|
60
44
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
45
|
+
version: 0.0.12
|
62
46
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
47
|
+
name: aruba
|
64
48
|
requirement: !ruby/object:Gem::Requirement
|
65
49
|
none: false
|
66
50
|
requirements:
|
67
51
|
- - ~>
|
68
52
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
53
|
+
version: 0.5.3
|
70
54
|
type: :development
|
71
55
|
prerelease: false
|
72
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,7 +58,7 @@ dependencies:
|
|
74
58
|
requirements:
|
75
59
|
- - ~>
|
76
60
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
61
|
+
version: 0.5.3
|
78
62
|
- !ruby/object:Gem::Dependency
|
79
63
|
name: cucumber
|
80
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,6 +91,38 @@ dependencies:
|
|
107
91
|
- - '='
|
108
92
|
- !ruby/object:Gem::Version
|
109
93
|
version: 1.2.0
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rake
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: rspec
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 2.14.1
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 2.14.1
|
110
126
|
description: Tool to launch and configure vCloud networks. Uses vcloud-core.
|
111
127
|
email:
|
112
128
|
- anna.shipman@digital.cabinet-office.gov.uk
|
@@ -116,6 +132,7 @@ extensions: []
|
|
116
132
|
extra_rdoc_files: []
|
117
133
|
files:
|
118
134
|
- .gitignore
|
135
|
+
- CHANGELOG.md
|
119
136
|
- Gemfile
|
120
137
|
- LICENSE.txt
|
121
138
|
- README.md
|
@@ -161,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
178
|
version: '0'
|
162
179
|
segments:
|
163
180
|
- 0
|
164
|
-
hash: -
|
181
|
+
hash: -2726991851897498986
|
165
182
|
requirements: []
|
166
183
|
rubyforge_project:
|
167
184
|
rubygems_version: 1.8.23
|