query option doesn't support special characters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-ceilometerclient |
Fix Released
|
Undecided
|
Chris Dent |
Bug Description
glance and nova both support special characters in their metadata, even names, but ceilometerclient commands cannot use --query to filter those characters, the problem is caused by the regular expression we use in https:/
here is the test detials:
# ceilometer --version
1.0.9.33
# glance image-create --property key~123=value~123
+------
| Property | Value |
+------
| Property 'key~123' | value~123 |
| checksum | None |
| container_format | None |
| created_at | 2014-04-
| deleted | False |
| deleted_at | None |
| disk_format | None |
| id | f7f822dc-
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | None |
| owner | 23e0bce4a8db4d5
| protected | False |
| size | 0 |
| status | queued |
| updated_at | 2014-04-
+------
# ceilometer resource-show -r f7f822dc-
+------
| Property | Value |
+------
| metadata | {u'status': u'queued', u'name': u'None', u'deleted': u'False', |
| | u'checksum': u'None', u'created_at': u'2014-
| | u'disk_format': u'None', u'updated_at': u'2014-
| | u'properties.
| | u'container_
| | u'deleted_at': u'None', u'min_ram': u'0', u'size': u'0'} |
| project_id | 23e0bce4a8db4d5
| resource_id | f7f822dc-
| source | |
| user_id | None |
+------
# ceilometer sample-list -m image -q metadata.
WARNING (http:173) Request returned failure status.
HTTPBadRequest (HTTP 400) ERROR Unknown argument: "123": unrecognized field in query: [<Query u'123' eq u'value~123' None>], valid keys: set(['end', 'start', 'metaquery', 'meter', 'project', 'source', 'user', 'start_
# nova boot --image 389750e2-
+------
| Property | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | building |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| adminPass | 7r3fmMCCouvr |
| config_drive | |
| created | 2014-04-
| flavor | m1.tiny (1) |
| hostId | |
| id | cb286d91-
| image | cirros (389750e2-
| key_name | - |
| metadata | {"key~1": "value~1"} |
| name | special!key |
| os-extended-
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | 23e0bce4a8db4d5
| updated | 2014-04-
| user_id | 1b4198375821452
+------
# ceilometer resource-show -r cb286d91-
+------
| Property | Value |
+------
| metadata | {u'state_
| | -7a2c-44ca-
| | u'compute.
| | u'terminated_at': u'', u'ephemeral_gb': u'0', u'instance_
| | u'message': u'Success', u'deleted_at': u'', u'reservation_id': |
| | u'r-g325kqrq', u'instance_id': u'cb286d91-
| | u'display_name': u'special!key', u'hostname': u'specialkey', u'state': |
| | u'active', u'image_ref_url': u'http://
| | -7a2c-44ca-
| | u'2014-
| | u'', u'access_ip_v6': u'None', u'disk_gb': u'1', u'access_ip_v4': |
| | u'None', u'kernel_id': u'', u'image_name': u'cirros', |
| | u'image_
| | u'bare', u'user_id': u'1b41983758214
| | u'image_
| | u'23e0bce4a8db4
| | u'2014-
| | u'compute.
| | u'm1.tiny', u'vcpus': u'1', u'architecture': u'None', u'os_type': |
| | u'None', u'instance_
| project_id | 23e0bce4a8db4d5
| resource_id | cb286d91-
| source | |
| user_id | 1b4198375821452
+------
# ceilometer sample-list -m instance -q 'metadata.
+------
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+------
+------
Changed in python-ceilometerclient: | |
assignee: | nobody → ZhiQiang Fan (aji-zqfan) |
Changed in python-ceilometerclient: | |
assignee: | ZhiQiang Fan (aji-zqfan) → Chris Dent (chdent) |
Changed in python-ceilometerclient: | |
milestone: | none → 1.3.0 |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/92074
Review: https:/