projects
/
osm
/
POL.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Feature 10918: Alarm Notification Enhancement
[osm/POL.git]
/
osm_policy_module
/
tests
/
integration
/
test_policy_agent.py
diff --git
a/osm_policy_module/tests/integration/test_policy_agent.py
b/osm_policy_module/tests/integration/test_policy_agent.py
index
2c86b12
..
6b1dc64
100644
(file)
--- a/
osm_policy_module/tests/integration/test_policy_agent.py
+++ b/
osm_policy_module/tests/integration/test_policy_agent.py
@@
-505,6
+505,7
@@
class PolicyModuleAgentTest(unittest.TestCase):
threshold=80,
vdu_name="cirros_ns-1-cirros_vnfd-VM-1",
vnf_member_index="1",
threshold=80,
vdu_name="cirros_ns-1-cirros_vnfd-VM-1",
vnf_member_index="1",
+ action="scale_out",
)
create_alarm.assert_not_called_with(
metric_name="average_memory_utilization",
)
create_alarm.assert_not_called_with(
metric_name="average_memory_utilization",
@@
-513,6
+514,7
@@
class PolicyModuleAgentTest(unittest.TestCase):
threshold=20,
vdu_name="cirros_ns-1-cirros_vnfd-VM-1",
vnf_member_index="1",
threshold=20,
vdu_name="cirros_ns-1-cirros_vnfd-VM-1",
vnf_member_index="1",
+ action="scale_out",
)
create_alarm.assert_any_call(
metric_name="average_memory_utilization",
)
create_alarm.assert_any_call(
metric_name="average_memory_utilization",
@@
-521,6
+523,7
@@
class PolicyModuleAgentTest(unittest.TestCase):
threshold=80,
vdu_name="cirros_ns-2-cirros_vnfd-VM-1",
vnf_member_index="2",
threshold=80,
vdu_name="cirros_ns-2-cirros_vnfd-VM-1",
vnf_member_index="2",
+ action="scale_out",
)
create_alarm.assert_not_called_with(
metric_name="average_memory_utilization",
)
create_alarm.assert_not_called_with(
metric_name="average_memory_utilization",
@@
-529,6
+532,7
@@
class PolicyModuleAgentTest(unittest.TestCase):
threshold=20,
vdu_name="cirros_ns-2-cirros_vnfd-VM-1",
vnf_member_index="2",
threshold=20,
vdu_name="cirros_ns-2-cirros_vnfd-VM-1",
vnf_member_index="2",
+ action="scale_out",
)
scaling_record = ScalingGroup.get()
self.assertEqual(scaling_record.name, "scale_cirros_vnfd-VM")
)
scaling_record = ScalingGroup.get()
self.assertEqual(scaling_record.name, "scale_cirros_vnfd-VM")
@@
-569,6
+573,7
@@
class PolicyModuleAgentTest(unittest.TestCase):
vnf_member_index="1",
threshold=20.0,
operation="LT",
vnf_member_index="1",
threshold=20.0,
operation="LT",
+ action="{'webhook': ['localhost:9090', 'localhost:9090', 'localhost:9090']}"
)
create_alarm.assert_any_call(
metric_name="average_memory_utilization",
)
create_alarm.assert_any_call(
metric_name="average_memory_utilization",
@@
-577,6
+582,7
@@
class PolicyModuleAgentTest(unittest.TestCase):
vnf_member_index="2",
threshold=20.0,
operation="LT",
vnf_member_index="2",
threshold=20.0,
operation="LT",
+ action="{'webhook': ['localhost:9090', 'localhost:9090', 'localhost:9090']}"
)
)