How-To: Make Contrail Python API Library Work With…

Diagnosis

By default, API calls require authentication. For the sake of lab testing, it is possible to disable this authentication.

root@openstack:~# cat /etc/contrail/contrail-api.conf | grep auth

auth = keystone

Solution

Replace “keystone” with “none” and restart.

Here is an example Python session that no longer requires authentication:

root@openstack:~# python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> from vnc_api import vnc_api
>>> vnc_lib = vnc_api.VncApi()
>>> print(vnc_lib.virtual_networks_list())
, , , , , , ]}

Source

Leave a comment

Your email address will not be published. Required fields are marked *