Class: Jenkins2::CLI::ConnectNode
Instance Attribute Summary
#errors, #options
Class Method Summary
collapse
Instance Method Summary
collapse
#call, class_to_command, #initialize, #parse, subcommands
Constructor Details
This class inherits a constructor from Jenkins2::CLI
Class Method Details
.description ⇒ Object
6
7
8
|
# File 'lib/jenkins2/cli/nodes.rb', line 6
def self.description
'Reconnect node(s).'
end
|
Instance Method Details
#add_options ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/jenkins2/cli/nodes.rb', line 10
def add_options
parser.separator 'Mandatory arguments:'
parser.on '-n', '--name X,Y,..', Array, 'Slave name, or "(master)" for master, '\
'comma-separated list is supported.' do |n|
options[:name] = n
end
end
|
#run ⇒ Object
18
19
20
21
22
|
# File 'lib/jenkins2/cli/nodes.rb', line 18
def run
options[:name].all? do |name|
jc.computer(name).launch_agent
end
end
|