osm/N2VC.git
4 years agoUse NS uuid when creating a juju k8s model 96/8396/1 sol006
Dominik Fleischmann [Thu, 12 Dec 2019 16:35:38 +0000 (17:35 +0100)]
Use NS uuid when creating a juju k8s model

This commit fixes bug 972, previously it was using the namespace
value that was always assigned to kube-system. This caused an error
in Juju due to kube-system already existing.
https://osm.etsi.org/bugzilla/show_bug.cgi?id=972

Change-Id: I840d65ef9991f64eba42a205900d42cb0a9bbeef
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
4 years agoFix bug 957: Return pubkey properly 57/8357/1 v7.0.0 v7.0.0rc1
David Garcia [Mon, 9 Dec 2019 17:50:03 +0000 (18:50 +0100)]
Fix bug 957: Return pubkey properly

Change-Id: I1265e972ee0a085733c5597dc2c793021713ee62
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoWorkaround bug 936 54/8354/2
Adam Israel [Mon, 9 Dec 2019 02:44:29 +0000 (21:44 -0500)]
Workaround bug 936

Apply a workaround for bug 936 that shortens the vnf and vdu id to no more than 12 characters, to keep the application name under the juju limit of 50 characters

Change-Id: I2bb49032f9f3432d304139b6e6b5ae0f62dc2a2a
Signed-off-by: Adam Israel <adam.israel@canonical.com>
4 years agoFix flake8 09/8309/1
quilesj [Fri, 29 Nov 2019 11:19:14 +0000 (11:19 +0000)]
Fix flake8

Change-Id: Ia81b37958ab03630cf9f3c65ab1ec59a95f82d68
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
4 years agoFix rjust error. Adding K8sException 08/8308/1
quilesj [Wed, 4 Dec 2019 07:51:26 +0000 (07:51 +0000)]
Fix rjust error. Adding K8sException

Change-Id: I778f74d0f059954225deb0371edf191f134cfed1
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
4 years agoMerge "Add missing argument in notify_callback"
israelad [Tue, 3 Dec 2019 20:51:18 +0000 (21:51 +0100)]
Merge "Add missing argument in notify_callback"

4 years agoJuju/k8s fixes 91/8291/1
Adam Israel [Mon, 2 Dec 2019 21:33:05 +0000 (16:33 -0500)]
Juju/k8s fixes

Fix how non-microk8s clusters are bootstrapped

Change-Id: Idf771fdd4d14f2876e0107f1d636eabc5169e170
Signed-off-by: Adam Israel <adam.israel@canonical.com>
4 years agoAdd NotImplemented exception 84/8284/1
Adam Israel [Sun, 1 Dec 2019 17:55:09 +0000 (12:55 -0500)]
Add NotImplemented exception

Change-Id: I5b94d60c9ce166163d5320cbbdef2cc0a549468f
Signed-off-by: Adam Israel <adam.israel@canonical.com>
4 years agoSync with k8s api 56/8256/2
Adam Israel [Thu, 28 Nov 2019 21:27:46 +0000 (16:27 -0500)]
Sync with k8s api

Updates to sync with changes to the underlying k8s API

Change-Id: I8c4022c9783a1c87c7c61a36074a614d211d0c81
Signed-off-by: Adam Israel <adam.israel@canonical.com>
4 years agoAdding inspect methods for K8s 59/8259/2
quilesj [Fri, 29 Nov 2019 11:17:11 +0000 (11:17 +0000)]
Adding inspect methods for K8s

Change-Id: I45fba22073e7dfdfab2f3a1d1cca1f0705145e0c
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
4 years agoFix native charms for feature 7928 48/8248/3
quilesj [Wed, 27 Nov 2019 16:12:02 +0000 (16:12 +0000)]
Fix native charms for feature 7928

Change-Id: Iba37a42152b2674c80bd887b2761827ffa19e4a8
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
4 years agoAdd missing argument in notify_callback 53/8253/1
Dominik Fleischmann [Thu, 28 Nov 2019 15:27:36 +0000 (16:27 +0100)]
Add missing argument in notify_callback

