feature request: support adding node with xml file

Bug #1524055 reported by Khai Do
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Jenkins
New
Undecided
Unassigned

Bug Description

This is a feature request. It would be nice if python-jenkins create_node() method could read an xml config containing the node info and create the node from the xml data. That's how create_job() method works so would be great if there was an equivalent for create_node()

Example:

NODE_CONFIG_XML = '''<?xml version="1.0" encoding="UTF-8"?>
<slave>
  <name>slave1</name>
  <description>This is my test slave</description>
  <remoteFS>/home/juser</remoteFS>
  <numExecutors>2</numExecutors>
  <mode>NORMAL</mode>
  <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/>
  <launcher class="hudson.plugins.sshslaves.SSHLauncher">
    <host>slave1.jenkins.org</host>
    <port>22</port>
    <credentialsId>10f3a3ce-b5b5-4279-b60b-43b5bdb0e46a</credentialsId>
  </launcher>
  <label>precide py27</label>
  <nodeProperties/>
  <userId>anonymous</userId>
</slave>'''

method invocation:
create_node('slave1', NODE_CONFIG_XML)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.