Parent

Methods

Class/Module Index [+]

Quicksearch

Fog::Identity::OpenStack::Ec2Credential

Public Class Methods

new(attributes) click to toggle source
# File lib/fog/openstack/models/identity/ec2_credential.rb, line 13
def initialize(attributes)
  # Old 'connection' is renamed as service and should be used instead
  prepare_service_value(attributes)
  super
end

Public Instance Methods

destroy() click to toggle source
# File lib/fog/openstack/models/identity/ec2_credential.rb, line 19
def destroy
  requires :access
  requires :user_id
  service.delete_ec2_credential user_id, access
  true
end
save() click to toggle source
# File lib/fog/openstack/models/identity/ec2_credential.rb, line 26
def save
  raise Fog::Errors::Error, 'Existing credentials cannot be altered' if
    access

  self.user_id   ||= user.id
  self.tenant_id ||= user.tenant_id

  requires :user_id, :tenant_id

  data = service.create_ec2_credential user_id, tenant_id

  merge_attributes(data.body['credential'])

  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.