Files
community.general/lib/ansible/module_utils
Pilou 2fd18c77ae openshift inventory plugin: fix exception when auth fails (#45826)
* openshift inventory: fix exception when auth fails

Fix 'ForbiddenError' object has no attribute 'message':

    [WARNING]:  * Failed to parse test.yml with openshift plugin: 'ForbiddenError' object has no attribute 'message'
     File "ansible/lib/ansible/inventory/manager.py", line 270, in parse_source
       plugin.parse(self._inventory, self._loader, source, cache=cache)
     File "ansible/lib/ansible/plugins/inventory/openshift.py", line 122, in parse
       self.setup(config_data, cache, cache_key)
     File "ansible/lib/ansible/module_utils/k8s/inventory.py", line 58, in setup
       self.fetch_objects(connections)
     File "ansible/lib/ansible/module_utils/k8s/inventory.py", line 250, in fetch_objects
       super(OpenShiftInventoryHelper, self).fetch_objects(connections)
     File "ansible/lib/ansible/module_utils/k8s/inventory.py", line 81, in fetch_objects
       namespaces = self.get_available_namespaces(client)
     File "ansible/lib/ansible/module_utils/k8s/inventory.py", line 95, in get_available_namespaces
       raise K8sInventoryException('Error fetching Namespace list: {0}'.format(exc.message))

Don't try to get 'message' attribute from:
- K8sInventoryException instances
- Exception instances
- KubernetesException instances (because KubernetesException can be
  Exception)

* move k8s/OpenShift inventory plugin dedicated code

inventory plugin specific code should not be located in
lib/ansible/module_utils directory. Then ansible.utils methods can be
reused (for example Display).

* Remove unused class variables 'helper'

unused since 4d77878654.
2018-09-26 18:16:54 -04:00
..
2018-09-04 08:38:57 -04:00
2017-08-07 19:46:06 -07:00
2017-06-02 12:14:11 +01:00
2017-06-02 12:14:11 +01:00
2017-06-02 12:14:11 +01:00
2018-08-21 16:32:37 +02:00
2018-09-24 21:03:50 +02:00
2017-11-21 10:03:34 -08:00
2017-09-13 01:53:08 -07:00
2018-09-24 10:14:23 -04:00
2018-07-31 13:23:05 -04:00
2017-06-02 12:14:11 +01:00