octodns.processor.ownership

class octodns.processor.ownership.OwnershipProcessor(name, txt_name='_owner', txt_value='*octodns*', txt_ttl=60)[source]

Bases: BaseProcessor

__init__(name, txt_name='_owner', txt_value='*octodns*', txt_ttl=60)[source]
process_source_zone(desired, *args, **kwargs)[source]

Called after all sources have completed populate. Provides an opportunity for the processor to modify the desired Zone that targets will receive.

  • Will see desired after any modifications done by Provider._process_desired_zone and processors configured to run before this one.

  • May modify desired directly.

  • Must return desired which will normally be the desired param.

  • Must not modify records directly, record.copy should be called, the results of which can be modified, and then Zone.add_record may be used with replace=True.

  • May call Zone.remove_record to remove records from desired.

  • Sources may be empty, as will be the case for aliased zones.

_is_ownership(record)[source]
process_plan(plan, *args, **kwargs)[source]

Called after the planning phase has completed. Provides an opportunity for the processors to modify the plan thus changing the actions that will be displayed and potentially applied.

  • plan may be None if no changes were detected, if so a Plan may still be created and returned.

  • May modify plan.changes directly or create a new Plan.

  • Does not have to modify plan.desired and/or plan.existing to line up with any modifications made to plan.changes.

  • Should copy over plan.exists, plan.update_pcent_threshold, and plan.delete_pcent_threshold when creating a new Plan.

  • Must return a Plan which may be plan or can be a newly created one plan.desired and plan.existing copied over as-is or modified.