From 93bd5c5000df5f66734f309b9c35dbe370915c96 Mon Sep 17 00:00:00 2001 From: "minecraftchest1@outlook.com" Date: Sat, 11 Jan 2025 13:17:24 -0600 Subject: [PATCH] v1.0.0 --- .gitignore | 1 + docs/html/classmain_1_1Record.html | 2 +- docs/html/classmain_1_1SRV-members.html | 2 +- docs/html/classmain_1_1SRV.html | 10 +- docs/html/classmain_1_1SRV.js | 2 +- docs/html/classmain_1_1Zone-members.html | 7 +- docs/html/classmain_1_1Zone.html | 119 +++++++++++++++++++++++ docs/html/classmain_1_1Zone.js | 3 + docs/html/doxygen_crawl.html | 5 +- docs/html/functions.html | 5 +- docs/html/functions_func.html | 5 +- docs/html/navtreeindex0.js | 22 +++-- docs/html/search/all_0.js | 2 +- docs/html/search/all_8.js | 9 +- docs/html/search/functions_0.js | 2 +- docs/html/search/functions_2.js | 7 +- main.py | 15 ++- 17 files changed, 189 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index cc128ba..02db6ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ __pycache__/ .venv/ test.zone +minecraftchest1.us.py diff --git a/docs/html/classmain_1_1Record.html b/docs/html/classmain_1_1Record.html index cfd166e..392fb63 100644 --- a/docs/html/classmain_1_1Record.html +++ b/docs/html/classmain_1_1Record.html @@ -176,7 +176,7 @@ Static Public Attributes
-

Reimplemented in main.SRV.

+

Reimplemented in main.SRV.

diff --git a/docs/html/classmain_1_1SRV-members.html b/docs/html/classmain_1_1SRV-members.html index e1d2245..c389df1 100644 --- a/docs/html/classmain_1_1SRV-members.html +++ b/docs/html/classmain_1_1SRV-members.html @@ -103,7 +103,7 @@ $(function(){initNavTree('classmain_1_1SRV.html',''); initResizable(true); });

This is the complete list of members for main.SRV, including all inherited members.

- + diff --git a/docs/html/classmain_1_1SRV.html b/docs/html/classmain_1_1SRV.html index 0f55114..25b7a0c 100644 --- a/docs/html/classmain_1_1SRV.html +++ b/docs/html/classmain_1_1SRV.html @@ -116,8 +116,8 @@ Inheritance diagram for main.SRV:
__int__(self, str name='@', str ttl=3600, str service="service", str protocol='proto', int priority=10, int weight=10, int port=0, str target=target)main.SRV
__int__(self, str name='@', str ttl=3600, str service="service", str protocol='proto', int priority=10, int weight=10, int port=0, str target='example.com')main.SRV
datamain.SRV
namemain.SRV
portmain.SRV
- - + + @@ -160,8 +160,8 @@ Additional Inherited Members

Public Member Functions

 __int__ (self, str name='@', str ttl=3600, str service="service", str protocol='proto', int priority=10, int weight=10, int port=0, str target=target)
 
 __int__ (self, str name='@', str ttl=3600, str service="service", str protocol='proto', int priority=10, int weight=10, int port=0, str target='example.com')
 
- Public Member Functions inherited from main.Record
 __str__ (self)
 
 

Member Function Documentation

- -

◆ __int__()

+ +

◆ __int__()

@@ -209,7 +209,7 @@ Additional Inherited Members - str target = target ) + str target = 'example.com' )
diff --git a/docs/html/classmain_1_1SRV.js b/docs/html/classmain_1_1SRV.js index e36ce3c..b7c8b51 100644 --- a/docs/html/classmain_1_1SRV.js +++ b/docs/html/classmain_1_1SRV.js @@ -1,6 +1,6 @@ var classmain_1_1SRV = [ - [ "__int__", "classmain_1_1SRV.html#a1659a48a0003dd4921a1a3e3edf59bb3", null ], + [ "__int__", "classmain_1_1SRV.html#a47b24a3972f3be3f3aff2a81022f6cc8", null ], [ "data", "classmain_1_1SRV.html#abbcbfbbb203c6d960482c15fd918f2f0", null ], [ "name", "classmain_1_1SRV.html#a3d380ee3e26b962cb3b89a93f9f6c81e", null ], [ "port", "classmain_1_1SRV.html#a8cb25b827605e2a37b831b9ff428f00f", null ], diff --git a/docs/html/classmain_1_1Zone-members.html b/docs/html/classmain_1_1Zone-members.html index 84a36d7..1f70325 100644 --- a/docs/html/classmain_1_1Zone-members.html +++ b/docs/html/classmain_1_1Zone-members.html @@ -109,10 +109,13 @@ $(function(){initNavTree('classmain_1_1Zone.html',''); initResizable(true); }); new_AAAA(self, str name='@', int ttl=3600, str data='0.0.0.0')main.Zone new_CNAME(self, str name='@', int ttl=3600, str data='0.0.0.0')main.Zone new_MX(self, str name='@', int ttl=3600, int priority=10, str host='example.com')main.Zone + new_NS(self, str name='@', int ttl=3600, str target='example.com')main.Zone + new_PTR(self, str name='@', int ttl=3600, str host='example.com')main.Zone new_record(self, str name='@', int ttl=3600, str rtype='A', str data='0.0.0.0')main.Zone new_soa(self, str mname='ns1.example.com', str rname='admin.example.com', int serial=int(time.time()), int refresh=86400, int retry=7200, int expire=15552000, int ttl=21700)main.Zone - recordsmain.Zonestatic - save_file(self, str filepath)main.Zone + new_SRV(self, str name='@', int ttl=3600, str service='service', str protocol='proto', int priority=10, int weight=10, str target='example.com')main.Zone + recordsmain.Zonestatic + save_file(self, str filepath)main.Zone
diff --git a/docs/html/classmain_1_1Zone.html b/docs/html/classmain_1_1Zone.html index 19f0f76..26e949f 100644 --- a/docs/html/classmain_1_1Zone.html +++ b/docs/html/classmain_1_1Zone.html @@ -117,8 +117,14 @@ Public Member Functions    new_MX (self, str name='@', int ttl=3600, int priority=10, str host='example.com')   + new_NS (self, str name='@', int ttl=3600, str target='example.com') +  + new_PTR (self, str name='@', int ttl=3600, str host='example.com') +   new_soa (self, str mname='ns1.example.com', str rname='admin.example.com', int serial=int(time.time()), int refresh=86400, int retry=7200, int expire=15552000, int ttl=21700)   + new_SRV (self, str name='@', int ttl=3600, str service='service', str protocol='proto', int priority=10, int weight=10, str target='example.com') +   new_record (self, str name='@', int ttl=3600, str rtype='A', str data='0.0.0.0')    add (self, Record record) @@ -297,6 +303,68 @@ Static Public Attributes
+
+ + +

◆ new_NS()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
main.Zone.new_NS ( self,
str name = '@',
int ttl = 3600,
str target = 'example.com' )
+
+ +
+
+ +

◆ new_PTR()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
main.Zone.new_PTR ( self,
str name = '@',
int ttl = 3600,
str host = 'example.com' )
+
+
@@ -384,6 +452,57 @@ Static Public Attributes
+
+ + +

◆ new_SRV()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
main.Zone.new_SRV ( self,
str name = '@',
int ttl = 3600,
str service = 'service',
str protocol = 'proto',
int priority = 10,
int weight = 10,
str target = 'example.com' )
+
+
diff --git a/docs/html/classmain_1_1Zone.js b/docs/html/classmain_1_1Zone.js index 7658929..18c3b7d 100644 --- a/docs/html/classmain_1_1Zone.js +++ b/docs/html/classmain_1_1Zone.js @@ -6,7 +6,10 @@ var classmain_1_1Zone = [ "new_AAAA", "classmain_1_1Zone.html#a4565629509df65dbbf6fc6ac61175efb", null ], [ "new_CNAME", "classmain_1_1Zone.html#a4b1adc5dce55fd19374b60bd7acd76a4", null ], [ "new_MX", "classmain_1_1Zone.html#addb69a78b5b55a50f5a9c66ac8554c64", null ], + [ "new_NS", "classmain_1_1Zone.html#a5c6c2c02843a4146b9c635be858433cd", null ], + [ "new_PTR", "classmain_1_1Zone.html#a2bd60dffb4462ba1a52869e7cba902ae", null ], [ "new_record", "classmain_1_1Zone.html#a4992ac1055e805e498589e0845e7961c", null ], [ "new_soa", "classmain_1_1Zone.html#abe4ab49a4368b32c96cf40f8bd1b7823", null ], + [ "new_SRV", "classmain_1_1Zone.html#a51f2b3e463023a0610cd169e455875d0", null ], [ "save_file", "classmain_1_1Zone.html#a10ef571aa905f9e97afa5419e67b1e4a", null ] ]; \ No newline at end of file diff --git a/docs/html/doxygen_crawl.html b/docs/html/doxygen_crawl.html index 0376944..eb99187 100644 --- a/docs/html/doxygen_crawl.html +++ b/docs/html/doxygen_crawl.html @@ -140,8 +140,8 @@ - + @@ -153,10 +153,13 @@ + + + diff --git a/docs/html/functions.html b/docs/html/functions.html index 7adcb84..6bccd71 100644 --- a/docs/html/functions.html +++ b/docs/html/functions.html @@ -101,7 +101,7 @@ $(function(){initNavTree('functions.html',''); initResizable(true); });

