Class: Bcome::Node::Kube::Namespace

Inherits:
Base
  • Object
show all
Defined in:
lib/objects/node/kube/namespace.rb

Instance Attribute Summary

Attributes inherited from Base

#resources

Instance Method Summary collapse

Methods inherited from Base

#build, #initialize, #parent, #parse, #run

Constructor Details

This class inherits a constructor from Bcome::Node::Kube::Base

Instance Method Details

#child_node_klassObject



11
12
13
# File 'lib/objects/node/kube/namespace.rb', line 11

def child_node_klass
  ::Bcome::Kube::Node::Pod
end

#get_child_config_from_line(raw_line) ⇒ Object



15
16
17
18
# File 'lib/objects/node/kube/namespace.rb', line 15

def get_child_config_from_line(raw_line)
  name, ready, status, restarts, age = raw_line.split("\s")
  { name: name, ready: ready, status: status, reastarts: restarts, age: age }
end

#get_child_node_commandObject

CONTAINS PODS



7
8
9
# File 'lib/objects/node/kube/namespace.rb', line 7

def get_child_node_command
  "get pods -n #{name}"
end

#nameObject



20
21
22
# File 'lib/objects/node/kube/namespace.rb', line 20

def name
  @config[:name]
end