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>
diff --git a/osm_policy_module/common/lcm_client.py b/osm_policy_module/common/lcm_client.py
index 7857d26..34e212f 100644
--- a/osm_policy_module/common/lcm_client.py
+++ b/osm_policy_module/common/lcm_client.py
@@ -49,6 +49,7 @@
'name': 'osm'})
def scale(self, nsr_id: str, scaling_group_name: str, vnf_member_index: int, action: str):
+ log.debug("scale %s %s %s %s", nsr_id, scaling_group_name, vnf_member_index, action)
nslcmop = self._generate_nslcmop(nsr_id, scaling_group_name, vnf_member_index, action)
self.common_db.create("nslcmops", nslcmop)
log.info("Sending scale action message: %s", json.dumps(nslcmop))
@@ -56,6 +57,7 @@
self.producer.flush()
def _generate_nslcmop(self, nsr_id: str, scaling_group_name: str, vnf_member_index: int, action: str):
+ log.debug("_generate_nslcmop %s %s %s %s", nsr_id, scaling_group_name, vnf_member_index, action)
_id = str(uuid.uuid4())
now = time.time()
params = {