Public bug reported:
The situation is like this: I need to update a archive-policy using gnocchi
command and the definition include space character. Such like this: gnocchi
archive-policy update -d "granularity: 0:03:00, points: 86400" low. When
running the below code, ValueError exception raised.
#gnocchiclient/v1/archive_policy_cli.py
def archive_policy_definition(string):
parts = string.split(",")
defs = {}
for part in parts:
attr, __, value = part.partition(":")
if (attr not in ['granularity', 'points', 'timespan'] or
value is None):
raise ValueError
defs[attr] = value
if len(defs) < 2:
raise ValueError
return defs
Because the attr and value don't remove these space character. So I think this
is a bug.
** Affects: python-gnocchiclient (Ubuntu)
Importance: Undecided
Assignee: jun923.gu (gujun1989)
Status: New
** Changed in: gnocchi (Ubuntu)
Assignee: (unassigned) => jun923.gu (gujun1989)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1801314
Title:
Run "gnocchi archive-policy update" exception when definition include
space character
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-gnocchiclient/+bug/1801314/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs