[Bug 1801314] Re: Run "gnocchi archive-policy update" exception when definition include space character
jun923.gu
gujun1989 at 126.com
Fri Nov 2 09:08:58 UTC 2018
** Package changed: gnocchi (Ubuntu) => python-gnocchiclient (Ubuntu)
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-gnocchiclient in Ubuntu.
https://bugs.launchpad.net/bugs/1801314
Title:
Run "gnocchi archive-policy update" exception when definition include
space character
Status in python-gnocchiclient package in Ubuntu:
New
Bug description:
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-gnocchiclient/+bug/1801314/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list