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

Function add_to_ipset

scripts/vm/network/security_group.py:456–466  ·  view source on GitHub ↗
(ipsetname, ips, action)

Source from the content-addressed store, hash-verified

454
455
456def add_to_ipset(ipsetname, ips, action):
457 result = True
458 for ip in ips:
459 try:
460 logging.debug("vm ip " + str(ip))
461 execute("ipset " + action + " " + ipsetname + " " + str(ip))
462 except:
463 logging.debug("vm ip already in ip set " + str(ip))
464 continue
465
466 return result
467
468
469def network_rules_vmSecondaryIp(vm_name, vm_mac, ip_secondary, action):

Callers 3

default_network_rulesFunction · 0.85

Calls 2

debugMethod · 0.80
executeFunction · 0.70

Tested by

no test coverage detected