osm/N2VC.git
4 weeks agoUpdate kubectl methods for generic objects to enable cluster scope 62/14662/1 master
garciadeblas [Tue, 22 Oct 2024 08:00:49 +0000 (10:00 +0200)]
Update kubectl methods for generic objects to enable cluster scope

Change-Id: I6508bd4f147331c4f3d04ba5c30c485947a3a24b
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
6 weeks agoTest OKA creation with sleeps 04/14604/2
garciadeblas [Thu, 26 Sep 2024 16:30:01 +0000 (18:30 +0200)]
Test OKA creation with sleeps

Change-Id: I75663fc13b6f128077fcb3c77e5e63cc954a06e2
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
8 weeks agoPass src_file and dest_filename in kubectl.create_pvc_with_content 92/14592/1
garciadeblas [Tue, 24 Sep 2024 12:41:40 +0000 (14:41 +0200)]
Pass src_file and dest_filename in kubectl.create_pvc_with_content

Change-Id: I81d530c170aad0f3d4e84ef9b687863a4c1983b9
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
3 months agoMake sync the routines to create and delete generic objects in kubectl.py 27/14527/1 v16.0 release-v16.0-start v16.0.0
garciadeblas [Thu, 22 Aug 2024 07:59:05 +0000 (09:59 +0200)]
Make sync the routines to create and delete generic objects in kubectl.py

Change-Id: I68ec4948d7950210958e500afc37c84757d2861f
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
3 months agoFeatures 11020,11022-11026: Advanced cluster management 64/14464/14
garciadeblas [Thu, 4 Jul 2024 09:00:13 +0000 (11:00 +0200)]
Features 11020,11022-11026: Advanced cluster management

Change-Id: I15c910f146f31fb10b56dddae4027825441afdfc
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
3 months agoUpdate pip dependencies
garciadeblas [Wed, 7 Aug 2024 00:35:10 +0000 (02:35 +0200)]
Update pip dependencies

Change-Id: I66c9047f6b607f9417bd5c0880c5eb7a7b806027
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
4 months agoFeature 10991: Change path to post-renderer according to previous changes 90/14490/1
Pedro Pereira [Fri, 12 Jul 2024 16:49:28 +0000 (17:49 +0100)]
Feature 10991: Change path to post-renderer according to previous changes

Change-Id: I7bf48674290073abfaa0058c09637b6a01c0fd09
Signed-off-by: Pedro Pereira <pedrocjdpereira@av.it.pt>
4 months agoFix podLabels when kdur can't be found during helm operations 87/14487/1
Gabriel Cuba [Thu, 11 Jul 2024 14:55:43 +0000 (09:55 -0500)]
Fix podLabels when kdur can't be found during helm operations

Change-Id: I2f8515538c6535cf33bf4825271853139d67c159
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
4 months agoFeature 10991: add postrenderer scripts to deb package 83/14483/1
garciadeblas [Wed, 10 Jul 2024 11:13:18 +0000 (13:13 +0200)]
Feature 10991: add postrenderer scripts to deb package

Change-Id: I2005b00b4bbc487e51fd6b991ddf884a2624e08e
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
4 months agoFeature 10991: Gather information relating to the KNF being deployed and inject it... 56/14256/33
Pedro Pereira [Tue, 12 Mar 2024 14:58:13 +0000 (14:58 +0000)]
Feature 10991: Gather information relating to the KNF being deployed and inject it as labels in the Kubernetes objects

Change-Id: I5d78de8f369bd893a4a05287763909d2fe360b06
Signed-off-by: Pedro Pereira <pedrocjdpereira@av.it.pt>
7 months agoFeature 11014: add option to reset values for upgrade operation on helm charts 22/14222/2
garciadeblas [Thu, 8 Feb 2024 12:05:27 +0000 (13:05 +0100)]
Feature 11014: add option to reset values for upgrade operation on helm charts

Change-Id: I61ca767d458985ecaa429eb3d0549634cf882da8
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
9 months agoPin black version in tox.ini to 23.12.1 78/14178/1
garciadeblas [Mon, 29 Jan 2024 17:26:53 +0000 (18:26 +0100)]
Pin black version in tox.ini to 23.12.1

Change-Id: Ica4b7a2ec310cffa116f319818f755c5062f0787
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
11 months agoFeature 10997: Adds helm OCI registry login 43/14043/4 release-v15.0-start
Gabriel Cuba [Mon, 20 Nov 2023 06:08:39 +0000 (01:08 -0500)]
Feature 10997: Adds helm OCI registry login

Change-Id: I1bc12bdf52f082900c3388d03c31e52841017b94
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
11 months agoRevert "Revert "Feature 11002: Deprecate helmv2"" 79/14079/1
almagia [Thu, 30 Nov 2023 17:50:02 +0000 (19:50 +0200)]
Revert "Revert "Feature 11002: Deprecate helmv2""

This reverts commit dfb624e236597b96658da80fe7436b0f92416cc3.

TSC request on 30.11

Change-Id: Ieb1e64d052c913b8aaedfe07620245054aa82a08

11 months agoRevert "Feature 11002: Deprecate helmv2" 78/14078/1
cubag [Wed, 29 Nov 2023 21:07:12 +0000 (23:07 +0200)]
Revert "Feature 11002: Deprecate helmv2"

