Copy the list of GCP CIDRs to the remote database
(logger, mongo_connector, rm_connector)
| 140 | |
| 141 | |
| 142 | def 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 | |
| 157 | def update_all_dns(logger, mongo_connector, rm_connector, zone_list): |
no test coverage detected