This fix is related to bug 866 and caused an exception when
the charm was not found. Nonetheless it did not fix the bug.
https://osm.etsi.org/bugzilla/show_bug.cgi?id=866

Change-Id: I641834461ac508eac131c32a4c4ef3557e192b1a
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
4 years agoAdd License headers to all code files 46/8246/1
Dominik Fleischmann [Wed, 27 Nov 2019 15:38:18 +0000 (16:38 +0100)]
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>
4 years agoMerge "Update deprecated use of yaml.load"
israelad [Tue, 26 Nov 2019 14:58:02 +0000 (15:58 +0100)]
Merge "Update deprecated use of yaml.load"

4 years agoUpdate deprecated use of yaml.load 38/8238/1
Adam Israel [Tue, 26 Nov 2019 14:23:52 +0000 (09:23 -0500)]
Update deprecated use of yaml.load

Update the deprecated use of `yaml.load` without a loader, replacing it with a call to the sugar method `yaml.safe_load`. See also: https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

Change-Id: Ia5b591349ba6da4260545335315d3d07191f76cf
Signed-off-by: Adam Israel <adam.israel@canonical.com>
4 years agoUpdate to use safe_load 37/8237/1
Adam Israel [Tue, 26 Nov 2019 14:20:41 +0000 (09:20 -0500)]
Update to use safe_load

The use of a bare yaml.load with no Loader is deprecated. Use the sugar shortcut safe_load per https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

Change-Id: I856d4263fcf20453157f9d3835289e665d1664bf
Signed-off-by: Adam Israel <adam.israel@canonical.com>
4 years agoRevert change 8b1bcf0 29/8229/1
tierno [Mon, 25 Nov 2019 09:23:16 +0000 (09:23 +0000)]
Revert change 8b1bcf0

Change-Id: I85fd9a038aa123eaf9b216e9d15f709cef7a808a
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
4 years agominor fix in yaml load with Loader 26/8226/1
tierno [Sat, 23 Nov 2019 22:41:22 +0000 (22:41 +0000)]
minor fix in yaml load with Loader

Change-Id: I1bc0e7197f6057c942490b710fbaf25013202ecb
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
5 years agoMerge "Added description to package"
israelad [Fri, 22 Nov 2019 17:03:32 +0000 (18:03 +0100)]
Merge "Added description to package"

5 years agoMerge branch 'feature7928' 14/8214/1
garciadeblas [Fri, 22 Nov 2019 12:39:20 +0000 (13:39 +0100)]
Merge branch 'feature7928'

Change-Id: Iccb5e5fa854394da873b9c8c3bade3358f9db6f0
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
5 years agoMerge branch 'feature5837' 12/8212/3
garciadeblas [Fri, 22 Nov 2019 11:07:49 +0000 (12:07 +0100)]
Merge branch 'feature5837'

Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Change-Id: I31abc0d7de97c1dd3fb45fd7798fbab5d1bad5b4

5 years agoMerge "Revert "Revert "Remove vendored libjuju"" Major code clean-up, approved by...
garciadeblas [Fri, 22 Nov 2019 10:02:18 +0000 (11:02 +0100)]
Merge "Revert "Revert "Remove vendored libjuju"" Major code clean-up, approved by TSC"

5 years agoNew N2VC API: generic connector and juju connector 01/8101/11 feature7928
quilesj [Tue, 29 Oct 2019 08:30:44 +0000 (09:30 +0100)]
New N2VC API: generic connector and juju connector

Change-Id: Ib53fc2eaae4287a34a36f03f654ce2076feaad01
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
5 years agoRevert "Revert "Remove vendored libjuju"" 05/8205/1
almagia [Thu, 21 Nov 2019 15:57:01 +0000 (16:57 +0100)]
Revert "Revert "Remove vendored libjuju""
Major code clean-up, approved by TSC

