Add ENV default for bug 585 Per Bug 585, this uses an ENV variable as the default value if one is not used to instantiate N2VC. If neither is present, N2VC will raise an exception on calls to CreateNetworkService and DestroyNetworkService. Change-Id: Ia5761c7eb1954ffb7a3a46390e850de059f0d2a4 Signed-off-by: Adam Israel <adam.israel@canonical.com>
Add Juju Public Key This commit adds the requirement to provide the Juju public key to N2VC - Updates integration testing to use public key - Updates N2VC to accept juju_public_key and ca-cert - Updated docstring of N2VC constructor Change-Id: I4cad1f8c39024137a23060000d7502aad56ac644 Signed-off-by: Adam Israel <adam.israel@canonical.com>
Fix bug 659: Don't use static member variables This fixes bug 659, where static member variables were used by the VCAMonitor, causing unexpected behaviour when deploying and destroying a network service multiple times. Change-Id: Icc5e4da62aeb11e4c89ba3cf5f148c6959acf7e3 Signed-off-by: Adam Israel <adam.israel@canonical.com>
Bug 666: Fix window_size overflow with Paramiko This commit fixes integration testing around bug fixes in the sshproxy layer that were causing a window_size overflow. This also improves reliability around testing machine charms, by verifying the sshd service is running inside the target machine (lxd) before running tests. Change-Id: I465d51521bf87b8e4b3dc5cac07c163fac836393 Signed-off-by: Adam Israel <adam.israel@canonical.com>
Merge upstream libjuju Merge upstream libjuju (bug fixes) Change-Id: Ia28b8a0ea2168a4df74823e8493c650491afb695 Signed-off-by: Adam Israel <adam.israel@canonical.com>
Squashed 'modules/libjuju/' changes from c50c361..c127833 c127833 Bump version and changelog for release 6aff679 k8s bundles no longer have application placement (#293) 1de9ad1 Add retry for connection if all endpoints fail (#288) 8cb8d75 Support generation of registration string for model sharing. (#279) a9e2fd6 Add Twine for dist upload on release (#284) 407a6a6 Update and prepare for 0.11.2 release (#282) d102620 call related update credential cloud facade methods based on facade version (#281) 2acbdc4 Add test case for redirect during connect (#275) 35fb43e Implement App.get_resources and pinned resources in bundles (#278) b5ba51a Bump version and changelog for release 7a73a0a Fix bundles with subordinates for Juju <2.5 (#277) a0f950f Bump version and changelog for release 01125e2 Updates for new Juju version (#274) 87d9388 Fix wrong variable name in revoke_model function (#271) 2b43065 Bump version and changelog for release 98ee524 set include_stats to false to reduce request time (#266) 61e1d69 Update version and changelog for 0.10.1 82f9968 Retry ssh in manual provision test (#265) d64bfff Clean up lint and add lint coverage to travis config (#263) c7c5c54 Increase the timeout for charmstore connections (#262) 4a6e398 Fix log level of `Driver connected to juju` message (#258) 514e479 Update version and changelog for 0.10.0 ec2c493 Reorder scp parameters (#259) (#260) 26c86c8 Implement set/get model constraints (#253) c6b4ab4 Update version and changelog for 0.9.1 e863746 Update websockets to 6.0 (#254) 567bc1a Update version and changelog for 0.9.0 b275ced python3.7 compatibility updates (#251) bc7336a Handle juju not installed in is_bootstrapped. (#250) 1ce8e0b Add app.reset_config(list). (#249) c620d4f Implement model.get_action_status (#248) 96ea3c4 Fix `make client` in Python 3.6 (#247) 61969ea Update version and changelog for release ebf6882 Add support for adding a manual (ssh) machine (#240) 18422f4 Backwards compatibility fixes (#213) 40c0211 Implement model.get_action_output (#242) c6b8ac5 Fix JSON serialization error for bundle with lxd to unit placement (#243) 5014fc3 Fix reference in docs to connect_current (#239) ebe0193 Wrap machine agent status workaround in version check (#238) 462989b Convert seconds to nanoseconds for juju.unit.run (#237) 0f413e6 Fix spurious intermittent failure in test_machines.py::test_status (#236) ce36b60 Define an unused juju-zfs lxd storage pool (#235) dfc2e8d Add support for Application get_actions (#234) e7e8c13 Update version and changelog for release 499337b Surface errors from bundle plan (#233) 2d94186 Always send auth-tag even with macaroon auth (#217) 000355c Inline jsonfile credential when sending to controller (#231) 9805123 Bump VERSION and changelog for release 27d723b Always parse tags and spaces constraints to lists (#228) 668945a Doc index improvements (#211) 65e6b5e Add doc req to force newer pymacaroons to fix RTD builds e2abd47 Fix dependency conflict for building docs 2907a6e Bump VERSION and changelog for 0.7.3 release 37a7500 Full macaroon bakery support (#206) a06e313 Fix regression with deploying local charm, add test case (#209) 75e9a2b Expose a machines series (#208) 46c98f5 Revert non-functional switch to Py3.6, just specify Py3 instead (#205) 8a99ad1 Cherry-pick VERSION and changelog bump from 0.7.2 release branch 88121d6 Support deploying bundle YAML file directly (rather than just directory) (#202) 57c0dbf Cherry-pick #197 into master (#198) 0973edc Update VERSION and changelog for 0.7.0 f5a4108 Add deprecated placeholder for Controller.get_models 17dffa4 JujuData abstract base class (#194) 76f22cc Make Model and Controller connect methods backwardly compatible (#196) 19b5658 Fix race condition in adding relations (#192) 978f35c refactor connections prior to bakery authentication (#187) 77c0f04 sort all imports; lint tests (#188) 4740935 juju.client.gocookies: new module (#186) 2c4de22 all: use pyrfc3339 instead of dateutil (#185) 7133ffe juju/client: factor out JujuData class (#182) 476b832 Fix race condition in connection monitor test (#183) e64a5d1 Fix example in README (#178) 97355cc Fix rare hang during Unit.run (#177) ae0b091 #176: Fix licensing quirks c0d001b Refactor model handling (#171) ab807c8 Refactor users handling, add get_users (#170) 5270db5 Upload credential to controller when adding model (#168) 16d8390 Support 'applications' key in bundles (#165) 2de3eed Improve handling of thread error handling for loop.run() (#169) 7807023 Fix encoding when using to_json() (#166) 73effb1 Fix intermittent test failures (#167) 46da148 Update VERSION and changelog for release 3dda1dc Fix test failures (#163) 14392af removing cli command to add ssh keys (#161) ce68170 Make Application.upgrade_charm upgrade resources (#158) git-subtree-dir: modules/libjuju git-subtree-split: c12783304945fdff5c28397b82b535a9cc065ca3
Fix bug 564 This fixes bug 684, which noted that the workload message was not being passed to the callback when removing charms. This also fixes some lint errors and adds tear-down of the per-ns model in integration tests Change-Id: I83be9e3d951cf10a7479ea2e55074526403cf674 Signed-off-by: Adam Israel <adam.israel@canonical.com>
Fix bug 601 This fixes bug 601, where a charm in a broken state would fail to be removed. This builds of of the new DestroyNetworkService method, which will remove a model containing a network service. There is no way, currently, to resolve errors on an individual charm through the Juju API (client), but removing the model will force the removal of a broken charm. Change-Id: I47f41991ed444395061b5a20e5a51059950e5200 Signed-off-by: Adam Israel <adam.israel@canonical.com>
Fix bug 628 - Better handling of model management In order to address the issue raised in bug 628, we've improved the handling of how N2VC creates and destroys models. Previously this was done transparently, but now they are explicit operations that will need to be performed by the LCM. The LCM will be required to call `CreateNetworkService()` prior to calling `DeployCharms`. This will return True if successful, or raise an exception if the model can't be created. After LCM has called `RemoveCharms()`, it will need to call `DestroyNetworkService()` to remove the model from the Juju controller. - Fix lint errors - Implement the `DestroyNetworkService` method, which will destroy the model per Network Service, and any applications deployed to it. - Adds a new test for creating and deleting models - Add `CreateNetworkService` to explicitly create a new model for a Network Service. - Add proper return values from `logout()` so we can assert against it during tests - Add dependency on pytest-assume so we can test multiple failures per test. This allows us to properly assert and still tear down the juju client. - Use pytest.assume. If a method asserts, we can continue with the teardown of the client. Change-Id: I3031b008f4ed79f978ecd84ade72e125153729a7 Signed-off-by: Adam Israel <adam.israel@canonical.com>
Add per-network service models In part to address, Bug 585, this patch drops the use of the "default" Juju model and instead creates a model per network service (which is required to be passed to N2VC methods). Change-Id: I31cfd56d71697066ff9c11df9c7607c791470cfa Signed-off-by: Adam Israel <adam.israel@canonical.com>
[bug 581] Fix parameter checking if no data-type Fix bug #581, which reported that the deployment of the simplecharm failed because the filename parameter was invalid. This turned out to be an issue introduced with the parameter type-checking added for R5. This has been fixed, and an integration test has been added that exercises the simplecharm example. Signed-off-by: Adam Israel <adam.israel@canonical.com>
Secure Key Management This patchset implements the Secure Key Management feature as described in Gerrit 1429, enabling support for native charms deployed to machines provisioned by the Resource Orchestrator. - Implement GetPublicKey, which will provide the public key to be injected into new machines - Support machine placement, to provision an existing machine for use with juju - Automatically create a SSH keypair to be used for provisioning - Add method to check if a charm is deployed (CI) - Update integration tests to use new ssh key workflow Signed-off-by: Adam Israel <adam.israel@canonical.com>
Merge "Relation support for multi-charm VNFs"