vmware-nsx/tools
Akash Gangil 72d72623a9 Admin util should work from any dir
It wasn't working because of two reasons:
1. The packages filed in setup.cfg takes a directory name.
so specifying tools.python_nsxadmin.admin didn't put the py files
in /usr/local/lib/python2.7/dist-packages when we pip installed
vmware-nsx package. (sudo pip install .). So changing it to tools
installs all the code in tools including python_nsxadmin there. Read
2 to know why we need this.

2. To enable admin utility to dynamically pick up any hooks that users
might add we use the importlib module. The bug was here, as the path was
absolute tools/python_nsxadmin/.... So when we executed it from other
diretory those modules were not imported. So I changed that to relative
path. Though, over here there could be a case where the hooks location
directory path contains a '-' / dash, which will cause it to fail.

>>> import
>>> home.gangil.t1-review.e_nsx.tools.python_nsxadmin.admin.plugins.nsxv.resources.edges

  File "<stdin>", line 1

    import
home.gangil.t1-review.vmware_nsx.tools.python_nsxadmin.admin.plugins.nsxv.resources.edges

                         ^

SyntaxError: invalid syntax

So we install the tools code using setup.cfg and then just import
resources from there.

Now it works from any directory.

Change-Id: Idc414fabc769d0503974e8f77b84d32008b3c08a
2015-12-02 07:10:00 -08:00
..
python_nsxadmin Admin util should work from any dir 2015-12-02 07:10:00 -08:00
__init__.py Use prettytable and rename python-nsxadmin - to _ 2015-12-02 06:12:02 -08:00
check_bash.sh Fix typos with topy 2015-11-19 12:53:12 -08:00
check_i18n.py Add in pep8 checks for the tools directory 2015-08-30 02:15:11 -07:00
check_i18n_test_case.txt Add script for checking i18n message 2012-12-10 17:29:54 +08:00
clean.sh Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
i18n_cfg.py Move vmware_nsx/neutron/tests to vmware_nsx/tests 2015-09-14 18:08:51 -07:00
install_venv.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
install_venv_common.py Create vmware-nsx with history 2014-12-18 07:36:43 -08:00
pretty_tox.sh VMware: fix gitreview 2014-12-21 23:24:18 -08:00
tox_install.sh LBaaSv2 driver 2015-10-27 07:42:47 +02:00
with_venv.sh Remove the useless vim modelines 2014-06-21 15:07:31 +08:00