:param exclusive: tied to specific job, boolean
:return: node obj
"""
- NODE_TYPE = 'jenkins.slaves.DumbSlave$DescriptorImpl'
+ NODE_TYPE = 'hudson.slaves.DumbSlave$DescriptorImpl'
MODE = 'NORMAL'
if self.has_node(name):
return Node(nodename=name, baseurl=self.get_node_url(nodename=name), jenkins_obj=self)
'labelString' : labels,
'mode' : MODE,
'type' : NODE_TYPE,
- 'retentionStrategy' : { 'stapler-class' : 'jenkins.slaves.RetentionStrategy$Always' },
+ 'retentionStrategy' : { 'stapler-class' : 'hudson.slaves.RetentionStrategy$Always' },
'nodeProperties' : { 'stapler-class-bag' : 'true' },
- 'launcher' : { 'stapler-class' : 'jenkins.slaves.JNLPLauncher' }
+ 'launcher' : { 'stapler-class' : 'hudson.slaves.JNLPLauncher' }
})
}
- url = "%(nodeurl)s/doCreateItem?%(params)s" % {
- 'nodeurl': self.get_node_url(),
- 'params': urllib.urlencode(params)
- }
- print url
+ url = self.get_node_url() + "doCreateItem?%s" % urllib.urlencode(params)
+
fn_urlopen = self.get_jenkins_obj().get_opener()
try:
fn_urlopen(url).read()