mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 09:27:31 -02:30
execution model pull container options added
This commit is contained in:
@@ -12,6 +12,12 @@ class ExecutionEnvironment(CommonModel):
|
|||||||
class Meta:
|
class Meta:
|
||||||
ordering = ('-created',)
|
ordering = ('-created',)
|
||||||
|
|
||||||
|
PULL_CHOICES = [
|
||||||
|
('always', _("Always pull container before running.")),
|
||||||
|
('missing', _("No pull option has been selected")),
|
||||||
|
('never', _("Never cull container before running"))
|
||||||
|
]
|
||||||
|
|
||||||
organization = models.ForeignKey(
|
organization = models.ForeignKey(
|
||||||
'Organization',
|
'Organization',
|
||||||
null=True,
|
null=True,
|
||||||
@@ -35,6 +41,11 @@ class ExecutionEnvironment(CommonModel):
|
|||||||
default=None,
|
default=None,
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL,
|
||||||
)
|
)
|
||||||
|
container_options = models.CharField(
|
||||||
|
max_length=1024,
|
||||||
|
choices=PULL_CHOICES,
|
||||||
|
help_text=_('Pull image before running?'),
|
||||||
|
)
|
||||||
|
|
||||||
def get_absolute_url(self, request=None):
|
def get_absolute_url(self, request=None):
|
||||||
return reverse('api:execution_environment_detail', kwargs={'pk': self.pk}, request=request)
|
return reverse('api:execution_environment_detail', kwargs={'pk': self.pk}, request=request)
|
||||||
|
|||||||
Reference in New Issue
Block a user