mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 17:28:51 -03:30
AC-550 Expose license errors flag, update how license error shows in inventory update stdout.
This commit is contained in:
@@ -743,5 +743,7 @@ class Command(NoArgsCommand):
|
|||||||
self.inventory_update.save(update_fields=['status', 'result_traceback'])
|
self.inventory_update.save(update_fields=['status', 'result_traceback'])
|
||||||
transaction.commit()
|
transaction.commit()
|
||||||
|
|
||||||
if exc:
|
if exc and isinstance(exc, CommandError):
|
||||||
|
sys.exit(1)
|
||||||
|
elif exc:
|
||||||
raise exc
|
raise exc
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ SUMMARIZABLE_FK_FIELDS = {
|
|||||||
'job_template': DEFAULT_SUMMARY_FIELDS,
|
'job_template': DEFAULT_SUMMARY_FIELDS,
|
||||||
'last_job': DEFAULT_SUMMARY_FIELDS + ('status', 'failed',),
|
'last_job': DEFAULT_SUMMARY_FIELDS + ('status', 'failed',),
|
||||||
'last_job_host_summary': DEFAULT_SUMMARY_FIELDS + ('failed',),
|
'last_job_host_summary': DEFAULT_SUMMARY_FIELDS + ('failed',),
|
||||||
'last_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed',),
|
'last_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed', 'license_error'),
|
||||||
'current_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed',),
|
'current_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed', 'license_error'),
|
||||||
'inventory_source': ('source', 'last_updated', 'status'),
|
'inventory_source': ('source', 'last_updated', 'status'),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -723,7 +723,7 @@ class InventoryUpdateSerializer(BaseSerializer):
|
|||||||
fields = ('id', 'url', 'related', 'summary_fields', 'created',
|
fields = ('id', 'url', 'related', 'summary_fields', 'created',
|
||||||
'modified', 'inventory_source', 'status', 'failed',
|
'modified', 'inventory_source', 'status', 'failed',
|
||||||
'result_stdout', 'result_traceback', 'job_args', 'job_cwd',
|
'result_stdout', 'result_traceback', 'job_args', 'job_cwd',
|
||||||
'job_env')
|
'job_env', 'license_error')
|
||||||
|
|
||||||
def get_related(self, obj):
|
def get_related(self, obj):
|
||||||
if obj is None:
|
if obj is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user