Feature 10296 Pip Standardization Creates standard template for tox.ini Introduces 'safety' for listing upstream CVEs Pins all versions of all upstream modules Removes Makefile step and places all build logic into tox.ini Change-Id: Ic14321bd5bddb322db08ac3e25202cc64cac2dff Signed-off-by: David Garcia <david.garcia@canonical.com>
Add License headers to all code files This was related to bug 547 https://osm.etsi.org/bugzilla/show_bug.cgi?id=547 Change-Id: Ief72f6e3b3de828be033729298ae905d163c6988 Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
Fix bug 760 This commit fixes bug 670 by introducing a new PrimitiveDoesNotExist exception that will be raised if ExecutePrimitive is called but the primitive does not exist in the charm. This also bumps the required version of websocket to match libjuju, along with other minor tweaks to the test framework Change-Id: I028c3c9c19fbfa87c8feb788446a290d66112043 Signed-off-by: Adam Israel <adam.israel@canonical.com>
Fix bug 680 This patch adds two new methods, Subscribe and Unsubscribe, allowing the caller to subscribe to callback messages for an already deployed charm. Change-Id: I1e34b488914feb488cf80b157fd664ca37037e76 Signed-off-by: Adam Israel <adam.israel@canonical.com>
Merge changes Iacd2f028,I43a6d573,Ibb6c93bb * changes: Secure Key Management Improved integration tests [WIP] Multi-vdu, multi-charm support
Add debian packaging Adds debian packaging, including the vendored version of libjuju Signed-off-by: Adam Israel <adam.israel@canonical.com>
Improved integration tests This merge includes a refactored integration test framework, to better take advantage of asyncio, and clarifies the test logic so it's easier to extend in the future. It also supports testing of more complex VNFs, such as multi-vdu, multi-charm VNFs. n2vc/vnf.py: - Remove duplicate status filtering, as it was a poor solution and lead to situations where some callbacks were not sent. - Added an internal refcount to track libjuju instantiation (helpful in debugging) tests/charms/layers/proxy-ci/reactive/proxy_ci.py: - Fix name of install function (remove confusion while reading logs) tests/base.py: - Add debug() for more consistent and useful logging - Refactor: remove parse_metrics - Improved error handling - Better LXD network connectivity verification - Refactor test framework: - Better use of async coded - Make handling of test phase more robust - Support more complex test cases, such as multi-vdu, multi-charm tests/integration/* - Update to use refactored test framework Other: - `make clean` now removes charm artifacts in tests/charms/builds/ - `make lint` now ignores charm artifacts Signed-off-by: Adam Israel <adam.israel@canonical.com> Change-Id: I43a6d573a7bafdfe3ccb0bb0f0f7d75dcc9c42b1
Tox + Integration testing This commit implements a VNF Descriptor-driven integration test framework, which will lead to integration tests being able to run via jenkins, and more robust testing in general. N2VC: - Allow the use of an event loop passed when instantiating N2VC - Refactor the execution of the initial-config-primitive so that it can be easily re-run, such as the case of when a proxy charm is deployed before the VNF's VM is created. - Refactor GetPrimitiveStatus, to return the status (queued, running, complete, failed) of a primitive. - Add GetPrimitiveOutput, to return the output of a completed primitive - Fix model disconnection when executing a primitive (it was happening in the wrong scope) - Fix wait_for_application, which was previously unused and broken - Add support for parameter's 'data-type' field - Add support for better SSH key management, allowing for a proxy charm to be deployed before the VNF, so that it's public SSH key can be injected when the VNF's VM is created. Integration Tests: The integration tests are intended to exercise the expected functionality of a VNF/charm: deploy the charm, configure it as required (i.e., ssh credentials), and execute the VNF's initial-config-primitives. - test_native_charm: deploy a native charm to a juju-managed machine and verify primitive execution works - test_proxy_charm: deploy a proxy charm, configured to talk to a remote machine, and verify primitive execution works - test_metrics_native: deploy a native charm and collect a metric - test_metrics_proxy: deploy a proxy charm and collect a metric from the vnf - test_no_initial-config-primitive: deploy a vnf without an initial-config-primitive - test_non-string_parameter: deploy a vnf with a non-string parameter in initial-config-primitive - test_no_parameter: deploy a vnf with a primitive with no parameters General: - Add a build target to tox.ini so that a .deb is built via Jenkins TODO (in a follow-up commit): - test multi-vdu, multi-charm - test deploying a native charm to a manually-provisioned machine - Update inline pydoc - Add more integration tests - Add global per-test timeout to catch stalled tests Signed-off-by: Adam Israel <adam.israel@canonical.com> Change-Id: Id322b45d65c44714e8051fc5764f8c20b76d846c