Class: Fog::Baremetal::OpenStack::Chassis
Instance Attribute Summary
#project
Instance Method Summary
collapse
#initialize, #save
Instance Method Details
#create ⇒ Object
17
18
19
20
21
|
# File 'lib/fog/baremetal/openstack/models/chassis.rb', line 17
def create
requires :description
merge_attributes(service.create_chassis(attributes).body)
self
end
|
#destroy ⇒ Object
36
37
38
39
40
|
# File 'lib/fog/baremetal/openstack/models/chassis.rb', line 36
def destroy
requires :uuid
service.delete_chassis(uuid)
true
end
|
42
43
44
45
|
# File 'lib/fog/baremetal/openstack/models/chassis.rb', line 42
def metadata
requires :uuid
service.get_chassis(uuid).
end
|
#update(patch = nil) ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/fog/baremetal/openstack/models/chassis.rb', line 23
def update(patch = nil)
requires :uuid, :description
if patch
merge_attributes(service.patch_chassis(uuid, patch).body)
else
raise ArgumentError,
'You need to provide patch attribute. Ironic does not support update by hash yet, only by jsonpatch.'
end
self
end
|