def do_check(params): vm = params[0] special_str = params[1] if test_lib.lib_check_vm_sg_rule_exist_in_iptables(vm, special_string=special_str): test_util.test_logger('[vm:] %s SG INGRESS rules are not removed, after it is destroyed. Will try again.' % vm.uuid) return False return True
def do_check_sg_rule_exist(params_pkg): test_vm = params_pkg[0] direction = params_pkg[1] additional_str = params_pkg[2] expected_result = params_pkg[3] if test_lib.lib_check_vm_sg_rule_exist_in_iptables(test_vm, direction, additional_string=additional_str): test_util.test_logger('[Security Group] find TCP ingress rule for [vm:] %s. ' % test_vm.uuid) test_result = True else: test_util.test_logger('[Security Group] does NOT find TCP ingress rule for [vm:] %s. ' % test_vm.uuid) test_result = False return expected_result == test_result