execution model pull container options added

This commit is contained in:
Rebeccah 2021-01-27 16:24:00 -05:00 committed by Shane McDonald
parent 6a7520d10f
commit 92f0af684c

View File

@ -12,6 +12,12 @@ class ExecutionEnvironment(CommonModel):
class Meta:
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',
null=True,
@ -35,6 +41,11 @@ class ExecutionEnvironment(CommonModel):
default=None,
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):
return reverse('api:execution_environment_detail', kwargs={'pk': self.pk}, request=request)