This reverts commit c81293be8ba0656a5bc7994e4333fedf73b527ff.

Change-Id: I89c7d1009c4f059ba497a76557f045434a1d2186
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
13 months agoFeature 11002: Deprecate helmv2 65/13965/1
Luis Vega [Fri, 13 Oct 2023 14:44:26 +0000 (14:44 +0000)]
Feature 11002: Deprecate helmv2

Change-Id: I639916d8aeef5a984a4fda2643b68e5bb589b19e
Signed-off-by: Luis Vega <lvega@whitestack.com>
13 months agoUpdate pip requirements to pin kubernetes version to 26.1.0 05/13905/1
garciadeblas [Fri, 29 Sep 2023 07:54:53 +0000 (09:54 +0200)]
Update pip requirements to pin kubernetes version to 26.1.0

Change-Id: I1c5ffa2baee938a36ea126b30becbc1e9c7d5885
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
13 months agoUpdate pip requirements to pass stage2 and stage3 in all modules 99/13899/2
garciadeblas [Thu, 28 Sep 2023 21:31:11 +0000 (23:31 +0200)]
Update pip requirements to pass stage2 and stage3 in all modules

Change-Id: Ib3e14922e3e40cdb423896caabc4915e78ac3ae2
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
13 months agoClean stage-archive.sh 98/13898/1
garciadeblas [Tue, 18 Apr 2023 13:07:58 +0000 (15:07 +0200)]
Clean stage-archive.sh

Change-Id: Ibfebb96815f05a7493de9c8866b8da299b1042fb
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
16 months agoUpdate version of PyYAML 14/13714/1
Mark Beierl [Fri, 21 Jul 2023 17:13:24 +0000 (17:13 +0000)]
Update version of PyYAML

Change-Id: Ic2a9611e6ee3a34e8c0c0d51243c6b95e6c11491
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
16 months agoRemove EE Charms when VNF has only day-1 operations 39/13539/3
Dario Faccin [Fri, 16 Jun 2023 08:21:38 +0000 (10:21 +0200)]
Remove EE Charms when VNF has only day-1 operations

Add paramter in EE deletion method to allow deletion of a single
application instead of the whole model

Change-Id: I4d1ebdd0c44c21a01c4d1e0e1f10b63ac983d787
Signed-off-by: Dario Faccin <dario.faccin@canonical.com>
16 months agoFix bug 2088 by quoting inputs for commands 37/13537/5
Daniel Arndt [Tue, 27 Jun 2023 19:42:41 +0000 (16:42 -0300)]
Fix bug 2088 by quoting inputs for commands

CVE-2022-35503

Change-Id: I392eda9138d399b956dd8072a082e15edab142b7
Signed-off-by: Daniel Arndt <daniel.arndt@canonical.com>
16 months agoUpdate python-libjuju version to 2.9.42.4 82/13582/1 release-v14.0-start
Guillermo Calvino [Mon, 26 Jun 2023 11:47:46 +0000 (13:47 +0200)]
Update python-libjuju version to 2.9.42.4

Change-Id: I9770e1647ea715d205d06cd07fda1b4d244a673f
Signed-off-by: Guillermo Calvino <guillermo.calvino@canonical.com>
17 months agoCoverity-CWE 22: Improper Limitation of a Pathname 14/13314/2
selvi.j [Fri, 28 Apr 2023 06:17:26 +0000 (06:17 +0000)]
Coverity-CWE 22: Improper Limitation of a Pathname
to a Restricted Directory ('Path Traversal')

Added fix for CWE 22: Improper Limitation of a Pathname
to a Restricted Directory ('Path Traversal')

Change-Id: I6e39b16dc2cc796eb91485ff6dcecef38b29377b
Signed-off-by: selvi.j <selvi.j@tataelxsi.co.in>
17 months agoCoverity-CWE 330: Use of Insufficiently Random Values 95/13295/2
selvi.j [Thu, 27 Apr 2023 06:53:45 +0000 (06:53 +0000)]
Coverity-CWE 330: Use of Insufficiently Random Values

Added fix for CWE 330: Use of Insufficiently Random Value (Cryptographically weak PRNG)

Change-Id: I927c9d22ca42b01f6ec1fe9fc41e4b962167b72f
Signed-off-by: selvi.j <selvi.j@tataelxsi.co.in>
17 months agoFeature 10948: Set labels to new namespaces 01/13401/4
Gabriel Cuba [Wed, 17 May 2023 06:30:15 +0000 (01:30 -0500)]
Feature 10948: Set labels to new namespaces

Change-Id: I0f40d198d398c79f3e9badd8def8f884f60fb7f8
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
18 months agoFeature 10957: Add methods for creation of namespace, secret and RBAC 75/13275/4
Gabriel Cuba [Wed, 26 Apr 2023 00:26:19 +0000 (19:26 -0500)]
Feature 10957: Add methods for creation of namespace, secret and RBAC

Change-Id: Iada9d3caa9e8a926e421fe96894be618f36fb37e
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
18 months agoWrapping Retry for Py3.10 25/13425/2
Mark Beierl [Fri, 19 May 2023 02:21:06 +0000 (22:21 -0400)]
Wrapping Retry for Py3.10

