Allow use of credential password prompting with split JTs

also
*update test to work with new JT callback call pattern
*fix spelling in template
This commit is contained in:
AlanCoding
2018-10-04 11:50:08 -04:00
parent dccd7f2e9d
commit 475a701f78
4 changed files with 24 additions and 13 deletions

View File

@@ -342,7 +342,10 @@ class UnifiedJobTemplate(PolymorphicModel, CommonModelNameNotUnique, Notificatio
unallowed_fields = set(kwargs.keys()) - set(fields)
validated_kwargs = kwargs.copy()
if unallowed_fields:
logger.warn('Fields {} are not allowed as overrides.'.format(unallowed_fields))
if parent_field_name is None:
logger.warn(six.text_type('Fields {} are not allowed as overrides to spawn {} from {}.').format(
six.text_type(', ').join(unallowed_fields), unified_job, self
))
map(validated_kwargs.pop, unallowed_fields)
unified_job = copy_model_by_class(self, unified_job_class, fields, validated_kwargs)