Class: Fog::Baremetal::OpenStack::ChassisCollection
- Inherits:
-
Collection
- Object
- Collection
- Fog::Baremetal::OpenStack::ChassisCollection
show all
- Defined in:
- lib/fog/openstack/models/baremetal/chassis_collection.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_sym, *arguments, &block) ⇒ Object
28
29
30
31
32
33
34
|
# File 'lib/fog/openstack/models/baremetal/chassis_collection.rb', line 28
def method_missing(method_sym, *arguments, &block)
if method_sym.to_s =~ /^find_by_(.*)$/
load(service.list_chassis_detailed({$1 => arguments.first}).body['chassis'])
else
super
end
end
|
Instance Method Details
#all ⇒ Object
10
11
12
|
# File 'lib/fog/openstack/models/baremetal/chassis_collection.rb', line 10
def all
load(service.list_chassis.body['chassis'])
end
|
#destroy(uuid) ⇒ Object
23
24
25
26
|
# File 'lib/fog/openstack/models/baremetal/chassis_collection.rb', line 23
def destroy(uuid)
chassis = self.find_by_id(uuid)
chassis.destroy
end
|
#details(parameters = nil) ⇒ Object
14
15
16
|
# File 'lib/fog/openstack/models/baremetal/chassis_collection.rb', line 14
def details(parameters=nil)
load(service.list_chassis_detailed(parameters).body['chassis'])
end
|
#find_by_uuid(uuid) ⇒ Object
Also known as:
get
18
19
20
|
# File 'lib/fog/openstack/models/baremetal/chassis_collection.rb', line 18
def find_by_uuid(uuid)
new(service.get_chassis(uuid).body)
end
|