how to connect and query an external database?

asked 2016-10-19 15:56:20 -0500

babak gravatar image

I need to query an external MySQL database inside the CinderAPI service. So I tried to modify the Cinder code, specifically the Quality of Service Module Manager that is located in the file cinder\api\contrib\qos_specs_manage.py. However, when I import mysql.connector to the qos_specs_manage.py the Cinder API service breaks. Cinder API returns the error 404 for any wsgi requests initiated from the cinder client.

I was wondering what is the best approach to query an external database with the context of the OpenStack wsgi controllers? If I need to use oslo.db is there any example available ?

edit retag flag offensive close merge delete