mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws|compute] fix bug where #get would make #reload misbehave
This commit is contained in:
parent
beb934eae2
commit
a10f8a21eb
8 changed files with 8 additions and 8 deletions
|
@ -33,7 +33,7 @@ module Fog
|
|||
|
||||
def get(public_ip)
|
||||
if public_ip
|
||||
all(public_ip).first
|
||||
self.class.new(:connection => connection).all(public_ip).first
|
||||
end
|
||||
rescue Fog::Errors::NotFound
|
||||
nil
|
||||
|
|
|
@ -29,7 +29,7 @@ module Fog
|
|||
end
|
||||
|
||||
def get(flavor_id)
|
||||
all.detect {|flavor| flavor.id == flavor_id}
|
||||
self.class.new(:connection => connection).all.detect {|flavor| flavor.id == flavor_id}
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@ module Fog
|
|||
|
||||
def get(image_id)
|
||||
if image_id
|
||||
all(image_id).first
|
||||
self.class.new(:connection => connection).all(image_id).first
|
||||
end
|
||||
rescue Fog::Errors::NotFound
|
||||
nil
|
||||
|
|
|
@ -24,7 +24,7 @@ module Fog
|
|||
|
||||
def get(key_name)
|
||||
if key_name
|
||||
all(key_name).first
|
||||
self.class.new(:connection => connection).all(key_name).first
|
||||
end
|
||||
rescue Fog::Errors::NotFound
|
||||
nil
|
||||
|
|
|
@ -24,7 +24,7 @@ module Fog
|
|||
|
||||
def get(group_name)
|
||||
if group_name
|
||||
all(group_name).first
|
||||
self.class.new(:connection => connection).all(group_name).first
|
||||
end
|
||||
rescue Fog::Errors::NotFound
|
||||
nil
|
||||
|
|
|
@ -60,7 +60,7 @@ module Fog
|
|||
|
||||
def get(server_id)
|
||||
if server_id
|
||||
all(server_id).first
|
||||
self.class.new(:connection => connection).all(server_id).first
|
||||
end
|
||||
rescue Fog::Errors::NotFound
|
||||
nil
|
||||
|
|
|
@ -36,7 +36,7 @@ module Fog
|
|||
|
||||
def get(snapshot_id)
|
||||
if snapshot_id
|
||||
all(snapshot_id).first
|
||||
self.class.new(:connection => connection).all(snapshot_id).first
|
||||
end
|
||||
rescue Fog::Errors::NotFound
|
||||
nil
|
||||
|
|
|
@ -29,7 +29,7 @@ module Fog
|
|||
|
||||
def get(volume_id)
|
||||
if volume_id
|
||||
all(volume_id).first
|
||||
self.class.new(:connection => connection).all(volume_id).first
|
||||
end
|
||||
rescue Fog::Errors::NotFound
|
||||
nil
|
||||
|
|
Loading…
Add table
Reference in a new issue