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