Class: Fog::OpenStack::Identity::V3::Domain
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::Identity::V3::Domain
show all
- Defined in:
- lib/fog/openstack/identity/v3/models/domain.rb
Class Attribute Summary collapse
Attributes inherited from Model
#project
Instance Method Summary
collapse
Methods inherited from Model
#initialize, #save
Class Attribute Details
.cache ⇒ Object
Returns the value of attribute cache.
16
17
18
|
# File 'lib/fog/openstack/identity/v3/models/domain.rb', line 16
def cache
@cache
end
|
Instance Method Details
#create ⇒ Object
41
42
43
44
45
46
47
48
|
# File 'lib/fog/openstack/identity/v3/models/domain.rb', line 41
def create
clear_cache
requires :name
merge_attributes(
service.create_domain(attributes).body['domain']
)
self
end
|
#destroy ⇒ Object
25
26
27
28
29
30
|
# File 'lib/fog/openstack/identity/v3/models/domain.rb', line 25
def destroy
clear_cache
requires :id
service.delete_domain(id)
true
end
|
#to_s ⇒ Object
21
22
23
|
# File 'lib/fog/openstack/identity/v3/models/domain.rb', line 21
def to_s
name
end
|
#update(attr = nil) ⇒ Object
32
33
34
35
36
37
38
39
|
# File 'lib/fog/openstack/identity/v3/models/domain.rb', line 32
def update(attr = nil)
clear_cache
requires :id, :name
merge_attributes(
service.update_domain(id, attr || attributes).body['domain']
)
self
end
|