Name validations for compute resources
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Invalid
|
Undecided
|
Aswad Rangnekar | ||
OpenStack Compute (nova) |
Opinion
|
Undecided
|
Unassigned | ||
OpenStack Identity (keystone) |
Invalid
|
Wishlist
|
Rohan | ||
oslo-incubator |
Invalid
|
Undecided
|
Aswad Rangnekar |
Bug Description
There is no consistent validation for the 'name' parameter across compute resources. The following characters need to be validated in the input:
1. One more whitespaces (like ' ' or ' ') -
2. Leading or trailing whitespaces (like ' test123 ')
Currently flavor name, volume name, role name, group name, security group name and keypair name accept input in each of the two cases (no validation).
Adding the two cases above to name parameter validation would be useful.
It makes sense to move this validation code to a common utility that can be used across all Create resource methods.
Although the 'name' is not as significant the resource's ID, it does act as a label for the resource and should be validated properly.
For example, from the dasbhboard, a role with a blank name, i.e single whitespace string like ' ' can be created. This get's stored in the keystone db as NULL and appears in the dashboard roles drop down during Create User as None. This behavior should be fixed.
Refer: https:/
Changed in nova: | |
assignee: | nobody → Rohan (kanaderohan) |
Changed in nova: | |
status: | New → Confirmed |
tags: | added: api |
summary: |
- Leading and trailing whitespaces in Flavor name + Name validations for compute resources |
description: | updated |
Changed in keystone: | |
assignee: | nobody → Rohan (kanaderohan) |
affects: | nova → cinder |
Changed in nova: | |
status: | New → Confirmed |
Changed in nova: | |
assignee: | nobody → Rohan (kanaderohan) |
Changed in oslo: | |
assignee: | nobody → Rohan (kanaderohan) |
Changed in keystone: | |
importance: | Undecided → Wishlist |
Changed in cinder: | |
assignee: | Rohan (kanaderohan) → Aswad Rangnekar (aswad-r) |
Changed in keystone: | |
assignee: | nobody → Aswad Rangnekar (aswad-r) |
Changed in nova: | |
assignee: | Rohan (kanaderohan) → Aswad Rangnekar (aswad-r) |
Changed in oslo: | |
assignee: | Rohan (kanaderohan) → Aswad Rangnekar (aswad-r) |
Changed in keystone: | |
assignee: | nobody → Rohan (kanaderohan) |
Changed in keystone: | |
status: | New → Confirmed |
I think we should look at its bigger picture. I want to ask the following questions,
1. Should we also look into the extra spaces in other resources?
2. What are the other restrictions we should put on a resource's name, apart from extra spaces?
3. Should we define a guideline for names, ids etc while creating resources?