mirror of
https://github.com/ansible/awx.git
synced 2026-03-15 07:57:29 -02:30
Merge pull request #198 from cchurch/options_meta_updates
Update field metadata returned in OPTIONS response
This commit is contained in:
@@ -734,6 +734,7 @@ class InventorySourceOptions(BaseModel):
|
||||
'''
|
||||
|
||||
SOURCE_CHOICES = [
|
||||
('', _('Manual')),
|
||||
('file', _('Local File, Directory or Script')),
|
||||
('rax', _('Rackspace Cloud Servers')),
|
||||
('ec2', _('Amazon EC2')),
|
||||
|
||||
@@ -41,6 +41,7 @@ class JobOptions(BaseModel):
|
||||
job_type = models.CharField(
|
||||
max_length=64,
|
||||
choices=JOB_TYPE_CHOICES,
|
||||
default='run',
|
||||
)
|
||||
inventory = models.ForeignKey(
|
||||
'Inventory',
|
||||
|
||||
@@ -203,6 +203,7 @@ class Project(UnifiedJobTemplate, ProjectOptions):
|
||||
)
|
||||
scm_update_cache_timeout = models.PositiveIntegerField(
|
||||
default=0,
|
||||
blank=True,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -280,7 +280,7 @@ class JobTemplateTest(BaseJobTestMixin, django.test.TestCase):
|
||||
|
||||
# Test that all required fields are really required.
|
||||
data['name'] = 'another new job template'
|
||||
for field in ('name', 'job_type', 'inventory', 'project', 'playbook'):
|
||||
for field in ('name', 'inventory', 'project', 'playbook'):
|
||||
with self.current_user(self.user_sue):
|
||||
d = dict(data.items())
|
||||
d.pop(field)
|
||||
|
||||
Reference in New Issue
Block a user