[Bug 1801314] Re: Run "gnocchi archive-policy update" exception when definition include space character
Corey Bryant
1801314 at bugs.launchpad.net
Thu Nov 10 13:53:11 UTC 2022
Closing in line with upstream issue.
** Changed in: python-gnocchiclient (Ubuntu)
Status: Confirmed => Won't Fix
--
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:
Won't Fix
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