This reverts commit e2051cca7dac12aa09f6ed33555dcc4548c4b52b.

Change-Id: I567a594bebfe56e31f68df92a828839a56948223

5 years agoEnhancements K8s helm connector 80/8180/3 feature5837
quilesj [Mon, 18 Nov 2019 10:32:12 +0000 (11:32 +0100)]
Enhancements K8s helm connector

Change-Id: If7619c257d3e64b54c1268bf0b5c51712a5586f5
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
5 years agoMerge "Revert "Remove vendored libjuju""
israelad [Thu, 21 Nov 2019 15:46:44 +0000 (16:46 +0100)]
Merge "Revert "Remove vendored libjuju""

5 years agoRevert "Remove vendored libjuju" 04/8204/1
israelad [Thu, 21 Nov 2019 15:46:28 +0000 (16:46 +0100)]
Revert "Remove vendored libjuju"

This reverts commit 9d18c22a0dc9e295adda50601fc5e2f45d2c9b8a.

Change-Id: I7dbf291ccd750c5f836ff80c642be492434ab3ac
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoMerge "Remove vendored libjuju"
israelad [Thu, 21 Nov 2019 15:40:21 +0000 (16:40 +0100)]
Merge "Remove vendored libjuju"

5 years agoRemove vendored libjuju 27/8127/2
Adam Israel [Thu, 7 Nov 2019 15:38:12 +0000 (10:38 -0500)]
Remove vendored libjuju

This removes the vendored libjuju, in favour of using the upstream version.

Change-Id: I4da23f04fad665502951a70653b894c82349bad3
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoAdded description to package 49/7649/4
garciadeblas [Wed, 12 Jun 2019 14:55:14 +0000 (16:55 +0200)]
Added description to package

Change-Id: I9d1652652cec61390a5988ee265d01f520c1c099
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
5 years agoMerge "K8s Juju connector" into feature5837
israelad [Mon, 18 Nov 2019 08:30:25 +0000 (09:30 +0100)]
Merge "K8s Juju connector" into feature5837

5 years agoK8s helm connector 00/8100/7
quilesj [Mon, 28 Oct 2019 17:10:42 +0000 (18:10 +0100)]
K8s helm connector

Change-Id: I5332ec8e053643bc582f7979af98b46a3f9f31ee
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
5 years agoK8s generic connector 99/8099/5
quilesj [Mon, 28 Oct 2019 17:08:00 +0000 (18:08 +0100)]
K8s generic connector

Change-Id: I7c7879d556783785f5510dcf0e63d8f6dda43d2c
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
5 years agoK8s Juju connector 55/8155/2
Adam Israel [Thu, 7 Nov 2019 14:46:59 +0000 (09:46 -0500)]
K8s Juju connector

Juju connector for Kubernetes

Change-Id: I2a020aa55840dd7e76391d7ad751be7c56db5eeb
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoUpdate exceptions 52/8152/1
Adam Israel [Tue, 12 Nov 2019 00:42:02 +0000 (16:42 -0800)]
Update exceptions

Add NotImplemented exception and fix flake8 issues (spacing)

Change-Id: I675ff7156084c41f1dc3b5ed4823f237e0835ad1
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoAdd license to Jenkinsfile 51/8151/1
Adam Israel [Mon, 11 Nov 2019 23:45:29 +0000 (15:45 -0800)]
Add license to Jenkinsfile

Add the Apache 2.0 licence to the Jenkinsfile to prevent it from
blocking other commits during license check

Change-Id: Id2322477090f62aea8cd881f441626e8d8ce2e8d
Signed-off-by: Adam Israel <adam.israel@canonical.com>
(cherry picked from commit fbac7c59fe1c3bbfefc070ca8b7f719cf0fd626a)

5 years agoAdd license to Jenkinsfile 49/8149/1
Adam Israel [Mon, 11 Nov 2019 23:45:29 +0000 (15:45 -0800)]
Add license to Jenkinsfile

