diff --git a/lib/fog/aws/models/compute/image.rb b/lib/fog/aws/models/compute/image.rb index 2188a3abf..0903a5490 100644 --- a/lib/fog/aws/models/compute/image.rb +++ b/lib/fog/aws/models/compute/image.rb @@ -36,13 +36,13 @@ module Fog return true end - + def tags requires :id - connection.tags(:filters => {'resource-id' => @id}) + connection.tags.all('resource-id' => identity) end - + end end diff --git a/lib/fog/aws/models/compute/server.rb b/lib/fog/aws/models/compute/server.rb index 14350d457..922cf3324 100644 --- a/lib/fog/aws/models/compute/server.rb +++ b/lib/fog/aws/models/compute/server.rb @@ -188,11 +188,10 @@ module Fog connection.stop_instances(@id) true end - + def tags requires :id - - connection.tags(:filters => {'resource-id' => @id}) + connection.tags.all('resource-id' => identity) end def username @@ -201,7 +200,6 @@ module Fog def volumes requires :id - connection.volumes(:server => self) end diff --git a/lib/fog/aws/models/compute/snapshot.rb b/lib/fog/aws/models/compute/snapshot.rb index 517bc651e..d53a44929 100644 --- a/lib/fog/aws/models/compute/snapshot.rb +++ b/lib/fog/aws/models/compute/snapshot.rb @@ -39,9 +39,13 @@ module Fog true end + def tags + requires :id + connection.tags.all('resource-id' => identity) + end + def volume requires :id - connection.describe_volumes(@volume_id) end diff --git a/lib/fog/aws/models/compute/volume.rb b/lib/fog/aws/models/compute/volume.rb index a68ec2c60..5cebf0982 100644 --- a/lib/fog/aws/models/compute/volume.rb +++ b/lib/fog/aws/models/compute/volume.rb @@ -59,14 +59,12 @@ module Fog def snapshots requires :id - connection.snapshots(:volume => self) end - + def tags requires :id - - connection.tags(:filters => {'resource-id' => @id}) + connection.tags.all('resource-id' => identity) end private