← Back to team overview

python-jenkins-developers team mailing list archive

Re: [Bug 1530085] Re: The methods enable_node and disable_node has no effect

 

Even sleeping 5 secs after each instruction did not make any change for me.
I have forgot to tell you that I have made my test on Windows 8.1, maybe is
it something about the OS ?

2015-12-30 18:54 GMT+01:00 Khai Do <1530085@xxxxxxxxxxxxxxxxxx>:

> you may need a sleep after create_node() to give jenkins time to create
> the node and register it before you can use the other methods to
> enable/disable/get node info on the slave.
>
> ** Changed in: python-jenkins
>        Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1530085
>
> Title:
>   The methods enable_node and disable_node has no effect
>
> Status in Python Jenkins:
>   Incomplete
>
> Bug description:
>   Hello,
>
>   I am currently building a software able to manage Jenkins work with your
> Python API, and I want to be able to disable a node when I don't need it
> for a moment, to reduce the resources needed by Jenkins.
>   For that, I have try to use the method enable_node and disable_node, but
> when i want to check if the node is actually enable or disable, I do not
> see any difference.
>
>   Here is a minimal python code to check the behavior that I have tried to
> describe previously
>   ```
>   import jenkins
>
>   nodeName = "my_node"
>   server = jenkins.Jenkins(JENKINS_LOCALHOST_URL)
>
>   server.create_node(nodeName)
>   print(server.get_node_info(nodeName))
>
>   server.enable_node(nodeName)
>   print(server.get_node_info(nodeName))
>
>   server.disable_node(nodeName)
>   print(server.get_node_info(nodeName))
>   ```
>
>   Maybe the information is available somewhere else.
>
>   I use the python version 3.5 and Jenkins ver. 1.643
>
>   Thank you beforehand for your help.
>
>   Best regards,
>   Xavier
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/python-jenkins/+bug/1530085/+subscriptions
>

-- 
You received this bug notification because you are a member of Python
Jenkins Developers, which is subscribed to Python Jenkins.
https://bugs.launchpad.net/bugs/1530085

Title:
  The methods enable_node and disable_node has no effect

Status in Python Jenkins:
  Incomplete

Bug description:
  Hello,

  I am currently building a software able to manage Jenkins work with your Python API, and I want to be able to disable a node when I don't need it for a moment, to reduce the resources needed by Jenkins.
  For that, I have try to use the method enable_node and disable_node, but when i want to check if the node is actually enable or disable, I do not see any difference.

  Here is a minimal python code to check the behavior that I have tried to describe previously
  ```
  import jenkins

  nodeName = "my_node"
  server = jenkins.Jenkins(JENKINS_LOCALHOST_URL)

  server.create_node(nodeName)
  print(server.get_node_info(nodeName))

  server.enable_node(nodeName)
  print(server.get_node_info(nodeName))

  server.disable_node(nodeName)
  print(server.get_node_info(nodeName))
  ```

  Maybe the information is available somewhere else.

  I use the python version 3.5 and Jenkins ver. 1.643

  Thank you beforehand for your help.

  Best regards,
  Xavier

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/1530085/+subscriptions


References