osm/N2VC.git
4 years agoUse default Previous Work Dir if there is none 96/8996/2 v7.0 v7.1.0 v7.1.0rc5 v7.1.0rc6 v7.1.2 v7.1.3 v7.1.4 v7.1.5
Dominik Fleischmann [Thu, 28 May 2020 12:33:22 +0000 (14:33 +0200)]
Use default Previous Work Dir if there is none

When the folder where the working dir was is deleted
an Exception is thrown. In that case a new default
directory is defined.

Change-Id: Ic0b3eb63625fc6cf6e90e9a77891c9958b6a9aee
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
4 years agoInstall iptables-persistent if it doesn't exist 74/8974/4 v7.1.0rc3 v7.1.0rc4
David Garcia [Tue, 26 May 2020 17:27:03 +0000 (19:27 +0200)]
Install iptables-persistent if it doesn't exist

Change-Id: I7535e7ff3b74236cd3c7e752244252481582d557
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoPin juju version to 2.8.1 70/8970/1
David Garcia [Tue, 26 May 2020 15:28:59 +0000 (17:28 +0200)]
Pin juju version to 2.8.1

Change-Id: Id40b3eeb698939131faf56fe008be335e6398cef
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoMerge "Get series from machine" into v7.0 v7.1.0rc2
garciadav [Mon, 25 May 2020 15:07:03 +0000 (17:07 +0200)]
Merge "Get series from machine" into v7.0

4 years agoGet series from machine 66/8966/2
David Garcia [Mon, 25 May 2020 14:23:20 +0000 (16:23 +0200)]
Get series from machine

Currently the series when deploying a charm is hardcoded to xenial, when it should be retrieved from the machine.

Change-Id: I2784290dde803e276a77775ee57879897b1c523c
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoOmmit public_key argument if None 48/8948/1
Dominik Fleischmann [Thu, 21 May 2020 11:55:19 +0000 (13:55 +0200)]
Ommit public_key argument if None

With newer Juju versions the authorized-keys
argument is expected to not be None, therefore it
now has to be ommited as an argument if thats the
case.

Change-Id: I0adeda2ce71df5505cfaaab98ec237611918d9e7
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
4 years agoCherry-pick 8905: Change to sane default timeout 18/8918/1 v7.1.0rc1
beierlm [Tue, 12 May 2020 19:26:37 +0000 (15:26 -0400)]
Cherry-pick 8905: Change to sane default timeout

Change-Id: I3bcdbf727e4b69deeb15fff83deb6598506f58f7
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoFix credential_name 85/8885/1
David Garcia [Thu, 7 May 2020 10:28:05 +0000 (12:28 +0200)]
Fix credential_name

Change-Id: I7eeed36b2f4d4cc47e8b2de56abcecaee24706f3
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoFix bug 1050: Make provisioner asynchronous 74/8874/1
David Garcia [Mon, 6 Apr 2020 10:42:26 +0000 (12:42 +0200)]
Fix bug 1050: Make provisioner asynchronous

Change-Id: I19a47abbea81deff64698a16715f5fd7c9e6e8e4
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoFix missing import 73/8873/1
beierlm [Tue, 5 May 2020 18:55:19 +0000 (14:55 -0400)]
Fix missing import

Import was removed for flake8 compliance, but it was
needed at runtime.

Change-Id: I2c1fce7b681582382c3c8f74267c3010bfcd97d6
Signed-off-by: beierlm <mark.beierl@canonical.com>
4 years agoEnable lint, flake8 and unit tests 72/8872/1
beierlm [Tue, 21 Apr 2020 20:36:35 +0000 (16:36 -0400)]
Enable lint, flake8 and unit tests

Cleans up non pep compliant code.
Adds a simple unit test.
Formats according to black.

Tox automatically runs lint, flake8 and unit test suite
with coverage.  To run each individually, execute:

tox -e pylint
tox -e black
tox -e flake8
tox -e cover

Note that these are all run for each patch via Jenkins.  The full
tox suite should be run locally before any commit to ensure it
will not fail in Jenkins.

Change-Id: I2f87abe3d5086d6d65ac33a27780c498fc7b1cd3
Signed-off-by: beierlm <mark.beierl@canonical.com>
4 years agoCheck if cloud is built-in cloud when adding a model 71/8871/1
David Garcia [Wed, 29 Apr 2020 10:34:23 +0000 (12:34 +0200)]
Check if cloud is built-in cloud when adding a model

