osm/POL.git
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 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