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
eos.py
fortimanager.py
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