Setting Up OpenStack Python Client Development Environment

Veröffentlicht am: 20 Januar 2015
auf dem Kanal: Nucleus
2,685
2

Setting Up OpenStack Python Client Development Environment
http://fosshelp.blogspot.in/2014/12/s...
1)
Clone the Project
#git clone https://github.com/openstack/python-k...

2)
Goto cloned directory
#cd python-keystoneclient

3)
Setup the Environment

3,a)
With run_tests.sh
#./run_tests.sh

OR

3,b)
With tox
#sudo pip install tox
#tox
4)
Run the client commands

4,a)
With run_tests.sh Environment

4,a,a)Goto cloned directory
#cd python-keystoneclient

4,a,b)
Create a script named "keystone" with following statements in cloned directory.
#vim keystone

#!/usr/bin/python
PBR Generated from 'console_scripts'
import sys
from keystoneclient.shell import main
if _name_ == "__main__":
sys.exit(main())

4,a,c)
Run the keystone client commands from run_tests.sh Environment
#source .venv/bin/activate
#.venv/bin/python keystone tenant-list
#.venv/bin/python keystone user-list

OR

4,b)
With Tox Environment

4,b,a)
Goto cloned directory
#cd python-keystoneclient

4,b,b)
Create a script named "keystone" with following statements in cloned directory.
#vim keystone

#!/usr/bin/python
PBR Generated from 'console_scripts'
import sys
from keystoneclient.shell import main
if _name_ == "__main__":
sys.exit(main())

4,b,c)
Run the keystone client commands from Tox Environment
#source .tox/py27/bin/activate
#.tox/py27/bin/python keystone tenant-list
#.tox/py27/bin/python keystone user-list

5)
Run the Tests

5,a)
With run_tests.sh
#./run_tests.sh --debug keystoneclient.tests.v2_0.test_tenants.TenantTests.test_list

##Only pep8 test
#./run_tests.sh --debug --pep8 keystoneclient.tests.v2_0.test_tenants

##manual pep8 test with the wrapper flake8
#source .venv/bin/activate
#flake8 keystoneclient/tests/v2_0/test_tenants.py

OR

5,b)
With tox

Deactivate virtualenv (Important), then run tox command , otherwise tox command will try to recreate the virtualenv from scratch
#deactivate

*UnitTest
#tox -e py27 -- keystoneclient.tests.v2_0.test_tenants.TenantTests.test_list
#tox -e py27 -- keystoneclient.tests.v2_0.test_tenants
#tox -e py27

*pep8 test
#tox -e pep8 -- keystoneclient.tests.v2_0.test_tenants
#tox -e pep8

http://fosshelp.blogspot.in/2014/11/o...


Auf dieser Seite können Sie das Online-Video Setting Up OpenStack Python Client Development Environment mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Nucleus 20 Januar 2015 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,685 Mal angesehen und es wurde von 2 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!