Class: TwistlockControl::Entities::Container

Inherits:
Service show all
Defined in:
lib/twistlock_control/entities/container.rb

Overview

A container is a service that can be provisioned on a Twistlock provisioner node.

Instance Method Summary collapse

Methods inherited from Service

deserialize

Methods inherited from PersistedEntity

all, deserialize, find_by_id, find_with_ids, inherited, #remove, #repository, #save

Methods inherited from TwistlockControl::Entity

#==

Instance Method Details

#consumed_servicesObject

The service can depend on any other services. For example it might require a MySQL service to be linked in on port 3047.



49
50
51
# File 'lib/twistlock_control/entities/container.rb', line 49

def consumed_services
	description.consumed_services
end

#provided_servicesObject

The network services provided by this service. Each service is identified with a name, for example: offers HTTP on port 80.



43
44
45
# File 'lib/twistlock_control/entities/container.rb', line 43

def provided_services
	description.provided_services
end

#serializeObject



53
54
55
56
57
# File 'lib/twistlock_control/entities/container.rb', line 53

def serialize
	super.merge!(
		description: description ? description.serialize : nil
	)
end