Implement feature 5949 79/6579/11
authorAnderson Bravalheri <a.bravalheri@bristol.ac.uk>
Fri, 17 Aug 2018 14:26:19 +0000 (15:26 +0100)
committerAnderson Bravalheri <a.bravalheri@bristol.ac.uk>
Fri, 16 Nov 2018 10:57:14 +0000 (10:57 +0000)
commit0446cd5df24c38f95cea13b995c553e9b2403f21
treec44cdd6e13913129dee35afff428e01c8dcd2d8b
parent63056c57eea17465ada68bcc076a0159d9c5f93f
Implement feature 5949

Enable dynamic connectivity setup in multi-site Network Services

The code required to implement the feature is contained in `osm_ro/wim`
as much as possible.

* `wim/engine.py` works together with `nfvo.py` to implement the
  feature
* `wim/persistence.py` is equivalent to `nfvo_db.py` and try to
  encapsulate most of the SQL-specific code, implementing a persistence
  layer
* `wim/http_handler.py` extends `httpserver.py` adding WIM-related HTTP
  routes
* `wim/wim_thread.py` is similar to `vim_thread.py` and controls the
  execution of WIM-related tasks
* `wim/actions.py` and `wim/wan_link_actions.py` implement the action
  handling specific code, calling instances of the `wim/wimconn.py`
  subclasses

WIM connectors are still a work in progress

Individual change details (newer to older)

- Add errors for inconsistent state

- Delay re-scheduled tasks

- Move lock to inside the persistence object

- Better errors for connector failures

- Try to cache the wan_link information before it is deleted from the database

- Integrate WanLinkDelete to NFVO

- Add WanLinkDelete implementation draft with some tests

- Add basic wim network creation

- Add minimal documentation for actions

- Add checks to the create action

- Improve documentation, rearrange insert_pending and remove unused functions on WimThread

- Integrate Action classes in refresh_tasks

- Add Action classes to avoid intricate conditions

- Adding Proposed License

- Move grouping of actions to persistence

- Change WimThread to use SQL to do the heavy lifting

- Simplify WimThread reload_actions

- Add tests for derive_wan_links

- Implement find_common_wim(s)

- Add tests for create_wim_account

- Add migration scripts for version 33

- Changes to WIM and VIM threads for vim_wim_actions

- Implement wim_account management according to the discussion

- Add WimHandler integration inside httpserver

- Add quick instructions to run the tests

- Add WIM functional tests using real database

- Add DB WIM port mapping

- RO WIM-related console scripts

- Add WIM integration to NFVO

- Improve database support focusing on tests

- RO NBI WIM-related commands in HTTP server

- Adding WIM tables to MANO DB

- Add wim http handler initial implementation

- Move http utility functions to separated files

    This separation allows the code to be reused more easily and avoids
    circular dependencies.

    (The httpserver can import other modules implementing http routes,
    and those modules can then use the utility functions without having
    to import back httpserver)

- Add a HTTP handler class and custom route decorator

    These tools can be used to create independent groups of bottle
    routes/callbacks in a OOP fashion

- Extract http error codes and related logic to separated file

Change-Id: Icd5fc9fa345852b8cf571e48f427dc10bdbd24c5
Signed-off-by: Anderson Bravalheri <a.bravalheri@bristol.ac.uk>
54 files changed:
.gitignore-common
database_utils/migrate_mano_db.sh
database_utils/migrations/down/34_remove_wim_tables.sql [new file with mode: 0644]
database_utils/migrations/up/34_add_wim_tables.sql [new file with mode: 0644]
docker/Dockerfile-local
docker/tests.dockerfile [new file with mode: 0644]
docker/tests.yml [new file with mode: 0644]
openmano
openmanod
osm_ro/db_base.py
osm_ro/http_tools/__init__.py [new file with mode: 0644]
osm_ro/http_tools/errors.py [new file with mode: 0644]
osm_ro/http_tools/handler.py [new file with mode: 0644]
osm_ro/http_tools/request_processing.py [new file with mode: 0644]
osm_ro/http_tools/tests/__init__.py [new file with mode: 0644]
osm_ro/http_tools/tests/test_errors.py [new file with mode: 0644]
osm_ro/http_tools/tests/test_handler.py [new file with mode: 0644]
osm_ro/http_tools/tox.ini [new file with mode: 0644]
osm_ro/httpserver.py
osm_ro/nfvo.py
osm_ro/nfvo_db.py
osm_ro/openmano_schemas.py
osm_ro/openmanoclient.py
osm_ro/openmanod.cfg
osm_ro/tests/db_helpers.py [new file with mode: 0644]
osm_ro/tests/helpers.py [new file with mode: 0644]
osm_ro/utils.py
osm_ro/vim_thread.py
osm_ro/vimconn_openstack.py
osm_ro/wim/__init__.py [new file with mode: 0644]
osm_ro/wim/actions.py [new file with mode: 0644]
osm_ro/wim/engine.py [new file with mode: 0644]
osm_ro/wim/errors.py [new file with mode: 0644]
osm_ro/wim/failing_connector.py [new file with mode: 0644]
osm_ro/wim/http_handler.py [new file with mode: 0644]
osm_ro/wim/persistence.py [new file with mode: 0644]
osm_ro/wim/schemas.py [new file with mode: 0644]
osm_ro/wim/tests/__init__.py [new file with mode: 0644]
osm_ro/wim/tests/fixtures.py [new file with mode: 0644]
osm_ro/wim/tests/test_actions.py [new file with mode: 0644]
osm_ro/wim/tests/test_engine.py [new file with mode: 0644]
osm_ro/wim/tests/test_http_handler.py [new file with mode: 0644]
osm_ro/wim/tests/test_persistence.py [new file with mode: 0644]
osm_ro/wim/tests/test_wim_thread.py [new file with mode: 0644]
osm_ro/wim/tox.ini [new file with mode: 0644]
osm_ro/wim/wan_link_actions.py [new file with mode: 0644]
osm_ro/wim/wim_thread.py [new file with mode: 0644]
osm_ro/wim/wimconn.py [new file with mode: 0644]
osm_ro/wim/wimconn_odl.py [new file with mode: 0644]
scripts/install-openmano.sh
setup.py
stdeb.cfg
test/test_RO.py
test/test_openmanoclient.py