Class: DnsMadeEasy::Zone::Diff
- Inherits:
-
Object
- Object
- DnsMadeEasy::Zone::Diff
- Defined in:
- lib/dnsmadeeasy/zone/diff.rb
Overview
Builds a conservative execution plan from desired and remote record sets. TTL-only differences are ignored unless compare_ttl is true.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(desired_records:, remote_records:, compare_ttl: false) ⇒ Diff
constructor
A new instance of Diff.
Constructor Details
#initialize(desired_records:, remote_records:, compare_ttl: false) ⇒ Diff
Returns a new instance of Diff.
10 11 12 13 14 |
# File 'lib/dnsmadeeasy/zone/diff.rb', line 10 def initialize(desired_records:, remote_records:, compare_ttl: false) @provider_managed_records, @desired_records = desired_records.partition { |record| provider_managed?(record) } @remote_records = remote_records @compare_ttl = compare_ttl end |
Instance Method Details
#call ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/dnsmadeeasy/zone/diff.rb', line 16 def call Plan.new( creates: create_actions, updates: update_actions, skipped_creates: skipped_create_actions, skipped_deletes: skipped_delete_actions, ambiguous: ambiguous_actions ) end |