vcli 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f00b2cbf107ad2864c9c39ea97885b394fa11955
4
- data.tar.gz: 26ef11c03842529c380ea62b3dce42941bcfc56e
3
+ metadata.gz: e880c3cd0026aaecb864f517434fbbee6b891fbf
4
+ data.tar.gz: d7ad14fc6b3f037e5642c9d58a14df8e9e78394b
5
5
  SHA512:
6
- metadata.gz: a0afe590cb2377b5c6afb7b1160d78bde2a4988a6aa81ac1b0d7c18b9b6df9f968f51938ac18a368c90200e0553d2cf91f6da38d658f9dbe420522f01357ec85
7
- data.tar.gz: ab5a9a6e4c7eb778e16cd0f2770efeb94b09e3bb82fa8a5fb5d9676262059b90f1d8957361dec3f7736e73d70db1451c4ba5619cd1d12969200e1d69a5f88482
6
+ metadata.gz: 5e81dcdf0f0f4dbf0f4fe0b4870c77ab6aacae319345142fdc6e52bc059cee015572639e2958796f6c7e4b02aa29ade1ca82b1dc4d321f17c2333ad39dd1cb38
7
+ data.tar.gz: 4826d77d1a3bea92f59c62bd5f6a95049a4161fa65e4b999f704ff1ccf7b688048b6d6151ab41bc1fa1104691d0c4fb8cb28ba9b7f3f24cab05dc8b01a023d51
@@ -34,7 +34,7 @@ module Vcli
34
34
  def virtualappliances( )
35
35
  abq = AbiquoAPI.new(:abiquo_api_url => Vcli::target, :abiquo_username => Vcli::user, :abiquo_password => Vcli::password)
36
36
  # Get something on the screen
37
- puts "VDC,Appliance ID,Appliance Name"
37
+ puts "VDC,Appliance Name,Appliance ID"
38
38
  # If --vdc parameter passed
39
39
  vdc=options[:vdc].to_s
40
40
  if vdc.length != 0
@@ -54,7 +54,7 @@ module Vcli
54
54
  link2=AbiquoAPI::Link.new(:href => 'api/cloud/virtualdatacenters/' + l.id.to_s + '/virtualappliances' , :type => 'application/vnd.abiquo.virtualappliances+json')
55
55
  dc=abq.list(link2)
56
56
  dc.each { |m|
57
- puts "#{l.id},#{m.id},#{m.name}"
57
+ puts "#{l.id},#{m.name},#{m.id}"
58
58
  }
59
59
  }
60
60
  end
@@ -63,8 +63,17 @@ module Vcli
63
63
  # Users
64
64
  desc "users", "Show all users within your account"
65
65
  def users( )
66
- command = "showing all users"
67
- puts command
66
+ abq = AbiquoAPI.new(:abiquo_api_url => Vcli::target,
67
+ :abiquo_username => Vcli::user,
68
+ :abiquo_password => Vcli::password)
69
+ abq.user
70
+ enterprise=abq.user.link(:enterprise).get
71
+ link2=AbiquoAPI::Link.new(:href => 'api/admin/enterprises/' + enterprise.id.to_s + '/users' , :type => 'application/vnd.abiquo.users+json')
72
+ users=abq.list(link2)
73
+ puts "UserID,Firstname,Surname,Email"
74
+ users.each { |m|
75
+ puts "#{m.id},#{m.name},#{m.surname},#{m.email}"
76
+ }
68
77
  end
69
78
 
70
79
  # Enterprise
@@ -1,3 +1,3 @@
1
1
  module Vcli
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Fearn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-16 00:00:00.000000000 Z
11
+ date: 2015-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -130,23 +130,23 @@ email:
130
130
  - jay@jayfearn.com
131
131
  executables:
132
132
  - setup
133
- - vcli
134
133
  - console
134
+ - vcli
135
135
  extensions: []
136
136
  extra_rdoc_files: []
137
137
  files:
138
138
  - Rakefile
139
139
  - bin/setup
140
- - bin/vcli
141
140
  - bin/console
142
- - lib/vcli/cli/abiquo.rb
141
+ - bin/vcli
142
+ - lib/vcli.rb
143
+ - lib/vcli/version.rb
143
144
  - lib/vcli/cli/show.rb
144
145
  - lib/vcli/cli/resource.rb
145
- - lib/vcli/version.rb
146
+ - lib/vcli/cli/abiquo.rb
146
147
  - lib/vcli/cli.rb
147
- - lib/vcli.rb
148
- - test/test_helper.rb
149
148
  - test/vcli_test.rb
149
+ - test/test_helper.rb
150
150
  homepage: http://www.sittingonthe.net
151
151
  licenses:
152
152
  - MIT