Fix CinderDefaultVolumeType constraints

Fix the CinderDefaultVolumeType constraints so that they match
cinder's own constraints. Basically, volume type names just need
at least one non-whitespace character. The name can contain leading
or trailing whitespace, but it cannot be '' (zero-length) or contain
only whitespace characters. The error message if the constraint isn't
met is similar to cinder's error message.

Resolves: rhbz#2073096
Related-Bug: #1782217
Change-Id: Ie7db672f929b21031338fe3e20ad2dfda34c231f
(cherry picked from commit 52bf7ee056)
(cherry picked from commit ab2d2f82c2)
(cherry picked from commit 7f12c44846)
This commit is contained in:
Alan Bishop 2022-04-07 13:34:01 -07:00
parent 52acc68786
commit c39286f93c
1 changed files with 2 additions and 3 deletions

View File

@ -59,10 +59,9 @@ parameters:
description: The name of Cinder's default volume type.
type: string
constraints:
- allowed_pattern: "[a-zA-Z0-9]+"
- allowed_pattern: ".*\\S.*"
description: >
The default volume type must be at least 1 character and contain only
letters and numbers.
The default volume type name cannot be empty.
CinderEnableDBPurge:
default: true
description: |