lib/fog/openstack/models/identity_v2/ec2_credentials.rb in fog-1.31.0 vs lib/fog/openstack/models/identity_v2/ec2_credentials.rb in fog-1.32.0
- old
+ new
@@ -8,18 +8,21 @@
class Ec2Credentials < Fog::Collection
model Fog::Identity::OpenStack::V2::Ec2Credential
attribute :user
- def all
+ def all(options = {})
user_id = user ? user.id : nil
- ec2_credentials = service.list_ec2_credentials(user_id)
+ options[:user_id] = user_id
+ ec2_credentials = service.list_ec2_credentials(options)
load(ec2_credentials.body['credentials'])
end
+ alias_method :summary, :all
+
def create(attributes = {})
if user then
attributes[:user_id] ||= user.id
attributes[:tenant_id] ||= user.tenant_id
end
@@ -50,6 +53,6 @@
end
end
end
end
end
-end
\ No newline at end of file
+end