octodns.zone
¶
- class octodns.zone.Zone(name, sub_zones, update_pcent_threshold=None, delete_pcent_threshold=None)[source]¶
Bases:
object
- log = <Logger Zone (WARNING)>¶
- property records¶
- property root_ns¶
- hydrate()[source]¶
Take a shallow copy Zone and make it a deeper copy holding its own reference to records. These records will still be the originals and they should not be modified. Changes should be made by calling add_record, often with replace=True, and/or remove_record.
Note: This method does not need to be called under normal circumstances as add_record and remove_record will automatically call it when appropriate.
- copy()[source]¶
Copy-on-write semantics support. This method will create a shallow clone of the zone which will be hydrated the first time add_record or remove_record is called.
This allows low-cost copies of things to be made in situations where changes are unlikely and only incurs the “expense” of actually copying the records when required. The actual record copy will not be “deep” meaning that records should not be modified directly.