openstack-compute 1.1.5 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -12,20 +12,16 @@ See the class definitions for documentation on specific methods and operations.
12
12
 
13
13
  require 'openstack/compute'
14
14
 
15
- cs = OpenStack::Compute::Connection.new(:username => USERNAME, :api_key => API_KEY, :auth_url => API_URL)
15
+ cs = OpenStack::Compute::Connection.new(:username => USERNAME, :api_key => API_KEY, :authtenant => TENANT, :auth_url => API_URL)
16
16
 
17
17
  # Get a listing of all current servers
18
18
  >> cs.servers
19
- => [{:name=>"RenamedRubyTest", :id=>110917}]
19
+ => [{:name=>"Server1", :id=>110917}]
20
20
 
21
21
  # Access a specific server
22
22
  >> server = cs.server(110917)
23
23
  >> server.name
24
- => "RenamedRubyTest"
25
-
26
- # or...
27
- server_manager.find(110917)
28
-
24
+ => "Server1"
29
25
 
30
26
  # See what type of server this is
31
27
  >> server.flavor.name
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.5
1
+ 1.1.6
@@ -32,7 +32,7 @@ module Compute
32
32
  raise OpenStack::Compute::Exception::Connection, "Unable to connect to #{server}"
33
33
  end
34
34
 
35
- auth_data = JSON.generate({ "auth" => { "passwordCredentials" => { "username" => connection.authuser, "password" => connection.authkey }}})
35
+ auth_data = JSON.generate({ "auth" => { "passwordCredentials" => { "username" => connection.authuser, "password" => connection.authkey }, "tenantName" => connection.authtenant}})
36
36
  response = server.post(connection.auth_path.chomp("/")+"/tokens", auth_data, {'Content-Type' => 'application/json'})
37
37
  if (response.code =~ /^20./)
38
38
  resp_data=JSON.parse(response.body)
@@ -6,6 +6,7 @@ module Compute
6
6
  attr_reader :name
7
7
  attr_reader :ram
8
8
  attr_reader :disk
9
+ attr_reader :vcpus
9
10
 
10
11
  # This class provides an object for the "Flavor" of a server. The Flavor can generally be taken as the server specification,
11
12
  # providing information on things like memory and disk space.
@@ -26,6 +27,7 @@ module Compute
26
27
  @name = data['name']
27
28
  @ram = data['ram']
28
29
  @disk = data['disk']
30
+ @vcpus = data['vcpus']
29
31
  end
30
32
 
31
33
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstack-compute
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 5
10
- version: 1.1.5
9
+ - 6
10
+ version: 1.1.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dan Prince
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-11 00:00:00 -05:00
18
+ date: 2012-01-29 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency