Merge pull request #198 from cchurch/options_meta_updates

Update field metadata returned in OPTIONS response
This commit is contained in:
Chris Church
2015-05-12 17:24:31 -04:00
7 changed files with 74 additions and 30 deletions

View File

@@ -734,6 +734,7 @@ class InventorySourceOptions(BaseModel):
'''
SOURCE_CHOICES = [
('', _('Manual')),
('file', _('Local File, Directory or Script')),
('rax', _('Rackspace Cloud Servers')),
('ec2', _('Amazon EC2')),

View File

@@ -41,6 +41,7 @@ class JobOptions(BaseModel):
job_type = models.CharField(
max_length=64,
choices=JOB_TYPE_CHOICES,
default='run',
)
inventory = models.ForeignKey(
'Inventory',

View File

@@ -203,6 +203,7 @@ class Project(UnifiedJobTemplate, ProjectOptions):
)
scm_update_cache_timeout = models.PositiveIntegerField(
default=0,
blank=True,
)
@classmethod

View File

@@ -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)