MCPcopy Create free account
hub / github.com/apache/cloudstack / verify_expected_rules_exist

Function verify_expected_rules_exist

scripts/vm/network/security_group.py:1572–1583  ·  view source on GitHub ↗
(expected_rules, rules)

Source from the content-addressed store, hash-verified

1570 return new_mac[1:]
1571
1572def verify_expected_rules_exist(expected_rules, rules):
1573 # Check if expected rules exist
1574 for expected_rule in expected_rules:
1575 found = False
1576 for rule in rules:
1577 if rule == expected_rule:
1578 found = True
1579 break
1580 if not found:
1581 print("Rule '%s' is not found" % expected_rule)
1582 return False
1583 return True
1584
1585def verify_expected_rules_in_order(expected_rules, rules):
1586 # Check if expected rules exist in order (!!!)

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected