Skip to content

Commit

Permalink
Revise to return a tuple instead of a list of key value pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
djyasin committed Sep 18, 2024
1 parent 0f4ef47 commit 24158ae
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions awx/main/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import re

from django.utils.translation import gettext_lazy as _

from awx.main.models.inventory import InventorySourceOptions

__all__ = [
Expand All @@ -15,13 +16,10 @@
'STANDARD_INVENTORY_UPDATE_ENV',
]


def get_cloud_providers():
cloud_providers = {key: value.plugin_name for key, value in InventorySourceOptions.injectors.items()}
return cloud_providers
plugin_names = tuple(key for key in InventorySourceOptions.injectors.keys())


CLOUD_PROVIDERS = get_cloud_providers
CLOUD_PROVIDERS = plugin_names
PRIVILEGE_ESCALATION_METHODS = [
('sudo', _('Sudo')),
('su', _('Su')),
Expand Down

0 comments on commit 24158ae

Please sign in to comment.