Class: Fog::ContainerInfra::OpenStack::Bay
- Inherits:
-
Base
show all
- Defined in:
- lib/fog/container_infra/openstack/models/bay.rb
Instance Attribute Summary
#project
Instance Method Summary
collapse
Methods inherited from Base
#convert_update_params
#initialize, #save
Instance Method Details
#create ⇒ Object
25
26
27
28
29
|
# File 'lib/fog/container_infra/openstack/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/container_infra/openstack/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/container_infra/openstack/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
|