class Marathon::Container
This class represents a Marathon
Container
information. It is included in App's definition. See mesosphere.github.io/marathon/docs/native-docker.html for full details.
Constants
- ACCESSORS
- DEFAULTS
- SUPPERTED_TYPES
Attributes
docker[R]
volumes[R]
Public Class Methods
new(hash)
click to toggle source
Create a new container object. hash
: Hash returned by API.
Calls superclass method
Marathon::Base::new
# File lib/marathon/container.rb, line 17 def initialize(hash) super(Marathon::Util.merge_keywordized_hash(DEFAULTS, hash), ACCESSORS) Marathon::Util.validate_choice('type', type, SUPPERTED_TYPES) @docker = Marathon::ContainerDocker.new(info[:docker]) if info[:docker] @volumes = info[:volumes].map { |e| Marathon::ContainerVolume.new(e) } end
Public Instance Methods
to_s()
click to toggle source
# File lib/marathon/container.rb, line 24 def to_s "Marathon::Container { :type => #{type} :docker => #{Marathon::Util.items_to_pretty_s(docker)}"\ + " :volumes => #{Marathon::Util.items_to_pretty_s(volumes)} }" end