The retrying_async library is not Python 3.10 ready, so we are providing
a 3.10 compatible callback for it to use instead of the default one

Change-Id: I15e9b64c70d4d294c9ff0c6c7048cd257f6e1b61
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
18 months agoWrapping Retry for Py3.10 23/13423/2
Mark Beierl [Thu, 18 May 2023 19:08:06 +0000 (15:08 -0400)]
Wrapping Retry for Py3.10

The retrying_async library is not Python 3.10 ready, so we are providing
a 3.10 compatible callback for it to use instead of the default one

Change-Id: I6e98f6d7ebc2fe134b0e3fe37d180e383044b30b
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
18 months agoPython3.10/Ubuntu 22.04 part 2 94/13394/2
Mark Beierl [Mon, 15 May 2023 20:17:02 +0000 (16:17 -0400)]
Python3.10/Ubuntu 22.04 part 2

Removal of loop from all methods

Change-Id: I05bfe90f82b8c8acba3172de89c7d8e0ee08402b
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
18 months agoRemove charset-normalizer version constraint 71/13371/4
Gabriel Cuba [Thu, 11 May 2023 07:04:17 +0000 (02:04 -0500)]
Remove charset-normalizer version constraint

Change-Id: I46311f74e949270278f685c50576f5884ba96227
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
18 months agoUbuntu 22.04 and Python 3.10 preparation 22/13322/12
Guillermo Calvino [Fri, 28 Apr 2023 09:51:43 +0000 (11:51 +0200)]
Ubuntu 22.04 and Python 3.10 preparation

Change-Id: I57a4ee39c101bdab610a6964de58eaa2653d37a3
Signed-off-by: Guillermo Calvino <guillermo.calvino@canonical.com>
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
19 months agoFix black errors 13/13113/1
garciadeblas [Fri, 24 Mar 2023 13:03:17 +0000 (14:03 +0100)]
Fix black errors

Change-Id: I58c380853485995e2c37163a958b06072cbe24ca
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
(cherry picked from commit 9831d7e8205bce462a669a8cc2b3dc1a611c924c)

21 months agoFeature 10950: Replace pycrypto with pycryptodome 97/12897/7
Gulsum Atici [Sat, 28 Jan 2023 20:55:19 +0000 (23:55 +0300)]
Feature 10950: Replace pycrypto with pycryptodome

Remove the encryption methods from N2VC and import them from common

Change-Id: Ia2c9a305a27cf6c9daaa14edab5319c735e33835
Signed-off-by: Gulsum Atici <gulsum.atici@canonical.com>
21 months agoFeature 10974: Add juju instantiation params. 41/12841/13
Patricia Reinoso [Tue, 17 Jan 2023 08:39:44 +0000 (08:39 +0000)]
Feature 10974: Add juju instantiation params.

Instantiation paramaters are added using
a bundle overlay.

Bundle overlay is passed to juju library at the
moment of deployment.

Bundle overlay is a YAML file created at instantiation.

We check that all the applications in overlay already
exist in original bundle

Change-Id: Idbc7d2bc02915a1023e213e26a01531d93f24798
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
21 months agoReformat files according to new black validation 06/12906/1
Patricia Reinoso [Wed, 1 Feb 2023 16:14:39 +0000 (16:14 +0000)]
Reformat files according to new black validation

Change-Id: Ifebf4e97ae22b0131d0e84c58a18468b454ee6a7
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
21 months agoUpdating python dependencies 94/12894/1
Mark Beierl [Sat, 28 Jan 2023 03:02:22 +0000 (03:02 +0000)]
Updating python dependencies

Update of Python packages (using pip-compile) in preparation for
Release FOURTEEN

Change-Id: I4b495cc7edb7866d0ffa93875242713ebc2e05d1
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
21 months agoUpdating python dependencies 89/12889/1
Mark Beierl [Fri, 27 Jan 2023 21:04:10 +0000 (21:04 +0000)]
Updating python dependencies

Update of Python packages (using pip-compile) in preparation for
Release FOURTEEN

Change-Id: I5212ca417f5d818d6e18718eb3adf6b9f6a06a58
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
21 months agoUpdating python dependencies 76/12876/4
Gulsum Atici [Thu, 26 Jan 2023 11:56:40 +0000 (14:56 +0300)]
Updating python dependencies

Update of Python packages (using pip-compile) in preparation for
Release FOURTEEN

Change-Id: Ib41ca12b847dcb3f0711d952fe9b8b1ae57e826f
Signed-off-by: Gulsum Atici <gulsum.atici@canonical.com>
22 months agoFix Basic_22 robot test 00/12800/4
Patricia Reinoso [Wed, 4 Jan 2023 10:40:10 +0000 (10:40 +0000)]
Fix Basic_22 robot test

When adding a juju relation that already exists
a JujuAPIError exception is raised.

The "already exists" message is contained in
JujuAPIError.error_code field.

Exception is handle in an except block and
is not propagated.

Change-Id: I0ac0d875cb9580959a474e486595144473873d24
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
23 months agoFix cross-model relation condition 64/12764/5
Patricia Reinoso [Mon, 5 Dec 2022 16:55:51 +0000 (16:55 +0000)]
Fix cross-model relation condition

