osm/POL.git
19 months agoClean stage-archive.sh and use allowlist in tox.ini 45/13145/1
garciadeblas [Tue, 4 Apr 2023 13:29:01 +0000 (15:29 +0200)]
Clean stage-archive.sh and use allowlist in tox.ini

Change-Id: I15fd118f9198f165daf9bb56e5ff32fc1ac15dda
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
21 months agoFeature 10950: Replace pycrypto with pycryptodome 18/12918/2
Gulsum Atici [Fri, 3 Feb 2023 17:50:09 +0000 (20:50 +0300)]
Feature 10950: Replace pycrypto with pycryptodome

Change-Id: I5eb6668028c868e6cce2beb7c74a643e5b72ca2f
Signed-off-by: Gulsum Atici <gulsum.atici@canonical.com>
21 months agoReformat files according to new black validation 21/12921/2
Gulsum Atici [Mon, 6 Feb 2023 09:25:54 +0000 (12:25 +0300)]
Reformat files according to new black validation

Change-Id: Ie4edd9c7d05661239b47e957d001b98b14b37409
Signed-off-by: Gulsum Atici <gulsum.atici@canonical.com>
21 months agoUpdating python dependencies 79/12879/3
Mark Beierl [Thu, 26 Jan 2023 14:53:55 +0000 (14:53 +0000)]
Updating python dependencies

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

Change-Id: Iafe61f141e57ad2cca7157a6144d6ccc0eff5d50
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
2 years agoUse of yaml.safe_load instead of yaml_load 94/12694/1 release-v13.0-start
garciadeblas [Tue, 15 Nov 2022 15:23:22 +0000 (16:23 +0100)]
Use of yaml.safe_load instead of yaml_load

Change-Id: I0bf420ff9b0a977e6c50e7379646e9ec64c87a56
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
2 years agoEnable black and pylint in tox.ini 88/12688/2
garciadeblas [Sun, 13 Nov 2022 23:29:47 +0000 (00:29 +0100)]
Enable black and pylint in tox.ini

Change-Id: I1571ce8b1a32aa67be1ada2864233c6f5ce9616b
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
2 years agoJenkins refresh 42/12342/3
Mark Beierl [Thu, 14 Jul 2022 13:40:08 +0000 (09:40 -0400)]
Jenkins refresh

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

Change-Id: I240b0e45185e7acebd7be06c976606150492576d
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
2 years agoBug 2113 fix: POL upgrade from v10.1.1 to v12.0.0 fails due to changes in databases 24/12324/2
Guillermo Calvino [Mon, 11 Jul 2022 16:23:47 +0000 (18:23 +0200)]
Bug 2113 fix: POL upgrade from v10.1.1 to v12.0.0 fails due to changes in databases

Change-Id: I8907cc52383c4f860a0db751d1dd079df449f7bf
Signed-off-by: Guillermo Calvino <guillermo.calvino@canonical.com>
2 years agoManual update of pip requirements 56/12256/1 release-v12.0-start
beierlm [Fri, 24 Jun 2022 17:48:04 +0000 (13:48 -0400)]
Manual update of pip requirements

Change-Id: I362db97903f7bb5a052018beeef3c82ab9dbfcaa
Signed-off-by: beierlm <mark.beierl@canonical.com>
2 years agoFeature 10923: Autohealing 33/11933/6
sritharan [Mon, 25 Apr 2022 12:37:55 +0000 (12:37 +0000)]
Feature 10923: Autohealing

Change-Id: I898ee9a904306e94c130140831ece04e9bf7dbac
Signed-off-by: sritharan <priyadarshini@tataelxsi.co.in>
2 years agoFeature 10912: NS Update Change VNF Package 55/11955/4
elumalai [Wed, 27 Apr 2022 21:21:04 +0000 (02:51 +0530)]
Feature 10912: NS Update Change VNF Package

Added support to update a VNF's policies using NS Update

Change-Id: I1d22c9d8f81690a403a9c869d7b0329e624b2808
Signed-off-by: elumalai <deepika.e@tataelxsi.co.in>
2 years agoFeature 10916 Remove VNF Instance from NS - NS Update 77/11877/3
elumalai [Tue, 12 Apr 2022 07:24:37 +0000 (12:54 +0530)]
Feature 10916 Remove VNF Instance from NS - NS Update

Added support to remove a VNF's policies using NS Update
Added unit test cases

Change-Id: Ia38a57a86ebe6b1d54073ed8331e0719215ed5fc
Signed-off-by: elumalai <deepika.e@tataelxsi.co.in>
2 years agoFeature 10918: Alarm Notification Enhancement 65/11865/4
sritharan [Thu, 7 Apr 2022 05:20:38 +0000 (05:20 +0000)]
Feature 10918: Alarm Notification Enhancement

Change-Id: I0ca845edbfbb1105174863240964b3275130f687
Signed-off-by: sritharan <priyadarshini@tataelxsi.co.in>
2 years agoBug 1848: LTS Support 20/11520/2
beierlm [Thu, 13 Jan 2022 18:19:43 +0000 (13:19 -0500)]
Bug 1848: 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 1848

Change-Id: I203d2d3f9ba636dfc12e0a640bdf445529713402
Signed-off-by: beierlm <mark.beierl@canonical.com>
2 years agoBug 1839 - Change in setuptools breaks stage 2 05/11505/1
beierlm [Wed, 5 Jan 2022 16:01:11 +0000 (11:01 -0500)]
Bug 1839 - Change in setuptools breaks stage 2

Need to pin setuptools to < 60 as the newer versions
do not work with stdeb

Fixes Bug 1839

Change-Id: Iba3e9d7d2672e28c3eb410160fb5cb7a6848f7bb
Signed-off-by: beierlm <mark.beierl@canonical.com>
2 years agoResolved Bug 1728 - Dockerfile not working when local building 82/11482/1
Atul Agarwal [Tue, 7 Dec 2021 12:51:16 +0000 (12:51 +0000)]
Resolved Bug 1728 - Dockerfile not working when local building

Change-Id: Idc1f84af9a21887feb52b38291519c457221770d
Signed-off-by: Atul Agarwal <Atul.Agarwal@Altran.com>
3 years agoResolved bug 1719 - POL hangs waiting for webhook response 87/11287/6 release-v11.0-start v11.0.0 v11.0.0rc1 v11.0.0rc2
Atul Agarwal [Sun, 24 Oct 2021 17:05:55 +0000 (17:05 +0000)]
Resolved bug 1719 - POL hangs waiting for webhook response

Change-Id: I41552d504d8a4599484ec24166a8ae7b2ef539dd
Signed-off-by: Atul Agarwal <Atul.Agarwal@Altran.com>
3 years agoResolved bug 1685 - POL hangs waiting for webhook response 68/11268/2
Atul Agarwal [Mon, 18 Oct 2021 17:22:58 +0000 (17:22 +0000)]
Resolved bug 1685 - POL hangs waiting for webhook response

Change-Id: Id0c3154491545c177ec3fb74aa82ad71acabdaf6
Signed-off-by: Atul Agarwal <Atul.Agarwal@Altran.com>
3 years agoFeature 10339 - Enhanced Alarm Mgmt. (SOL005 FM Interface) 16/10516/4
Atul Agarwal [Fri, 19 Mar 2021 10:11:38 +0000 (10:11 +0000)]
Feature 10339 - Enhanced Alarm Mgmt. (SOL005 FM Interface)

Change-Id: I917a09ebc4c3b262b5dea8056cae775615a654d6
Signed-off-by: Atul Agarwal <atul.agarwal@altran.com>
3 years agoReformat POL to standardized format 04/10804/1 release-v10.0-start
garciadeblas [Fri, 14 May 2021 14:50:06 +0000 (16:50 +0200)]
Reformat POL to standardized format

Change-Id: I955a76830f582b6d152e242568d74a12907c782c
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
3 years agoIncluding upstream requirements 93/10693/1
beierlm [Thu, 22 Apr 2021 17:00:52 +0000 (13:00 -0400)]
Including upstream requirements

