fog 0.3.22 → 0.3.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/Gemfile.lock +1 -1
  2. data/fog.gemspec +2 -2
  3. data/lib/fog.rb +1 -1
  4. data/lib/fog/aws/models/compute/address.rb +6 -5
  5. data/lib/fog/aws/models/compute/addresses.rb +3 -3
  6. data/lib/fog/aws/models/compute/image.rb +7 -11
  7. data/lib/fog/aws/models/compute/images.rb +3 -3
  8. data/lib/fog/aws/models/compute/key_pair.rb +1 -1
  9. data/lib/fog/aws/models/compute/key_pairs.rb +4 -3
  10. data/lib/fog/aws/models/compute/security_group.rb +6 -6
  11. data/lib/fog/aws/models/compute/security_groups.rb +3 -3
  12. data/lib/fog/aws/models/compute/server.rb +15 -44
  13. data/lib/fog/aws/models/compute/servers.rb +3 -5
  14. data/lib/fog/aws/models/compute/snapshot.rb +4 -4
  15. data/lib/fog/aws/models/compute/snapshots.rb +3 -3
  16. data/lib/fog/aws/models/compute/tags.rb +4 -4
  17. data/lib/fog/aws/models/compute/volume.rb +7 -7
  18. data/lib/fog/aws/models/compute/volumes.rb +4 -4
  19. data/lib/fog/aws/models/storage/directories.rb +1 -1
  20. data/lib/fog/aws/models/storage/file.rb +9 -5
  21. data/lib/fog/aws/models/storage/files.rb +10 -9
  22. data/lib/fog/aws/parsers/storage/get_bucket.rb +19 -3
  23. data/lib/fog/aws/requests/storage/get_bucket.rb +1 -0
  24. data/lib/fog/bluebox/models/compute/server.rb +7 -13
  25. data/lib/fog/brightbox/models/compute/image.rb +4 -4
  26. data/lib/fog/brightbox/models/compute/server.rb +7 -7
  27. data/lib/fog/brightbox/models/compute/user.rb +3 -3
  28. data/lib/fog/core/attributes.rb +18 -26
  29. data/lib/fog/go_grid/models/compute/image.rb +2 -2
  30. data/lib/fog/go_grid/models/compute/server.rb +2 -2
  31. data/lib/fog/google/models/storage/directories.rb +1 -1
  32. data/lib/fog/google/models/storage/file.rb +9 -6
  33. data/lib/fog/google/models/storage/files.rb +10 -9
  34. data/lib/fog/google/parsers/storage/get_bucket.rb +19 -3
  35. data/lib/fog/google/requests/storage/get_bucket.rb +1 -0
  36. data/lib/fog/local/models/storage/file.rb +5 -2
  37. data/lib/fog/rackspace/models/compute/image.rb +3 -3
  38. data/lib/fog/rackspace/models/compute/server.rb +10 -10
  39. data/lib/fog/rackspace/models/storage/file.rb +8 -5
  40. data/lib/fog/rackspace/models/storage/files.rb +4 -4
  41. data/lib/fog/slicehost/models/compute/server.rb +7 -7
  42. data/lib/fog/terremark/models/shared/address.rb +2 -2
  43. data/lib/fog/terremark/models/shared/network.rb +2 -2
  44. data/lib/fog/terremark/models/shared/server.rb +13 -13
  45. data/lib/fog/terremark/models/shared/task.rb +3 -3
  46. data/lib/fog/terremark/models/shared/vdc.rb +4 -4
  47. metadata +3 -3
@@ -15,30 +15,30 @@ module Fog
15
15
 
16
16
  def destroy
17
17
  requires :id
18
- data = connection.power_off(@id).body
18
+ data = connection.power_off(id).body
19
19
  task = connection.tasks.new(data)
20
20
  task.wait_for { ready? }
21
- connection.delete_vapp(@id)
21
+ connection.delete_vapp(id)
22
22
  true
23
23
  end
24
24
 
25
25
  # { '0' => 'Being created', '2' => 'Powered Off', '4' => 'Powered On'}
26
26
  def ready?
27
- @status == '2'
27
+ status == '2'
28
28
  end
