From 16afa1815501d6fc98c9567918172901515da920 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Tue, 15 Oct 2024 13:42:28 -0400 Subject: [PATCH] Add splitted up inventory source plugins Fix CI failure introduced by https://github.com/ansible/awx-plugins/commit/7d83b7dfdb9d5db81b4b88cf85166ded33d176de --- awx/main/constants.py | 20 ++++++++++++++++++- .../test_inventory_source_injectors.py | 4 ++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/awx/main/constants.py b/awx/main/constants.py index 5610dde101ec..7a93481f6f3e 100644 --- a/awx/main/constants.py +++ b/awx/main/constants.py @@ -14,7 +14,25 @@ 'STANDARD_INVENTORY_UPDATE_ENV', ] -CLOUD_PROVIDERS = ('azure_rm', 'ec2', 'gce', 'vmware', 'openstack', 'rhv', 'satellite6', 'controller', 'insights', 'terraform', 'openshift_virtualization') +CLOUD_PROVIDERS = ( + 'azure_rm', + 'ec2', + 'gce', + 'vmware', + 'openstack', + 'rhv', + 'satellite6', + 'controller', + 'insights', + 'terraform', + 'openshift_virtualization', + 'controller_supported', + 'rhv_supported', + 'openshift_virtualization_supported', + 'insights_supported', + 'satellite6_supported', +) + PRIVILEGE_ESCALATION_METHODS = [ ('sudo', _('Sudo')), ('su', _('Su')), diff --git a/awx/main/tests/functional/test_inventory_source_injectors.py b/awx/main/tests/functional/test_inventory_source_injectors.py index 6c93717b76b5..9cc8d72ab2ed 100644 --- a/awx/main/tests/functional/test_inventory_source_injectors.py +++ b/awx/main/tests/functional/test_inventory_source_injectors.py @@ -47,8 +47,12 @@ def generate_fake_var(element): def credential_kind(source): """Given the inventory source kind, return expected credential kind""" + if source.endswith('_supported'): + source = source[:-10] + if source == 'openshift_virtualization': return 'kubernetes_bearer_token' + return source.replace('ec2', 'aws')