What is the tracked zone for the provided hostname?
(name, zones)
| 84 | |
| 85 | |
| 86 | def get_tracked_zone(name, zones): |
| 87 | """ |
| 88 | What is the tracked zone for the provided hostname? |
| 89 | """ |
| 90 | for zone in zones: |
| 91 | if name.endswith("." + zone) or name == zone: |
| 92 | return zone |
| 93 | |
| 94 | return None |
| 95 | |
| 96 | |
| 97 | def add_new_domain_names(hostnames, zones, mongo_connector): |
no outgoing calls
no test coverage detected