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

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

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from Base

#convert_update_params

Methods inherited from OpenStack::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/container_infra/openstack/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/container_infra/openstack/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/container_infra/openstack/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