Add the Apache 2.0 licence to the Jenkinsfile to prevent it from
blocking other commits during license check

Change-Id: Id2322477090f62aea8cd881f441626e8d8ce2e8d
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoAccept None for parameter ca_cert at vnf.py: N2VC.__init__ 45/8145/1
tierno [Mon, 11 Nov 2019 17:45:17 +0000 (17:45 +0000)]
Accept None for parameter ca_cert at vnf.py: N2VC.__init__
To be backward compatible with old LCM versions

Change-Id: I05c90d329051f948a569c17e0864a4c2123c28b0
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
5 years agoModified Jenkinsfile to disable TEST_INSTALL in branch feature7928 68/8068/1
garciadeblas [Mon, 21 Oct 2019 16:10:39 +0000 (18:10 +0200)]
Modified Jenkinsfile to disable TEST_INSTALL in branch feature7928

Change-Id: I9cee170bee8768e70236f4d76f4df21a210620ed
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
5 years agoModified Jenkinsfile to disable TEST_INSTALL in branch feature5837 63/8063/1
garciadeblas [Mon, 21 Oct 2019 08:47:47 +0000 (10:47 +0200)]
Modified Jenkinsfile to disable TEST_INSTALL in branch feature5837

Change-Id: I759488f508eb38716ccbcbf56e15e47f5c1fb18d
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
5 years agoRemove dependency on vendored libjuju 18/8018/7
Adam Israel [Thu, 3 Oct 2019 16:35:38 +0000 (12:35 -0400)]
Remove dependency on vendored libjuju

This patch removes the dependency on the embedded version of libjuju,
instead relying on the upstream library.

Change-Id: I88bd762006e5a182eaea74b5eba636ad03d524b0
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoFix provisoner timeout 25/8025/1
Adam Israel [Mon, 7 Oct 2019 21:01:16 +0000 (17:01 -0400)]
Fix provisoner timeout

Run `apt-get update` before attempting to install a package, for cloud
images without an apt cache.

Change-Id: Id67a347d90edbaa862a6d9c48ed1613f3fe2ad0d
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoNative charm support 05/7905/82 n2vc
Adam Israel [Tue, 3 Sep 2019 22:26:08 +0000 (18:26 -0400)]
Native charm support

This patch adds a provisioner which will prepare a VM, via SSH, to run the Juju
agent, enabling a native charm to run on the VM.

Change-Id: Icd5d873a12e2d7b2e7cb5424e87d8083a7921c16
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoWorkaround for bug 816 60/7860/2
Adam Israel [Tue, 27 Aug 2019 16:50:06 +0000 (12:50 -0400)]
Workaround for bug 816

Identified the root cause of bug 816 as a race condition in Juju 2.6.6,
which will be fixed in the pending 2.6.7 release. In the meantime, this
adds a workaround to dealing with the race condition by sleeping
immediately after the model is created.

Change-Id: Ief3d0bffe51cef0736f9819a2934e62412584fe4
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoFix provisoner w/non-ubuntu user 59/7859/2
Adam Israel [Mon, 26 Aug 2019 19:12:52 +0000 (15:12 -0400)]
Fix provisoner w/non-ubuntu user

This fix allows for a non-ubuntu user to be used to provision a machine
for full charms.

Change-Id: I9491b6f0ca8391208f967e88b02a2c18cdd7ced5
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoFix bug 760 95/7695/1
Adam Israel [Mon, 24 Jun 2019 15:44:47 +0000 (11:44 -0400)]
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>
5 years agoFix reference to information model 61/7661/1 v6.0.0
Adam Israel [Wed, 12 Jun 2019 21:08:36 +0000 (17:08 -0400)]
Fix reference to information model

This fixes a bug where the information model for relations was referred
to as "vca-relations" rather than the proper "vca-relationships".