Provider and requirer are in different
controllers.

Change-Id: Icd6d82571d62c562517292d368241244cbe06f3e
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
23 months agoFeature 10947: Add methods to create certificates 97/12597/8 release-v13.0-start
Gabriel Cuba [Fri, 7 Oct 2022 16:40:03 +0000 (11:40 -0500)]
Feature 10947: Add methods to create certificates

Change-Id: Icc85c4b23e3f22c4b1b34dfd86e90cb0b53819d8
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
23 months agoFeature 10956: Add namespace and force arguments to helm upgrade 78/12578/11
Gabriel Cuba [Mon, 10 Oct 2022 17:13:55 +0000 (12:13 -0500)]
Feature 10956: Add namespace and force arguments to helm upgrade

Change-Id: I8e37e43b72c5f7f63c4b9f49542905727610fa5a
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
2 years agoUse of yaml.SafeLoader instead of yaml.Loader 02/12302/3
garciadeblas [Tue, 5 Jul 2022 16:05:04 +0000 (18:05 +0200)]
Use of yaml.SafeLoader instead of yaml.Loader

Change-Id: I11a4775ac657275d14b3d7a76abbefdca5d556f4
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
2 years agoBug 2104 fixed 16/12316/6
Pedro Escaleira [Thu, 7 Jul 2022 21:18:35 +0000 (22:18 +0100)]
Bug 2104 fixed

- Added the --reuse-values flag to the upgrade command;
- Also, removed the duplicated code from the _get_upgrade_scale_command
  method, and not this method only calls the _get_upgrade_command to get
  the command to upgrade/scale the Helm Chart

Change-Id: I8bda5450f1f9bd5e2b9771f284e1b904b82fb3df
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoBug 2066 fixed 63/12163/12
Pedro Escaleira [Sat, 4 Jun 2022 21:21:57 +0000 (22:21 +0100)]
Bug 2066 fixed

Proper verification of the replica count in get_scale_count,
_get_replica_count_instance and _get_replica_count_url methods

Change-Id: I0df7b164b690daf171b78dbed19629047db199fe
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoFixing Bug 2181 Application name creation for Helm chart 93/12593/2
Gulsum Atici [Mon, 17 Oct 2022 11:40:39 +0000 (14:40 +0300)]
Fixing Bug 2181 Application name creation for Helm chart

Change-Id: Id0a83e2b5fee1dbb4c4109f7974b073fc7c3abd7
Signed-off-by: Gulsum Atici <gulsum.atici@canonical.com>
2 years agoFix Bug 2181 92/12592/2
Gulsum Atici [Sun, 16 Oct 2022 18:13:53 +0000 (21:13 +0300)]
Fix Bug 2181

VDU level charm application name creation problem has been fixed.

Change-Id: Ie9e039ae2a3b8734dc6bf0b6dfc14b3455941b84
Signed-off-by: Gulsum Atici <gulsum.atici@canonical.com>
2 years agoUpdate pip packages 79/12579/1
calvinosanc1 [Tue, 11 Oct 2022 09:21:27 +0000 (09:21 +0000)]
Update pip packages

Change-Id: I7fd1b3ffaceba62ba79f086ca9169ee7c17a2d7e
Signed-off-by: calvinosanc1 <guillermo.calvino@canonical.com>
2 years agoUpdate python libjuju from 2.9.10 to 3.0.0 46/12546/6
calvinosanc1 [Thu, 15 Sep 2022 10:23:16 +0000 (10:23 +0000)]
Update python libjuju from 2.9.10 to 3.0.0

Change-Id: Ifdbc1cd385a7779dc0b7d24fbd803559b8c3c878
Signed-off-by: calvinosanc1 <guillermo.calvino@canonical.com>
2 years agoBug 2065 fixed 62/12162/6
Pedro Escaleira [Sat, 4 Jun 2022 18:14:11 +0000 (19:14 +0100)]
Bug 2065 fixed

The method _exec_inspect_command is only obtaining the repo name
where an URL was passed: this will allow to scale KDUs based on local
Helm Charts; did also some refactor work: the _split_repo method now
returns both the Chart's name and Repo's name, in order to avoid using
similar blocks of code in other portions (with this, made some changes
to the _exec_inspect_command and _find_repo methods, to use this method,
instead of a similar block of code); added some information to the
description of some changed methods; other small changes.

Change-Id: I7302623ad2bfeef9be3b7c17376cab67f5eda630
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoBug 2123 fixed 02/12402/2
Pedro Escaleira [Sat, 23 Jul 2022 22:34:42 +0000 (23:34 +0100)]
Bug 2123 fixed

 - Killing the subprocesses launched in both
   _local_async_exec and _local_async_exec_pipe methods if cancelled

Change-Id: I89d15fa20246407f8e5942960151b1265ec2d298
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoFix bug 2149 07/12507/3
Patricia Reinoso [Tue, 30 Aug 2022 16:08:48 +0000 (16:08 +0000)]
Fix bug 2149

Set appropriate delete method for
cluster role bindings in case of exception

