How to dev and test python libs on your OpenStack's devstack

In OpenStack Devstack, the python packages/libs such as python-tackerclient, tacker-horizon are not easy to dev because normally they will be installed under python's site-packages. So, to make it easier for us to developing these libs, follow the instructions below:

1. Clone the python packages that you want, for example: tacker-horizon:

cd /opt/stack/
git clone git://

2. Go inside the cloned directory and install it using pip:

cd tacker-horizon
sudo pip install -U -e .

3. Make the changes and enjoy

Note: if you work with tacker-horizon, you may have to restart apache2 server:

sudo systemctl restart apache2

How to fix "F821 undefined name 'unicode'" error when running tox

If you get this following error when running "tox -e pep8":

# F821 undefined name 'unicode'
if isinstance(config, str) or isinstance(config, unicode):

Modify the tox.ini as following to fix it:

builtins = unicode

How to fix "db type could not be determined" when running tox

If you get this error when running "tox -e py35":

"db type could not be determined"

 do this trick to get rid of it:

rm .testrepository/times.dbm

Life is good now.

Quote of the day

"The man who moves a mountain begins by carrying away small stones"
~Phil Knight

Install a python package from a local directory with pip

Normally you will use pip to install a python package from pypi. But, actually you can do it from a local directory using the "-e" parameter:

pip install -e /local/directory