Class: Promote::NodeShell::BaseShell

Inherits:
Object
  • Object
show all
Defined in:
lib/promote/node_shell/base_shell.rb

Direct Known Subclasses

SshShell, WinrmShell

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node, vault) ⇒ BaseShell

Returns a new instance of BaseShell.



4
5
6
7
# File 'lib/promote/node_shell/base_shell.rb', line 4

def initialize(node, vault)
  @node = node
  @vault = vault
end

Instance Attribute Details

#nodeObject

Returns the value of attribute node.



10
11
12
# File 'lib/promote/node_shell/base_shell.rb', line 10

def node
  @node
end

#vaultObject

Returns the value of attribute vault.



9
10
11
# File 'lib/promote/node_shell/base_shell.rb', line 9

def vault
  @vault
end

Instance Method Details

#converge?(ui = nil) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/promote/node_shell/base_shell.rb', line 12

def converge?(ui = nil)
  execute('chef-client', ui) == 0
end

#execute(command, ui = nil) ⇒ Object



16
17
# File 'lib/promote/node_shell/base_shell.rb', line 16

def execute(command, ui = nil)
end