Change-Id: I187ec50dbec37ed9ff51e18234ab51e02c42ce40
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
2 years agoFix bug 2071: create secret 77/12477/7
Patricia Reinoso [Tue, 23 Aug 2022 06:22:01 +0000 (06:22 +0000)]
Fix bug 2071: create secret

Manually create a service-account-token secret
for service account when k8s cluster is created
in case k8s version >=1.24.

ServiceAccount object should be created first.
When deleting a k8s cluster. Corresponding
ServiceAccount and Secret are automatically
deleted as well.

In k8s < 1.24, secret is automatically created.

Change-Id: I160b1f87a64cf7a1bbb1fa8587259d8fbd3e6cd4
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
2 years agoBug 1890: Use output from action 72/12472/3
Mark Beierl [Fri, 19 Aug 2022 19:02:24 +0000 (15:02 -0400)]
Bug 1890: Use output from action

Pass the output from the action command back to the caller,
regardless of the status of action completion.  This allows
for failure messages to be passed through to the LCM for
storage in the action record.

Change-Id: I268c43225b71a80e54712743e61586d57952553e
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
2 years agoFixing charm application name creation if DU is Helm Chart/KDU 70/12470/2
aticig [Fri, 19 Aug 2022 16:58:13 +0000 (19:58 +0300)]
Fixing charm application name creation if DU is Helm Chart/KDU

If deployment unit is a Helm chart/KDU,
vdu_profile_id and vdu_count will be empty string.

Change-Id: Ifb6aed0f08f2d7687d0cd6a31506268926ac7f63
Signed-off-by: aticig <gulsum.atici@canonical.com>
2 years agoFeature 10944 Change naming of charms 11/12411/11
aticig [Wed, 27 Jul 2022 22:12:03 +0000 (01:12 +0300)]
Feature 10944 Change naming of charms

Modifying n2vc_conn.py/N2VCConnector _get_application_name
method to generate new application naming for charms

Change-Id: I1908bdbe4ce1a959a8a407f77913a414ec23fbb4
Signed-off-by: aticig <gulsum.atici@canonical.com>
2 years agoEnsure async calls are performed 99/12399/6
limon [Thu, 21 Jul 2022 11:55:55 +0000 (13:55 +0200)]
Ensure async calls are performed

Change-Id: I3f8afe4c7aa4e5ab1e5f2b19edf4c07b5d6a5d64
Signed-off-by: limon <alimonj@indra.es>
2 years agoJenkins refresh 37/12337/2
Mark Beierl [Thu, 14 Jul 2022 13:39:01 +0000 (09:39 -0400)]
Jenkins refresh

Change the jenkins node label from 'docker'
to 'stage_2' as part of the Jenkins cleanup

Change-Id: Ifc15cf371e588cd482b296ac1d6e85f8f51a2c22
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
2 years agoManual update of pip requirements 55/12255/1 release-v12.0-start
beierlm [Fri, 24 Jun 2022 17:45:23 +0000 (13:45 -0400)]
Manual update of pip requirements

Change-Id: If32e6a3789884c9d7a9521f4955a608ae59c9381
Signed-off-by: beierlm <mark.beierl@canonical.com>
2 years agoUpdating Python-libjuju version to 2.9.10 34/12234/1
aticig [Wed, 22 Jun 2022 08:40:00 +0000 (11:40 +0300)]
Updating Python-libjuju version to 2.9.10

Change-Id: I1286443df6c76503a95cbaeb1cd9543d3a5841c3
Signed-off-by: aticig <gulsum.atici@canonical.com>
2 years agoFix bug 2036 33/12233/1
David Garcia [Tue, 21 Jun 2022 09:26:57 +0000 (11:26 +0200)]
Fix bug 2036

The unit tests were failing because of a wrong mock

Change-Id: Ie8fd9f6cf926e0aee72c1cd5b1601c073c9928ba
Signed-off-by: David Garcia <david.garcia@canonical.com>
2 years agoBug 2085 fixed: added an async lock everytime a cmd is executed in the Helm conn 25/12225/5
Pedro Escaleira [Mon, 20 Jun 2022 14:40:43 +0000 (15:40 +0100)]
Bug 2085 fixed: added an async lock everytime a cmd is executed in the Helm conn

Change-Id: I118ab7264cff8e51f098e9249fbb4d0872290058
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoBug 2005 fixed: removed the while true from K8sHelmBaseConnector._store_status 25/11925/3
Pedro Escaleira [Sat, 23 Apr 2022 18:55:45 +0000 (19:55 +0100)]
Bug 2005 fixed: removed the while true from K8sHelmBaseConnector._store_status

Made the necessary refactor and fixed the tests accordingly. Now, the
`_store_status` method is not executed forever, it is only executed once
each time is called.

Change-Id: Ia96ab3152fe7f838d1b81dd02c2d22373b805f4a
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoBug 1995 fixed: possibility of defining the K8s namespace for Juju Bundles 00/11900/14
Pedro Escaleira [Tue, 19 Apr 2022 19:40:09 +0000 (20:40 +0100)]
Bug 1995 fixed: possibility of defining the K8s namespace for Juju Bundles

