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

Method is_guest_gateway

systemvm/debian/opt/cloud/bin/cs/CsAddress.py:973–987  ·  view source on GitHub ↗

Exclude the vrrp maintained addresses on a redundant router

(self, bag, ip)

Source from the content-addressed store, hash-verified

971 return interface.get_gateway()
972
973 def is_guest_gateway(self, bag, ip):
974 """ Exclude the vrrp maintained addresses on a redundant router """
975 interface = CsInterface(bag, self.config)
976 if not self.config.cl.is_redundant():
977 return False
978
979 rip = ip.split('/')[0]
980 logging.info("Checking if cidr is a gateway for rVPC. IP ==> %s / device ==> %s", ip, self.dev)
981
982 gw = interface.get_gateway()
983 logging.info("Interface has the following gateway ==> %s", gw)
984
985 if bag['nw_type'] == "guest" and rip == gw:
986 return True
987 return False
988
989 def delete(self, ip):
990 remove = []

Callers 1

compareMethod · 0.95

Calls 4

get_gatewayMethod · 0.95
CsInterfaceClass · 0.85
is_redundantMethod · 0.80
infoMethod · 0.45

Tested by

no test coverage detected