MCPcopy Create free account
hub / github.com/adobe/Marinus / is_gcp_ip

Method is_gcp_ip

python3_cron_scripts/libs3/IPManager.py:301–314  ·  view source on GitHub ↗

Is the provided IP within one of the GCP CIDRs?

(self, ip)

Source from the content-addressed store, hash-verified

299 return self.check_in_cidr(ip_addr, self.Azure_IPs)
300
301 def is_gcp_ip(self, ip):
302 """
303 Is the provided IP within one of the GCP CIDRs?
304 """
305 if isinstance(ip, str):
306 ip_addr = IPAddress(ip)
307 else:
308 ip_addr = ip
309
310 if self.GCP_IPs is None:
311 self.__get_gcp_ips()
312 self.__get_gcp_ipv6s()
313
314 return self.check_in_cidr(ip_addr, self.GCP_IPs)
315
316 def is_tracked_ip(self, ip):
317 """

Callers 5

create_network_data_setsFunction · 0.95
process_threadFunction · 0.80
process_threadFunction · 0.80
find_all_dns_by_zoneFunction · 0.80
find_srdns_by_zoneFunction · 0.80

Calls 3

__get_gcp_ipsMethod · 0.95
__get_gcp_ipv6sMethod · 0.95
check_in_cidrMethod · 0.95

Tested by

no test coverage detected