class TwistlockControl::Entities::Container

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

Public Instance Methods

consumed_services() click to toggle source

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

# File lib/twistlock_control/entities/container.rb, line 49
def consumed_services
        description.consumed_services
end
provided_services() click to toggle source

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

# File lib/twistlock_control/entities/container.rb, line 43
def provided_services
        description.provided_services
end
serialize() click to toggle source
Calls superclass method
# File lib/twistlock_control/entities/container.rb, line 53
def serialize
        super.merge!(
                description: description ? description.serialize : nil
        )
end

Private Instance Methods

generate_id() click to toggle source
# File lib/twistlock_control/entities/container.rb, line 61
def generate_id
        Digest::SHA256.hexdigest(url)
end