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

Function update_gcp_cidrs

python3_cron_scripts/send_remote_server.py:142–154  ·  view source on GitHub ↗

Copy the list of GCP CIDRs to the remote database

(logger, mongo_connector, rm_connector)

Source from the content-addressed store, hash-verified

140
141
142def update_gcp_cidrs(logger, mongo_connector, rm_connector):
143 """
144 Copy the list of GCP CIDRs to the remote database
145 """
146 logger.info("Starting GCP IPs..")
147 gcp_ips_collection = mongo_connector.get_gcp_ips_connection()
148 remote_gcp_ips_collection = rm_connector.get_gcp_ips_connection()
149
150 gcp_ips = gcp_ips_collection.find({}, {"_id": 0})
151
152 remote_gcp_ips_collection.delete_many({})
153 for ip_addr in gcp_ips:
154 remote_gcp_ips_collection.insert_one(ip_addr)
155
156
157def update_all_dns(logger, mongo_connector, rm_connector, zone_list):

Callers 1

mainFunction · 0.85

Calls 1

Tested by

no test coverage detected