mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-25 09:21:48 -05:00
Rename managed_by_tower to managed
This commit is contained in:
committed by
Shane McDonald
parent
6db4732bf3
commit
06b04007a0
@@ -366,7 +366,7 @@ def get_allowed_fields(obj, serializer_mapping):
|
||||
fields_excluded = ACTIVITY_STREAM_FIELD_EXCLUSIONS.get(model_name, [])
|
||||
# see definition of from_db for CredentialType
|
||||
# injection logic of any managed types are incompatible with activity stream
|
||||
if model_name == 'credentialtype' and obj.managed_by_tower and obj.namespace:
|
||||
if model_name == 'credentialtype' and obj.managed and obj.namespace:
|
||||
fields_excluded.extend(['inputs', 'injectors'])
|
||||
if fields_excluded:
|
||||
allowed_fields = [f for f in allowed_fields if f not in fields_excluded]
|
||||
|
||||
@@ -7,18 +7,18 @@ from awx.main.models.execution_environments import ExecutionEnvironment
|
||||
|
||||
|
||||
def get_control_plane_execution_environment():
|
||||
return ExecutionEnvironment.objects.filter(organization=None, managed_by_tower=True).first()
|
||||
return ExecutionEnvironment.objects.filter(organization=None, managed=True).first()
|
||||
|
||||
|
||||
def get_default_execution_environment():
|
||||
if settings.DEFAULT_EXECUTION_ENVIRONMENT is not None:
|
||||
return settings.DEFAULT_EXECUTION_ENVIRONMENT
|
||||
installed_default = ExecutionEnvironment.objects.filter(
|
||||
image__in=[ee['image'] for ee in settings.GLOBAL_JOB_EXECUTION_ENVIRONMENTS], organization=None, managed_by_tower=False
|
||||
image__in=[ee['image'] for ee in settings.GLOBAL_JOB_EXECUTION_ENVIRONMENTS], organization=None, managed=False
|
||||
).first()
|
||||
if installed_default:
|
||||
return installed_default
|
||||
return ExecutionEnvironment.objects.filter(organization=None, managed_by_tower=False).first()
|
||||
return ExecutionEnvironment.objects.filter(organization=None, managed=False).first()
|
||||
|
||||
|
||||
def get_default_pod_spec():
|
||||
|
||||
Reference in New Issue
Block a user