community.general/lib/ansible/plugins/httpapi
Chris Van Heuveln 874fd70d10 httpapi/nxos_facts: raise ConnectionError is missing `code` (#53406)
* `nxos_facts` crashes with certain nxos images; e.g. `7.0(3)I7(3)` as a result of this call:
  ```
        data = self.run('show lldp neighbors', output='json')
  ```
  ...which returns `ERROR: No neighbour information` when the device has no neighbors.

* This response causes httpapi's `handle_reponse()` to raise a ConnectionError, which is caught by `utils/jsonrpc.py` which is expecting `code` in the exception data:

  ```
             except ConnectionError as exc:
                 display.vvv(traceback.format_exc())
                 error = self.error(code=exc.code, message=to_text(exc))
  ```

* Found by: `nxos_facts/tests/common/not_hardware.yaml:7`
2019-03-07 08:16:28 -05:00
..
__init__.py Change handle_httperror in httpapi plugins (#53391) 2019-03-06 12:13:58 -05:00
checkpoint.py Add checkpoint_session module (#50930) 2019-01-16 13:19:36 +01:00
eos.py Allow persistent connection plugins to queue messages back to ansible-connection (#49977) 2018-12-19 10:54:42 -05:00
fortimanager.py Fortinet FortiManager Connection Plugin RC, plus associated utilities (#50336) 2019-02-07 08:55:30 -05:00
ftd.py Change handle_httperror in httpapi plugins (#53391) 2019-03-06 12:13:58 -05:00
nxos.py httpapi/nxos_facts: raise ConnectionError is missing `code` (#53406) 2019-03-07 08:16:28 -05:00
restconf.py Change handle_httperror in httpapi plugins (#53391) 2019-03-06 12:13:58 -05:00