diff --git a/bin/__init__.py b/octavia/cmd/__init__.py similarity index 100% rename from bin/__init__.py rename to octavia/cmd/__init__.py diff --git a/bin/octavia-api b/octavia/cmd/api.py similarity index 97% rename from bin/octavia-api rename to octavia/cmd/api.py index 1f99cdc936..75d04d8fe8 100755 --- a/bin/octavia-api +++ b/octavia/cmd/api.py @@ -27,7 +27,8 @@ from octavia.i18n import _LI LOG = logging.getLogger(__name__) -if __name__ == '__main__': + +def main(): octavia_service.prepare_service(sys.argv) app = api_app.setup_app() diff --git a/octavia/tests/specs b/octavia/tests/specs deleted file mode 120000 index b306242a17..0000000000 --- a/octavia/tests/specs +++ /dev/null @@ -1 +0,0 @@ -../../specs-tests/tests \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index da906a5196..04e6ea222e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,8 @@ anyjson>=0.3.3 Babel>=1.3 eventlet>=0.16.1,!=0.17.0 requests>=2.2.0,!=2.4.0 +ipaddr==2.1.11 +iso8601>=0.1.9 jsonrpclib keystonemiddleware>=1.5.0 netaddr>=0.7.12 @@ -35,5 +37,5 @@ pyOpenSSL>=0.11 WSME>=0.6 pyasn1 pyasn1_modules - +singledispatch>=3.4.0.3 # For pecan Jinja2>=2.6 # BSD License (3 clause) diff --git a/setup.cfg b/setup.cfg index 25d186a961..e32bfc4b42 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,6 +18,10 @@ classifier = Programming Language :: Python Programming Language :: Python :: 2.7 +[files] +packages = + octavia + [build_sphinx] all_files = 1 build-dir = doc/build @@ -30,6 +34,8 @@ warnerrors = True universal = 1 [entry_points] +console_scripts = + octavia-api = octavia.cmd.api:main octavia.api.handlers = simulated_handler = octavia.api.v1.handlers.controller_simulator.handler:SimulatedControllerHandler queue_producer = octavia.api.v1.handlers.queue.producer:ProducerHandler diff --git a/specs-tests/tests/__init__.py b/specs-tests/__init__.py similarity index 100% rename from specs-tests/tests/__init__.py rename to specs-tests/__init__.py diff --git a/specs-tests/tests/test_titles.py b/specs-tests/test_titles.py similarity index 100% rename from specs-tests/tests/test_titles.py rename to specs-tests/test_titles.py diff --git a/tox.ini b/tox.ini index 3fb454e734..64cc31c659 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 1.6 -envlist = docs,py27,pep8 +envlist = docs,py27,pep8,specs skipsdist = True [testenv] @@ -26,6 +26,11 @@ commands = flake8 [testenv:docs] commands = python setup.py build_sphinx +[testenv:specs] +commands = + find . -type f -name "*.pyc" -delete + python -m unittest specs-tests.test_titles + [flake8] # Ignoring O321 because it's unnecessarily restricting use of json package. # jsonutils version doesn't add additional value