72d72623a9
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
70 lines
2.0 KiB
INI
70 lines
2.0 KiB
INI
[metadata]
|
|
name = vmware-nsx
|
|
summary = VMware NSX library for OpenStack projects
|
|
description-file =
|
|
README.rst
|
|
author = OpenStack
|
|
author-email = openstack-dev@lists.openstack.org
|
|
home-page = http://launchpad.net/vmware-nsx
|
|
classifier =
|
|
Environment :: OpenStack
|
|
Intended Audience :: Information Technology
|
|
Intended Audience :: System Administrators
|
|
License :: OSI Approved :: Apache Software License
|
|
Operating System :: POSIX :: Linux
|
|
Programming Language :: Python
|
|
Programming Language :: Python :: 2
|
|
Programming Language :: Python :: 2.7
|
|
Programming Language :: Python :: 3
|
|
Programming Language :: Python :: 3.3
|
|
|
|
[files]
|
|
packages =
|
|
vmware_nsx
|
|
tools/python_nsxadmin.admin
|
|
data_files =
|
|
etc/neutron/plugins/vmware = etc/nsx.ini
|
|
|
|
[entry_points]
|
|
console_scripts =
|
|
neutron-check-nsx-config = vmware_nsx.check_nsx_config:main
|
|
nsxadmin = tools.python_nsxadmin.admin.shell:main
|
|
neutron.db.alembic_migrations =
|
|
vmware-nsx = vmware_nsx.db.migration:alembic_migrations
|
|
neutron.core_plugins =
|
|
vmware = vmware_nsx.plugin:NsxMhPlugin
|
|
neutron.service_plugins =
|
|
vmware_nsx_l2gw = vmware_nsx.services.l2gateway.common.plugin:NsxL2GatewayPlugin
|
|
vmware_nsx_qos = vmware_nsx.services.qos.plugin:NsxQosPlugin
|
|
vmware_nsx.neutron.nsxv.router_type_drivers =
|
|
shared = vmware_nsx.plugins.nsx_v.drivers.shared_router_driver:RouterSharedDriver
|
|
distributed = vmware_nsx.plugins.nsx_v.drivers.distributed_router_driver:RouterDistributedDriver
|
|
exclusive = vmware_nsx.plugins.nsx_v.drivers.exclusive_router_driver:RouterExclusiveDriver
|
|
[build_sphinx]
|
|
source-dir = doc/source
|
|
build-dir = doc/build
|
|
all_files = 1
|
|
|
|
[upload_sphinx]
|
|
upload-dir = doc/build/html
|
|
|
|
[compile_catalog]
|
|
directory = vmware-nsx/locale
|
|
domain = vmware-nsx
|
|
|
|
[update_catalog]
|
|
domain = vmware-nsx
|
|
output_dir = vmware-nsx/locale
|
|
input_file = vmware-nsx/locale/vmware-nsx.pot
|
|
|
|
[extract_messages]
|
|
keywords = _ gettext ngettext l_ lazy_gettext
|
|
mapping_file = babel.cfg
|
|
output_file = vmware-nsx/locale/vmware-nsx.pot
|
|
|
|
[pbr]
|
|
autodoc_index_modules = 1
|
|
|
|
[wheel]
|
|
universal = 1
|