Change-Id: I3f961ab750df647e2d2086e887d7e9ac0a01c034
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoAdd missing dependency 45/7645/1
Adam Israel [Tue, 11 Jun 2019 15:02:33 +0000 (11:02 -0400)]
Add missing dependency

Add a missing dependency on pyasn1

Change-Id: I0d16d627ffd174640ff6985d801b4035fc8fd94a
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoBug 733 fixed 34/7634/1
endika [Wed, 5 Jun 2019 12:48:44 +0000 (14:48 +0200)]
Bug 733 fixed

Change-Id: Ibb0891e4cde4bb2db52df43159a94c102809aa9c
Signed-off-by: Endika Aldecoa <endika.aldecoa@ehu.eus>
5 years agoAdditional fix for bug 733 05/7605/1
Adam Israel [Tue, 4 Jun 2019 12:30:51 +0000 (08:30 -0400)]
Additional fix for bug 733

An additional fix for bug 733

Change-Id: I0b6d82f7ba8030f28e82a3d68e249fbcb299979c

5 years agoFix bug 733 95/7595/1
Adam Israel [Mon, 3 Jun 2019 15:21:27 +0000 (11:21 -0400)]
Fix bug 733

This fixes bug 733, which identified that N2VC was not properly adhering
to the Information Model regarding the vca-relationships grouping.

Change-Id: I778777446d1d4f8e8b630abfd42bd36f8479ca56
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoMerge "Feature 'ns primitive'"
Adam Israel [Sat, 1 Jun 2019 16:50:51 +0000 (18:50 +0200)]
Merge "Feature 'ns primitive'"

5 years agoFeature 'ns primitive' 90/7590/4
Adam Israel [Fri, 31 May 2019 13:59:52 +0000 (09:59 -0400)]
Feature 'ns primitive'

This contains a bug fix to enable deployment of NS charms

Change-Id: I9a0adc5dc1a357c6ae3d5e50e4a5905a344d8087
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoFix bug 705 75/7575/4
Adam Israel [Wed, 29 May 2019 15:31:01 +0000 (11:31 -0400)]
Fix bug 705

Apply patch from upstream to catch unknown delta types in Watcher
callbacks.

Change-Id: I82779053ace9ba72f93baecf45ebf40bacf62571
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoMerge "Complete Feature 6297"
Adam Israel [Mon, 27 May 2019 13:28:13 +0000 (15:28 +0200)]
Merge "Complete Feature 6297"

5 years agoComplete Feature 6297 51/7551/1
Adam Israel [Mon, 27 May 2019 12:39:19 +0000 (08:39 -0400)]
Complete Feature 6297

This makes feature 6297 functionally complete, with a bug fix and an
integration test that demonstrates the functionality

Change-Id: I1d993f81ce19778ff8cf0c93514837fb88f4eac0
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoAlign machine_spec with pydoc 92/7492/1
Adam Israel [Wed, 22 May 2019 20:30:25 +0000 (16:30 -0400)]
Align machine_spec with pydoc

Align the name of the machine_spec keys as defined in the pydoc

Change-Id: I3e9c3609ea81b53b77cefcda63bbb4a8b0c6510c
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoFix bug 680 36/7436/4 feature7106
Adam Israel [Mon, 29 Apr 2019 18:59:45 +0000 (14:59 -0400)]
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>
5 years agoAdd ENV default for bug 585 28/7428/1
Adam Israel [Fri, 26 Apr 2019 17:12:47 +0000 (13:12 -0400)]
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>
5 years agoAdd Juju Public Key 24/7424/4
Adam Israel [Thu, 25 Apr 2019 21:17:05 +0000 (17:17 -0400)]
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>
5 years agoFix bug 659: Don't use static member variables 99/7399/2
Adam Israel [Tue, 9 Apr 2019 20:07:53 +0000 (16:07 -0400)]
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>
5 years agoBug 666: Fix window_size overflow with Paramiko
Adam Israel [Fri, 5 Apr 2019 14:17:25 +0000 (10:17 -0400)]
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>
5 years agoMerge upstream libjuju
Adam Israel [Wed, 27 Mar 2019 23:07:43 +0000 (19:07 -0400)]
Merge upstream libjuju

