cloudstack-cli 0.12.2 → 0.12.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e382582b33a19593f0ab0f5743d9e9432dab2e88
4
- data.tar.gz: a5702646ce71db7bbd8bad56cbd5c26290245d2a
3
+ metadata.gz: b0aaa064bdf46d5aa2eb58d9df7a3f1e538ad0fc
4
+ data.tar.gz: 6bbd5c89739859be9cd154695dd65d24f978dfdd
5
5
  SHA512:
6
- metadata.gz: c03b172bf5457b28253cfa0c648928906ec60c7de8a8e460c34c2f08f61d321b264fe58a00e3ddf35c883f8dda6b180ffa22fb0ef95da86c85a4d49c73092ba2
7
- data.tar.gz: baf300b01b00682d8836b8e027153d2de58d1a4066c8576e9ae1a6e2662e2657a9c706e839ebb508ee0ac358011f0fb4622569805c2227f257194f11fad27cc5
6
+ metadata.gz: 6dde868c6f42746e0d56295636bb05baa55fda0ea98938c375ef66b477e4bd3677f8807c115c7229f0d7eea029f624d41606db2bf8788d485c16398f55c2c122
7
+ data.tar.gz: f2494582998bcf36d42fcb06d5ecf947cf5da52c095adfb899af1eac48f5b948b3e615a43dd0ae42e6f3bbb108da829ef1e5e26a6c160b2303fa1acb1edd67b1
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: .
10
10
  specs:
11
- cloudstack-cli (0.12.1)
11
+ cloudstack-cli (0.12.3)
12
12
  cloudstack_client (~> 0.8.0)
13
13
  thor (~> 0.19.1)
14
14
 
