neutron port-list -f csv outputs poorly formatted JSON strings.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-neutronclient |
Fix Released
|
Medium
|
Ilya Shakhat |
Bug Description
I have two IPs attached to a port. One IPv4 address and one IPv6 address:
$ neutron port-list -f table | grep '..relevant lines..'
| f59ec695-
| | | | {"subnet_id": "81aa0d62-
$ neutron port-list -f csv | grep '..relevant lines..'
"f59ec695-
{""subnet_id"": ""81aa0d62-
Running this through a CSV filter:
$VAR1 = '10fd0850-
$VAR2 = '';
$VAR3 = 'fa:16:
$VAR4 = '{"subnet_id": "1bb2eda5-
{"subnet_id": "81aa0d62-
Finally, attempting to parse the JSON string ($VAR4) in perl:
garbage after JSON object, at character offset 85 (before "{"subnet_id": "81aa0...") at ./neutron_ports line 48, <$NEUTRON_PORTS> line 15.
Indeed, this isn't perl's fault. Putting the string through http://
The two strings need to be contained in a larger structure: [{...},{...}]
instead of just concatenated together: {...}{...}
Or the output specification needs to be changed.
Package/version information:
# dpkg -l | awk '/neutron/ {print $3 " " $2}'
1:2013.2-0ubuntu1 neutron-common
1:2013.2-0ubuntu1 neutron-dhcp-agent
1:2013.2-0ubuntu1 neutron-
1:2013.2-0ubuntu1 neutron-
1:2013.2-0ubuntu1 neutron-
1:2013.2-0ubuntu1 neutron-
1:2013.2-0ubuntu1 neutron-server
1:2013.2-0ubuntu1 python-neutron
1:2.3.0-0ubuntu1 python-
Changed in neutron: | |
importance: | Undecided → Medium |
affects: | neutron → python-neutronclient |
Changed in python-neutronclient: | |
status: | New → Confirmed |
Changed in python-neutronclient: | |
assignee: | nobody → Cedric Brandily (cbrandily) |
Changed in python-neutronclient: | |
status: | Confirmed → In Progress |
Changed in python-neutronclient: | |
status: | In Progress → Confirmed |
assignee: | Cedric Brandily (cbrandily) → nobody |
Changed in python-neutronclient: | |
assignee: | nobody → Akhila C (chetlapalle-akhila-b) |
Changed in python-neutronclient: | |
assignee: | Akhila C (chetlapalle-akhila-b) → nobody |
assignee: | nobody → tcs_openstack_group (tcs-openstack-group) |
Changed in python-neutronclient: | |
milestone: | none → 2.3.9 |
Changed in python-neutronclient: | |
milestone: | 2.3.9 → 2.3.10 |
Changed in python-neutronclient: | |
status: | Fix Committed → Fix Released |
Changed in python-neutronclient: | |
milestone: | 2.3.10 → 2.3.11 |
Fix proposed to branch: master /review. openstack. org/99929
Review: https:/