lloretgalleg [Thu, 21 Jan 2021 12:00:57 +0000 (12:00 +0000)]
Bug 1400: Fix stable repo urls that have changed
Change-Id: I92e8f50edd849459b86d5cd3c077200ea4f2b880
Signed-off-by: lloretgalleg <illoret@indra.es>
gspri [Wed, 24 Feb 2021 05:03:17 +0000 (05:03 +0000)]
Feature-9904: Enhancing NG-UI to enable Juju operational view dashboard
New functions implemented in N2VC (Specific for VNF)
- update_vca_status() in n2vc.juju.conn.py
- get_executed_actions() in libjuju.py
- get_application_configs() in libjuju.py
Unit testing added for the above implemented new functions
- UpdateVcaStatus in test_n2vc_juju_conn.py
- GetExecutedActionsTest in test_libjuju.py
- GetApplicationConfigsTest in test_libjuju.py
Change-Id: I7d750d8c39bc7bc061568c28d29f53d1b87c4c23
Signed-off-by: gspri <priyadharshini.g@tataelxsi.co.in>
Signed-off-by: ksaikiranr <saikiran.k@tataelxsi.co.in>
ksaikiranr [Tue, 23 Feb 2021 13:22:18 +0000 (18:52 +0530)]
Feature-9904: Enhancing NG-UI to enable Juju operational view dashboard
Added functions to get action list, config list and executed action list for KNF
Change-Id: Ibec764c719da5507168c474cf48fc23efbb9c846
Signed-off-by: jayaramans <selvi.j@tataelxsi.co.in>
Signed-off-by: ksaikiranr <saikiran.k@tataelxsi.co.in>
ksaikiranr [Wed, 27 Jan 2021 16:37:46 +0000 (22:07 +0530)]
Feature-9904: Enhancing NG-UI to enable Juju operational view dashboard
Added methods in n2vc_juju_conn and libjuju to suppot configs list
and executed actions/history of actions. Added method in n2vc juju conn
to call libjuju methods to get actions, configs and history of actions.
Change-Id: I845789080d148fa42e859dcda185da1e62b4c489
Signed-off-by: ksaikiranr <saikiran.k@tataelxsi.co.in>
David Garcia [Tue, 23 Feb 2021 09:38:17 +0000 (10:38 +0100)]
Fix pylint in tox
Change-Id: Ifef8f7516df33e48d6df8e38414fe96a3ad30e73
Signed-off-by: David Garcia <david.garcia@canonical.com>
tierno [Tue, 22 Sep 2020 10:38:22 +0000 (10:38 +0000)]
Providing output info when exec_primitive fails
Change-Id: I5d35e524acf89eaa4a15e468a00c0d3e818f9a93
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
tierno [Fri, 14 Aug 2020 10:05:43 +0000 (10:05 +0000)]
k8s_helm log enhancement
avoid repetition of logs. Remove unneded traceback
Change-Id: Idcbdec0ea137e1daf6a8340f47e123849b585118
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
David Garcia [Tue, 29 Sep 2020 17:48:13 +0000 (19:48 +0200)]
Fix bug 1216: Remove machines only for native charms
Updates revision of Python libjuju to 2.8.4
Change-Id: I3f41eead305349eba5d404f5f3d61d33f0536aca
Signed-off-by: David Garcia <david.garcia@canonical.com>
David Garcia [Wed, 16 Sep 2020 11:31:33 +0000 (13:31 +0200)]
Remove EntityType from juju watcher and workaround juju bug for retrieving the status
- The juju watcher was doing an unnecessary translation with the entity types. The entity already provides an attribute .entity_type
- Juju has a bug in version 2.8.2 that returns a wrong status. Therefore, charms were getting stuck in waiting for ever.
Change-Id: I44709190acc41601e8a67f4c52074fda00c3d495
Signed-off-by: David Garcia <david.garcia@canonical.com>
David Garcia [Thu, 23 Jul 2020 13:04:19 +0000 (15:04 +0200)]
Store k8s controller information in Mongo, and remove controller attribute from K8sJujuConnector
- Storing the k8s controller information in Mongo let us connect to that controller from different LCM units
- The cacert and secret keys are encrypted
- The controller attribute in K8sJujuConnector was preventing to have more than 1 connection to different controllers at the same time
Change-Id: Icf96e1eedf84e283dd6b0016cae3695a074b7d24
Signed-off-by: David Garcia <david.garcia@canonical.com>
David Garcia [Wed, 22 Jul 2020 15:56:12 +0000 (17:56 +0200)]
Get the kubeconfig credentials from MongoDB
This the previous approach, the kubeconfig was gotten from the filesystem,
which has issues scaling the LCM, because the kubeconfig was only present
in the pod that had initialized the environment.
The kubeconfig is stored in Mongo, and this commit basically gets the config from there, so it doesn't matter which LCM needs access to it.
Change-Id: I80458db5124122a4b7b3eb3a9b00cb4a4add11ff
Signed-off-by: David Garcia <david.garcia@canonical.com>
David Garcia [Wed, 22 Jul 2020 11:17:56 +0000 (13:17 +0200)]
Fix bug 1167
Change-Id: Id0ea5f19d57d2214219eec8f59f13a378d61c870
Signed-off-by: David Garcia <david.garcia@canonical.com>
tierno [Fri, 17 Jul 2020 11:47:32 +0000 (11:47 +0000)]
1156 fix path obtained for k8s_helm_conn cluster
minor change at /k8s_juju_conn.py
Change-Id: I1e7f4910bc726d5a693ce50f45798a2fc8363a96
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
David Garcia [Thu, 16 Jul 2020 15:53:20 +0000 (17:53 +0200)]
Fix an issue with the service ports in Kubectl.py
The ports were retrieved as V1ServicePort classes, and LCM cannot store that in the database
Change-Id: I451ab65478f36c5cb7f33594b4454bd315c22878
Signed-off-by: David Garcia <david.garcia@canonical.com>
David Garcia [Thu, 16 Jul 2020 10:37:13 +0000 (12:37 +0200)]
Make API Proxy optional and avoid replacing existing SSH Keys in the provisioner
- Fixes bug 1154
- Fixes bug 1083
Change-Id: I0ee5e092f5ff205089c2b80ece9f4262572d58d2
Signed-off-by: David Garcia <david.garcia@canonical.com>
Dominik Fleischmann [Wed, 15 Jul 2020 12:44:45 +0000 (14:44 +0200)]
Add unit tests for K8s Proxy Charm Feature
This commit also makes an initial template for
future test in n2vc_juju_conn.py
Change-Id: I34cb0f52bc2e6ce6b514ea4f99658f109e21875f
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
David Garcia [Wed, 15 Jul 2020 14:01:17 +0000 (16:01 +0200)]
Pin libjuju version to 2.8.2
This fixes bug 1144
Change-Id: I72580c2a2c4614bad2847b436d376ad9b4636031
Signed-off-by: David Garcia <david.garcia@canonical.com>
David Garcia [Thu, 2 Jul 2020 11:56:58 +0000 (13:56 +0200)]
Implement get_service and get_services methods for K8sJujuConnector
- Add a new class (n2vc.kubectl.Kubectl) for managing the Kubectl commands
- Add unit tests
- Add get_config_file() method for getting the path of the kubeconfig in K8sJujuConnector
- Implement get_service() and get_services() methods in K8sJujuConnector
Change-Id: I883ec21dad519c2dc65cb9bd601e539685336756
Signed-off-by: David Garcia <david.garcia@canonical.com>
Dominik Fleischmann [Tue, 7 Jul 2020 11:11:19 +0000 (13:11 +0200)]
Add unit tests to N2VC refactor
This commit adds unit tests for the following
modules:
juju_watcher.py 96% coverage
libjuju.py 72% coverage
utils.py 100% coverage
Minor libjuju.py fixes found with unit testing
Fix testing with tox
Change-Id: I9f23ce2f18aac6765edfa955ed200802c27d9047
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
tierno [Tue, 14 Jul 2020 10:29:00 +0000 (10:29 +0000)]
fix bugs 1117 and 1142 at deleting k8scluster helm-chart
bug 1142: When helm is not going to be uninstalled, do not check for kdu releases
bug 1117: When helm is going to be unistalled with kdu releases, just warn and
skip uninstall helm. This happens because kdu release has been installed
outside the scope of OSM. NBI already checks that there is not OSM kdu
deployments upon k8scluster deletion, denying the operation if any.
Change-Id: Icee2125b790c562130e13dd8c619d1c94c64c0fe
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
lloretgalleg [Mon, 29 Jun 2020 14:18:30 +0000 (14:18 +0000)]
Added new functionaliyty to obtain services data
Change-Id: I140dafb29f7636e4b8e481b865faa414d7fb1136
Signed-off-by: lloretgalleg <illoret@indra.es>
(cherry picked from commit
d99f3f2f67d693c30494be7ad19b97f3f5528961)
tierno [Wed, 24 Jun 2020 13:57:10 +0000 (13:57 +0000)]
allow starts N2VCJujuConnector without the parameter api_proxy
Change-Id: I7506f10b89c6837ce019e6db447748de3c811d61
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
tierno [Thu, 25 Jun 2020 15:48:52 +0000 (15:48 +0000)]
fix 1108 enhancement in helm installation and removing
it allows old versions of k8s by creating a serviceaccount
In addition it stores the namespace used for helm instalation,
to use it at deletion. For that a 'namespace.cluster_id' is used
Change-Id: I8333cbd02bc681908c4341b592746b144f8a0acd
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
David Garcia [Wed, 1 Jul 2020 18:25:30 +0000 (20:25 +0200)]
Update database with api_endpoints of VCA on initialization
Change-Id: Id5666d8c93d357632efde93e8e60abafdad56e35
Signed-off-by: David Garcia <david.garcia@canonical.com>
(cherry picked from commit
2cf8b2e0cd32ab2e8f3913ae9c5e156710465240)
David Garcia [Tue, 30 Jun 2020 06:39:26 +0000 (08:39 +0200)]
Fix missing await
Change-Id: I64babbb51193d47122e34498f11b6d380b44a174
Signed-off-by: David Garcia <david.garcia@canonical.com>
(cherry picked from commit
d745e229c23053e565c89231c4e239186ba3e332)
David Garcia [Thu, 25 Jun 2020 15:18:31 +0000 (17:18 +0200)]
Fix model deletion
- Model deletion is failing with Juju 2.8
Change-Id: I6d7fc85ac9166a4eb7ff5851c231490400d64787
Signed-off-by: David Garcia <david.garcia@canonical.com>
(cherry picked from commit
b8ff39bee1fffc09564f911ab522269306163f84)
Dominik Fleischmann [Mon, 29 Jun 2020 14:16:28 +0000 (16:16 +0200)]
Write to DB when creating K8s Proxy Charm
This commit adds a call to _write_ee_id_db so
that the DB is updated the same way as in LXD
Proxy Charms.
Change-Id: I7ecd815b1a5fbbb0b0222300da39ca99cb6ae584
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
(cherry picked from commit
7ace6faf03350236447f49ea6435e271a3f84aae)
Dominik Fleischmann [Tue, 9 Jun 2020 09:57:14 +0000 (11:57 +0200)]
8716 - K8s Proxy Charms
This commit enables the possibility to deploy
Proxy Charms on Kubernetes.
It depends on a new LCM environment variable
called `k8s_cloud` which will state the k8s name
in VCA that will be used for deploying the proxy
charms.
It will also check the k8s model for status
and delete the k8s model if it exists.
Finally it will now retry the verify ssh
credential action when the action fails, instead
of only retrying when a excpetion is launched.
Change-Id: I09510dcec00f747da945f88d54c2e25c1402d56c
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
(cherry picked from commit
b95133489d1cd16e1692085b1193d24d52c858fc)
David Garcia [Wed, 25 Mar 2020 17:19:02 +0000 (18:19 +0100)]
Feature 8720: Add scale support
Change-Id: Ie94521fb6a1ce0a765f9558de749f4f438cf8b93
Signed-off-by: David Garcia <david.garcia@canonical.com>
(cherry picked from commit
f8a9d46e66f1222d7aefdf5a641e4490ef1a40b8)
David Garcia [Fri, 19 Jun 2020 09:40:18 +0000 (11:40 +0200)]
Feature 8681: Add VCA HA capabilities
- juju watcher: fix exception handling when websocket is closed
- libjuju.py:
- Get vca endpoints from database (if exists)
- Update vca endpoints in database
- Get controller per operation (remove controller from class attribute)
- Add health check: Every 5 minutes the connection to the controller will be tested.
- Dockerfile: update it to 18.04
Change-Id: Ifa0a3a705d48fd736a9634b0722bdc914003b497
Signed-off-by: David Garcia <david.garcia@canonical.com>
(cherry picked from commit
2f66c4df28308b5b2747bb207e7797932e502436)
Felipe Vicens [Thu, 25 Jun 2020 06:24:19 +0000 (08:24 +0200)]
Adding python3-pip stage2 dependency
Change-Id: I39e5e196fb598570ddd7376a0b280379546fa271
Signed-off-by: Felipe Vicens <felipe.vicens@atos.net>
(cherry picked from commit
032bba4c743bc28afb495d28f82edaac7a6efe6e)
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>
(cherry picked from commit
cbf4b78798f1c6535fa7a7caaaa9235fb9dc8e8a)
tierno [Tue, 21 Apr 2020 13:22:26 +0000 (13:22 +0000)]
fix issue storing status of k8s_helm_conn
Change-Id: Iab7d4b7d1cc944fe4d23fb1455823d0eb6798b33
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
David Garcia [Wed, 13 May 2020 10:18:38 +0000 (12:18 +0200)]
Initial refactor of N2VC
- Add libjuju.py to encapsulate all code related with the communication using libjuju
- Replace juju_observer with juju_watcher
- Add utils with some utilities like EntityType, FinalStatus, and JujuStatusToOSM
Change-Id: I5d46ad65d6ed37b49bf2504209bfdd46d1b5a7e4
Signed-off-by: David Garcia <david.garcia@canonical.com>
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>
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>
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>
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>
beierlm [Tue, 12 May 2020 19:26:37 +0000 (15:26 -0400)]
Change to sane default timeout
Changes the default timeout from ~28 hours to 1 hour.
Fixed syntax errors in two log messages.
Adds unit tests for timeouts.
Adds nose config to create Junit style output.
Fixes bug 1014
Change-Id: I7d1c2d28b397adc3ac638aa2366925dc744eade3
Signed-off-by: beierlm <mark.beierl@canonical.com>
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>
beierlm [Wed, 6 May 2020 16:05:16 +0000 (12:05 -0400)]
Adds skipdist back
The merge has been failing, probably due to unmaintained distribution
code for debian packages that are no longer needed. This patch
reinstates the skipdist step to tox.ini
Change-Id: Ia4134222f85075fda9e9a535493eb77ceabb855f
Signed-off-by: beierlm <mark.beierl@canonical.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
israelad [Wed, 26 Feb 2020 18:48:38 +0000 (19:48 +0100)]
Merge "Revert "Bug 1000: Fix authentication when deleting service""
israelad [Wed, 26 Feb 2020 18:46:43 +0000 (19:46 +0100)]
Revert "Bug 1000: Fix authentication when deleting service"
This reverts commit
4d193dc97be946877fc9b033e5d267b103a7cc45.
Change-Id: I231f152421c839d1604710bd0707a91c634fd0bc
Signed-off-by: Adam Israel <adam.israel@canonical.com>
israelad [Wed, 26 Feb 2020 18:45:53 +0000 (19:45 +0100)]
Merge "Bug 1000: Fix authentication when deleting service"
Dominik Fleischmann [Wed, 26 Feb 2020 12:25:00 +0000 (13:25 +0100)]
Bug 1000: Fix authentication when deleting service
This fixes bug 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: I46f9a89e004c918b4f0104489ca4edfa7e386c95
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
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>
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>
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>
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>
garciadeblas [Fri, 13 Dec 2019 12:39:03 +0000 (13:39 +0100)]
k8s_juju_conn.py: fix cloud name for k8s
Change-Id: Id0e605f010306bd71728e1335636340674bbfb2d
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
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>
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>
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>
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>
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>
israelad [Tue, 21 Jan 2020 13:54:39 +0000 (14:54 +0100)]
Merge "Add check for local k8s"
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>
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>
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>
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>
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>
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>
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>
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>
israelad [Tue, 3 Dec 2019 20:51:18 +0000 (21:51 +0100)]
Merge "Add missing argument in notify_callback"
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>
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>
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>
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>
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>
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>
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>
israelad [Tue, 26 Nov 2019 14:58:02 +0000 (15:58 +0100)]
Merge "Update deprecated use of yaml.load"
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>
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>
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>
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>
israelad [Fri, 22 Nov 2019 17:03:32 +0000 (18:03 +0100)]
Merge "Added description to package"
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>
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