The init_all parameter is useful if you need to get access to the partner IP addresses directly rather than using convenience functions.
(self, mongo_connector, init_all=False)
| 67 | return logging.getLogger(__name__) |
| 68 | |
| 69 | def __init__(self, mongo_connector, init_all=False): |
| 70 | """ |
| 71 | The init_all parameter is useful if you need to get access to the partner IP |
| 72 | addresses directly rather than using convenience functions. |
| 73 | """ |
| 74 | self._logger = self._log() |
| 75 | |
| 76 | self._mongo_connector = mongo_connector |
| 77 | self.all_ips_collection = mongo_connector.get_all_ips_connection() |
| 78 | self.ip_zones_collection = mongo_connector.get_ipzone_connection() |
| 79 | self.ipv6_zones_collection = mongo_connector.get_ipv6_zone_connection() |
| 80 | |
| 81 | if init_all: |
| 82 | self.__get_akamai_ips() |
| 83 | self.__get_akamai_ipv6s() |
| 84 | self.__get_aws_ips() |
| 85 | self.__get_aws_ipv6s() |
| 86 | self.__get_azure_ips() |
| 87 | self.__get_gcp_ips() |
| 88 | self.__get_gcp_ipv6s() |
| 89 | self.__get_tracked_cidrs() |
| 90 | self.__get_tracked_ipv6_cidrs() |
| 91 | |
| 92 | def __get_akamai_ips(self): |
| 93 | """ |
nothing calls this directly
no test coverage detected