Now, N2VC will use the namespace passed by argument to the methods
install and get_services. Also added this argument to other functions
where it should be passed. When it is not passed, for now it is obtained
from the nsrs, but it should be always passed to avoid queries to the
database, while mainaining backward compatibility.
Updated the N2VC tests accordingly.

Change-Id: Iace944506ba212034efdbb87c6f2d74f8265ea4e
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoBug 2067 fixed 64/12164/2
Pedro Escaleira [Sun, 5 Jun 2022 00:29:57 +0000 (01:29 +0100)]
Bug 2067 fixed

Added the missing resource_name param to the _get_replica_count_instance
method call under the method get_scale_count

Change-Id: Iae2f437b82993dbbf71b80feb5b208f29c8d7083
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoBug 2064 fixed 61/12161/3
Pedro Escaleira [Fri, 3 Jun 2022 18:48:46 +0000 (19:48 +0100)]
Bug 2064 fixed

Removed the unnecessary verification for if the repo_url exists in the
method get_scale_count of the Helm Base Connection class; The same
problem also applies for the scale method, so this verification was also
removed there;
Also did some fixes/additions to the description of some methods being called
in this verification block.

Change-Id: I710b8678b4b70c6f24c2150d44bb714e9e4c5b66
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoUpdate _split_version to check if the kdu_model is a reference or a file 83/12183/4
garciadeblas [Wed, 8 Jun 2022 13:39:24 +0000 (15:39 +0200)]
Update _split_version to check if the kdu_model is a reference or a file

Change-Id: I80dac9f24f652d2a71d9dcbb88cbc2c6850440db
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
2 years agoFix bug 2060: Ignore "model not found" exception when deleting models 78/12178/1
David Garcia [Wed, 8 Jun 2022 09:16:54 +0000 (11:16 +0200)]
Fix bug 2060: Ignore "model not found" exception when deleting models

Change-Id: Ife06b41bf2bcf32b080b405e607450d9303d19e0
Signed-off-by: David Garcia <david.garcia@canonical.com>
2 years agoFix bug 2060: Add logic to delete models gracefully 59/12159/1
David Garcia [Thu, 2 Jun 2022 14:11:28 +0000 (16:11 +0200)]
Fix bug 2060: Add logic to delete models gracefully

Change-Id: Icfda4b9d7ca67cd75621413ac09c6fc00857d1c2
Signed-off-by: David Garcia <david.garcia@canonical.com>
2 years agoFix security bug: Deserialization of Untrusted Data 46/12146/1
David Garcia [Tue, 31 May 2022 09:01:09 +0000 (11:01 +0200)]
Fix security bug: Deserialization of Untrusted Data

Change-Id: I6228e249bdb0acf6f18924910fbb7105fc519eb4
Signed-off-by: David Garcia <david.garcia@canonical.com>
2 years agoBug 2053 fixed: raising JujuControllerFailedConnecting with error message 42/12142/1
Pedro Escaleira [Mon, 30 May 2022 18:08:41 +0000 (19:08 +0100)]
Bug 2053 fixed: raising JujuControllerFailedConnecting with error message

Change-Id: Ie4f3fa92ffd7e7263733d2364ed794a2262f00a4
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoFix bug 2047: Remove fetching of actions for charms on update_vca_status 29/12129/2
David Garcia [Thu, 26 May 2022 10:46:14 +0000 (12:46 +0200)]
Fix bug 2047: Remove fetching of actions for charms on update_vca_status

Change-Id: If599baf949b74d420400fd2752aeac6e4fd117f6
Signed-off-by: David Garcia <david.garcia@canonical.com>
2 years agoAdd logs 07/12007/6
David Garcia [Fri, 6 May 2022 10:26:20 +0000 (12:26 +0200)]
Add logs

Change-Id: If831d758b463ce0a2592cd651277c5ec7dabc26a
Signed-off-by: David Garcia <david.garcia@canonical.com>
2 years agoFeature 10908 pass over upgrade request to Libjuju 95/11895/10
aticig [Sun, 17 Apr 2022 21:31:42 +0000 (00:31 +0300)]
Feature 10908 pass over upgrade request to Libjuju

Change-Id: I7a4ea434f22b939a80f58941a892ed92dae62ee6
Signed-off-by: aticig <gulsum.atici@canonical.com>
2 years agoUpdate the repo for a helm KDU before install and upgrade 72/11872/4
garciadeblas [Fri, 8 Apr 2022 20:53:25 +0000 (22:53 +0200)]
Update the repo for a helm KDU before install and upgrade

Change-Id: Ibe4efcaa00b0340502a9476b07d28860d33f7083
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
2 years agoUpdate only the repo that was added instead of all repos 71/11871/4
garciadeblas [Wed, 4 May 2022 09:07:41 +0000 (11:07 +0200)]
Update only the repo that was added instead of all repos

Change-Id: I70c75ced584b40873566a36f2dfc900abc824767
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
2 years agoUpdate helm repo after adding the repo 70/11870/4
garciadeblas [Wed, 4 May 2022 08:57:36 +0000 (10:57 +0200)]
Update helm repo after adding the repo

Change-Id: I4cd2a073cb862fac4d7646e65f7b3df6068a1c5a
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
2 years agoAdd deleting lock to K8sJujuConnector 02/12002/2
David Garcia [Thu, 5 May 2022 07:46:06 +0000 (09:46 +0200)]
Add deleting lock to K8sJujuConnector

