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",
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",
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",
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")
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",
vnf_member_index="2",
threshold=20.0,
operation="LT",
+ action="{'webhook': ['localhost:9090', 'localhost:9090', 'localhost:9090']}"
)