Skip to content

Commit

Permalink
Merge pull request #8 from wznoinsk/RHOSINFRA-2560
Browse files Browse the repository at this point in the history
add support for 'disconnect' from Jenkins master cli command - lint fix
  • Loading branch information
wznoinsk authored Nov 18, 2019
2 parents c36a256 + 82c740b commit ac0068b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
/dist
/ChangeLog
/.eggs
/.idea/
.idea/
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Michal <[email protected]>
Michal Pryc <[email protected]>
Sorin Sbarnea <[email protected]>
Tristan Cacqueray <[email protected]>
Waldemar Znoinski <[email protected]>
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CHANGES
=======

* add support for 'disconnect' from Jenkins master cli command

0.0.1.dev49
-----------

* Add IP address to the list column
* Add dump config options
* Add directory options to update multiply slaves at once
* Ensure force reservation is only for not reserved nodes
Expand Down
8 changes: 4 additions & 4 deletions devnest/lib/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ def get_base_parser(self):
help=argparse.SUPPRESS)

disconnect_parser = subparsers.add_parser('disconnect',
parents=[node_parser, nest_parser],
formatter_class=formatter,
help='disconnect node(s) from Jenkins master')
parents=[node_parser, nest_parser],
formatter_class=formatter,
help='disconnect node(s) from Jenkins master')
disconnect_parser.set_defaults(action=Action.DISCONNECT)

list_parser = subparsers.add_parser('list',
Expand Down Expand Up @@ -468,7 +468,7 @@ def main(self, argv):
if reserve_node.get_node_status() == NodeStatus.JOB_RUNNING and \
not parser_args.force:
err_msg = "A CI job is is currently running on %s node. Use --force flag " \
"to reserve the node.\n\tIt will be reserved and available once the currently \ " \
"to reserve the node.\n\tIt will be reserved and available once the currently " \
"running CI job finishes\n\tUse:\n\t" \
" $ devnest list -g %s %s\n\tto check if " \
"CI job has finished and you can use it, if so the node "\
Expand Down
2 changes: 1 addition & 1 deletion devnest/lib/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ def disconnect(self, msg='disconnected_by_devnest'):

LOG.info('Disconnecting %s from Jenkins master' % self.node_name)

self.jenkins.requester.post_and_confirm_status("%s/doDisconnect?offlineMessage=%s" % (node_url, msg), data={} )
self.jenkins.requester.post_and_confirm_status("%s/doDisconnect?offlineMessage=%s" % (node_url, msg), data={})

def _update_node_with_node_details(self, node_details):
"""Update node with NodeDetails data.
Expand Down

0 comments on commit ac0068b

Please sign in to comment.