- Minor fix in delete_lock
- bug 2016

Change-Id: Ic2f66eeee7967f0d7789428abb4b288c7bb90f36
Signed-off-by: David Garcia <david.garcia@canonical.com>
2 years agoAdd lock deleting namespaces 99/11999/2
David Garcia [Wed, 4 May 2022 13:33:03 +0000 (15:33 +0200)]
Add lock deleting namespaces

- Fix bug 2016

Change-Id: Ifd4572937376cdeec79e3dfd808174d3f14325b9
Signed-off-by: David Garcia <david.garcia@canonical.com>
2 years agoSkip exception if model doesn't exist after delete failure 96/11996/2
David Garcia [Tue, 3 May 2022 10:23:59 +0000 (12:23 +0200)]
Skip exception if model doesn't exist after delete failure

- bug: 2016
Change-Id: I9d118602c747840a4a32fd670c8724c82c1ee094
Signed-off-by: David Garcia <david.garcia@canonical.com>
2 years agoFeature 10908: Add Upgrade Charm 90/11890/8
beierlm [Thu, 14 Apr 2022 20:33:51 +0000 (16:33 -0400)]
Feature 10908: Add Upgrade Charm

Adds ability to wait for a unit to go idle
Adds new method to upgrade charm in a particular application

Change-Id: I329286e63519c6398fc1f2229f306eec0b15551a
Signed-off-by: beierlm <mark.beierl@canonical.com>
2 years agoFix bug 2016: Skip exception if model has been removed 61/11961/2
David Garcia [Thu, 28 Apr 2022 11:43:36 +0000 (13:43 +0200)]
Fix bug 2016: Skip exception if model has been removed

Change-Id: I1d1d6e0c18c7e6a8c42c03a1e39e4673caa0b637
Signed-off-by: David Garcia <david.garcia@canonical.com>
2 years agoBug 2004 fixed: Helm repos certs now with the corret variable cluster_uuid 24/11924/1
Pedro Escaleira [Fri, 22 Apr 2022 17:51:00 +0000 (18:51 +0100)]
Bug 2004 fixed: Helm repos certs now with the corret variable cluster_uuid

Change-Id: Id4075db6830cc69ed4804b2300003748ec9422c5
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoBug 1939 fixed: : added a random suffix to the end of the Juju app name, in order... 91/11791/4
Pedro Escaleira [Mon, 21 Mar 2022 17:54:45 +0000 (17:54 +0000)]
Bug 1939 fixed: : added a random suffix to the end of the Juju app name, in order to allow multiple Juju charms per VDU

I followed the second option of the bug's description. Now, Juju
applications have a random suffix with size=5 (the random suffix
size used by K8s), in order to avoid collisions between applications'
names;

Also fixed unit-test on test_n2vc_juju_conn.py

Change-Id: I5d3eb8282889e58361f7c21214b11071a7530d26
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoBug 1980 fixed 56/11856/3
Pedro Escaleira [Tue, 5 Apr 2022 16:32:13 +0000 (17:32 +0100)]
Bug 1980 fixed

Added the `yaml_format` argument to the `status_kdu` abstract method of
the class `K8sConnector`, and changed the corresponding Helm connectors
methods accordingly, while maintaining backward compatibility

Change-Id: Ic78c951825b7654ccf8246c4fe1fc4d488221bfc
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agofeature: helm charts repos with certs 03/11403/3
bravof [Tue, 23 Nov 2021 22:33:18 +0000 (19:33 -0300)]
feature: helm charts repos with certs

Change-Id: I427d20f6e184c889de91a384d921eb7edaf00e95
Signed-off-by: bravof <fbravo@whitestack.com>
2 years agoImprove logs for K8sJujuConnector init_env 20/10920/5
garciadeblas [Mon, 31 May 2021 13:49:15 +0000 (15:49 +0200)]
Improve logs for K8sJujuConnector init_env

Change-Id: I013b6c062cf29d9a69e39ab8fdc363e9bd052873
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
2 years agoBug 1965 fixed 26/11826/3
Pedro Escaleira [Sun, 3 Apr 2022 12:51:46 +0000 (13:51 +0100)]
Bug 1965 fixed

