From 2050fff35267091eb05d3331e7e161d5aa7170a8 Mon Sep 17 00:00:00 2001 From: "minecraftchest1@outlook.com" Date: Wed, 19 Feb 2025 12:49:12 -0600 Subject: [PATCH] v1.6.0: Add port pramater to `Zone.new_SRV()`. --- .../classdnscode_1_1dnscode_1_1Zone-members.html | 2 +- docs/html/classdnscode_1_1dnscode_1_1Zone.html | 13 +++++++++---- docs/html/classdnscode_1_1dnscode_1_1Zone.js | 2 +- docs/html/doxygen_crawl.html | 2 +- docs/html/functions.html | 2 +- docs/html/functions_func.html | 2 +- docs/html/index.html | 4 ++-- docs/html/navtreeindex0.js | 4 ++-- docs/html/search/all_8.js | 2 +- docs/html/search/functions_2.js | 2 +- pyproject.toml | 2 +- src/dnscode/dnscode.py | 4 ++-- 12 files changed, 23 insertions(+), 18 deletions(-) diff --git a/docs/html/classdnscode_1_1dnscode_1_1Zone-members.html b/docs/html/classdnscode_1_1dnscode_1_1Zone-members.html index e2bfe41..2705505 100644 --- a/docs/html/classdnscode_1_1dnscode_1_1Zone-members.html +++ b/docs/html/classdnscode_1_1dnscode_1_1Zone-members.html @@ -116,7 +116,7 @@ $(function(){initNavTree('classdnscode_1_1dnscode_1_1Zone.html',''); initResizab new_PTR(self, str name='@', int ttl=3600, str host='example.com')dnscode.dnscode.Zone new_record(self, str name='@', int ttl=3600, str rtype='A', str data='0.0.0.0')dnscode.dnscode.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)dnscode.dnscode.Zone - new_SRV(self, str name='@', int ttl=3600, str service='service', str protocol='proto', int priority=10, int weight=10, str host='example.com')dnscode.dnscode.Zone + new_SRV(self, str name='@', int ttl=3600, str service='service', str protocol='proto', int priority=10, int weight=10, int port=443, str host='example.com')dnscode.dnscode.Zone new_TXT(self, str name='@', int ttl=3600, str text='example.com')dnscode.dnscode.Zone origindnscode.dnscode.Zonestatic recordsdnscode.dnscode.Zonestatic diff --git a/docs/html/classdnscode_1_1dnscode_1_1Zone.html b/docs/html/classdnscode_1_1dnscode_1_1Zone.html index d3c54a4..7153da8 100644 --- a/docs/html/classdnscode_1_1dnscode_1_1Zone.html +++ b/docs/html/classdnscode_1_1dnscode_1_1Zone.html @@ -128,8 +128,8 @@ Public Member Functions    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 host='example.com') -  + new_SRV (self, str name='@', int ttl=3600, str service='service', str protocol='proto', int priority=10, int weight=10, int port=443, str host='example.com') +   new_TXT (self, str name='@', int ttl=3600, str text='example.com')    new_record (self, str name='@', int ttl=3600, str rtype='A', str data='0.0.0.0') @@ -486,8 +486,8 @@ Static Public Attributes
Creates and adds a new SOA record to the zone.
- -

◆ new_SRV()

+ +

◆ new_SRV()