- _ -

@@ -138,8 +138,11 @@ $(function(){initNavTree('functions.html',''); initResizable(true); });
  • new_AAAA() : main.Zone
  • new_CNAME() : main.Zone
  • new_MX() : main.Zone
  • +
  • new_NS() : main.Zone
  • +
  • new_PTR() : main.Zone
  • new_record() : main.Zone
  • new_soa() : main.Zone
  • +
  • new_SRV() : main.Zone
  • diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html index aab742c..5afeb30 100644 --- a/docs/html/functions_func.html +++ b/docs/html/functions_func.html @@ -99,15 +99,18 @@ $(function(){initNavTree('functions_func.html',''); initResizable(true); });
    Here is a list of all functions with links to the classes they belong to:
    diff --git a/docs/html/navtreeindex0.js b/docs/html/navtreeindex0.js index 67d5cd2..4e55c5b 100644 --- a/docs/html/navtreeindex0.js +++ b/docs/html/navtreeindex0.js @@ -118,10 +118,10 @@ var NAVTREEINDEX0 = "classmain_1_1SOA.html#aed964af4b4bb1a4178c85e9da5127cae":[1,0,0,8,9], "classmain_1_1SRV.html":[0,0,0,9], "classmain_1_1SRV.html":[1,0,0,9], -"classmain_1_1SRV.html#a1659a48a0003dd4921a1a3e3edf59bb3":[0,0,0,9,0], -"classmain_1_1SRV.html#a1659a48a0003dd4921a1a3e3edf59bb3":[1,0,0,9,0], "classmain_1_1SRV.html#a3d380ee3e26b962cb3b89a93f9f6c81e":[0,0,0,9,2], "classmain_1_1SRV.html#a3d380ee3e26b962cb3b89a93f9f6c81e":[1,0,0,9,2], +"classmain_1_1SRV.html#a47b24a3972f3be3f3aff2a81022f6cc8":[0,0,0,9,0], +"classmain_1_1SRV.html#a47b24a3972f3be3f3aff2a81022f6cc8":[1,0,0,9,0], "classmain_1_1SRV.html#a51b58c5537d20b2d56d6123d5b372ff8":[0,0,0,9,8], "classmain_1_1SRV.html#a51b58c5537d20b2d56d6123d5b372ff8":[1,0,0,9,8], "classmain_1_1SRV.html#a55bc0c0d33341177926005e116276785":[0,0,0,9,4], @@ -142,18 +142,24 @@ var NAVTREEINDEX0 = "classmain_1_1SRV.html#acc3c60251ff2b995b3485c76bad378a3":[1,0,0,9,6], "classmain_1_1Zone.html":[0,0,0,10], "classmain_1_1Zone.html":[1,0,0,10], -"classmain_1_1Zone.html#a10ef571aa905f9e97afa5419e67b1e4a":[0,0,0,10,8], -"classmain_1_1Zone.html#a10ef571aa905f9e97afa5419e67b1e4a":[1,0,0,10,8], +"classmain_1_1Zone.html#a10ef571aa905f9e97afa5419e67b1e4a":[0,0,0,10,11], +"classmain_1_1Zone.html#a10ef571aa905f9e97afa5419e67b1e4a":[1,0,0,10,11], +"classmain_1_1Zone.html#a2bd60dffb4462ba1a52869e7cba902ae":[0,0,0,10,7], +"classmain_1_1Zone.html#a2bd60dffb4462ba1a52869e7cba902ae":[1,0,0,10,7], "classmain_1_1Zone.html#a4565629509df65dbbf6fc6ac61175efb":[0,0,0,10,3], "classmain_1_1Zone.html#a4565629509df65dbbf6fc6ac61175efb":[1,0,0,10,3], -"classmain_1_1Zone.html#a4992ac1055e805e498589e0845e7961c":[0,0,0,10,6], -"classmain_1_1Zone.html#a4992ac1055e805e498589e0845e7961c":[1,0,0,10,6], +"classmain_1_1Zone.html#a4992ac1055e805e498589e0845e7961c":[0,0,0,10,8], +"classmain_1_1Zone.html#a4992ac1055e805e498589e0845e7961c":[1,0,0,10,8], "classmain_1_1Zone.html#a4b1adc5dce55fd19374b60bd7acd76a4":[0,0,0,10,4], "classmain_1_1Zone.html#a4b1adc5dce55fd19374b60bd7acd76a4":[1,0,0,10,4], +"classmain_1_1Zone.html#a51f2b3e463023a0610cd169e455875d0":[0,0,0,10,10], +"classmain_1_1Zone.html#a51f2b3e463023a0610cd169e455875d0":[1,0,0,10,10], "classmain_1_1Zone.html#a55437b4d8db5d82758547fb3f4842e2f":[0,0,0,10,1], "classmain_1_1Zone.html#a55437b4d8db5d82758547fb3f4842e2f":[1,0,0,10,1], -"classmain_1_1Zone.html#abe4ab49a4368b32c96cf40f8bd1b7823":[0,0,0,10,7], -"classmain_1_1Zone.html#abe4ab49a4368b32c96cf40f8bd1b7823":[1,0,0,10,7], +"classmain_1_1Zone.html#a5c6c2c02843a4146b9c635be858433cd":[0,0,0,10,6], +"classmain_1_1Zone.html#a5c6c2c02843a4146b9c635be858433cd":[1,0,0,10,6], +"classmain_1_1Zone.html#abe4ab49a4368b32c96cf40f8bd1b7823":[0,0,0,10,9], +"classmain_1_1Zone.html#abe4ab49a4368b32c96cf40f8bd1b7823":[1,0,0,10,9], "classmain_1_1Zone.html#ac38b29dbb5fc97f5e6532e7b3a45332c":[0,0,0,10,0], "classmain_1_1Zone.html#ac38b29dbb5fc97f5e6532e7b3a45332c":[1,0,0,10,0], "classmain_1_1Zone.html#adba760f672d54a3df8c18bd5b7e5a858":[0,0,0,10,2], diff --git a/docs/html/search/all_0.js b/docs/html/search/all_0.js index 23c5950..686166c 100644 --- a/docs/html/search/all_0.js +++ b/docs/html/search/all_0.js @@ -1,6 +1,6 @@ var searchData= [ ['_5f_5finit_5f_5f_0',['__init__',['../classmain_1_1InvaliadDataException.html#ad6c810d43f2ae40f6a935a93c37b8ed5',1,'main.InvaliadDataException.__init__()'],['../classmain_1_1A.html#a939a4314d79561cb9122dd24a3b0465e',1,'main.A.__init__()'],['../classmain_1_1AAAA.html#ae48b91c83b53f6949bedf26af9afe14a',1,'main.AAAA.__init__()'],['../classmain_1_1CNAME.html#abc35469de414c93891510138a400e62d',1,'main.CNAME.__init__()'],['../classmain_1_1MX.html#a7f518af5dee9bfc1ba63171fcdcbc543',1,'main.MX.__init__()'],['../classmain_1_1NS.html#a59144d1b3ed7f78213ac027b5dfcea20',1,'main.NS.__init__()'],['../classmain_1_1PTR.html#ad5d2bb05a7cdde0a34dc10fdf18b631b',1,'main.PTR.__init__()'],['../classmain_1_1SOA.html#a740335ccaf962b80f55db1d9dae4701c',1,'main.SOA.__init__()']]], - ['_5f_5fint_5f_5f_1',['__int__',['../classmain_1_1Record.html#a2573e7eff095cd7088b78622bdc1da9f',1,'main.Record.__int__()'],['../classmain_1_1SRV.html#a1659a48a0003dd4921a1a3e3edf59bb3',1,'main.SRV.__int__()']]], + ['_5f_5fint_5f_5f_1',['__int__',['../classmain_1_1Record.html#a2573e7eff095cd7088b78622bdc1da9f',1,'main.Record.__int__()'],['../classmain_1_1SRV.html#a47b24a3972f3be3f3aff2a81022f6cc8',1,'main.SRV.__int__()']]], ['_5f_5fstr_5f_5f_2',['__str__',['../classmain_1_1Record.html#a0e60c4535076c6c4fb437fc97853098f',1,'main.Record.__str__()'],['../classmain_1_1Zone.html#ac38b29dbb5fc97f5e6532e7b3a45332c',1,'main.Zone.__str__()']]] ]; diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js index bec8b3c..364e307 100644 --- a/docs/html/search/all_8.js +++ b/docs/html/search/all_8.js @@ -5,7 +5,10 @@ var searchData= ['new_5faaaa_2',['new_AAAA',['../classmain_1_1Zone.html#a4565629509df65dbbf6fc6ac61175efb',1,'main::Zone']]], ['new_5fcname_3',['new_CNAME',['../classmain_1_1Zone.html#a4b1adc5dce55fd19374b60bd7acd76a4',1,'main::Zone']]], ['new_5fmx_4',['new_MX',['../classmain_1_1Zone.html#addb69a78b5b55a50f5a9c66ac8554c64',1,'main::Zone']]], - ['new_5frecord_5',['new_record',['../classmain_1_1Zone.html#a4992ac1055e805e498589e0845e7961c',1,'main::Zone']]], - ['new_5fsoa_6',['new_soa',['../classmain_1_1Zone.html#abe4ab49a4368b32c96cf40f8bd1b7823',1,'main::Zone']]], - ['ns_7',['NS',['../classmain_1_1NS.html',1,'main']]] + ['new_5fns_5',['new_NS',['../classmain_1_1Zone.html#a5c6c2c02843a4146b9c635be858433cd',1,'main::Zone']]], + ['new_5fptr_6',['new_PTR',['../classmain_1_1Zone.html#a2bd60dffb4462ba1a52869e7cba902ae',1,'main::Zone']]], + ['new_5frecord_7',['new_record',['../classmain_1_1Zone.html#a4992ac1055e805e498589e0845e7961c',1,'main::Zone']]], + ['new_5fsoa_8',['new_soa',['../classmain_1_1Zone.html#abe4ab49a4368b32c96cf40f8bd1b7823',1,'main::Zone']]], + ['new_5fsrv_9',['new_SRV',['../classmain_1_1Zone.html#a51f2b3e463023a0610cd169e455875d0',1,'main::Zone']]], + ['ns_10',['NS',['../classmain_1_1NS.html',1,'main']]] ]; diff --git a/docs/html/search/functions_0.js b/docs/html/search/functions_0.js index 23c5950..686166c 100644 --- a/docs/html/search/functions_0.js +++ b/docs/html/search/functions_0.js @@ -1,6 +1,6 @@ var searchData= [ ['_5f_5finit_5f_5f_0',['__init__',['../classmain_1_1InvaliadDataException.html#ad6c810d43f2ae40f6a935a93c37b8ed5',1,'main.InvaliadDataException.__init__()'],['../classmain_1_1A.html#a939a4314d79561cb9122dd24a3b0465e',1,'main.A.__init__()'],['../classmain_1_1AAAA.html#ae48b91c83b53f6949bedf26af9afe14a',1,'main.AAAA.__init__()'],['../classmain_1_1CNAME.html#abc35469de414c93891510138a400e62d',1,'main.CNAME.__init__()'],['../classmain_1_1MX.html#a7f518af5dee9bfc1ba63171fcdcbc543',1,'main.MX.__init__()'],['../classmain_1_1NS.html#a59144d1b3ed7f78213ac027b5dfcea20',1,'main.NS.__init__()'],['../classmain_1_1PTR.html#ad5d2bb05a7cdde0a34dc10fdf18b631b',1,'main.PTR.__init__()'],['../classmain_1_1SOA.html#a740335ccaf962b80f55db1d9dae4701c',1,'main.SOA.__init__()']]], - ['_5f_5fint_5f_5f_1',['__int__',['../classmain_1_1Record.html#a2573e7eff095cd7088b78622bdc1da9f',1,'main.Record.__int__()'],['../classmain_1_1SRV.html#a1659a48a0003dd4921a1a3e3edf59bb3',1,'main.SRV.__int__()']]], + ['_5f_5fint_5f_5f_1',['__int__',['../classmain_1_1Record.html#a2573e7eff095cd7088b78622bdc1da9f',1,'main.Record.__int__()'],['../classmain_1_1SRV.html#a47b24a3972f3be3f3aff2a81022f6cc8',1,'main.SRV.__int__()']]], ['_5f_5fstr_5f_5f_2',['__str__',['../classmain_1_1Record.html#a0e60c4535076c6c4fb437fc97853098f',1,'main.Record.__str__()'],['../classmain_1_1Zone.html#ac38b29dbb5fc97f5e6532e7b3a45332c',1,'main.Zone.__str__()']]] ]; diff --git a/docs/html/search/functions_2.js b/docs/html/search/functions_2.js index ec5a464..4ac6353 100644 --- a/docs/html/search/functions_2.js +++ b/docs/html/search/functions_2.js @@ -4,6 +4,9 @@ var searchData= ['new_5faaaa_1',['new_AAAA',['../classmain_1_1Zone.html#a4565629509df65dbbf6fc6ac61175efb',1,'main::Zone']]], ['new_5fcname_2',['new_CNAME',['../classmain_1_1Zone.html#a4b1adc5dce55fd19374b60bd7acd76a4',1,'main::Zone']]], ['new_5fmx_3',['new_MX',['../classmain_1_1Zone.html#addb69a78b5b55a50f5a9c66ac8554c64',1,'main::Zone']]], - ['new_5frecord_4',['new_record',['../classmain_1_1Zone.html#a4992ac1055e805e498589e0845e7961c',1,'main::Zone']]], - ['new_5fsoa_5',['new_soa',['../classmain_1_1Zone.html#abe4ab49a4368b32c96cf40f8bd1b7823',1,'main::Zone']]] + ['new_5fns_4',['new_NS',['../classmain_1_1Zone.html#a5c6c2c02843a4146b9c635be858433cd',1,'main::Zone']]], + ['new_5fptr_5',['new_PTR',['../classmain_1_1Zone.html#a2bd60dffb4462ba1a52869e7cba902ae',1,'main::Zone']]], + ['new_5frecord_6',['new_record',['../classmain_1_1Zone.html#a4992ac1055e805e498589e0845e7961c',1,'main::Zone']]], + ['new_5fsoa_7',['new_soa',['../classmain_1_1Zone.html#abe4ab49a4368b32c96cf40f8bd1b7823',1,'main::Zone']]], + ['new_5fsrv_8',['new_SRV',['../classmain_1_1Zone.html#a51f2b3e463023a0610cd169e455875d0',1,'main::Zone']]] ]; diff --git a/main.py b/main.py index f2af1bf..6a7b376 100644 --- a/main.py +++ b/main.py @@ -125,7 +125,7 @@ class SOA(Record): @dataclass class SRV(Record): def __int__(self, name: str = '@', ttl: str = 3600, service: str = "service", protocol: str = 'proto', - priority: int = 10, weight: int = 10, port: int = 0, target: str = target + priority: int = 10, weight: int = 10, port: int = 0, target: str = 'example.com' ): self.rtype = 'PTR' self.name = '_{service}._{protocol}.name' @@ -176,10 +176,23 @@ class Zone: name = self.__mkfqdn(name) self.add(MX(name=name, ttl=ttl, priority=priority, host=host)) + def new_NS(self, name: str = '@', ttl: int = 3600, target: str = 'example.com'): + name = self.__mkfqdn(name) + self.add(NS(name=name, ttl=ttl, target=target)) + + def new_PTR(self, name: str = '@', ttl: int = 3600, host: str = 'example.com'): + name = self.__mkfqdn(name) + self.add(PTR(name=name, ttl=ttl, host=host)) + def new_soa(self, mname: str = 'ns1.example.com', rname: str = 'admin.example.com', serial: int = int(time.time()), refresh: int = 86400, retry: int = 7200, expire: int = 15552000, ttl: int = 21700): mname = self.__mkfqdn(name) self.add(SOA(mname=mname, rname=rname, serial=serial, refresh=refresh, retry=retry, expire=expire, ttl=ttl)) + def new_SRV(self, name: str = '@', ttl: int = 3600, service: str = 'service', protocol: str = 'proto', priority: int = 10, weight: int = 10, target: str = 'example.com'): + name = self.__mkfqdn(name) + self.add(SRV(name=name, ttl=ttl, target=target)) + + def new_record(self, name: str = '@', ttl: int = 3600, rtype: str = 'A', data: str = '0.0.0.0'): name = self.__mkfqdn(name) self.add(name=name, ttl=ttl, rtype=rtype, data=data)