octodns.provider.base

class octodns.provider.base.BaseProvider(id, apply_disabled=False, update_pcent_threshold=0.3, delete_pcent_threshold=0.3, strict_supports=True)[source]

Bases: BaseSource

__init__(id, apply_disabled=False, update_pcent_threshold=0.3, delete_pcent_threshold=0.3, strict_supports=True)[source]
_process_desired_zone(desired)[source]

An opportunity for providers to modify the desired zone records before planning. desired is a “shallow” copy, see Zone.copy for more information

  • Must call super at an appropriate point for their work, generally that means as the final step of the method, returning the result of the super call.

  • May modify desired directly.

  • 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.

  • Must call supports_warn_or_except with information about any changes that are made to have them logged or throw errors depending on the provider configuration.

_process_existing_zone(existing, desired)[source]

An opportunity for providers to modify the existing zone records before planning. existing is a “shallow” copy, see Zone.copy for more information

  • desired must not be modified in anyway, it is only for reference

  • Must call super at an appropriate point for their work, generally that means as the final step of the method, returning the result of the super call.

  • May modify existing directly.

  • 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 existing.

  • Must call supports_warn_or_except with information about any changes that are made to have them logged or throw errors depending on the provider configuration.

_include_change(change)[source]

An opportunity for providers to filter out false positives due to peculiarities in their implementation. E.g. minimum TTLs.

_extra_changes(existing, desired, changes)[source]

An opportunity for providers to add extra changes to the plan that are necessary to update ancillary record data or configure the zone. E.g. base NS records.

_plan_meta(existing, desired, changes)[source]

An opportunity for providers to indicate they have “meta” changes to the zone which are unrelated to records. Examples may include service plan changes, replication settings, and notes. The returned data is arbitrary/opaque to octoDNS, with the only requirement being that pprint.pformat can display it. A dict is recommended.

supports_warn_or_except(msg, fallback)[source]
plan(desired, processors=[])[source]
apply(plan)[source]

Submits actual planned changes to the provider. Returns the number of changes made

_apply(plan)[source]