Change-Id: Iad5f8e8f614898b2be38c6c40f97d6bbe97964cd
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoK8s action support 70/8870/1
Dominik Fleischmann [Mon, 6 Apr 2020 12:51:00 +0000 (14:51 +0200)]
K8s action support

This commit enables k8s actions by executing them the
same way as any other ns-action. It needs a mandatory
parameter which is application-name.

This commit depends on another commit in LCM.
https://osm.etsi.org/gerrit/#/c/osm/LCM/+/8767/

Change-Id: I375fb93d55f1255d425f229fe1a88968b19ae3d0
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
4 years agoadding optional namespace to K8s install 69/8869/1
tierno [Tue, 7 Apr 2020 11:08:16 +0000 (11:08 +0000)]
adding optional namespace to K8s install

Change-Id: Ib433aff72f68f56359917a8a3716e6b798ea330b
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
4 years agofix 1040 report error on failing delete_namespace 68/8868/1
tierno [Thu, 26 Mar 2020 09:51:11 +0000 (09:51 +0000)]
fix 1040 report error on failing delete_namespace
Do not capture asyncio.CancelledError
remove unneeded loging. e.g. certificates

Change-Id: Ia4f8c19bf693b689aeaaaeb76b006cd25c7295e1
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
4 years agoRaise N2VCNotFound exception in delete_namespace 67/8867/1
David Garcia [Wed, 8 Apr 2020 11:23:07 +0000 (13:23 +0200)]
Raise N2VCNotFound exception in delete_namespace

Change-Id: I57d8ab115b4efdee65af2ca1e951463359ef81de
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoAdd N2VCNotFound exception 66/8866/1
David Garcia [Wed, 8 Apr 2020 07:48:21 +0000 (09:48 +0200)]
Add N2VCNotFound exception

Change-Id: I83702862086996adaefbfb9721f08f40bc943a44
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoFix bug 1039: Add config to install_configuration_sw 65/8865/1
David Garcia [Wed, 1 Apr 2020 14:06:39 +0000 (16:06 +0200)]
Fix bug 1039: Add config to install_configuration_sw

Change-Id: I6545d0d425f6cd0f20c0cba049b6c828128ab66a
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoFix bug 1049: Raise exception if model does not exist when destroying a model 64/8864/1
David Garcia [Mon, 6 Apr 2020 10:55:23 +0000 (12:55 +0200)]
Fix bug 1049: Raise exception if model does not exist when destroying a model

Change-Id: I7bc64f296d6cff695511be77a5445241a1175d8a
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoFix bug 1018 63/8863/1
David Garcia [Mon, 6 Apr 2020 09:02:42 +0000 (11:02 +0200)]
Fix bug 1018

- Only destroy manually provisioned machines
- Fix in the observer: check if entity is not dead
- Destroy applications

Change-Id: I2b79585775572ed99aaa7ad7fe053bb33424163f
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoAdd local k8s charms support 62/8862/1
Dominik Fleischmann [Thu, 26 Mar 2020 11:21:42 +0000 (12:21 +0100)]
Add local k8s charms support

This adds the support to deploy Kuberentes Charm
Bundles that are available locally (directly
inside the vnf descriptor).

Change-Id: Ib2e191df5f905ba909f935f2005347d2cf83da74
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
4 years agoFeature 8720: Get leader unit to execute action 61/8861/1
David Garcia [Wed, 25 Mar 2020 15:23:14 +0000 (16:23 +0100)]
Feature 8720: Get leader unit to execute action

Change-Id: I745bdadd96e7af0c4ef00fc5c0b41e71708cb489
Signed-off-by: David Garcia <david.garcia@canonical.com>
4 years agoAdd multicloud controller support 60/8860/1
Dominik Fleischmann [Thu, 19 Mar 2020 09:32:55 +0000 (10:32 +0100)]
Add multicloud controller support

This commit depends on 8702. As it needs
the cloud VCA config variable.
https://osm.etsi.org/gerrit/#/c/osm/LCM/+/8702/

