Copy the list of Azure CIDRs to the remote database
(logger, mongo_connector, rm_connector)
| 110 | |
| 111 | |
| 112 | def update_azure_cidrs(logger, mongo_connector, rm_connector): |
| 113 | """ |
| 114 | Copy the list of Azure CIDRs to the remote database |
| 115 | """ |
| 116 | logger.info("Starting Azure IPs..") |
| 117 | azure_ips_collection = mongo_connector.get_azure_ips_connection() |
| 118 | remote_azure_ips_collection = rm_connector.get_azure_ips_connection() |
| 119 | |
| 120 | azure_ips = azure_ips_collection.find({}, {"_id": 0}) |
| 121 | |
| 122 | remote_azure_ips_collection.delete_many({}) |
| 123 | for ip_addr in azure_ips: |
| 124 | remote_azure_ips_collection.insert_one(ip_addr) |
| 125 | |
| 126 | |
| 127 | def update_akamai_cidrs(logger, mongo_connector, rm_connector): |
no test coverage detected