Parsed the manifest returned by the `helm status` command (in the
`_status_kdu` method) from a raw string to a list of dictionaries (each
entry in the list corresponds to each manifest's document).

Change-Id: I791c8fd59fee8ac67bcbd640a100bf63d572efcf
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoBug 1983 fixed: added the possibility to deploy bundles from the Charm Hub 59/11859/3
Pedro Escaleira [Tue, 5 Apr 2022 20:01:37 +0000 (21:01 +0100)]
Bug 1983 fixed: added the possibility to deploy bundles from the Charm Hub

Also upgraded the version of the juju library to 2.9.8 (and made the
necessary changes to the code to work with this version), once the
previous version didn't supported Bundles from the Charm Hub

Change-Id: I34d87dff75b4e77fdbdaef0eaf4da565b0bf213b
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoBug 1962 fixed: removed the variable cluster_uuid from init_env method 22/11822/6
Pedro Escaleira [Fri, 1 Apr 2022 23:44:08 +0000 (00:44 +0100)]
Bug 1962 fixed: removed the variable cluster_uuid from init_env method

This was applied to the class K8sHelmBaseConnector, and then returned
the variable cluster_id instead of cluster_uuid;

Also, refactored the overall Helm related code, in order to use the correct cluster uuid (and fixed the corresponding tests);

Also made a small fix in the function _uninstall_sw, to remove the service accounts when using different namespaces

Change-Id: Ibfdc82f325abf5fd27a225e73f949483a4e68fe2
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoBug 1914 fixed 65/11765/1
Pedro Escaleira [Thu, 17 Mar 2022 23:59:29 +0000 (23:59 +0000)]
Bug 1914 fixed

Change-Id: I06ef0123481fa26a06e48e808327e82d1b25b0ce
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
list fixes

Change-Id: I3809a0a6da1c2aee6d43a47585b2b02b0b81a593
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
2 years agoBug 1843: LTS Support 15/11515/3
beierlm [Thu, 13 Jan 2022 16:43:45 +0000 (11:43 -0500)]
Bug 1843: LTS Support

Updates base to Ubuntu 20.04
Updates python to 3.8
Updates pip dependencies to more recent versions
Adds apt cache to stage 2 dockerfile

Fixes bug 1843

Change-Id: Iec7c73cb99f5ed3f0e07666d8c8c8be8ca91c0ea
Signed-off-by: beierlm <mark.beierl@canonical.com>
2 years agoFeature 10886 manual scaling for KNF (helm chart) deployment 60/11460/6
aktas [Tue, 19 Oct 2021 15:26:13 +0000 (18:26 +0300)]
Feature 10886 manual scaling for KNF (helm chart) deployment

Change-Id: Ibdcabd4e3f077bf86749f49e8aeb75aec2935ea2
Signed-off-by: aktas <emin.aktas@ulakhaberlesme.com.tr>
3 years agobugfix: kubeconfig passed for helm commands. Bug 1789 67/11367/11
bravof [Wed, 17 Nov 2021 14:14:57 +0000 (11:14 -0300)]
bugfix: kubeconfig passed for helm commands. Bug 1789

Change-Id: Idf8e9141e46296d45dbaa0260e8c9a55b445eb54
Signed-off-by: bravof <fbravo@whitestack.com>
3 years agoFeature 10887: Add cross-model relations support 91/11291/7 release-v11.0-start v11.0.0rc1
David Garcia [Tue, 26 Oct 2021 10:30:44 +0000 (12:30 +0200)]
Feature 10887: Add cross-model relations support

Changes:
- Extend `add_relation` method in N2VCJujuConn to include the CMR case
- Add `add_relation` method to K8sJujuConn
- Add n2vc/definitions.py file that includes definition ofjects for
Offer and RelationEndpoint.
- Change `n2vc.libjuju.Libjuju.list_offers` method to be private, and accept a filter `offer_name` parameter.
- Update `n2vc.libjuju.Libjuju.consume` method arguments.
- Add `n2vc.libjuju.Libjuju.offer` method to create an offer.

Unit tests associated to the code changes have been either created or
updated accordingly

Change-Id: Ibf8d574528dee0fa898e0e97578dd3a6aa68316a
Signed-off-by: David Garcia <david.garcia@canonical.com>
3 years agoFix bug 1722: add support for deploying .charm files 93/11293/1
David Garcia [Tue, 26 Oct 2021 15:24:21 +0000 (17:24 +0200)]
Fix bug 1722: add support for deploying .charm files

Change-Id: Id43c3d0714cf341dcb4d5581a32d6a1102a3e7ac
Signed-off-by: David Garcia <david.garcia@canonical.com>
3 years agoFix bug 1715 78/11278/2
aktas [Tue, 19 Oct 2021 17:03:23 +0000 (20:03 +0300)]
Fix bug 1715

In sometimes, it cannot catch that if the application is in the model.
Jenkinks report: https://osm.etsi.org/jenkins/view/Robot%20tests/job/osm-stage_3-merge/job/v10.0/169/robot/report/report.html#tags?basic_20

Change-Id: I8121d57923d93b7af9ad60e07b87b4616060a916
Signed-off-by: aktas <emin.aktas@ulakhaberlesme.com.tr>
3 years agoUpdate requirements.txt and tox.ini 65/11265/6
David Garcia [Thu, 14 Oct 2021 13:05:25 +0000 (15:05 +0200)]
Update requirements.txt and tox.ini

- Update to juju==2.9.4: needed for feature 10884
- Pin pylint version in tox.ini

Change-Id: Ie7115804973f97e61e9bb8946215ce958abe8089
Signed-off-by: David Garcia <david.garcia@canonical.com>
3 years agoBug 1651 fix 56/11156/2
gatici [Wed, 8 Sep 2021 07:35:18 +0000 (07:35 +0000)]
Bug 1651 fix

This fix is required to fix VCA metric collection for SOL006 compatible descriptors.

Related bug: https://osm.etsi.org/bugzilla/show_bug.cgi?id=1651

Change-Id: I5a25c97b48692c23b5520cf72becb7b5bbcf327a
Signed-off-by: gatici <gulsumatici@gmail.com>