|
@@ -247,12 +247,6 @@ class UpdateSession:
|
|
|
self.__diff = isc.xfrin.diff.Diff(datasrc_client, zname,
|
|
|
journaling=True,
|
|
|
single_update_mode=True)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- self.__finder = self.__diff.get_updater()
|
|
|
self.__zname = zname
|
|
|
self.__zclass = zclass
|
|
|
self.__datasrc_client = datasrc_client
|
|
@@ -313,9 +307,9 @@ class UpdateSession:
|
|
|
only return what the result code would be (and not read/copy
|
|
|
any actual data).
|
|
|
'''
|
|
|
- result, _, _ = self.__finder.find(rrset.get_name(), rrset.get_type(),
|
|
|
- ZoneFinder.NO_WILDCARD |
|
|
|
- ZoneFinder.FIND_GLUE_OK)
|
|
|
+ result, _, _ = self.__diff.find(rrset.get_name(), rrset.get_type(),
|
|
|
+ ZoneFinder.NO_WILDCARD |
|
|
|
+ ZoneFinder.FIND_GLUE_OK)
|
|
|
return result == ZoneFinder.SUCCESS
|
|
|
|
|
|
def __prereq_rrset_exists_value(self, rrset):
|
|
@@ -324,10 +318,10 @@ class UpdateSession:
|
|
|
RFC2136 Section 2.4.2
|
|
|
Returns True if the prerequisite is satisfied, False otherwise.
|
|
|
'''
|
|
|
- result, found_rrset, _ = self.__finder.find(rrset.get_name(),
|
|
|
- rrset.get_type(),
|
|
|
- ZoneFinder.NO_WILDCARD |
|
|
|
- ZoneFinder.FIND_GLUE_OK)
|
|
|
+ result, found_rrset, _ = self.__diff.find(rrset.get_name(),
|
|
|
+ rrset.get_type(),
|
|
|
+ ZoneFinder.NO_WILDCARD |
|
|
|
+ ZoneFinder.FIND_GLUE_OK)
|
|
|
if result == ZoneFinder.SUCCESS and\
|
|
|
rrset.get_name() == found_rrset.get_name() and\
|
|
|
rrset.get_type() == found_rrset.get_type():
|
|
@@ -366,9 +360,9 @@ class UpdateSession:
|
|
|
to only return what the result code would be (and not read/copy
|
|
|
any actual data).
|
|
|
'''
|
|
|
- result, rrsets, flags = self.__finder.find_all(rrset.get_name(),
|
|
|
- ZoneFinder.NO_WILDCARD |
|
|
|
- ZoneFinder.FIND_GLUE_OK)
|
|
|
+ result, rrsets, flags = self.__diff.find_all(rrset.get_name(),
|
|
|
+ ZoneFinder.NO_WILDCARD |
|
|
|
+ ZoneFinder.FIND_GLUE_OK)
|
|
|
if result == ZoneFinder.SUCCESS and\
|
|
|
(flags & ZoneFinder.RESULT_WILDCARD == 0):
|
|
|
return True
|
|
@@ -592,10 +586,10 @@ class UpdateSession:
|
|
|
|
|
|
if rrset.get_type() == RRType.SOA():
|
|
|
return
|
|
|
- result, orig_rrset, _ = self.__finder.find(rrset.get_name(),
|
|
|
- rrset.get_type(),
|
|
|
- ZoneFinder.NO_WILDCARD |
|
|
|
- ZoneFinder.FIND_GLUE_OK)
|
|
|
+ result, orig_rrset, _ = self.__diff.find(rrset.get_name(),
|
|
|
+ rrset.get_type(),
|
|
|
+ ZoneFinder.NO_WILDCARD |
|
|
|
+ ZoneFinder.FIND_GLUE_OK)
|
|
|
if result == ZoneFinder.CNAME:
|
|
|
|
|
|
|
|
@@ -626,10 +620,10 @@ class UpdateSession:
|
|
|
Special cases: if the delete statement is for the
|
|
|
zone's apex, and the type is either SOA or NS, it
|
|
|
is ignored.'''
|
|
|
- result, to_delete, _ = self.__finder.find(rrset.get_name(),
|
|
|
- rrset.get_type(),
|
|
|
- ZoneFinder.NO_WILDCARD |
|
|
|
- ZoneFinder.FIND_GLUE_OK)
|
|
|
+ result, to_delete, _ = self.__diff.find(rrset.get_name(),
|
|
|
+ rrset.get_type(),
|
|
|
+ ZoneFinder.NO_WILDCARD |
|
|
|
+ ZoneFinder.FIND_GLUE_OK)
|
|
|
if result == ZoneFinder.SUCCESS:
|
|
|
if to_delete.get_name() == self.__zname and\
|
|
|
(to_delete.get_type() == RRType.SOA() or\
|
|
@@ -651,10 +645,10 @@ class UpdateSession:
|
|
|
|
|
|
|
|
|
|
|
|
- result, orig_rrset, _ = self.__finder.find(rrset.get_name(),
|
|
|
- rrset.get_type(),
|
|
|
- ZoneFinder.NO_WILDCARD |
|
|
|
- ZoneFinder.FIND_GLUE_OK)
|
|
|
+ result, orig_rrset, _ = self.__diff.find(rrset.get_name(),
|
|
|
+ rrset.get_type(),
|
|
|
+ ZoneFinder.NO_WILDCARD |
|
|
|
+ ZoneFinder.FIND_GLUE_OK)
|
|
|
|
|
|
|
|
|
|
|
@@ -684,9 +678,9 @@ class UpdateSession:
|
|
|
Special case: if the name is the zone's apex, SOA and
|
|
|
NS records are kept.
|
|
|
'''
|
|
|
- result, rrsets, flags = self.__finder.find_all(rrset.get_name(),
|
|
|
- ZoneFinder.NO_WILDCARD |
|
|
|
- ZoneFinder.FIND_GLUE_OK)
|
|
|
+ result, rrsets, flags = self.__diff.find_all(rrset.get_name(),
|
|
|
+ ZoneFinder.NO_WILDCARD |
|
|
|
+ ZoneFinder.FIND_GLUE_OK)
|
|
|
if result == ZoneFinder.SUCCESS and\
|
|
|
(flags & ZoneFinder.RESULT_WILDCARD == 0):
|
|
|
for to_delete in rrsets:
|
|
@@ -736,9 +730,9 @@ class UpdateSession:
|
|
|
|
|
|
|
|
|
|
|
|
- result, old_soa, _ = self.__finder.find(self.__zname, RRType.SOA(),
|
|
|
- ZoneFinder.NO_WILDCARD |
|
|
|
- ZoneFinder.FIND_GLUE_OK)
|
|
|
+ result, old_soa, _ = self.__diff.find(self.__zname, RRType.SOA(),
|
|
|
+ ZoneFinder.NO_WILDCARD |
|
|
|
+ ZoneFinder.FIND_GLUE_OK)
|
|
|
|
|
|
if self.__added_soa is not None:
|
|
|
new_soa = self.__added_soa
|