mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 14:39:30 -02:30
Handle inventory types where Automation Hub collection names differ
Move imports added by Bill to be in-line, because utils should not import models at top Remove more get_licenser inline imports
This commit is contained in:
@@ -51,7 +51,6 @@ __all__ = [
|
||||
'underscore_to_camelcase',
|
||||
'memoize',
|
||||
'memoize_delete',
|
||||
'get_licenser',
|
||||
'get_awx_http_client_headers',
|
||||
'get_awx_version',
|
||||
'update_scm_url',
|
||||
@@ -255,18 +254,6 @@ def get_awx_http_client_headers():
|
||||
return headers
|
||||
|
||||
|
||||
def get_licenser(*args, **kwargs):
|
||||
from awx.main.utils.licensing import Licenser, OpenLicense
|
||||
|
||||
try:
|
||||
if os.path.exists('/var/lib/awx/.tower_version'):
|
||||
return Licenser(*args, **kwargs)
|
||||
else:
|
||||
return OpenLicense()
|
||||
except Exception as e:
|
||||
raise ValueError(_('Error importing License: %s') % e)
|
||||
|
||||
|
||||
def update_scm_url(scm_type, url, username=True, password=True, check_special_cases=True, scp_format=False):
|
||||
"""
|
||||
Update the given SCM URL to add/replace/remove the username/password. When
|
||||
|
||||
Reference in New Issue
Block a user