Class: Fog::Identity::OpenStack::V2::Ec2Credential
Instance Attribute Summary
#project
Instance Method Summary
collapse
#create, #initialize, #update
Instance Method Details
#destroy ⇒ Object
14
15
16
17
18
19
|
# File 'lib/fog/identity/openstack/v2/models/ec2_credential.rb', line 14
def destroy
requires :access
requires :user_id
service.delete_ec2_credential user_id, access
true
end
|
#save ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/fog/identity/openstack/v2/models/ec2_credential.rb', line 21
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
|