remove job ask_ fields that reference JT

This commit is contained in:
AlanCoding
2019-04-30 13:35:58 -04:00
parent aaeb2d6fb9
commit 81f0662161
2 changed files with 2 additions and 85 deletions

View File

@@ -3229,41 +3229,12 @@ class JobTemplateWithSpecSerializer(JobTemplateSerializer):
class JobSerializer(UnifiedJobSerializer, JobOptionsSerializer):
passwords_needed_to_start = serializers.ReadOnlyField()
ask_diff_mode_on_launch = serializers.BooleanField(
read_only=True,
help_text=_('This field has been deprecated and will be removed in a future release'))
ask_variables_on_launch = serializers.BooleanField(
read_only=True,
help_text=_('This field has been deprecated and will be removed in a future release'))
ask_limit_on_launch = serializers.BooleanField(
read_only=True,
help_text=_('This field has been deprecated and will be removed in a future release'))
ask_skip_tags_on_launch = serializers.BooleanField(
read_only=True,
help_text=_('This field has been deprecated and will be removed in a future release'))
ask_tags_on_launch = serializers.BooleanField(
read_only=True,
help_text=_('This field has been deprecated and will be removed in a future release'))
ask_job_type_on_launch = serializers.BooleanField(
read_only=True,
help_text=_('This field has been deprecated and will be removed in a future release'))
ask_verbosity_on_launch = serializers.BooleanField(
read_only=True,
help_text=_('This field has been deprecated and will be removed in a future release'))
ask_inventory_on_launch = serializers.BooleanField(
read_only=True,
help_text=_('This field has been deprecated and will be removed in a future release'))
ask_credential_on_launch = serializers.BooleanField(
read_only=True,
help_text=_('This field has been deprecated and will be removed in a future release'))
artifacts = serializers.SerializerMethodField()
class Meta:
model = Job
fields = ('*', 'job_template', 'passwords_needed_to_start', 'ask_diff_mode_on_launch',
'ask_variables_on_launch', 'ask_limit_on_launch', 'ask_tags_on_launch', 'ask_skip_tags_on_launch',
'ask_job_type_on_launch', 'ask_verbosity_on_launch', 'ask_inventory_on_launch',
'ask_credential_on_launch', 'allow_simultaneous', 'artifacts', 'scm_revision',
fields = ('*', 'job_template', 'passwords_needed_to_start',
'allow_simultaneous', 'artifacts', 'scm_revision',
'instance_group', 'diff_mode', 'job_slice_number', 'job_slice_count')
def get_related(self, obj):

View File

@@ -613,60 +613,6 @@ class Job(UnifiedJob, JobOptions, SurveyJobMixin, JobNotificationMixin, TaskMana
new_prompts['_eager_fields']['job_slice_count'] = self.job_slice_count
return super(Job, self).copy_unified_job(**new_prompts)
@property
def ask_diff_mode_on_launch(self):
if self.job_template is not None:
return self.job_template.ask_diff_mode_on_launch
return False
@property
def ask_variables_on_launch(self):
if self.job_template is not None:
return self.job_template.ask_variables_on_launch
return False
@property
def ask_limit_on_launch(self):
if self.job_template is not None:
return self.job_template.ask_limit_on_launch
return False
@property
def ask_tags_on_launch(self):
if self.job_template is not None:
return self.job_template.ask_tags_on_launch
return False
@property
def ask_skip_tags_on_launch(self):
if self.job_template is not None:
return self.job_template.ask_skip_tags_on_launch
return False
@property
def ask_job_type_on_launch(self):
if self.job_template is not None:
return self.job_template.ask_job_type_on_launch
return False
@property
def ask_verbosity_on_launch(self):
if self.job_template is not None:
return self.job_template.ask_verbosity_on_launch
return False
@property
def ask_inventory_on_launch(self):
if self.job_template is not None:
return self.job_template.ask_inventory_on_launch
return False
@property
def ask_credential_on_launch(self):
if self.job_template is not None:
return self.job_template.ask_credential_on_launch
return False
def get_passwords_needed_to_start(self):
return self.passwords_needed_to_start