Now that internal OSM software does not specify python modules in
setup.py, we need to include the requirements.txt from the module
in the requirements-dev.in to generate the full list properly.

Change-Id: I11c1ea9cc7b362e9f0238a76117667ade370a8ee
Signed-off-by: beierlm <mark.beierl@canonical.com>
3 years agoAdding GitLab Scanner 72/10672/1
beierlm [Mon, 19 Apr 2021 19:41:01 +0000 (15:41 -0400)]
Adding GitLab Scanner

Adds gitlab-ci yaml file to enable security scans in GitLab mirror

Change-Id: Ifc632fa1f35ec799354a7d39d8bf644e789f6ed2
Signed-off-by: beierlm <mark.beierl@canonical.com>
3 years agoFeature 10296 Pip Standardization 99/10299/10 branch-ng-ro-refactor-start branch-sol006v331-start
beierlm [Thu, 11 Feb 2021 21:32:17 +0000 (16:32 -0500)]
Feature 10296 Pip Standardization

Creates standard template for tox.ini
Introduces 'safety' for listing upstream CVEs
Pins all versions of all upstream modules
Removes Makefile step and places all build logic into tox.ini

Change-Id: I96b0007f918930e61e54edda4b43a4aba90d26d9
Feature: 10296
Signed-off-by: beierlm <mark.beierl@canonical.com>
3 years agofix(scaling): min instance count now from right sol006 field and condition fixed... 15/10315/5
bravof [Mon, 15 Feb 2021 19:19:07 +0000 (16:19 -0300)]
fix(scaling): min instance count now from right sol006 field and condition fixed. Bug 1388

Change-Id: I465e0e9d53c1384bff1c64ab542f2ca5697bed6e
Signed-off-by: bravof <fbravo@whitestack.com>
3 years agoSOL006 patch for POL 77/10077/3 release-v9.0-start v9.0.0 v9.0.0rc1
garciaale [Thu, 3 Dec 2020 21:05:24 +0000 (18:05 -0300)]
SOL006 patch for POL

Change-Id: Id7bb8f8bb358fcbe8b348617bdb64c224daba5a7
Signed-off-by: garciaale <agarcia@whitestack.com>
4 years agofix(aiokafka): version now fixed to 0.6.0 (this is the latest at the moment) 89/9089/3 v8.0 release-v8.0-start v8.0.0 v8.0.0rc1 v8.0.0rc2 v8.0.0rc3 v8.0.1 v8.0.1rc1 v8.0.2 v8.0.3 v8.0.4
bravof [Mon, 15 Jun 2020 14:59:04 +0000 (10:59 -0400)]
fix(aiokafka): version now fixed to 0.6.0 (this is the latest at the moment)

