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

Method __get_gcp_ips

python3_cron_scripts/libs3/IPManager.py:164–181  ·  view source on GitHub ↗

Get the list of GCP IPv4 CIDRs.

(self)

Source from the content-addressed store, hash-verified

162 self.Azure_IPs.append(IPNetwork(result["ip_prefix"]))
163
164 def __get_gcp_ips(self):
165 """
166 Get the list of GCP IPv4 CIDRs.
167 """
168 if self.GCP_IPs is None:
169 self.GCP_IPs = []
170
171 gcp_ips_collection = self._mongo_connector.get_gcp_ips_connection()
172
173 results = self._mongo_connector.perform_find_one(gcp_ips_collection, {})
174
175 if (
176 results is not None
177 and "prefixes" in results
178 and len(results["prefixes"]) > 0
179 ):
180 for result in results["prefixes"]:
181 self.GCP_IPs.append(IPNetwork(result["ip_prefix"]))
182
183 def __get_gcp_ipv6s(self):
184 """

Callers 3

__init__Method · 0.95
is_gcp_ipMethod · 0.95
find_partner_rangeMethod · 0.95

Calls 2

perform_find_oneMethod · 0.80

Tested by

no test coverage detected