mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 19:35:02 -02:30
evaluate max bulk settings in validate and improve OPTIONS (#16)
* evaluate max bulk settings in validate... instead of in class attribute. This makes them load at request time instead of at app start up time, which fixes problems with test as well as I think will be better user experience if admins actually do change the setting it will apply without restarting django app on each instance * improve OPTIONS by not manually declaring feilds alan pointed this out
This commit is contained in:
@@ -775,26 +775,25 @@ register(
|
||||
help_text=_('Indicates whether the instance is part of a kubernetes-based deployment.'),
|
||||
)
|
||||
|
||||
# TODO : Commenting below bulk job settings because of failing conftest import. Figure out the conftest issue and then uncomment
|
||||
# register(
|
||||
# 'BULK_JOB_MAX_LAUNCH',
|
||||
# field_class=fields.IntegerField,
|
||||
# default=100,
|
||||
# label=_('Max jobs to allow bulk jobs to launch'),
|
||||
# help_text=_('Max jobs to allow bulk jobs to launch'),
|
||||
# category=_('Bulk Actions'),
|
||||
# category_slug='bulk',
|
||||
# )
|
||||
#
|
||||
# register(
|
||||
# 'BULK_HOST_MAX_CREATE',
|
||||
# field_class=fields.IntegerField,
|
||||
# default=1000,
|
||||
# label=_('Max number of hosts to allow to be created in a single bulk action'),
|
||||
# help_text=_('Max number of hosts to allow to be created in a single bulk action'),
|
||||
# category=_('Bulk Actions'),
|
||||
# category_slug='bulk',
|
||||
# )
|
||||
register(
|
||||
'BULK_JOB_MAX_LAUNCH',
|
||||
field_class=fields.IntegerField,
|
||||
default=100,
|
||||
label=_('Max jobs to allow bulk jobs to launch'),
|
||||
help_text=_('Max jobs to allow bulk jobs to launch'),
|
||||
category=_('Bulk Actions'),
|
||||
category_slug='bulk',
|
||||
)
|
||||
|
||||
register(
|
||||
'BULK_HOST_MAX_CREATE',
|
||||
field_class=fields.IntegerField,
|
||||
default=1000,
|
||||
label=_('Max number of hosts to allow to be created in a single bulk action'),
|
||||
help_text=_('Max number of hosts to allow to be created in a single bulk action'),
|
||||
category=_('Bulk Actions'),
|
||||
category_slug='bulk',
|
||||
)
|
||||
|
||||
|
||||
def logging_validate(serializer, attrs):
|
||||
|
||||
Reference in New Issue
Block a user