diff --git a/cinder/api/validation/parameter_types.py b/cinder/api/validation/parameter_types.py index 80f1b07df3d..71d277cb780 100644 --- a/cinder/api/validation/parameter_types.py +++ b/cinder/api/validation/parameter_types.py @@ -147,7 +147,7 @@ uuid = { extra_specs = { 'type': 'object', 'patternProperties': { - '^[a-zA-Z0-9-_:. ]{1,255}$': { + '^[a-zA-Z0-9-_:. /]{1,255}$': { 'type': 'string', 'maxLength': 255 } }, @@ -173,7 +173,7 @@ group_snapshot_status = { extra_specs_with_null = copy.deepcopy(extra_specs) extra_specs_with_null['patternProperties'][ - '^[a-zA-Z0-9-_:. ]{1,255}$']['type'] = ['string', 'null'] + '^[a-zA-Z0-9-_:. /]{1,255}$']['type'] = ['string', 'null'] name_allow_zero_min_length = { diff --git a/cinder/tests/functional/test_volumes.py b/cinder/tests/functional/test_volumes.py index e0a82b54189..cb243b318fb 100644 --- a/cinder/tests/functional/test_volumes.py +++ b/cinder/tests/functional/test_volumes.py @@ -82,7 +82,8 @@ class VolumesTest(functional_helpers._FunctionalTestBase): # Create volume metadata = {'key1': 'value1', - 'key2': 'value2'} + 'key2': 'value2', + 'volume/created/by': 'cinder'} created_volume = self.api.post_volume( {'volume': {'size': 1, 'metadata': metadata}})