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

Method is_aws_ip

python3_cron_scripts/libs3/IPManager.py:272–285  ·  view source on GitHub ↗

Is the provided IP within one of the AWS CIDRs?

(self, ip)

Source from the content-addressed store, hash-verified

270 return None
271
272 def is_aws_ip(self, ip):
273 """
274 Is the provided IP within one of the AWS CIDRs?
275 """
276 if isinstance(ip, str):
277 ip_addr = IPAddress(ip)
278 else:
279 ip_addr = ip
280
281 if self.AWS_IPs is None:
282 self.__get_aws_ips()
283 self.__get_aws_ipv6s()
284
285 return self.check_in_cidr(ip_addr, self.AWS_IPs)
286
287 def is_azure_ip(self, ip):
288 """

Callers 6

mainFunction · 0.95
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_aws_ipsMethod · 0.95
__get_aws_ipv6sMethod · 0.95
check_in_cidrMethod · 0.95

Tested by

no test coverage detected