Class: Jenkins2::CLI::OnlineNode
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
150
151
152
153
|
# File 'lib/jenkins2/cli/nodes.rb', line 150
def self.description
'Resume using a node for performing builds, to cancel out the earlier "offline-node" '\
'command.'
end
|
Instance Method Details
#add_options ⇒ Object
155
156
157
158
159
160
|
# File 'lib/jenkins2/cli/nodes.rb', line 155
def add_options
parser.separator 'Mandatory arguments:'
parser.on '-n', '--name NAME', 'Name of the node or "(master)" for master.' do |n|
options[:name] = n
end
end
|
#run ⇒ Object
162
163
164
165
|
# File 'lib/jenkins2/cli/nodes.rb', line 162
def run
return unless jc.computer(options[:name]).temporarilyOffline
jc.computer(options[:name]).toggle_offline
end
|