Fixing nits

This patch is a followup for the nitpicks
for unified limits.

Change-Id: I911c74cfdc317af0ece612c7ffe3bc57a0e5a67d
Related-Patch: https://review.openstack.org/#/c/610479
Related-Patch: https://review.openstack.org/#/c/612226/
Related-Bug: #1797876
This commit is contained in:
Vishakha Agarwal 2018-11-07 09:56:39 +05:30
parent 002128208c
commit 84dc0a2904
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ establish a limit may include:
- a region (optional depending on the service)
.. NOTE:: The `default limit` of registered limit and the `resource limit` of
limit now are limited from `-1` to `2147483647` (integer). `-1` means
project limit now are limited from `-1` to `2147483647` (integer). `-1` means
no limit and `2147483647` is the max value for user to define limits.
The length of unified limit's `resource type` now is limited from `1`
to `255` (string).

View File

@ -2675,14 +2675,14 @@ class LimitValidationTestCase(unit.BaseTestCase):
{'resource_limit': 10000000000000000},
{'resource_limit': 'not_int'},
{'description': 123}]
for invalid_desc in _INVALID_FORMATS:
for invalid_attribute in _INVALID_FORMATS:
request_to_validate = [{'project_id': uuid.uuid4().hex,
'service_id': uuid.uuid4().hex,
'region_id': 'RegionOne',
'resource_name': 'volume',
'resource_limit': 10,
'description': 'test description'}]
request_to_validate[0].update(invalid_desc)
request_to_validate[0].update(invalid_attribute)
self.assertRaises(exception.SchemaValidationError,
self.create_limits_validator.validate,