remove source_regions

This commit is contained in:
Chris Meyers
2020-07-27 11:04:51 -04:00
committed by Ryan Petrello
parent f32716a0f1
commit a8a47f314e
11 changed files with 21 additions and 236 deletions

View File

@@ -45,7 +45,7 @@ __all__ = [
'get_object_or_400', 'camelcase_to_underscore', 'underscore_to_camelcase', 'memoize',
'memoize_delete', 'get_ansible_version', 'get_licenser', 'get_awx_http_client_headers',
'get_awx_version', 'update_scm_url', 'get_type_for_model', 'get_model_for_type',
'copy_model_by_class', 'region_sorting', 'copy_m2m_relationships',
'copy_model_by_class', 'copy_m2m_relationships',
'prefetch_page_capabilities', 'to_python_boolean', 'ignore_inventory_computed_fields',
'ignore_inventory_group_removal', '_inventory_updates', 'get_pk_from_dict', 'getattrd',
'getattr_dne', 'NoDefaultProvided', 'get_current_apps', 'set_current_apps',
@@ -87,15 +87,6 @@ def to_python_boolean(value, allow_none=False):
raise ValueError(_(u'Unable to convert "%s" to boolean') % value)
def region_sorting(region):
# python3's removal of sorted(cmp=...) is _stupid_
if region[1].lower() == 'all':
return ''
elif region[1].lower().startswith('us'):
return region[1]
return 'ZZZ' + str(region[1])
def camelcase_to_underscore(s):
'''
Convert CamelCase names to lowercase_with_underscore.