I have a code snippet which will not work for Kilo version. I know the Openstack version, now I'm willing to know step/s to fetch the neutron version.
3.18 is the version of the openstack command line client, not the version of OpenStack.
There are several possible Neutron versions in Stein, all starting with 14. To obtain the precise version, either check the Python code or run neutron-db-manage version --verbose
on a controller (see the documentation for information about this command).
There is no API that gives you the version of the deployed software. You obtain the API version by sending an HTTP GET to the bare Neutron endpoint, e.g. curl http://example.com:9696
.
While I can't promise anything (it may be hard to find a Kilo installation for checking), feel free to publish your code here, stating what exactly works and doesn't work in which version.