Fixes StopIteration error in multi scaling group descriptor scenarios 59/6659/8
authorBenjamin Diaz <bdiaz@whitestack.com>
Mon, 8 Oct 2018 22:38:49 +0000 (19:38 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Tue, 9 Oct 2018 17:39:57 +0000 (14:39 -0300)
commit48af3094153dcbef3bf03f72f9d20a3c49d50678
treee17987c7d064e7f6f1d493da4a836b593230a7ff
parentdb8ea6ae17ac2393829c61f9be61e1b25efb1fe4
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
docker/Dockerfile
osm_policy_module/cmd/policy_module_agent.py
osm_policy_module/core/agent.py
osm_policy_module/core/config.py