Change-Id: If9477995e41497aa3171266efa1c5d88976f1cc3
Signed-off-by: bravof <fbravo@whitestack.com>
4 years agofix(healthcheck): new flag implemented as a file for health checking in POL (it only... 75/9075/5
bravof [Thu, 11 Jun 2020 22:50:32 +0000 (18:50 -0400)]
fix(healthcheck): new flag implemented as a file for health checking in POL (it only appears after all migrations and connections were made)

Change-Id: I7fac1e4f219526b9ac7a4e28f1be1b456d365b5d
Signed-off-by: bravof <fbravo@whitestack.com>
4 years agoResolved bug 1087 60/9060/6
Atul Agarwal [Tue, 9 Jun 2020 14:18:10 +0000 (14:18 +0000)]
Resolved bug 1087

Change-Id: I2b83e1d731e0459a76f1ecf5ab95357c808999f7
Signed-off-by: Atul Agarwal <atul.agarwal@altran.com>
4 years agoResolved bug 1047. 31/8831/12
Atul Agarwal [Tue, 28 Apr 2020 10:12:28 +0000 (15:42 +0530)]
Resolved bug 1047.

Adds # pylint: disable=no-member due to dynamic creation of VNF
alarm member.

Change-Id: I7ce58193e60847699777521c115384fde1ca6ec4
Signed-off-by: Atul Agarwal <atul.agarwal@altran.com>
4 years agoFix metric name at VNF Alarms feature 43/8343/3 sol006 v7.0.0 v7.0.0rc1 v7.0.1 v7.0.1rc1 v7.0.1rc2 v7.0.1rc3
Gianpietro Lavado [Fri, 6 Dec 2019 15:46:23 +0000 (15:46 +0000)]
Fix metric name at VNF Alarms feature

Change-Id: Ia996a26befe7bc871b2801c4758fe1deaf2eb987
Signed-off-by: Gianpietro Lavado <glavado@whitestack.com>
5 years agoAdds arch docs to POL 39/8039/2 feature5837 feature7928
Benjamin Diaz [Wed, 9 Oct 2019 17:29:59 +0000 (14:29 -0300)]
Adds arch docs to POL

Change-Id: If8ad88148e50b76c7df29d7a16ddaa58fce9f84b
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoRefactors alarm creation to comply with changes regarding the use of tags instead... 64/7964/2
Benjamin Diaz [Thu, 19 Sep 2019 15:01:14 +0000 (12:01 -0300)]
Refactors alarm creation to comply with changes regarding the use of tags instead of fixed fields

MON changed alarms to include the concept of tags. POL process for alarm creation has
modified to comply with this.
Also, some refactoring has been done in the autoscaling service.

Change-Id: Iaf18262d05727bbb8ff06e83bce13e991aecab6c
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoAdds unit test coverage 78/7878/2
beierl [Thu, 29 Aug 2019 19:57:14 +0000 (15:57 -0400)]
Adds unit test coverage

Adds the coverage module and reporting to tox so it can be
reported with each build.

Change-Id: Ib05fed7b5fea8d777b57deb42912f4a8898832b4
Signed-off-by: beierl <mbeierl@vmware.com>
5 years agoAdds projects_read and projects_write params to scaling nslcmop 45/7845/2
Benjamin Diaz [Wed, 14 Aug 2019 13:27:25 +0000 (10:27 -0300)]
Adds projects_read and projects_write params to scaling nslcmop

Change-Id: Iebd318b9815e711a374ba6ee235577cb2e5234ff
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoUpgrading aiokafka to 0.5.* 85/7785/1
Benjamin Diaz [Fri, 19 Jul 2019 17:13:22 +0000 (14:13 -0300)]
Upgrading aiokafka to 0.5.*

Change-Id: I287b95a0d9fc6132edadfb2b7b446a3ec7d9e142
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoRemoves kafka check from healthcheck 73/7773/1
Benjamin Diaz [Fri, 12 Jul 2019 20:09:37 +0000 (17:09 -0300)]
Removes kafka check from healthcheck

Change-Id: I307361789522b87b7191019ee8f99394ffce605a
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoChanges vnf_member_index to a string 17/7617/1 v6.0 v6.0.0 v6.0.1 v6.0.2 v6.0.2rc1 v6.0.3 v6.0.4 v6.0.4rc1
Benjamin Diaz [Wed, 5 Jun 2019 19:24:34 +0000 (16:24 -0300)]
Changes vnf_member_index to a string

bug 690

Change-Id: I13200cef5039368215a6df2c7f0e93a7de12f2a4
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoAdds missing healthcheck command to setup.py 91/7591/2
Benjamin Diaz [Fri, 31 May 2019 14:47:34 +0000 (11:47 -0300)]
Adds missing healthcheck command to setup.py

bug 716

Change-Id: I63df0ee76b48722fdba480db851cda3a502702c4
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoAdds basic healthcheck to Dockerfile 57/7557/1
Benjamin Diaz [Mon, 27 May 2019 17:57:51 +0000 (14:57 -0300)]
Adds basic healthcheck to Dockerfile

Change-Id: Ia69f49dbfb6e1ff479548d19327d5f26e1a291ed
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoImproves handling of database connections 36/7536/2
Benjamin Diaz [Thu, 23 May 2019 17:19:06 +0000 (14:19 -0300)]
Improves handling of database connections

Change-Id: Ice70378bb0bad3566f51b65476eafcfdac3c991c
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoMakes actions in vnf alarm optional 35/7535/1
Benjamin Diaz [Tue, 21 May 2019 15:31:15 +0000 (12:31 -0300)]
Makes actions in vnf alarm optional

Change-Id: I4db3e01903d4c82cd8c89529e62fc0146853969f
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoRemoving unused CMD from Dockerfile 49/7449/1
Benjamin Diaz [Wed, 8 May 2019 20:23:48 +0000 (17:23 -0300)]
Removing unused CMD from Dockerfile

Change-Id: I41457113b0ff55cf3e3544c70365b4de56b3cc20
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoAdds requests package installation to debian postinst 42/7442/1 feature7106
Benjamin Diaz [Tue, 30 Apr 2019 13:20:57 +0000 (10:20 -0300)]
Adds requests package installation to debian postinst

Change-Id: Ibeb270fce9cc0fe546da479a7c34981c4b918329
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoImproves README 31/7431/2
Benjamin Diaz [Fri, 26 Apr 2019 19:35:32 +0000 (16:35 -0300)]
Improves README

Change-Id: I378ef316d15e5a2d0f943cfb93e92127d80cd82e
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoAdds pylint to tox test pipeline and fixes related errors 05/7405/3
Benjamin Diaz [Thu, 11 Apr 2019 17:29:14 +0000 (14:29 -0300)]
Adds pylint to tox test pipeline and fixes related errors

Change-Id: Ie19400ce0cf591e0bfcbca690bd5d905ad9bd6f5
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoAdds support for vnf alarms 79/7379/4
Benjamin Diaz [Mon, 1 Apr 2019 17:56:26 +0000 (14:56 -0300)]
Adds support for vnf alarms

Abstracts database logic into repositories for easier unit testing
Adds unit tests

Feature 6373

Change-Id: If006a680227f814de1516ec35aa177ed66b48ca1
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoRefactors autoscaling module to separate concerns and allow better control of db... 78/7378/1
Benjamin Diaz [Mon, 4 Mar 2019 16:59:53 +0000 (13:59 -0300)]
Refactors autoscaling module to separate concerns and allow better control of db connections

Change-Id: I57034d34ae2fbb3c4aeda784f9542e643d348460
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoAdds support in entrypoint script for more complex mysql URI (+pool and query params) 89/7289/1
Benjamin Diaz [Mon, 11 Mar 2019 16:36:34 +0000 (13:36 -0300)]
Adds support in entrypoint script for more complex mysql URI (+pool and query params)

Change-Id: Iab6bd86196d9b0bf330eac6b053fdda5dc021328
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoModifies POL to create database if using mysql URI 57/7257/1
Benjamin Diaz [Tue, 26 Feb 2019 19:54:10 +0000 (16:54 -0300)]
Modifies POL to create database if using mysql URI

Change-Id: I718e703992eac66bae22cbc44ea8b78cbd776371
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoAdds migration engine for peewee ORM 44/7244/5
Benjamin Diaz [Tue, 5 Feb 2019 20:44:42 +0000 (17:44 -0300)]
Adds migration engine for peewee ORM

bug 590

Change-Id: If6752715d455cbeb3dc2633e9b62f79360fef767
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoReplaces direct use of aiokafka with osm_common message bus in agent and 76/7176/4
Benjamin Diaz [Fri, 1 Feb 2019 16:31:47 +0000 (13:31 -0300)]
Replaces direct use of aiokafka with osm_common message bus in agent and
lcmclient

Changes config handling to comply with the way it is handled in other modules,
by using a config file and overriding it with env vars.

Adds unit tests for message_bus_client.

Mon client remains using aiokafka directly, as there is no support yet for
auto_offset_reset configuration in osm_common.

Change-Id: I99615287cc934ce310105e86544a6bfe26bc0673
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoExits process when encountered by a database exception 69/7169/1
Benjamin Diaz [Fri, 25 Jan 2019 17:30:20 +0000 (14:30 -0300)]
Exits process when encountered by a database exception

Database errors could mean database node failure. In this cases, the process
should exit so it could be automatically restarted (when handled by Docker Swarm, K8s, etc)
so it can obtain a new DB connection to an alive node.

Change-Id: I42a3954fe238a0445101eb71add79aaef4315c2e
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoRemoves try except block from creation of database tables 68/7168/1
Benjamin Diaz [Thu, 3 Jan 2019 02:13:32 +0000 (23:13 -0300)]
Removes try except block from creation of database tables

In case there is an error connecting to the database engine, or the database
is not yet created, POL should fail. This is specially relevant to avoid race
conditions in Docker and K8s deployments using MySQL/MariaDB, because peewee
needs the database to already exist.

Change-Id: Iabe46c1c4f718919e10fc65271d0e814c5f9a146
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoAdds pymysql to requirements.txt 67/7167/1
Benjamin Diaz [Thu, 27 Dec 2018 21:25:43 +0000 (18:25 -0300)]
Adds pymysql to requirements.txt

Allows using a mysql database as peewee backend

Change-Id: If0c408d57f9d20d36a04e5cf8421a0a9f9c1d0b9
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoAdds deletion of orphaned alarms after an scalein operation 81/6981/1 v5.0 v5.0.0 v5.0.1 v5.0.2 v5.0.3 v5.0.4 v5.0.5
Benjamin Diaz [Tue, 27 Nov 2018 20:40:30 +0000 (17:40 -0300)]
Adds deletion of orphaned alarms after an scalein operation

Change-Id: Ic461abb88d5514367c284ae79b4ed8914bc0281e
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoMerge "Adds use of alarm response topics based on cor_id"
lavado [Tue, 27 Nov 2018 14:00:26 +0000 (15:00 +0100)]
Merge "Adds use of alarm response topics based on cor_id"

5 years agoMerge "added env vars for mongo ha"
lavado [Tue, 27 Nov 2018 14:00:13 +0000 (15:00 +0100)]
Merge "added env vars for mongo ha"

5 years agoAdds use of alarm response topics based on cor_id 67/6967/1
Benjamin Diaz [Mon, 26 Nov 2018 21:05:53 +0000 (18:05 -0300)]
Adds use of alarm response topics based on cor_id

Change-Id: I6cde487c95c55e6b9b0e021d058d95fcec8881ba
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
5 years agoAdds support for autoscaling based on vnf-metric 56/6956/2
Benjamin Diaz [Fri, 23 Nov 2018 18:34:24 +0000 (15:34 -0300)]
Adds support for autoscaling based on vnf-metric

Change-Id: I179395ce1390f9031b15d141ff3b37839943368e
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
6 years agoAdds deletion of scaling alarms in POL and MON after ns termination 44/6944/4
Benjamin Diaz [Wed, 21 Nov 2018 21:53:18 +0000 (18:53 -0300)]
Adds deletion of scaling alarms in POL and MON after ns termination

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Iefe8de25061cfffa0220671a8072c2bc155332eb

6 years agoadded env vars for mongo ha 37/6937/2
Juan [Wed, 21 Nov 2018 15:21:34 +0000 (12:21 -0300)]
added env vars for mongo ha

Change-Id: Ied541f300e819eacbc31426089eb7ca547b59f34
Signed-off-by: Juan <jquiroga@whitestack.com>
6 years agoRefactor scaling group config and adds partial support for vnf metrics 09/6909/2
Benjamin Diaz [Fri, 16 Nov 2018 22:46:50 +0000 (19:46 -0300)]
Refactor scaling group config and adds partial support for vnf metrics

Adds support for scaling groups based on vdu-metric corresponding to a juju
metric. It also includes modifications to support MON modifications regarding
vnf-monitoring-params.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I1a1604f965c077fa14a19ad7a26da0facc4818ba

6 years agoFixes discrepancies with IM related to monitoring params 03/6803/3
Benjamin Diaz [Wed, 31 Oct 2018 03:58:22 +0000 (20:58 -0700)]
Fixes discrepancies with IM related to monitoring params

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Ie57107550b229292fad7ecb9ed154dd51bf5985e

6 years agoRenames DbClient to CommonDbClient to avoid confusion 53/6653/8
Benjamin Diaz [Mon, 8 Oct 2018 19:26:32 +0000 (16:26 -0300)]
Renames DbClient to CommonDbClient to avoid confusion

POL comunicates with two different databases, a relational
one, that stores records for alarms, scaling groups and more,
and a nonrelational one, that is common to all OSM modules,
which we call CommonDB, that currently corrsponds to a MongoDB
instance and stores nsds, vnfds, etc.
The name db_client and DbClient used in the file and
class that comunicates with CommonDB may be open to confussion,
so it has been renamed as common_db_client and CommonDbClient.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I8209cbc23b5ab129221d1c928703929e4f405a4c

6 years agoImplements aiokafka and modifies code to support asyncio 89/6689/11
Benjamin Diaz [Thu, 11 Oct 2018 15:34:20 +0000 (12:34 -0300)]
Implements aiokafka and modifies code to support asyncio

Replaces multithreading with asyncronous calls to kafka.
Implements the async/await keywords in methods that needed
it.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Ic93054dc9a6b3835e2eaf1a480e5081c5eb9d4f5

6 years agoAdds use of OSMPOL_SQL_DATABASE_URI config param to connect to DB 54/6654/4
Benjamin Diaz [Mon, 8 Oct 2018 19:34:17 +0000 (16:34 -0300)]
Adds use of OSMPOL_SQL_DATABASE_URI config param to connect to DB

The OSMPOL_SQL_DATABASE_URI was not being used by POL to connect
to the database. There was a hardcoded sqlite database name.
This change should now provide capability to the user to use any
SQL database engine supported by the peewee ORM (mysql/mariadb,
postgres, sqlite).

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Iff406862fb3dfeb4453fb3213c94db6d62385d96

6 years agoAdds deletion of alarms in case exception is thrown during scaling config 52/6652/4
Benjamin Diaz [Mon, 8 Oct 2018 19:25:36 +0000 (16:25 -0300)]
Adds deletion of alarms in case exception is thrown during scaling config

If a exception is thrown during the configuration of a scaling group, POL
will check if there have been alarms created through MON, and if that is
the case, it will delete them.
Also, it adds validation of the MON alarm responses. It throws an exception
if MON returns status: False, meaning there was an error creating the alarm.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I4f5f0c95ae2cce0c71efb73ff2e06cdf8ea08864

6 years agoMerge "Added LICENSE file to root folder" netslice
lavado [Sat, 13 Oct 2018 12:08:08 +0000 (14:08 +0200)]
Merge "Added LICENSE file to root folder"

6 years agoAdds vnf_member_index attribute to ScalingGroup model 74/6674/1
Benjamin Diaz [Wed, 10 Oct 2018 13:53:49 +0000 (10:53 -0300)]
Adds vnf_member_index attribute to ScalingGroup model

Changes default last_scale attribute in ScalingPolicy
to datetime.datetime.now.
Adds some debug logs.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
6 years agoAdds unique group_id to KafkaConsumer used in MonClient 71/6671/1
Benjamin Diaz [Tue, 9 Oct 2018 23:07:43 +0000 (20:07 -0300)]
Adds unique group_id to KafkaConsumer used in MonClient

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
6 years agoModifies version_command to use pep440-git-full 66/6666/3
Benjamin Diaz [Tue, 9 Oct 2018 18:56:22 +0000 (15:56 -0300)]
Modifies version_command to use pep440-git-full

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
6 years agoAdds support for cooldown-time variable in scaling-policy 65/6665/3
Benjamin Diaz [Tue, 9 Oct 2018 18:04:24 +0000 (15:04 -0300)]
Adds support for cooldown-time variable in scaling-policy

Cooldown time defines the minimum time that needs to happen between
each scaling action. If an alarm triggers before this has happened,
no action should be executed. When POL receives an alarm notification
it will check that the difference between the current time and the
last scaling action of the alarm's scaling policy is bigger than the
cooldown time.
During configuration of the scaling groups, POL will now store the
cooldown time of the scaling policy. Also, it adds a new last_scale
var to ScalingPolicy, which has as default the oldest time supported
by Python datetime.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I6d110ccc7f89af29500c602d05054e7ba78808a0

6 years agoFixes StopIteration error in multi scaling group descriptor scenarios 59/6659/8
Benjamin Diaz [Mon, 8 Oct 2018 22:38:49 +0000 (19:38 -0300)]
Fixes StopIteration error in multi scaling group descriptor scenarios

The code was iterating over all vdus in a vnfd, instead of doing
so over the vdu refs inside the scaling-group. This lead to errors
when there was a vdu without the metric declared in the criteria.
It has been replaced to iterate over the vdus in the scaling group
descriptor, which is the correct behaviour.
This commit also fixes an error in the scale function, which was
still using the old db structure.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I8b8450534f739e6afecc2602086c868ffaee79bc

6 years agoRemoves filter param from osm-common function calls 62/6662/1
Benjamin Diaz [Tue, 9 Oct 2018 14:44:53 +0000 (11:44 -0300)]
Removes filter param from osm-common function calls

The filter argument was replaced to q_filter. Instead of
renaming the keyword arg, now functions are called using
only positional args.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
6 years agoAdds handling of scaled life cycle operation 20/6620/2
Benjamin Diaz [Wed, 3 Oct 2018 18:52:47 +0000 (15:52 -0300)]
Adds handling of scaled life cycle operation

Configures alarms on vdus created after a scaling operation, which
correspond to the 'scaled' message, using the same handler used with
the 'instantiated' message, in which a check has been added to avoid
duplicate alarms.
It also fixes the vdu name used when creating the alarm through MON,
which is now the vdur name and not the vdu-id-ref used in the vnfd.
Finally, it adds a check for the scaling-type param in the scaling policy,
only executing the autoscaling logic if it is set to 'automatic'.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I3499ebdb5605f80ff73d905fbe3ac61d0d806687

6 years agoRefactor common_db client code 19/6619/2
Benjamin Diaz [Wed, 3 Oct 2018 17:36:49 +0000 (14:36 -0300)]
Refactor common_db client code

Creates DbClient which exposes methods to interact with the common
database, using osm_common module.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Ib81bb44e5f2c6ffd289380936b089af2f9e76e63

6 years agoAdds pip installation of python deps in deb package install 41/6541/25
Benjamin Diaz [Wed, 26 Sep 2018 23:12:58 +0000 (20:12 -0300)]
Adds pip installation of python deps in deb package install

Adds postinst script
Adds Makefile (there is an issue when using postinst with tox)
Adds stdeb.cfg declaring binary dependencies
Reenables flake8 in tox
Removes consumer timeout that should have never been there
Readds group_id in kafka consumer

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Ied0cb6135aee5f08cfd36c9cbaafa4c174b7434f

6 years agoAdded LICENSE file to root folder 69/6569/1
garciadeblas [Thu, 27 Sep 2018 08:29:33 +0000 (10:29 +0200)]
Added LICENSE file to root folder

Change-Id: I411ad72697d614558e9bed2b20e750b1725c6e2e
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
6 years agoFixup name of MON -> POL 32/6532/1
Mike Marchetti [Thu, 20 Sep 2018 18:51:45 +0000 (14:51 -0400)]
Fixup name of MON -> POL

Signed-off-by: Mike Marchetti <mmarchetti@sandvine.com>
6 years agoFixes dependency error in setup.py 30/6530/1
Benjamin Diaz [Thu, 20 Sep 2018 17:12:52 +0000 (14:12 -0300)]
Fixes dependency error in setup.py

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
6 years agoMigrates POL code from MON repo 87/6487/2 v4.0.1
Benjamin Diaz [Fri, 14 Sep 2018 15:03:38 +0000 (12:03 -0300)]
Migrates POL code from MON repo

Adds support for VDU metric autoscaling
Modifies env var names

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: If9587e1b8eacaf6fb297306050a97d33c8a63ead

6 years agoInitial empty repository
garciadeblas [Fri, 31 Aug 2018 10:53:37 +0000 (12:53 +0200)]
Initial empty repository