29
29
 
30
30
  def on?
31
- @status == '4'
31
+ status == '4'
32
32
  end
33
33
 
34
34
  def off?
35
- @status == '2'
35
+ status == '2'
36
36
  end
37
37
 
38
38
  def power_on(options = {})
39
39
  requires :id
40
40
  begin
41
- connection.power_on(@id)
41
+ connection.power_on(id)
42
42
  rescue Excon::Errors::InternalServerError => e
43
43
  #Frankly we shouldn't get here ...
44
44
  raise e unless e.to_s =~ /because it is already powered on/
@@ -49,7 +49,7 @@ module Fog
49
49
  def power_off
50
50
  requires :id
51
51
  begin
52
- connection.power_off(@id)
52
+ connection.power_off(id)
53
53
  rescue Excon::Errors::InternalServerError => e
54
54
  #Frankly we shouldn't get here ...
55
55
  raise e unless e.to_s =~ /because it is already powered off/
@@ -60,7 +60,7 @@ module Fog
60
60
  def shutdown
61
61
  requires :id
62
62
  begin
63
- connection.power_shutdown(@id)
63
+ connection.power_shutdown(id)
64
64
  rescue Excon::Errors::InternalServerError => e
65
65
  #Frankly we shouldn't get here ...
66
66
  raise e unless e.to_s =~ /because it is already powered off/
@@ -70,7 +70,7 @@ module Fog
70
70
 
71
71
  def power_reset
72
72
  requires :id
73
- connection.power_reset(@id)
73
+ connection.power_reset(id)
74
74
  true
75
75
  end
76
76
 
@@ -83,11 +83,11 @@ module Fog
83
83
 
84
84
  def save
85
85
  requires :name
86
- data = connection.instantiate_vapp(@name)
86
+ data = connection.instantiate_vapp(name)
87
87
  merge_attributes(data.body)
88
- task = connection.deploy_vapp(@id)
88
+ task = connection.deploy_vapp(id)
89
89
  task.wait_for { ready? }
90
- task = connection.power_on(@id)
90
+ task = connection.power_on(id)
91
91
  task.wait_for { ready? }
92
92
  true
93
93
  end
@@ -95,7 +95,7 @@ module Fog
95
95
  private
96
96
 
97
97
  def href=(new_href)
98
- @id = new_href.split('/').last.to_i
98
+ self.id = new_href.split('/').last.to_i
99
99
  end
100
100
 
101
101
  def type=(new_type); @type = new_type; end
@@ -23,11 +23,11 @@ module Fog
23
23
  new_cancel_link = attributes.delete('Link')
24
24
 
25
25
  super
26
- @owner = connection.parse(new_owner)
26
+ self.owner = connection.parse(new_owner)
27
27
  if new_result
28
- @result = connection.parse(new_result)
28
+ self.result = connection.parse(new_result)
29
29
  end
30
- @error = connection.parse(new_error) if new_error
30
+ self.error = connection.parse(new_error) if new_error
31
31
  @cancel_link = connection.parse(new_cancel_link) if new_cancel_link
32
32
  end
33
33
 
@@ -11,21 +11,21 @@ module Fog
11
11
  attribute :name
12
12
 
13
13
  def networks
14
- connection.networks(:vdc_id => @id)
14
+ connection.networks(:vdc_id => id)
15
15
  end
16
16
 
17
17
  def addresses
18
- connection.addresses(:vdc_id => @id)
18
+ connection.addresses(:vdc_id => id)
19
19
  end
20
20
 
21
21
  def servers
22
- connection.servers(:vdc_id => @id)
22
+ connection.servers(:vdc_id => id)
23
23
  end
24
24
 
25
25
  private
26
26
 
27
27
  def href=(new_href)
28
- @id = new_href.split('/').last.to_i
28
+ self.id = new_href.split('/').last.to_i
29
29
  end
30
30
 
31
31
  def type=(new_type); end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 22
9
- version: 0.3.22
8
+ - 23
9
+ version: 0.3.23
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-18 00:00:00 -08:00
17
+ date: 2010-11-19 00:00:00 -08:00
18
18
  default_executable: fog
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency