Class: Fog::OpenStack::ContainerInfra::Bay
- Inherits:
-
Base
- Object
- Model
- Model
- Base
- Fog::OpenStack::ContainerInfra::Bay
show all
- Defined in:
- lib/fog/openstack/container_infra/models/bay.rb
Instance Attribute Summary
Attributes inherited from Model
#project
Instance Method Summary
collapse
Methods inherited from Base
#convert_update_params
Methods inherited from Model
#initialize, #save
Instance Method Details
#create ⇒ Object
25
26
27
28
29
|
# File 'lib/fog/openstack/container_infra/models/bay.rb', line 25
def create
requires :name, :baymodel_id
merge_attributes(service.create_bay(attributes).body)
self
end
|
#destroy ⇒ Object
39
40
41
42
43
|
# File 'lib/fog/openstack/container_infra/models/bay.rb', line 39
def destroy
requires :uuid
service.delete_bay(uuid)
true
end
|
#update ⇒ Object
31
32
33
34
35
36
37
|
# File 'lib/fog/openstack/container_infra/models/bay.rb', line 31
def update
requires :uuid, :name, :baymodel_id
attrs = attributes.select{|k,_| allowed_update_attributes.include? k}
attrs = convert_update_params(attrs)
merge_attributes(service.update_bay(uuid, attrs).body)
self
end
|