ansible/lib/ansible
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
..
cli avoid empty groups in json output (#45621) 2018-09-13 15:38:52 -04:00
compat Fix the local and ssh plugins for a cornercase retrying a syscall 2018-08-13 07:17:11 -07:00
config Fix issues with PLUGIN_FILTERS_CFG config handling (#45994) 2018-09-24 14:34:59 -05:00
errors give hint to users when a file is not found 2018-04-10 17:19:03 -04:00
executor Move persistent connections to only use registered variables (#45616) 2018-09-20 09:56:43 -04:00
galaxy Link to the Galaxy platforms list from the meta file template (#34046) 2018-09-17 13:39:54 -05:00
inventory add docstring for ansible.inventory.helpers.get_group_vars 2018-09-14 16:02:45 -04:00
module_utils openshift inventory plugin: fix exception when auth fails (#45826) 2018-09-26 18:16:54 -04:00
modules Update win_robocopy.py (#38633) 2018-09-27 06:28:15 +10:00
parsing Support nested JSON decoding in AnsibleJSONDecoder (#45924) 2018-09-24 14:33:19 -05:00
playbook 2.8 Core Deprecation Removal (#45232) 2018-09-10 15:05:52 -05:00
plugins openshift inventory plugin: fix exception when auth fails (#45826) 2018-09-26 18:16:54 -04:00
template remove unused templar._clean_data() (#42739) 2018-09-11 09:11:03 +02:00
utils docker-py: bump minimal version to 1.8.0 (#46134) 2018-09-26 11:58:32 +05:30
vars Speed up VariableManager by preserving Templar state. (#45572) 2018-09-25 16:24:25 -04:00
__init__.py
constants.py cisco firepower : Make API endpoints configurable via hostvars (#44952) 2018-08-31 18:38:16 +05:30
release.py Codename: How Many More Times 2018-09-04 12:38:29 -04:00