[Bug 1801314] [NEW] Run "gnocchi archive-policy update" exception when definition include space character
Launchpad Bug Tracker
1801314 at bugs.launchpad.net
Fri Nov 2 09:08:59 UTC 2018
You have been subscribed to a public bug:
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
--
Run "gnocchi archive-policy update" exception when definition include space character
https://bugs.launchpad.net/bugs/1801314
You received this bug notification because you are a member of Ubuntu OpenStack, which is subscribed to python-gnocchiclient in Ubuntu.
More information about the Ubuntu-openstack-bugs
mailing list