Add in more model changes around execution environments

- a new unique name field to EE
- a new configure-Tower-in-Tower setting DEFAULT_EXECUTION_ENVIRONMENT
- an Org-level execution_environment_admin_role
- a default_environment field on Project
- a new Container Registry credential type
- order EEs by reverse of the created timestamp
- a method to resolve which EE to use on jobs
This commit is contained in:
Jeff Bradberry
2020-11-17 14:46:42 -05:00
committed by Shane McDonald
parent c0faa39b53
commit c1133b3f6d
14 changed files with 135 additions and 10 deletions

View File

@@ -2,16 +2,15 @@ from django.db import models
from django.utils.translation import ugettext_lazy as _
from awx.api.versioning import reverse
from awx.main.models.base import PrimordialModel
from awx.main.models.base import CommonModel
__all__ = ['ExecutionEnvironment']
class ExecutionEnvironment(PrimordialModel):
class ExecutionEnvironment(CommonModel):
class Meta:
unique_together = ('organization', 'image')
ordering = (models.F('organization_id').asc(nulls_first=True), 'image')
ordering = ('-created',)
organization = models.ForeignKey(
'Organization',