Skip to content

Commit 28522a5

Browse files
committed
Increase string attribute max length to 256 chars
Increase the maximum supported length for string type resource attributes from 255 to 256 characters, to allow creating string attributes on resources that accept values of such length (e.g. Swift container names).
1 parent b28f215 commit 28522a5

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

gnocchi/resource_type.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ def __init__(self, min_length, max_length, *args, **kwargs):
141141

142142
meta_schema_ext = {
143143
voluptuous.Required('min_length', default=0):
144-
voluptuous.All(int, voluptuous.Range(min=0, max=255)),
145-
voluptuous.Required('max_length', default=255):
146-
voluptuous.All(int, voluptuous.Range(min=1, max=255))
144+
voluptuous.All(int, voluptuous.Range(min=0, max=256)),
145+
voluptuous.Required('max_length', default=256):
146+
voluptuous.All(int, voluptuous.Range(min=1, max=256))
147147
}
148148

149149
@property

gnocchi/tests/functional/gabbits/resource-type.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ tests:
146146
foobar:
147147
type: string
148148
required: False
149-
max_length: 255
149+
max_length: 256
150150
min_length: 0
151151
uuid:
152152
type: uuid
@@ -200,7 +200,7 @@ tests:
200200
type: string
201201
required: False
202202
min_length: 0
203-
max_length: 255
203+
max_length: 256
204204
uuid:
205205
type: uuid
206206
required: True
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
features:
3+
- |
4+
The maximum allowed length for string-type resource attributes has been
5+
increased from 255 to 256 characters. This allows creating attributes
6+
that accept values up to 256 characters long e.g. Swift container names.

0 commit comments

Comments
 (0)