cloudstack-cli 1.6.4 → 1.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/LICENSE.txt +2 -2
- data/README.md +8 -1
- data/cloudstack-cli.gemspec +1 -1
- data/lib/cloudstack-cli/version.rb +1 -1
- data/spec/cloudstack-cli/commands/template_spec.rb +18 -0
- data/spec/cloudstack-cli/commands/virtual_machine_spec.rb +16 -12
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e60a497f475714aec6cb18b1bb67afcf390c5bb2b2f7007cb735652b4a10f166
|
4
|
+
data.tar.gz: cd34143fd86f142f5a2370bd26eefa076853335725dcf22931a1b8a82fb6e23f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dc8845f82bce05e0442cb3c0213e65fa608b0c063299b601b0ab8c6f171678d7e050be03881234519c3391d2fecc08960f25974938e6ea23827187bb0e6773f
|
7
|
+
data.tar.gz: dc6bff10c02021e23c893cb19878f315ce8c543890c6cbe67d9ebc18bfa651ed6b1a3689215112ddcafa735e17460078b9ae93dca916c6a87a9eac620c645a7f
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cloudstack-cli (1.6.
|
5
|
-
cloudstack_client (~> 1.5.
|
4
|
+
cloudstack-cli (1.6.5)
|
5
|
+
cloudstack_client (~> 1.5.5)
|
6
6
|
thor (~> 0.20.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
cloudstack_client (1.5.
|
11
|
+
cloudstack_client (1.5.5)
|
12
12
|
minitest (5.11.3)
|
13
13
|
rake (12.3.1)
|
14
14
|
thor (0.20.3)
|
@@ -22,4 +22,4 @@ DEPENDENCIES
|
|
22
22
|
rake (~> 12.3)
|
23
23
|
|
24
24
|
BUNDLED WITH
|
25
|
-
1.
|
25
|
+
1.17.1
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2013 Nik Wolfgramm
|
3
|
+
Copyright (c) 2013-2018 Nik Wolfgramm
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -102,7 +102,7 @@ $ cloudstack-cli vm help list
|
|
102
102
|
*Bootstraps a server using a template and creating port-forwarding rules for port 22 and 80:*
|
103
103
|
|
104
104
|
```bash
|
105
|
-
$ cloudstack-cli server create
|
105
|
+
$ cloudstack-cli server create web-01 --template CentOS-7.5-x64 --zone DC1 --offering 2cpu_2gb --port-rules :22 :80
|
106
106
|
```
|
107
107
|
|
108
108
|
### Example: Run any custom API command
|
@@ -190,6 +190,13 @@ $ cloudstack-cli router list --project Demo --status running --redundant-state B
|
|
190
190
|
- This tool was inspired by the Knife extension for Cloudstack: [knife-cloudstack](https://github.com/CloudStack-extras/knife-cloudstack)
|
191
191
|
|
192
192
|
|
193
|
+
## Test
|
194
|
+
|
195
|
+
1. Requires the [cloudstack-simulator](https://hub.docker.com/r/cloudstack/simulator/) docker images running on your local machine
|
196
|
+
2. You need to add the admin secrets to your local cloudstack environment an make it default
|
197
|
+
3. Currently you need to create a isolated network named "test-network" manually on the simulator
|
198
|
+
4. Run `bundle exec rake test`
|
199
|
+
|
193
200
|
## Contributing
|
194
201
|
|
195
202
|
1. Fork it
|
data/cloudstack-cli.gemspec
CHANGED
@@ -24,6 +24,6 @@ Gem::Specification.new do |gem|
|
|
24
24
|
gem.add_development_dependency('rake', '~> 12.3')
|
25
25
|
gem.add_development_dependency('minitest', '~> 5.11')
|
26
26
|
|
27
|
-
gem.add_dependency('cloudstack_client', '~> 1.5.
|
27
|
+
gem.add_dependency('cloudstack_client', '~> 1.5.5')
|
28
28
|
gem.add_dependency('thor', '~> 0.20.0')
|
29
29
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "cloudstack-cli"
|
3
|
+
|
4
|
+
describe Template do
|
5
|
+
|
6
|
+
it "should list templates" do
|
7
|
+
out, err = capture_io do
|
8
|
+
CloudstackCli::Cli.start [
|
9
|
+
"template",
|
10
|
+
"list",
|
11
|
+
"--zone=#{ZONE}"
|
12
|
+
]
|
13
|
+
end
|
14
|
+
err.must_equal ""
|
15
|
+
out.must_include TEMPLATE
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -3,21 +3,25 @@ require "cloudstack-cli"
|
|
3
3
|
|
4
4
|
describe VirtualMachine do
|
5
5
|
|
6
|
+
#TODO: test-network must be created beforehand
|
7
|
+
|
6
8
|
it "should support all CRUD actions" do
|
7
9
|
vmname = "testvm1"
|
8
10
|
|
9
11
|
# CREATE
|
10
|
-
out, err = capture_io
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
out, err = capture_io do
|
13
|
+
CloudstackCli::Cli.start [
|
14
|
+
"vm",
|
15
|
+
"create",
|
16
|
+
vmname,
|
17
|
+
"--zone=#{ZONE}",
|
18
|
+
"--template=#{TEMPLATE}",
|
19
|
+
"--offering=#{OFFERING_S}",
|
20
|
+
"--networks=test-network",
|
21
|
+
"--port-rules=:80",
|
22
|
+
"--assumeyes"
|
23
|
+
]
|
24
|
+
end
|
21
25
|
err.must_equal ""
|
22
26
|
|
23
27
|
# READ - LIST
|
@@ -87,7 +91,7 @@ describe VirtualMachine do
|
|
87
91
|
"--force"
|
88
92
|
]}
|
89
93
|
err.must_equal ""
|
90
|
-
|
94
|
+
|
91
95
|
end
|
92
96
|
|
93
97
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudstack-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nik Wolfgramm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.5.
|
47
|
+
version: 1.5.5
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.5.
|
54
|
+
version: 1.5.5
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: thor
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,6 +128,7 @@ files:
|
|
128
128
|
- lib/cloudstack-cli/option_resolver.rb
|
129
129
|
- lib/cloudstack-cli/thor_patch.rb
|
130
130
|
- lib/cloudstack-cli/version.rb
|
131
|
+
- spec/cloudstack-cli/commands/template_spec.rb
|
131
132
|
- spec/cloudstack-cli/commands/virtual_machine_spec.rb
|
132
133
|
- spec/fixtures/stack.yml
|
133
134
|
- spec/spec_helper.rb
|
@@ -153,11 +154,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
154
|
version: '0'
|
154
155
|
requirements: []
|
155
156
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.7.
|
157
|
+
rubygems_version: 2.7.8
|
157
158
|
signing_key:
|
158
159
|
specification_version: 4
|
159
160
|
summary: cloudstack-cli CloudStack API client
|
160
161
|
test_files:
|
162
|
+
- spec/cloudstack-cli/commands/template_spec.rb
|
161
163
|
- spec/cloudstack-cli/commands/virtual_machine_spec.rb
|
162
164
|
- spec/fixtures/stack.yml
|
163
165
|
- spec/spec_helper.rb
|