Merge upstream libjuju (bug fixes)

Change-Id: Ia28b8a0ea2168a4df74823e8493c650491afb695
Signed-off-by: Adam Israel <adam.israel@canonical.com>
5 years agoSquashed 'modules/libjuju/' changes from c50c361..c127833
Adam Israel [Wed, 27 Mar 2019 18:50:11 +0000 (14:50 -0400)]
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

5 years agoMerge "Fix bug 564"
Adam Israel [Tue, 19 Mar 2019 21:21:08 +0000 (22:21 +0100)]
Merge "Fix bug 564"

5 years agoFix bug 564 33/7333/1
Adam Israel [Tue, 19 Mar 2019 20:33:30 +0000 (16:33 -0400)]
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>
5 years agoFix bug 601 25/7325/1
Adam Israel [Fri, 15 Mar 2019 19:28:47 +0000 (15:28 -0400)]
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>
5 years agoFix bug 628 - Better handling of model management 21/7321/1
Adam Israel [Fri, 8 Mar 2019 23:33:35 +0000 (18:33 -0500)]
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>
5 years agoUser parameters provided at instantiation time for Day-1 configuration mapping initia... 84/7084/3
tierno [Fri, 21 Dec 2018 13:42:43 +0000 (13:42 +0000)]
User parameters provided at instantiation time for Day-1 configuration mapping initial-config-primitive

