Class: Fog::Identity::OpenStack::V3::Service
Instance Attribute Summary
#project
Instance Method Summary
collapse
#initialize
Instance Method Details
#create ⇒ Object
37
38
39
40
41
|
# File 'lib/fog/openstack/models/identity_v3/service.rb', line 37
def create
merge_attributes(
service.create_service(attributes).body['service'])
self
end
|
#destroy ⇒ Object
19
20
21
22
23
|
# File 'lib/fog/openstack/models/identity_v3/service.rb', line 19
def destroy
requires :id
service.delete_service(self.id)
true
end
|
#save ⇒ Object
32
33
34
35
|
# File 'lib/fog/openstack/models/identity_v3/service.rb', line 32
def save
requires :name
identity ? update : create
end
|
#to_s ⇒ Object
15
16
17
|
# File 'lib/fog/openstack/models/identity_v3/service.rb', line 15
def to_s
self.name
end
|
#update(attr = nil) ⇒ Object
25
26
27
28
29
30
|
# File 'lib/fog/openstack/models/identity_v3/service.rb', line 25
def update(attr = nil)
requires :id
merge_attributes(
service.update_service(self.id, attr || attributes).body['service'])
self
end
|