Change-Id: If55cebd90ad69f0c09a4e6f27e63c1c5aff5d34f
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
4 years agoFix logging in Juju K8s code 53/8653/2
Dominik Fleischmann [Wed, 26 Feb 2020 13:37:16 +0000 (14:37 +0100)]
Fix logging in Juju K8s code

This fixes the logging in the juju k8s code base
which wasn't showing up in the LCM logs.
This logging follows the same standard as the rest
of LCM code base.

Change-Id: I569d2bc1e3c50e73ac9af129f1d59775b89cb3ca
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
(cherry picked from commit 2f2832cc214c058d3fce343cdd459ccddd770dad)

4 years agoFix machine deletion when delete execution environment 51/8651/3
calvinosanch [Fri, 21 Feb 2020 08:25:21 +0000 (09:25 +0100)]
Fix machine deletion when delete execution environment

Change-Id: If389f267e996af3b93ef0ba59444733ab4c7ed7e
Signed-off-by: calvinosanch <guillermo.calvinosanchez@altran.com>
(cherry picked from commit 413952226163141c8f88c6c1b1eab419a7aad244)

4 years ago1000: Fix authentication when deleting service 45/8645/4
Dominik Fleischmann [Wed, 26 Feb 2020 18:58:25 +0000 (19:58 +0100)]
1000: Fix authentication when deleting service

This fixes 1000 where the creation of k8sclusters
was failing once a k8scluster had been deleted. This
was due to N2VC not logging out correctly from the
juju controller. Error handling was added to the
add_model funciton.

https://osm.etsi.org/bugzilla/show_bug.cgi?id=1000

Change-Id: I144ddf7ed16a3aa65e145459e49f41b9fd936353
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
(cherry picked from commit 1ac78b3b0c1440f4c69834387c7ceafdff27ac28)

4 years agoStandardize logging 52/8652/1
Dominik Fleischmann [Thu, 27 Feb 2020 09:04:34 +0000 (10:04 +0100)]
Standardize logging

This commit will standardize logging for all the code,
so that it follows the same format as LCM. The logging
for k8s_juju_conn.py is in commit 8638.

Change-Id: I0ea199018e96b167ecbf8fd1ab16e5065a2e2bdf
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
(cherry picked from commit f9bed35a0acf26a93eb2f6d0f146fa71579af74a)

4 years agoSynchronize helm repos on ns instantiation instead of creation 46/8646/2
lloretgalleg [Thu, 20 Feb 2020 11:01:17 +0000 (12:01 +0100)]
Synchronize helm repos on ns instantiation instead of creation

Change-Id: Ia4f35283399d2777ff3df1fb2824a68cbaec4804
Signed-off-by: lloretgalleg <illoret@indra.es>
(cherry picked from commit 65ddf85ef9d11aa4d4f9dc7cb2912ff7069f7c94)

4 years agoFixed issue canceling status task 40/8640/1
lloretgalleg [Wed, 26 Feb 2020 09:00:16 +0000 (10:00 +0100)]
Fixed issue canceling status task

Change-Id: I29d842351f23f0464bc230e8b97dacf24edff0bd
Signed-off-by: lloretgalleg <illoret@indra.es>
(cherry picked from commit dd0cdee63d1ce9441e7e3076e3a301304cf9b4cd)

4 years agoFix 1015. Remove non used paramiko dependencies at k8s_helm_conn 82/8582/1
tierno [Tue, 11 Feb 2020 10:22:12 +0000 (10:22 +0000)]
Fix 1015. Remove non used paramiko dependencies at k8s_helm_conn

Change-Id: Id5c6333fb7feac8dce85f87641676771f346d062
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
(cherry picked from commit 68eb809576112cf59add5f62f87e99b07c3ac17a)

4 years ago1007 Use KDU name and NS id for model names 70/8570/1 v7.0.1
Dominik Fleischmann [Tue, 4 Feb 2020 14:32:42 +0000 (15:32 +0100)]
1007 Use KDU name and NS id for model names

This commit is part of the fix for Bug 1007. Previously
The wrong naming was used in the uninstall function and
it was deleting each application one by one. Now the whole
model will be deleted automatically.
This commit is dependent on this one in LCM:
https://osm.etsi.org/gerrit/#/c/osm/LCM/+/8555/

Additionally the naming for models has changes so that
each KDU gets is own model with the following naming:
<kdu-name>-<ns-id> . This will fix multi KDU support.

