Class: TwistlockControl::Entities::ContainerConfiguration

Inherits:
ProvisioningConfiguration show all
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

Methods inherited from ProvisioningConfiguration

new

Methods inherited from TwistlockControl::Entity

#==, #serialize

Instance Method Details

#containerObject



37
38
39
# File 'lib/twistlock_control/entities/provisioning_configuration.rb', line 37

def container
	@container ||= Container.find_by_id(service_id)
end

#container_configurationsObject



45
46
47
# File 'lib/twistlock_control/entities/provisioning_configuration.rb', line 45

def container_configurations
	[self]
end

#container_instanceObject



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

#provisionerObject



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