Fixes #35468: ADD max_results to the nios api (#35473)

* Fixes #35468: ADD max_results to the nios api

* Fixes #35468: fix nios unittest

* Fixes #35468: document the module docs fragments for nios
This commit is contained in:
Clement Trebuchet 2018-01-30 23:21:45 +01:00 committed by John R Barker
parent c282e4e00f
commit 287f3a609e
3 changed files with 12 additions and 2 deletions

View file

@ -50,7 +50,8 @@ nios_provider_spec = {
'http_pool_connections': dict(type='int', default=10),
'http_pool_maxsize': dict(type='int', default=10),
'max_retries': dict(type='int', default=3),
'wapi_version': dict(default='1.4')
'wapi_version': dict(default='1.4'),
'max_results': dict(type='int', default=1000)
}

View file

@ -76,6 +76,15 @@ options:
variable.
required: false
default: 1.4
max_results:
description:
- Specifies the maximum number of objects to be returned,
if set to a negative number the appliance will return an error when the
number of returned objects would exceed the setting.
- Value can also be specified using C(INFOBLOX_MAX_RESULTS) environment
variable.
required: false
default: 1000
notes:
- "This module must be run locally, which can be achieved by specifying C(connection: local)."
"""

View file

@ -32,7 +32,7 @@ class TestNiosApi(unittest.TestCase):
def test_get_provider_spec(self):
provider_options = ['host', 'username', 'password', 'ssl_verify', 'silent_ssl_warnings',
'http_request_timeout', 'http_pool_connections',
'http_pool_maxsize', 'max_retries', 'wapi_version']
'http_pool_maxsize', 'max_retries', 'wapi_version', 'max_results']
res = api.WapiBase.provider_spec
self.assertIsNotNone(res)
self.assertIn('provider', res)