Get an rdataset matching the specified properties in the current node. None is returned if an rdataset of the specified type and class does not exist and *create* is not ``True``. *rdclass*, an ``int``, the class of the rdataset. *rdtype*, an ``int``, the t
(
self,
rdclass: dns.rdataclass.RdataClass,
rdtype: dns.rdatatype.RdataType,
covers: dns.rdatatype.RdataType = dns.rdatatype.NONE,
create: bool = False,
)
| 204 | return rds |
| 205 | |
| 206 | def get_rdataset( |
| 207 | self, |
| 208 | rdclass: dns.rdataclass.RdataClass, |
| 209 | rdtype: dns.rdatatype.RdataType, |
| 210 | covers: dns.rdatatype.RdataType = dns.rdatatype.NONE, |
| 211 | create: bool = False, |
| 212 | ) -> dns.rdataset.Rdataset | None: |
| 213 | """Get an rdataset matching the specified properties in the |
| 214 | current node. |
| 215 | |
| 216 | None is returned if an rdataset of the specified type and |
| 217 | class does not exist and *create* is not ``True``. |
| 218 | |
| 219 | *rdclass*, an ``int``, the class of the rdataset. |
| 220 | |
| 221 | *rdtype*, an ``int``, the type of the rdataset. |
| 222 | |
| 223 | *covers*, an ``int``, the covered type. Usually this value is |
| 224 | dns.rdatatype.NONE, but if the rdtype is dns.rdatatype.SIG or |
| 225 | dns.rdatatype.RRSIG, then the covers value will be the rdata |
| 226 | type the SIG/RRSIG covers. The library treats the SIG and RRSIG |
| 227 | types as if they were a family of |
| 228 | types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA). This makes RRSIGs much |
| 229 | easier to work with than if RRSIGs covering different rdata |
| 230 | types were aggregated into a single RRSIG rdataset. |
| 231 | |
| 232 | *create*, a ``bool``. If True, create the rdataset if it is not found. |
| 233 | |
| 234 | Returns a ``dns.rdataset.Rdataset`` or ``None``. |
| 235 | """ |
| 236 | |
| 237 | try: |
| 238 | rds = self.find_rdataset(rdclass, rdtype, covers, create) |
| 239 | except KeyError: |
| 240 | rds = None |
| 241 | return rds |
| 242 | |
| 243 | def delete_rdataset( |
| 244 | self, |