Class: Fog::OpenStack::ContainerInfra::BayModel

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/openstack/container_infra/models/bay_model.rb

Instance Attribute Summary

Attributes inherited from Model

#project

Instance Method Summary collapse

Methods inherited from Base

#convert_update_params

Methods inherited from Model

#initialize, #save

Constructor Details

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

Instance Method Details

#createObject



39
40
41
42
43
44
# File 'lib/fog/openstack/container_infra/models/bay_model.rb', line 39

def create
  requires :name, :keypair_id,  :flavor_id, :image_id,
           :external_network_id, :coe
  merge_attributes(service.create_bay_model(attributes).body)
  self
end

#destroyObject



54
55
56
57
58
# File 'lib/fog/openstack/container_infra/models/bay_model.rb', line 54

def destroy
  requires :uuid
  service.delete_bay_model(uuid)
  true
end

#updateObject



46
47
48
49
50
51
52
# File 'lib/fog/openstack/container_infra/models/bay_model.rb', line 46

def update
  requires :uuid, :name, :keypair_id,  :flavor_id, :image_id,
           :external_network_id, :coe
  attrs = convert_update_params(attributes)
  merge_attributes(service.update_bay_model(uuid, attrs).body)
  self
end