@@ -527,6 +527,11 @@ Static Public Attributes int weight = 10, + + + + int port = 443, + diff --git a/docs/html/classdnscode_1_1dnscode_1_1Zone.js b/docs/html/classdnscode_1_1dnscode_1_1Zone.js index fd3f207..52b9583 100644 --- a/docs/html/classdnscode_1_1dnscode_1_1Zone.js +++ b/docs/html/classdnscode_1_1dnscode_1_1Zone.js @@ -11,7 +11,7 @@ var classdnscode_1_1dnscode_1_1Zone = [ "new_PTR", "classdnscode_1_1dnscode_1_1Zone.html#a579ec534602081efd30fbcbc279bc625", null ], [ "new_record", "classdnscode_1_1dnscode_1_1Zone.html#a6ff7d4cb63c08a7d06fc47c341e3bba4", null ], [ "new_SOA", "classdnscode_1_1dnscode_1_1Zone.html#aabed9788e2e4be4c6b0628214492fdbe", null ], - [ "new_SRV", "classdnscode_1_1dnscode_1_1Zone.html#aef9ec626cabe184b565418644798e7d4", null ], + [ "new_SRV", "classdnscode_1_1dnscode_1_1Zone.html#a9b7c828acb3d62f8c677efb4a858ef97", null ], [ "new_TXT", "classdnscode_1_1dnscode_1_1Zone.html#a602dd6071a6c3d1017e155c7ca2512a2", null ], [ "save_file", "classdnscode_1_1dnscode_1_1Zone.html#adfe5442ed2137a324f1c5ba676ba2043", null ], [ "records", "classdnscode_1_1dnscode_1_1Zone.html#a1e958c8be9cf4cc7c0f30bd227e15c5a", null ] diff --git a/docs/html/doxygen_crawl.html b/docs/html/doxygen_crawl.html index 52b58f5..24b99a1 100644 --- a/docs/html/doxygen_crawl.html +++ b/docs/html/doxygen_crawl.html @@ -166,12 +166,12 @@ + - diff --git a/docs/html/functions.html b/docs/html/functions.html index b8b80d9..7d43f80 100644 --- a/docs/html/functions.html +++ b/docs/html/functions.html @@ -144,7 +144,7 @@ $(function(){initNavTree('functions.html',''); initResizable(true); });
  • new_PTR() : dnscode.dnscode.Zone
  • new_record() : dnscode.dnscode.Zone
  • new_SOA() : dnscode.dnscode.Zone
  • -
  • new_SRV() : dnscode.dnscode.Zone
  • +
  • new_SRV() : dnscode.dnscode.Zone
  • new_TXT() : dnscode.dnscode.Zone
  • diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html index eea2ab4..2e02e53 100644 --- a/docs/html/functions_func.html +++ b/docs/html/functions_func.html @@ -112,7 +112,7 @@ $(function(){initNavTree('functions_func.html',''); initResizable(true); });
  • new_PTR() : dnscode.dnscode.Zone
  • new_record() : dnscode.dnscode.Zone
  • new_SOA() : dnscode.dnscode.Zone
  • -
  • new_SRV() : dnscode.dnscode.Zone
  • +
  • new_SRV() : dnscode.dnscode.Zone
  • new_TXT() : dnscode.dnscode.Zone
  • save_file() : dnscode.dnscode.Zone
  • diff --git a/docs/html/index.html b/docs/html/index.html index 3a4d431..47126de 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -142,8 +142,8 @@ Usage
    zone.add(cname)
    zone.save_file('example.zone')
    -
    Definition dnscode.py:82
    -
    Definition dnscode.py:216
    +
    Definition dnscode.py:81
    +
    Definition dnscode.py:194
    diff --git a/docs/html/navtreeindex0.js b/docs/html/navtreeindex0.js index 9e8db74..74f4575 100644 --- a/docs/html/navtreeindex0.js +++ b/docs/html/navtreeindex0.js @@ -170,6 +170,8 @@ var NAVTREEINDEX0 = "classdnscode_1_1dnscode_1_1Zone.html#a602dd6071a6c3d1017e155c7ca2512a2":[5,0,0,0,11,12], "classdnscode_1_1dnscode_1_1Zone.html#a6ff7d4cb63c08a7d06fc47c341e3bba4":[4,0,0,0,11,9], "classdnscode_1_1dnscode_1_1Zone.html#a6ff7d4cb63c08a7d06fc47c341e3bba4":[5,0,0,0,11,9], +"classdnscode_1_1dnscode_1_1Zone.html#a9b7c828acb3d62f8c677efb4a858ef97":[4,0,0,0,11,11], +"classdnscode_1_1dnscode_1_1Zone.html#a9b7c828acb3d62f8c677efb4a858ef97":[5,0,0,0,11,11], "classdnscode_1_1dnscode_1_1Zone.html#aabed9788e2e4be4c6b0628214492fdbe":[4,0,0,0,11,10], "classdnscode_1_1dnscode_1_1Zone.html#aabed9788e2e4be4c6b0628214492fdbe":[5,0,0,0,11,10], "classdnscode_1_1dnscode_1_1Zone.html#ad696206776c2c68471126d950fa178d1":[4,0,0,0,11,0], @@ -178,8 +180,6 @@ var NAVTREEINDEX0 = "classdnscode_1_1dnscode_1_1Zone.html#adfe5442ed2137a324f1c5ba676ba2043":[5,0,0,0,11,13], "classdnscode_1_1dnscode_1_1Zone.html#ae0a178b817cb174866bb5bb33507cb98":[4,0,0,0,11,7], "classdnscode_1_1dnscode_1_1Zone.html#ae0a178b817cb174866bb5bb33507cb98":[5,0,0,0,11,7], -"classdnscode_1_1dnscode_1_1Zone.html#aef9ec626cabe184b565418644798e7d4":[4,0,0,0,11,11], -"classdnscode_1_1dnscode_1_1Zone.html#aef9ec626cabe184b565418644798e7d4":[5,0,0,0,11,11], "classdnscode_1_1dnscode_1_1Zone.html#af16862a7d8680f1eb6ab66a92105301f":[4,0,0,0,11,4], "classdnscode_1_1dnscode_1_1Zone.html#af16862a7d8680f1eb6ab66a92105301f":[5,0,0,0,11,4], "classes.html":[5,1], diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js index ebde8f1..e71e7e6 100644 --- a/docs/html/search/all_8.js +++ b/docs/html/search/all_8.js @@ -9,7 +9,7 @@ var searchData= ['new_5fptr_6',['new_PTR',['../classdnscode_1_1dnscode_1_1Zone.html#a579ec534602081efd30fbcbc279bc625',1,'dnscode::dnscode::Zone']]], ['new_5frecord_7',['new_record',['../classdnscode_1_1dnscode_1_1Zone.html#a6ff7d4cb63c08a7d06fc47c341e3bba4',1,'dnscode::dnscode::Zone']]], ['new_5fsoa_8',['new_SOA',['../classdnscode_1_1dnscode_1_1Zone.html#aabed9788e2e4be4c6b0628214492fdbe',1,'dnscode::dnscode::Zone']]], - ['new_5fsrv_9',['new_SRV',['../classdnscode_1_1dnscode_1_1Zone.html#aef9ec626cabe184b565418644798e7d4',1,'dnscode::dnscode::Zone']]], + ['new_5fsrv_9',['new_SRV',['../classdnscode_1_1dnscode_1_1Zone.html#a9b7c828acb3d62f8c677efb4a858ef97',1,'dnscode::dnscode::Zone']]], ['new_5ftxt_10',['new_TXT',['../classdnscode_1_1dnscode_1_1Zone.html#a602dd6071a6c3d1017e155c7ca2512a2',1,'dnscode::dnscode::Zone']]], ['ns_11',['NS',['../classdnscode_1_1dnscode_1_1NS.html',1,'dnscode::dnscode']]] ]; diff --git a/docs/html/search/functions_2.js b/docs/html/search/functions_2.js index fc273dd..71fa136 100644 --- a/docs/html/search/functions_2.js +++ b/docs/html/search/functions_2.js @@ -8,6 +8,6 @@ var searchData= ['new_5fptr_5',['new_PTR',['../classdnscode_1_1dnscode_1_1Zone.html#a579ec534602081efd30fbcbc279bc625',1,'dnscode::dnscode::Zone']]], ['new_5frecord_6',['new_record',['../classdnscode_1_1dnscode_1_1Zone.html#a6ff7d4cb63c08a7d06fc47c341e3bba4',1,'dnscode::dnscode::Zone']]], ['new_5fsoa_7',['new_SOA',['../classdnscode_1_1dnscode_1_1Zone.html#aabed9788e2e4be4c6b0628214492fdbe',1,'dnscode::dnscode::Zone']]], - ['new_5fsrv_8',['new_SRV',['../classdnscode_1_1dnscode_1_1Zone.html#aef9ec626cabe184b565418644798e7d4',1,'dnscode::dnscode::Zone']]], + ['new_5fsrv_8',['new_SRV',['../classdnscode_1_1dnscode_1_1Zone.html#a9b7c828acb3d62f8c677efb4a858ef97',1,'dnscode::dnscode::Zone']]], ['new_5ftxt_9',['new_TXT',['../classdnscode_1_1dnscode_1_1Zone.html#a602dd6071a6c3d1017e155c7ca2512a2',1,'dnscode::dnscode::Zone']]] ]; diff --git a/pyproject.toml b/pyproject.toml index 4f8e886..ec40458 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "dnscode" -version = "1.5.3" +version = "1.6.0" authors = [ { name="Minecraftchest1", email="me@minec1.us" }, ] diff --git a/src/dnscode/dnscode.py b/src/dnscode/dnscode.py index f2761c4..c73c0cf 100644 --- a/src/dnscode/dnscode.py +++ b/src/dnscode/dnscode.py @@ -255,11 +255,11 @@ class Zone: 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, host: str = 'example.com'): + priority: int = 10, weight: int = 10, port: int = 443, host: str = 'example.com'): """Creates and adds a new SRV record to the zone.""" name = self.__mkfqdn(name) self.add(SRV(name=name, ttl=ttl, service=service, protocol=protocol, - priority=priority, weight=weight, host=host)) + priority=priority, weight=weight, port=port, host=host)) def new_TXT(self, name: str = '@', ttl: int = 3600, text: str = 'example.com'): """Creates and adds a new CNAME record to the zone."""