CloudManager¶
The CloudManager
class manages detection of IP addresses from major cloud providers.
Class Definition¶
class CloudManager:
def __init__(self):
"""
Initialize cloud IP ranges manager.
"""
self.ip_ranges: Dict[str, Set[ipaddress.IPv4Network]] = {}
self.refresh()
Methods¶
refresh¶
is_cloud_ip¶
def is_cloud_ip(
self,
ip: str,
providers: Set[str]
) -> bool:
"""
Check if an IP belongs to specified cloud providers.
Args:
ip: IP address to check
providers: Set of provider names ('AWS', 'GCP', 'Azure')
"""