Change-Id: I912105417d67d5f3d95b997b91d7a5b7388bdf0d
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
(cherry picked from commit 847f3c055188614da2cd7ea8028db8ab025eb1d8)

4 years agofix 1010. Proper exception handling when looking for used kdu name 59/8559/1
tierno [Tue, 4 Feb 2020 15:26:25 +0000 (15:26 +0000)]
fix 1010. Proper exception handling when looking for used kdu name

Change-Id: Ieaa07ddd0dcd3901a242665ef8306e6f08b23c3a
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
(cherry picked from commit 601697a71710893f45f3c00c4fdb9d612cc99b59)

4 years agok8s_juju_conn.py: fix cloud name for k8s 44/8544/1 v7.0.1rc3
garciadeblas [Fri, 13 Dec 2019 12:39:03 +0000 (13:39 +0100)]
k8s_juju_conn.py: fix cloud name for k8s

Change-Id: I182d62fa5997c4a3a6137668827b2e100901ee47
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
4 years agoGenerate names for K8s pods when file or url 42/8542/2
quilesj [Thu, 23 Jan 2020 09:28:26 +0000 (09:28 +0000)]
Generate names for K8s pods when file or url

Change-Id: I99e50cda65df2462c90775eb84a096232428ffc4
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
4 years agoFix bug 996. Error status when cluster is not ready 43/8543/1
quilesj [Thu, 23 Jan 2020 16:30:04 +0000 (16:30 +0000)]
Fix bug 996. Error status when cluster is not ready

Change-Id: I194932ac67aa9a04a1fd4a7e4789103b13477e6e
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
(cherry picked from commit 32dc3c64b74491a4058822a3d6f6371ff74c835f)

4 years agojuju relations implementation 41/8541/1
quilesj [Thu, 9 Jan 2020 08:49:10 +0000 (08:49 +0000)]
juju relations implementation

Change-Id: I1ed4744e5d616a7674fb8232041aa64820a322f0
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
(cherry picked from commit aae10b40873737c1cc783868ce13c33c0b4c2846)

4 years agoFix bug 1002 35/8535/1
Adam Israel [Wed, 29 Jan 2020 14:35:35 +0000 (09:35 -0500)]
Fix bug 1002

This patch fixes bug 1002 by using the async-friendly `asyncio.create_subprocess_exec` instead of `subprocess.run`.

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

4 years agoDestroy machines before destroying the model 15/8515/1 v7.0.1rc2
quilesj [Wed, 15 Jan 2020 12:30:09 +0000 (12:30 +0000)]
Destroy machines before destroying the model

Change-Id: If42c99ac9ec88a492d89a201f12a93872a476783
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
(cherry picked from commit bd5a0c9bcbcd078a2c914f77671d23d4e2afca98)

4 years agoAdd check for local k8s 09/8509/1
David Garcia [Wed, 11 Dec 2019 14:25:15 +0000 (15:25 +0100)]
Add check for local k8s

Change-Id: Ib408bb3d2412c064cb8ad14c3ff16fd537d84a49
Signed-off-by: David Garcia <david.garcia@canonical.com>
(cherry picked from commit ace992dd8c55fb909832bc26e05a9eb7e2e21055)

4 years agoQuick deployment of charms: added apt_mirror and enable_os_upgrade model config options 90/8490/1
garciadeblas [Tue, 17 Dec 2019 14:02:11 +0000 (15:02 +0100)]
Quick deployment of charms: added apt_mirror and enable_os_upgrade model config options

Change-Id: Ied84a77d43aa02314c6e24a17148af1b19d76993
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
(cherry picked from commit 923510cbae1b6abf0b90f4b4ec0e2e37504111de)

4 years agoUse NS uuid when creating a juju k8s model 59/8459/1 v7.0.1rc1
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>
(cherry picked from commit ad3a05447418afef1d7b1998f9d7e351ccf9fe40)

4 years agoChanges in NS and operation status 56/8456/1
quilesj [Thu, 12 Dec 2019 16:10:54 +0000 (16:10 +0000)]
Changes in NS and operation status

Change-Id: I649c19f13e2679163f5ea993f91368cc1c433208
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
(cherry picked from commit 776ab399e7a5468ab8ae08ac54af96b795a15457)

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>
5 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>
5 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"

5 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>
5 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>
5 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>
5 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>