Adds support for cooldown-time variable in scaling-policy 65/6665/3
authorBenjamin Diaz <bdiaz@whitestack.com>
Tue, 9 Oct 2018 18:04:24 +0000 (15:04 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Tue, 9 Oct 2018 20:07:09 +0000 (17:07 -0300)
commitcb76d133adebeda011a00b73c1df161ef3d6db8c
tree6973745f034c1059ab97bfb446a099a4781e3d96
parent48af3094153dcbef3bf03f72f9d20a3c49d50678
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
osm_policy_module/core/agent.py
osm_policy_module/core/database.py