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

Function trim_mac_address

scripts/vm/network/security_group.py:1563–1570  ·  view source on GitHub ↗
(vm_mac)

Source from the content-addressed store, hash-verified

1561 return True
1562
1563def trim_mac_address(vm_mac):
1564 new_mac = ""
1565 for mac in vm_mac.split(":"):
1566 if mac.startswith("0"):
1567 new_mac += ":" + mac[1:]
1568 else:
1569 new_mac += ":" + mac
1570 return new_mac[1:]
1571
1572def verify_expected_rules_exist(expected_rules, rules):
1573 # Check if expected rules exist

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected