Skip to content

Commit

Permalink
Merge pull request #506 from rahkumar651991/software_upgrade_error_me…
Browse files Browse the repository at this point in the history
…ssage

Correct message  in case of failure during software install
  • Loading branch information
Nitin Kr committed Jun 30, 2020
2 parents c1e860f + 41a2be7 commit ff7069c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ This Juniper.junos role includes the following modules:
- **juniper_junos_system** — Initiate operational actions on the Junos system.
- **juniper_junos_table** — Retrieve data from a Junos device using a PyEZ table/view.

### PyEZ Version Requirement
For ansible roles 2.4.0 we will need to install junos-eznc(PyEZ) version 2.5.0 or higher.

### Important Changes

Significant changes to the modules in the Juniper.junos role were made between versions 1.4.3 and 2.0.0.
Expand Down
9 changes: 5 additions & 4 deletions library/juniper_junos_software.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,13 +685,14 @@ def main():
junos_module.logger.debug("Install parameters are: %s",
str(install_params))
junos_module.add_sw()
ok = junos_module.sw.install(**install_params)
ok, msg_ret = junos_module.sw.install(**install_params)
if ok is not True:
results['msg'] = 'Unable to install the software'
results['msg'] = 'Unable to install the software %s', msg_ret
junos_module.fail_json(**results)
msg = 'Package %s successfully installed.' % (
msg = 'Package %s successfully installed. Response from device is: %s' % (
install_params.get('package') or
install_params.get('pkg_set'))
install_params.get('pkg_set'),
msg_ret)
results['msg'] = msg
junos_module.logger.debug(msg)
except (junos_module.pyez_exception.ConnectError,
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ansible >= 2.4
junos-eznc
jsnapy==1.3.2
junos-eznc >= 2.5.0
jsnapy>=1.3.2
jxmlease
docker
junos-netconify
4 changes: 2 additions & 2 deletions version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION = "2.3.2"
DATE = "2020-May-28"
VERSION = "2.4.0"
DATE = "2020-June-30"

0 comments on commit ff7069c

Please sign in to comment.