Class: SwarmClusterCliOpe::Models::Task
- Defined in:
- lib/swarm_cluster_cli_ope/models/task.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
- #id ⇒ String
- #name ⇒ String
-
#node ⇒ String
Nome dell’immagine.
Instance Method Summary collapse
-
#container ⇒ Object
Estrapola il container dal task.
Methods inherited from Base
#docker_command, #docker_inspect, #initialize, #mapped_uri_connection
Methods included from LoggerConcern
Constructor Details
This class inherits a constructor from SwarmClusterCliOpe::Models::Base
Instance Attribute Details
#id ⇒ String
8 9 10 |
# File 'lib/swarm_cluster_cli_ope/models/task.rb', line 8 def id @id end |
#name ⇒ String
6 7 8 |
# File 'lib/swarm_cluster_cli_ope/models/task.rb', line 6 def name @name end |
#node ⇒ String
Returns nome dell’immagine.
10 11 12 |
# File 'lib/swarm_cluster_cli_ope/models/task.rb', line 10 def node @node end |
Instance Method Details
#container ⇒ Object
Estrapola il container dal task
15 16 17 18 19 20 21 22 23 |
# File 'lib/swarm_cluster_cli_ope/models/task.rb', line 15 def container stack_info = docker_inspect cmd = Commands::Container.new(connection_uri: cfgs.get_node_by_id(stack_info.NodeID).connection_uri) container = cmd.docker_inspect(stack_info.Status["ContainerStatus"]["ContainerID"]).result(object_class: Container).first container end |