Class: Fog::OpenStack::Compute::Aggregate

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/openstack/compute/models/aggregate.rb

Instance Attribute Summary

Attributes inherited from Model

#project

Instance Method Summary collapse

Methods inherited from Model

#initialize

Constructor Details

This class inherits a constructor from Fog::OpenStack::Model

Instance Method Details

#add_host(host_uuid) ⇒ Object



37
38
39
40
# File 'lib/fog/openstack/compute/models/aggregate.rb', line 37

def add_host(host_uuid)
  requires :id
  service.add_aggregate_host(id, host_uuid)
end

#createObject



25
26
27
28
29
# File 'lib/fog/openstack/compute/models/aggregate.rb', line 25

def create
  requires :name
  merge_attributes(service.create_aggregate(name, attributes).body['aggregate'])
  self
end

#destroyObject



51
52
53
54
55
# File 'lib/fog/openstack/compute/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/openstack/compute/models/aggregate.rb', line 42

def remove_host(host_uuid)
  requires :id
  service.remove_aggregate_host(id, host_uuid)
end

#saveObject



20
21
22
23
# File 'lib/fog/openstack/compute/models/aggregate.rb', line 20

def save
  requires :name
  identity ? update : create
end

#updateObject



31
32
33
34
35
# File 'lib/fog/openstack/compute/models/aggregate.rb', line 31

def update
  requires :id
  merge_attributes(service.update_aggregate(id, attributes).body['aggregate'])
  self
end

#update_metadata(metadata) ⇒ Object



47
48
49
# File 'lib/fog/openstack/compute/models/aggregate.rb', line 47

def ()
  service.(id, )
end