Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maskari-controller is not a python package #41

Open
rsjethani opened this issue May 31, 2016 · 2 comments
Open

maskari-controller is not a python package #41

rsjethani opened this issue May 31, 2016 · 2 comments
Assignees

Comments

@rsjethani
Copy link

rsjethani commented May 31, 2016

The character "-" in the name of a pyhon package is invalid. we get import error while creating database:

openstack@openstack_3:~/masakari/masakari-controller/db$ ./create_database.sh
/home/openstack/masakari/masakari-controller/db
/home/openstack/masakari
/usr/bin/python: No module named masakari-controller.db

Also masakari-controller does not contain init.py so as to be recognized as a package.

IMO directory structure should be like:

masakari-controller
`---controller
      `---__init__.py and other py files
masakari-instancemonitor
`---instance_monitor
     `---__init__.py and other py files

and so on.

@sampathP
Copy link
Contributor

Thank you for the reporting the issues and sorry for the late response.
As @rsjethani said, "-" should not use in pkg name tree. However, in current source tree masakari-controller does not consider as a package and that a one reason why I intentionally avoid init.py directly under masakari-controller directory.
Furthermore, current source set masakari-controller as the parent dir by adding it to sys.path before import the sub modules. This was not the best solution but the affordable solution at the time.

Changing the top level directory structure will effect to most of the modules and pkging methods.
Though, we have lot of changes coming in on next release, and changing the directory structure is among them.

Just for create db issue,
PR #42 will fix the create database issue.

@sampathP
Copy link
Contributor

@brocdeckard Thank you and please don't hesitate to raise issues if you have any problems or unclear points about masakari. I would be happy to help you out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants