Class: TwistlockControl::Entities::ContainerConfiguration
- Inherits:
-
ProvisioningConfiguration
- Object
- TwistlockControl::Entity
- ProvisioningConfiguration
- TwistlockControl::Entities::ContainerConfiguration
- Defined in:
- lib/twistlock_control/entities/provisioning_configuration.rb
Overview
Maybe we want ContainerConfiguration to be an entity with its own repository, so we can simply refer to it by id. That will make getting events from the provisioner easier
Instance Method Summary collapse
- #container ⇒ Object
- #container_configurations ⇒ Object
- #container_instance ⇒ Object
- #provisioner ⇒ Object
- #provisioner=(provisioner) ⇒ Object
Methods inherited from ProvisioningConfiguration
Methods inherited from TwistlockControl::Entity
Instance Method Details
#container ⇒ Object
37 38 39 |
# File 'lib/twistlock_control/entities/provisioning_configuration.rb', line 37 def container @container ||= Container.find_by_id(service_id) end |
#container_configurations ⇒ Object
45 46 47 |
# File 'lib/twistlock_control/entities/provisioning_configuration.rb', line 45 def container_configurations [self] end |
#container_instance ⇒ Object
41 42 43 |
# File 'lib/twistlock_control/entities/provisioning_configuration.rb', line 41 def container_instance @container_instance ||= ContainerInstance.find_by_id(container_instance_id) end |
#provisioner ⇒ Object
28 29 30 |
# File 'lib/twistlock_control/entities/provisioning_configuration.rb', line 28 def provisioner @provisioner ||= Provisioner.find_by_id(provisioner_id) end |
#provisioner=(provisioner) ⇒ Object
32 33 34 35 |
# File 'lib/twistlock_control/entities/provisioning_configuration.rb', line 32 def provisioner=(provisioner) @provisioner = provisioner @provisioner_id = provisioner.id end |