Class: Jenkins2::CLI::UpdateNode
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
169
170
171
|
# File 'lib/jenkins2/cli/nodes.rb', line 169
def self.description
'Update the node definition XML from stdin. The opposite of the get-node command.'
end
|
Instance Method Details
#add_options ⇒ Object
173
174
175
176
177
178
|
# File 'lib/jenkins2/cli/nodes.rb', line 173
def add_options
parser.separator 'Mandatory arguments:'
parser.on '-n', '--name NAME', 'Name of the node.' do |n|
options[:name] = n
end
end
|
#run ⇒ Object
180
181
182
|
# File 'lib/jenkins2/cli/nodes.rb', line 180
def run
jc.computer(options[:name]).update($stdin.read)
end
|