Class: Fog::Compute::OpenStack::Aggregate
Instance Attribute Summary
#project
Instance Method Summary
collapse
#initialize
Instance Method Details
#add_host(host_uuid) ⇒ Object
36
37
38
39
|
# File 'lib/fog/openstack/models/compute/aggregate.rb', line 36
def add_host(host_uuid)
requires :id,
service.add_aggregate_host(self.id, host_uuid)
end
|
#create ⇒ Object
25
26
27
28
29
|
# File 'lib/fog/openstack/models/compute/aggregate.rb', line 25
def create
requires :name
merge_attributes(service.create_aggregate(self.name, self.attributes).body['aggregate'])
self
end
|
#destroy ⇒ Object
50
51
52
53
54
|
# File 'lib/fog/openstack/models/compute/aggregate.rb', line 50
def destroy
requires :id
service.delete_aggregate(self.id)
true
end
|
#remove_host(host_uuid) ⇒ Object
41
42
43
44
|
# File 'lib/fog/openstack/models/compute/aggregate.rb', line 41
def remove_host(host_uuid)
requires :id,
service.remove_aggregate_host(self.id, host_uuid)
end
|
#save ⇒ Object
20
21
22
23
|
# File 'lib/fog/openstack/models/compute/aggregate.rb', line 20
def save
requires :name
identity ? update : create
end
|
#update ⇒ Object
31
32
33
34
|
# File 'lib/fog/openstack/models/compute/aggregate.rb', line 31
def update
merge_attributes(service.update_aggregate(self.id, self.attributes).body['aggregate'])
self
end
|
46
47
48
|
# File 'lib/fog/openstack/models/compute/aggregate.rb', line 46
def update_metadata(metadata)
service.update_aggregate_metadata(self.id, metadata)
end
|