|
| 1 | +from pydantic import BaseModel, Field |
| 2 | + |
| 3 | + |
| 4 | +class ZoneSyncPolicy(BaseModel): |
| 5 | + """Defines a synchronization policy for zones that are synchronized with DNS servers.""" |
| 6 | + |
| 7 | + create_missing_zones_in_server: bool = Field( |
| 8 | + title='Create Missing Zones In Server', |
| 9 | + description='Whether to create zones in a DNS server that are present in the database.', |
| 10 | + default=False, |
| 11 | + ) |
| 12 | + """Whether to create zones in a DNS server that are present in the database.""" |
| 13 | + |
| 14 | + update_zones_in_db: bool = Field( |
| 15 | + title='Update Zones In Database', |
| 16 | + description='Whether to update zones in the database from updates in a DNS server.', |
| 17 | + default=False, |
| 18 | + ) |
| 19 | + """Whether to update zones in the database from updates in a DNS server.""" |
| 20 | + |
| 21 | + update_zones_in_server: bool = Field( |
| 22 | + title='Update Zones In Server', |
| 23 | + description='Whether to update zones in a DNS server from updates in the database.', |
| 24 | + default=False, |
| 25 | + ) |
| 26 | + """Whether to update zones in a DNS server from updates in the database.""" |
| 27 | + |
| 28 | + purge_missing_zones_in_db: bool = Field( |
| 29 | + title='Purge Missing Zones In Database', |
| 30 | + description='Whether to purge zones in the database that are not present in a DNS server.', |
| 31 | + default=False, |
| 32 | + ) |
| 33 | + """Whether to purge zones in the database that are not present in a DNS server.""" |
| 34 | + |
| 35 | + purge_missing_zones_in_server: bool = Field( |
| 36 | + title='Purge Missing Zones In Server', |
| 37 | + description='Whether to purge zones in a DNS server that are not present in the database.', |
| 38 | + default=False, |
| 39 | + ) |
| 40 | + """Whether to purge zones in a DNS server that are not present in the database.""" |
| 41 | + |
| 42 | + create_missing_records_in_db: bool = Field( |
| 43 | + title='Create Missing Records In Database', |
| 44 | + description='Whether to create records in the database that are present in a DNS server.', |
| 45 | + default=False, |
| 46 | + ) |
| 47 | + """Whether to create records in the database that are present in a DNS server.""" |
| 48 | + |
| 49 | + create_missing_records_in_server: bool = Field( |
| 50 | + title='Create Missing Records In Server', |
| 51 | + description='Whether to create records in a DNS server that are present in the database.', |
| 52 | + default=False, |
| 53 | + ) |
| 54 | + """Whether to create records in a DNS server that are present in the database.""" |
| 55 | + |
| 56 | + update_records_in_db: bool = Field( |
| 57 | + title='Update Records In Database', |
| 58 | + description='Whether to update records in the database from updates in a DNS server.', |
| 59 | + default=False, |
| 60 | + ) |
| 61 | + """Whether to update records in the database from updates in a DNS server.""" |
| 62 | + |
| 63 | + update_records_in_server: bool = Field( |
| 64 | + title='Update Records In Server', |
| 65 | + description='Whether to update records in a DNS server from updates in the database.', |
| 66 | + default=False, |
| 67 | + ) |
| 68 | + """Whether to update records in a DNS server from updates in the database.""" |
| 69 | + |
| 70 | + purge_missing_records_in_db: bool = Field( |
| 71 | + title='Purge Missing Records In Database', |
| 72 | + description='Whether to purge records in the database that are not present in a DNS server.', |
| 73 | + default=False, |
| 74 | + ) |
| 75 | + """Whether to purge records in the database that are not present in a DNS server.""" |
| 76 | + |
| 77 | + purge_missing_records_in_server: bool = Field( |
| 78 | + title='Purge Missing Records In Server', |
| 79 | + description='Whether to purge records in a DNS server that are not present in the database.', |
| 80 | + default=False, |
| 81 | + ) |
| 82 | + """Whether to purge records in a DNS server that are not present in the database.""" |
| 83 | + |
| 84 | + |
| 85 | +class ServerSyncPolicy(ZoneSyncPolicy): |
| 86 | + """Defines a zone synchronization policy for servers.""" |
| 87 | + |
| 88 | + create_missing_zones_in_db: bool = Field( |
| 89 | + title='Create Missing Zones In Database', |
| 90 | + description='Whether to create zones in the database that are present in a DNS server.', |
| 91 | + default=False, |
| 92 | + ) |
| 93 | + """Whether to create zones in the database that are present in a DNS server.""" |
0 commit comments