Change-Id: Ide239b0a37100c093f66b27f926fa2b616ba4705
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
5 years agoAdd per-network service models 07/7007/2 v5.0.0 v5.0.1 v5.0.2
Adam Israel [Fri, 30 Nov 2018 01:30:24 +0000 (20:30 -0500)]
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>
6 years ago[bug 581] Fix parameter checking if no data-type 33/6933/1
Adam Israel [Tue, 20 Nov 2018 18:54:13 +0000 (13:54 -0500)]
[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>
6 years agoSecure Key Management 68/6868/1
Adam Israel [Fri, 14 Sep 2018 15:26:13 +0000 (11:26 -0400)]
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>
6 years agoMerge "fix minor error"
israelad [Fri, 2 Nov 2018 17:18:55 +0000 (18:18 +0100)]
Merge "fix minor error"

6 years agobug 563: Return initial-config-primitive uuids 29/6829/3
Adam Israel [Wed, 31 Oct 2018 23:29:09 +0000 (16:29 -0700)]
bug 563: Return initial-config-primitive uuids

Fixes bug #563, by returning the uuids of the executed initial-config-primitives when calling DeployCharms.

Signed-off-by: Adam Israel <adam.israel@canonical.com>
Change-Id: I5c5735618a3b0ab91a1f461e367ecae1fa177f21

6 years agoFix FormatApplicationName 22/6822/1
Adam Israel [Wed, 31 Oct 2018 20:59:51 +0000 (13:59 -0700)]
Fix FormatApplicationName

Remove the @staticmethod decorator, which introduced some unintended
behavior.

Signed-off-by: Adam Israel <adam.israel@canonical.com>
6 years agofix minor error 69/6769/1
tierno [Fri, 26 Oct 2018 12:54:26 +0000 (14:54 +0200)]
fix minor error

Change-Id: Id1e90d7e45a78c45d6c1e2720f3688a79d43941d
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
6 years agoMerge "Relation support for multi-charm VNFs"
Adam Israel [Mon, 15 Oct 2018 17:12:07 +0000 (19:12 +0200)]
Merge "Relation support for multi-charm VNFs"

6 years agoFull charm support 89/6489/2
Adam Israel [Fri, 14 Sep 2018 15:32:35 +0000 (11:32 -0400)]
Full charm support

This work adds the ability to deploy charms directly to an
externally instantiated VM, which is expected to have N2VC's public key
injected into it, by using the VCA's manual provisioning function.

This allows the VCA to ssh to the target machine and provision it. The
charm will then be deployed directly to that machine, allowing the charm
to fully manage the VNF lifecycle.

Change-Id: I935e432fbd60a9a6bc10a499ae1b8e07c1e70c14
Signed-off-by: Adam Israel <adam.israel@canonical.com>
6 years agoRelation support for multi-charm VNFs 91/6491/4
Adam Israel [Fri, 14 Sep 2018 16:01:12 +0000 (12:01 -0400)]
Relation support for multi-charm VNFs

Adds support for establishing relations between charms

Signed-off-by: Adam Israel <adam.israel@canonical.com>
Change-Id: I9a0b7725013e06635875cd824e219ab6a023efb3

6 years agoMerge changes Iacd2f028,I43a6d573,Ibb6c93bb netslice
Adam Israel [Thu, 11 Oct 2018 16:25:22 +0000 (18:25 +0200)]
Merge changes Iacd2f028,I43a6d573,Ibb6c93bb

* changes:
  Secure Key Management
  Improved integration tests
  [WIP] Multi-vdu, multi-charm support

6 years agoAdd debian packaging 68/6668/1
Adam Israel [Tue, 9 Oct 2018 19:17:50 +0000 (15:17 -0400)]
Add debian packaging

Adds debian packaging, including the vendored version of libjuju

Signed-off-by: Adam Israel <adam.israel@canonical.com>
6 years agoSecure Key Management 88/6488/2
Adam Israel [Fri, 14 Sep 2018 15:26:13 +0000 (11:26 -0400)]
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>
Change-Id: Iacd2f02800484fd90945f9b9c1ac2d8951115a76

6 years agoUpdate package versioning 94/6594/1
Adam Israel [Mon, 1 Oct 2018 14:35:42 +0000 (10:35 -0400)]
Update package versioning

Update the package versioning to include git hash

Signed-off-by: Adam Israel <adam.israel@canonical.com>
6 years agoImproved integration tests 61/6561/2
Adam Israel [Fri, 21 Sep 2018 12:20:55 +0000 (14:20 +0200)]
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

6 years ago[WIP] Multi-vdu, multi-charm support 84/6484/2
Adam Israel [Thu, 13 Sep 2018 21:14:51 +0000 (17:14 -0400)]
[WIP] Multi-vdu, multi-charm support

This work-in-progress adds support + integration testing for multi-vdu, multi-charm VNFs

TODO:
- Resolve race condition causing some tests to hang or not clean up
properly

Signed-off-by: Adam Israel <adam.israel@canonical.com>
Change-Id: Ibb6c93bb622c5807ed136cabc0c3b1cfcc50bdbf

6 years agoAdded LICENSE file to root of the repo 74/6474/3
garciadeblas [Thu, 13 Sep 2018 09:35:31 +0000 (11:35 +0200)]
Added LICENSE file to root of the repo

Change-Id: I36d495f1c5613663f321eed9fb3629ff29b5462f
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
6 years agoTox + Integration testing 66/6466/11
Adam Israel [Thu, 6 Sep 2018 23:22:47 +0000 (19:22 -0400)]
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

6 years agoMerge "Integration test for metrics + bug fix"
Adam Israel [Thu, 13 Sep 2018 16:20:21 +0000 (18:20 +0200)]
Merge "Integration test for metrics + bug fix"

6 years agoMerge "Fix bug #502"
Adam Israel [Thu, 23 Aug 2018 14:45:10 +0000 (16:45 +0200)]
Merge "Fix bug #502"

6 years agoadding paramiko as required package 30/6430/1
tierno [Thu, 23 Aug 2018 10:31:02 +0000 (10:31 +0000)]
adding paramiko as required package

Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
6 years agoIntegration test for metrics + bug fix 08/6408/1
Adam Israel [Wed, 8 Aug 2018 16:54:55 +0000 (12:54 -0400)]
Integration test for metrics + bug fix

This commit:
- adds the beginnings of an integration testing framework
- adds an integration test to exercise metric collection
- adds a test charm with metrics collection
- fixes a potential bug that can cause N2VC to fail if no
initial-config-primitive is specified in the VNF descriptor

Signed-off-by: Adam Israel <adam.israel@canonical.com>
6 years agoImproved Primitive support and better testing 94/6394/1 BUILD_v4.0.1_2
Adam Israel [Thu, 2 Aug 2018 19:32:00 +0000 (15:32 -0400)]
Improved Primitive support and better testing

This changeset addresses several issues.

- Improve primitive support so the status and output of an executed
primitive can be retrieved
- Merge latest upstream libjuju (required for new primive features)
- New testing framework
    This is the start of a new testing framework with the ability to
create and configure LXD containers with SSH, to use while testing proxy
charms.
- Add support for using ssh keys with proxy charms
    See Feature 1429. This uses the per-proxy charm/unit ssh keypair

Signed-off-by: Adam Israel <adam.israel@canonical.com>
6 years agoFix bug #502 79/6379/1
Adam Israel [Mon, 23 Jul 2018 19:39:57 +0000 (15:39 -0400)]
Fix bug #502

This patch, in addition to change #6341 (Extend data-type to
initial-config-primitive), enables type casting of primitive parameters.
This enables primitives with non-string parameters from being executed.

