]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Add AVC RR support.
authorBob Halley <halley@dnspython.org>
Tue, 20 Sep 2016 20:00:33 +0000 (13:00 -0700)
committerBob Halley <halley@dnspython.org>
Tue, 20 Sep 2016 20:00:33 +0000 (13:00 -0700)
ChangeLog
dns/rdatatype.py
dns/rdtypes/ANY/AVC.py [new file with mode: 0644]
tests/example
tests/example1.good
tests/example2.good
tests/example3.good

index 521873fe53415cd8423c93870c9f320582a300b7..78a2961a43be8e402a2d224fadf7045a2e40154e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,8 +7,10 @@
          http://unicode.org/reports/tr46/ for more info on what this
          means.
 
-       * Problems with newlines in various output modes have been
-         addressed, but I suspect there is more to come in this area.
+       * Add AVC RR support.
+
+       * Some problems with newlines in various output modes have been
+         addressed.
 
        * More miscellaneous fixes for the Python 2/3 codeline merge.
 
index cde1a0a1aa32a523c5da2a230d7538e03ad5e051..15284f64d518c5896ac153e2a08e5a45d00d3bb7 100644 (file)
@@ -96,6 +96,7 @@ MAILA = 254
 ANY = 255
 URI = 256
 CAA = 257
+AVC = 258
 TA = 32768
 DLV = 32769
 
@@ -166,6 +167,7 @@ _by_text = {
     'ANY': ANY,
     'URI': URI,
     'CAA': CAA,
+    'AVC': AVC,
     'TA': TA,
     'DLV': DLV,
 }
diff --git a/dns/rdtypes/ANY/AVC.py b/dns/rdtypes/ANY/AVC.py
new file mode 100644 (file)
index 0000000..137c9de
--- /dev/null
@@ -0,0 +1,23 @@
+# Copyright (C) 2016 Nominum, Inc.
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose with or without fee is hereby granted,
+# provided that the above copyright notice and this permission notice
+# appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+import dns.rdtypes.txtbase
+
+
+class AVC(dns.rdtypes.txtbase.TXTBase):
+
+    """AVC record
+
+    @see: U{http://www.iana.org/assignments/dns-parameters/AVC/avc-completed-template}"""
index 5983754bd4c72203c367021330c8d6545d178950..f91da99b95d0b1d17d2eab77b011dbb4e07e2b0d 100644 (file)
@@ -196,3 +196,4 @@ caa04                       CAA 0 issue "ca.example.net; account=230123"
 caa05                  CAA 0 issue "ca.example.net; policy=ev"
 caa06                  CAA 128 tbs "Unknown"
 csync0                 CSYNC 12345 0 A MX RRSIG NSEC TYPE1234
+avc01                  AVC "app-name:WOLFGANG|app-class:OAM|business=yes"
index 215d99f88cc1718c8b6d537dc68f8b67da44a8cc..0769da6949ef1162cf1797406555918d52e42be3 100644 (file)
@@ -14,6 +14,7 @@ afsdb01 3600 IN AFSDB 0 hostname
 afsdb02 3600 IN AFSDB 65535 .
 apl01 3600 IN APL 1:192.168.32.0/21 !1:192.168.38.0/28
 apl02 3600 IN APL 1:224.0.0.0/4 2:FF00:0:0:0:0:0:0:0/8
+avc01 3600 IN AVC "app-name:WOLFGANG|app-class:OAM|business=yes"
 b 300 IN CNAME foo.net.
 c 300 IN A 73.80.65.49
 caa01 3600 IN CAA 0 issue "ca.example.net"
index 070293061f1c2e18053bcffd8d46a756bf6cf9ce..579338866d4218facce8e8a6a0827747b52cd3e5 100644 (file)
@@ -14,6 +14,7 @@ afsdb01.example. 3600 IN AFSDB 0 hostname.example.
 afsdb02.example. 3600 IN AFSDB 65535 .
 apl01.example. 3600 IN APL 1:192.168.32.0/21 !1:192.168.38.0/28
 apl02.example. 3600 IN APL 1:224.0.0.0/4 2:FF00:0:0:0:0:0:0:0/8
+avc01.example. 3600 IN AVC "app-name:WOLFGANG|app-class:OAM|business=yes"
 b.example. 300 IN CNAME foo.net.
 c.example. 300 IN A 73.80.65.49
 caa01.example. 3600 IN CAA 0 issue "ca.example.net"
index 215d99f88cc1718c8b6d537dc68f8b67da44a8cc..0769da6949ef1162cf1797406555918d52e42be3 100644 (file)
@@ -14,6 +14,7 @@ afsdb01 3600 IN AFSDB 0 hostname
 afsdb02 3600 IN AFSDB 65535 .
 apl01 3600 IN APL 1:192.168.32.0/21 !1:192.168.38.0/28
 apl02 3600 IN APL 1:224.0.0.0/4 2:FF00:0:0:0:0:0:0:0/8
+avc01 3600 IN AVC "app-name:WOLFGANG|app-class:OAM|business=yes"
 b 300 IN CNAME foo.net.
 c 300 IN A 73.80.65.49
 caa01 3600 IN CAA 0 issue "ca.example.net"