data/README.md CHANGED
@@ -9,7 +9,7 @@ cloudstack-cli uses the [cloudstack_client](https://github.com/niwo/cloudstack_c
9
9
 
10
10
  Install the cloudstack-cli gem:
11
11
 
12
- ```sh
12
+ ```bash
13
13
  $ gem install cloudstack-cli
14
14
  ```
15
15
 
@@ -19,15 +19,15 @@ $ gem install cloudstack-cli
19
19
 
20
20
  Create your first environment, which defines your connection options:
21
21
 
22
- ```sh
23
- $ cs environment add [environment-name]
22
+ ```bash
23
+ $ cloudstack-cli environment add [environment-name]
24
24
  ```
25
25
 
26
26
  cloudstack-cli expects to find a configuartion file with the API URL and your CloudStack credentials in your home directory named .cloudstack-cli.yml. If the file is located elsewhere you can specify the loaction using the --config option.
27
27
 
28
28
  cloudstack-cli supports multiple environments using the --environment option.
29
29
 
30
- see `cs help environment` for more options.
30
+ see `cloudstack-cli help environment` for more options.
31
31
 
32
32
  Example content of the configuration file:
33
33
 
@@ -46,9 +46,9 @@ test:
46
46
 
47
47
  To enable tab auto-completion for cloudstack-cli, add the following lines to your ~/.bash_profile file.
48
48
 
49
- ```sh
49
+ ```bash
50
50
  # Bash, ~/.bash_profile
51
- eval "$(cs completion --shell=bash)"
51
+ eval "$(cloudstack-cli completion --shell=bash)"
52
52
  ```
53
53
 
54
54
  __Note__: use `~/.bashrc` on Ubuntu
@@ -59,24 +59,24 @@ For additional documentation find the RubyDoc [here](http://rubydoc.info/gems/cl
59
59
 
60
60
  See the help screen:
61
61
 
62
- ```sh
63
- $ cs
62
+ ```bash
63
+ $ cloudstack-cli
64
64
  ```
65
65
 
66
66
  ### Example: Bootsrapping a server
67
67
 
68
68
  Bootsraps a server using a template and creating port-forwarding rules for port 22 and 80.
69
69
 
70
- ```sh
71
- $ cs server create server-01 --template CentOS-6.4-x64-v1.4 --zone DC1 --offering 1cpu_1gb --port-rules :22 :80
70
+ ```bash
71
+ $ cloudstack-cli server create server-01 --template CentOS-6.4-x64-v1.4 --zone DC1 --offering 1cpu_1gb --port-rules :22 :80
72
72
  ```
73
73
 
74
74
  ### Example: Run a any custom API command
75
75
 
76
76
  Run the "listAlerts" command against the Cloudstack API with an argument of type=8:
77
77
 
78
- ```sh
79
- $ cs command listAlerts type=8
78
+ ```bash
79
+ $ cloudstack-cli command listAlerts type=8
80
80
  ```
81
81
 
82
82
  ### Example: Creating a complete stack of servers
@@ -115,29 +115,29 @@ An example stackfile could look like this (my_stackfile.yml):
115
115
 
116
116
  Create the stack of servers from above:
117
117
 
118
- ```sh
119
- $ cs stack create my_stackfile.yml
118
+ ```bash
119
+ $ cloudstack-cli stack create my_stackfile.yml
120
120
  ```
121
- Hint: You can also parse a stackfile from a URI.
121
+
122
+ **Hint:** You can also parse a stackfile from a URI.
122
123
 
123
124
  The following command destroys a stack using a definition gathered from a stackfile lying on a Github repository:
124
125
 
125
- ```sh
126
- bundle exec cs stack destroy https://raw.githubusercontent.com/niwo/cloudstack-cli/master/test/stack_example.json
126
+ ```bash
127
+ $ cloudstack-cli stack destroy https://raw.githubusercontent.com/niwo/cloudstack-cli/master/test/stack_example.json
127
128
  Destroy the following servers web-001, web-002, db-001? [y/N]: y
128
129
  Destroy server web-001 : job completed
129
130
  Destroy server web-002 : job completed
130
- Destroy server db-001 : job completed
131
- Completed: 3/3 (41.4s)
132
- Finished.
131
+ Destroy server db-001 : /
132
+ Completed: 2/3 (15.4s)
133
133
  ```
134
134
 
135
135
  ### Example: Sort computing offerings
136
136
 
137
137
  Sort all computing offerings by CPU and Memory grouped my Domain:
138
138
 
139
- ```sh
140
- $ cs offering sort
139
+ ```bash
140
+ $ cloudstack-cli offering sort
141
141
  ```
142
142
 
143
143
  ### Example: Stop all backup routers of a given project
@@ -145,14 +145,14 @@ $ cs offering sort
145
145
  Stop all virtual routers of project Demo (you could filter by zone too):
146
146
  (This command is helpful if you have to deploy new versions of Cloudstack when using redundant routers)
147
147
 
148
- ```sh
149
- $ cs router list --project Demo --status running --redundant-state BACKUP --command stop
148
+ ```bash
149
+ $ cloudstack-cli router list --project Demo --status running --redundant-state BACKUP --command stop
150
150
  ````
151
151
 
152
- Hint: You can watch the status of the command with watch.
152
+ **Hint:** You can watch the status of the command with watch.
153
153
 
154
- ```sh
155
- $ watch -n cs router list --project Demo
154
+ ```bash
155
+ $ watch -n cloudstack-cli router list --project Demo
156
156
  ```
157
157
 
158
158
 
@@ -8,10 +8,11 @@ class Account < CloudstackCli::Base
8
8
 
9
9
  desc "show NAME", "show detailed infos about an account"
10
10
  def show(name)
11
- unless account = client.list_accounts({name: name})
12
- puts "No account with name #{name} found."
11
+ accounts = client.list_accounts(name: name)
12
+ if accounts.size < 1
13
+ say "No account named \"#{name}\" found.", :red
13
14
  else
14
- account = account.first
15
+ account = accounts.first
15
16
  account.delete 'user'
16
17
  account['accounttype'] = "#{account['accounttype']} (#{TYPES[account['accounttype']]})"
17
18
  table = account.map do |key, value|
@@ -23,7 +24,7 @@ class Account < CloudstackCli::Base
23
24
 
24
25
  desc 'list [NAME]', 'list accounts (by name)'
25
26
  def list(name = nil)
26
- accounts = client.list_accounts({name: name})
27
+ accounts = client.list_accounts(name: name)
27
28
  if accounts.size < 1
28
29
  puts "No accounts found."
29
30
  else
@@ -1,3 +1,3 @@
1
1
  module CloudstackCli
2
- VERSION = "0.12.2"
2
+ VERSION = "0.12.3"
3
3
  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: 0.12.2
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nik Wolfgramm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-03 00:00:00.000000000 Z
11
+ date: 2015-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc