Module: TwistlockControl::Actions::ContainerInstance
- Defined in:
- lib/twistlock_control/actions/container_instance.rb
Overview
-
Provisioning service instances on provisioners
Class Method Summary collapse
-
.add(container_configuration) ⇒ Object
Provision takes a ContainerConfiguration and when it is done provisioning it will notify the ContainerConfiguration of the ip address and container id of the provisioned container.
- .remove ⇒ Object
- .update ⇒ Object
Class Method Details
.add(container_configuration) ⇒ Object
Provision takes a ContainerConfiguration and when it is done provisioning it will notify the ContainerConfiguration of the ip address and container id of the provisioned container.
10 11 12 13 14 15 16 17 18 |
# File 'lib/twistlock_control/actions/container_instance.rb', line 10 def add(container_configuration) # TODO: figure out how to have internal actions like provisioning # without polluting the entities with logic provisioner = container_configuration.provisioner.api properties = provisioner.provision_container(container_configuration) instance = Entities::ContainerInstance.new(properties) instance.save instance end |
.remove ⇒ Object
23 24 |
# File 'lib/twistlock_control/actions/container_instance.rb', line 23 def remove end |
.update ⇒ Object
20 21 |
# File 'lib/twistlock_control/actions/container_instance.rb', line 20 def update end |