Class: Fog::OpenStack::Identity::V3::Endpoint
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::Identity::V3::Endpoint
show all
- Defined in:
- lib/fog/openstack/identity/v3/models/endpoint.rb
Instance Attribute Summary
Attributes inherited from Model
#project
Instance Method Summary
collapse
Methods inherited from Model
#initialize, #save
Instance Method Details
#create ⇒ Object
36
37
38
39
40
41
42
|
# File 'lib/fog/openstack/identity/v3/models/endpoint.rb', line 36
def create
requires :name
merge_attributes(
service.create_endpoint(attributes).body['endpoint']
)
self
end
|
#destroy ⇒ Object
22
23
24
25
26
|
# File 'lib/fog/openstack/identity/v3/models/endpoint.rb', line 22
def destroy
requires :id
service.delete_endpoint(id)
true
end
|
#to_s ⇒ Object
18
19
20
|
# File 'lib/fog/openstack/identity/v3/models/endpoint.rb', line 18
def to_s
name
end
|
#update(attr = nil) ⇒ Object
28
29
30
31
32
33
34
|
# File 'lib/fog/openstack/identity/v3/models/endpoint.rb', line 28
def update(attr = nil)
requires :id, :name
merge_attributes(
service.update_endpoint(id, attr || attributes).body['endpoint']
)
self
end
|