diff --git a/tools/python_nsxadmin/admin/plugins/common/constants.py b/tools/python_nsxadmin/admin/plugins/common/constants.py index 19aa573eb8..6dcd72377a 100644 --- a/tools/python_nsxadmin/admin/plugins/common/constants.py +++ b/tools/python_nsxadmin/admin/plugins/common/constants.py @@ -12,6 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. +# Default conf file locations +NEUTRON_CONF = '/etc/neutron/neutron.conf' +NSX_INI = '/etc/neutron/plugins/vmware/nsx.ini' + # NSX Plugin Constants NSXV3_PLUGIN = 'vmware_nsx.plugin.NsxV3Plugin' NSXV_PLUGIN = 'vmware_nsx.plugin.NsxVPlugin' diff --git a/tools/python_nsxadmin/admin/shell.py b/tools/python_nsxadmin/admin/shell.py index 88ac616dbc..5873a1952f 100644 --- a/tools/python_nsxadmin/admin/shell.py +++ b/tools/python_nsxadmin/admin/shell.py @@ -116,13 +116,7 @@ def _get_resources(): modules) -cli_opts = [cfg.StrOpt('neutron-conf', - default='/etc/neutron/neutron.conf', - help='Neutron configuration file'), - cfg.StrOpt('nsx-conf', - default='/etc/neutron/plugins/vmware/nsx.ini', - help='NSX configuration file'), - cfg.StrOpt('fmt', +cli_opts = [cfg.StrOpt('fmt', short='f', default='psql', choices=['psql', 'json'], @@ -171,8 +165,8 @@ def _init_cfg(): prog='Admin Utility', version=version.__version__, usage='nsxadmin -r -o ', - default_config_files=[cfg.CONF.neutron_conf, - cfg.CONF.nsx_conf]) + default_config_files=[constants.NEUTRON_CONF, + constants.NSX_INI]) def _validate_resource_choice(resource, nsx_plugin): @@ -207,7 +201,6 @@ def _validate_op_choice(choice, nsx_plugin): def main(argv=sys.argv[1:]): _init_cfg() _init_resource_plugin() - nsx_plugin_in_use = _get_plugin() LOG.info(_LI('NSX Plugin in use: %s'), nsx_plugin_in_use)