yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #26408
[Bug 1404888] [NEW] Metadata widget doesn't handle default values for numeric and boolean fields
Public bug reported:
Metadata widget doesn't handle well default values for metadefinition
properties from Glance which type is set to: integer, number and
boolean. For now on it works only with string properties.
To reproduce this issue follow these steps:
1. Go to the "metadef_properties" table located in Glance database.
2. Update "json_schema" field of any record (e.g. "os_shutdown_timeout") and put there "default" key with some integer value (e.g. 10).
Field "json_schema" before update:
{
"minimum": 0,
"type": "integer",
"description": "Some description.",
"title": "Shutdown timeout"
}
After update:
{
"minimum": 0,
"type": "integer",
"description": "Some description.",
"title": "Shutdown timeout",
"default: 10
}
3. Go to the Horizon /admin/images/ page and choose any image which doesn't have "os_shutdown_timeout" property defined yet.
4. Open "Update Metadata" form and pick the "Shutdown timeout" property. As you can see it has empty input, with no default value filled.
Same steps can be repeated for number and boolean properties to check
that no default value is shown to the user. Default value is prompted
only for string properties.
** Affects: horizon
Importance: Undecided
Assignee: Kamil Rykowski (kamil-rykowski)
Status: In Progress
** Tags: metadef
** Changed in: horizon
Assignee: (unassigned) => Kamil Rykowski (kamil-rykowski)
** Changed in: horizon
Status: New => In Progress
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1404888
Title:
Metadata widget doesn't handle default values for numeric and boolean
fields
Status in OpenStack Dashboard (Horizon):
In Progress
Bug description:
Metadata widget doesn't handle well default values for metadefinition
properties from Glance which type is set to: integer, number and
boolean. For now on it works only with string properties.
To reproduce this issue follow these steps:
1. Go to the "metadef_properties" table located in Glance database.
2. Update "json_schema" field of any record (e.g. "os_shutdown_timeout") and put there "default" key with some integer value (e.g. 10).
Field "json_schema" before update:
{
"minimum": 0,
"type": "integer",
"description": "Some description.",
"title": "Shutdown timeout"
}
After update:
{
"minimum": 0,
"type": "integer",
"description": "Some description.",
"title": "Shutdown timeout",
"default: 10
}
3. Go to the Horizon /admin/images/ page and choose any image which doesn't have "os_shutdown_timeout" property defined yet.
4. Open "Update Metadata" form and pick the "Shutdown timeout" property. As you can see it has empty input, with no default value filled.
Same steps can be repeated for number and boolean properties to check
that no default value is shown to the user. Default value is prompted
only for string properties.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1404888/+subscriptions
Follow ups
References