Fix 'MaxRecords' type issues by _get_param()
It alternates _get_param() with _get_int_param() on parsing the parameter 'MaxRecords'.
This commit is contained in:
parent
6bc07360a1
commit
5d91ce20fc
@ -48,7 +48,7 @@ class AutoScalingResponse(BaseResponse):
|
|||||||
start = all_names.index(marker) + 1
|
start = all_names.index(marker) + 1
|
||||||
else:
|
else:
|
||||||
start = 0
|
start = 0
|
||||||
max_records = self._get_param('MaxRecords', 50) # the default is 100, but using 50 to make testing easier
|
max_records = self._get_int_param('MaxRecords', 50) # the default is 100, but using 50 to make testing easier
|
||||||
launch_configurations_resp = all_launch_configurations[start:start + max_records]
|
launch_configurations_resp = all_launch_configurations[start:start + max_records]
|
||||||
next_token = None
|
next_token = None
|
||||||
if len(all_launch_configurations) > start + max_records:
|
if len(all_launch_configurations) > start + max_records:
|
||||||
|
@ -95,7 +95,7 @@ class RDSResponse(BaseResponse):
|
|||||||
start = all_ids.index(marker) + 1
|
start = all_ids.index(marker) + 1
|
||||||
else:
|
else:
|
||||||
start = 0
|
start = 0
|
||||||
page_size = self._get_param('MaxRecords', 50) # the default is 100, but using 50 to make testing easier
|
page_size = self._get_int_param('MaxRecords', 50) # the default is 100, but using 50 to make testing easier
|
||||||
instances_resp = all_instances[start:start + page_size]
|
instances_resp = all_instances[start:start + page_size]
|
||||||
next_marker = None
|
next_marker = None
|
||||||
if len(all_instances) > start + page_size:
|
if len(all_instances) > start + page_size:
|
||||||
|
@ -280,7 +280,7 @@ class RDS2Response(BaseResponse):
|
|||||||
|
|
||||||
def describe_option_groups(self):
|
def describe_option_groups(self):
|
||||||
kwargs = self._get_option_group_kwargs()
|
kwargs = self._get_option_group_kwargs()
|
||||||
kwargs['max_records'] = self._get_param('MaxRecords')
|
kwargs['max_records'] = self._get_int_param('MaxRecords')
|
||||||
kwargs['marker'] = self._get_param('Marker')
|
kwargs['marker'] = self._get_param('Marker')
|
||||||
option_groups = self.backend.describe_option_groups(kwargs)
|
option_groups = self.backend.describe_option_groups(kwargs)
|
||||||
template = self.response_template(DESCRIBE_OPTION_GROUP_TEMPLATE)
|
template = self.response_template(DESCRIBE_OPTION_GROUP_TEMPLATE)
|
||||||
@ -329,7 +329,7 @@ class RDS2Response(BaseResponse):
|
|||||||
|
|
||||||
def describe_db_parameter_groups(self):
|
def describe_db_parameter_groups(self):
|
||||||
kwargs = self._get_db_parameter_group_kwargs()
|
kwargs = self._get_db_parameter_group_kwargs()
|
||||||
kwargs['max_records'] = self._get_param('MaxRecords')
|
kwargs['max_records'] = self._get_int_param('MaxRecords')
|
||||||
kwargs['marker'] = self._get_param('Marker')
|
kwargs['marker'] = self._get_param('Marker')
|
||||||
db_parameter_groups = self.backend.describe_db_parameter_groups(kwargs)
|
db_parameter_groups = self.backend.describe_db_parameter_groups(kwargs)
|
||||||
template = self.response_template(
|
template = self.response_template(
|
||||||
|
Loading…
Reference in New Issue
Block a user