Signed-off-by: Adam Israel <adam.israel@canonical.com>
6 years agoMerge "Bug 502 improvements" v4.0 BUILD_v4.0.1_1
Adam Israel [Tue, 17 Jul 2018 16:37:31 +0000 (18:37 +0200)]
Merge "Bug 502 improvements"

6 years agoBug 502 improvements 37/6337/1
Adam Israel [Tue, 17 Jul 2018 16:17:06 +0000 (12:17 -0400)]
Bug 502 improvements

While investigating bug 502, I found that the type mismatch is actually
being generated elsewhere (being investigated).

This adds a test that will trigger the exception, and makes sure that
executing a primitive will return the correct type of exception if it
fails.

Signed-off-by: Adam Israel <adam.israel@canonical.com>
6 years agoFix bug #501 35/6335/1
Adam Israel [Mon, 16 Jul 2018 18:18:41 +0000 (14:18 -0400)]
Fix bug #501

This fixes bug #501, where initial-config-primitive always expected a
parameter to be present.

Signed-off-by: Adam Israel <adam.israel@canonical.com>
6 years agoFix libjuju install versioning 89/6189/2 v4.0.0 v4.0.1
Adam Israel [Tue, 22 May 2018 14:03:35 +0000 (10:03 -0400)]
Fix libjuju install versioning

This updates the libjuju setup.py with the upstream version that pins
several python module version requirements.

Signed-off-by: Adam Israel <adam.israel@canonical.com>
Change-Id: I47a4723d1b3db7ace141dc106e6e781281c0ae61

6 years agoAdd workload message to callback 09/6109/2
Adam Israel [Wed, 9 May 2018 17:55:28 +0000 (13:55 -0400)]
Add workload message to callback

Add the charm's workload status message to the callback so more detailed
information can be provided to the user.

Signed-off-by: Adam Israel <adam.israel@canonical.com>
Change-Id: I1bcd502a2470dd5a527bc88cf24f2e3e6753da91

6 years agoDocumentation update 69/6069/2
Adam Israel [Thu, 3 May 2018 18:49:56 +0000 (14:49 -0400)]
Documentation update

 - Updates of the pydoc and README.md
 - Rebase
Signed-off-by: Adam Israel <adam.israel@canonical.com>
Change-Id: I9da9c2fd4432af00f7c655ce4789ce6dac629bc9

6 years agoMerge "Return the uuid of the executed primitive" v3.1
Adam Israel [Mon, 7 May 2018 16:28:11 +0000 (18:28 +0200)]
Merge "Return the uuid of the executed primitive"