DNScode 0.1.9
Simplifying DNS configuration
Loading...
Searching...
No Matches
main.Zone Class Reference

Public Member Functions

 __str__ (self)
 
 new_A (self, str name='@', int ttl=3600, str data='0.0.0.0')
 
 new_AAAA (self, str name='@', int ttl=3600, str data='0.0.0.0')
 
 new_CNAME (self, str name='@', int ttl=3600, str data='0.0.0.0')
 
 new_MX (self, str name='@', int ttl=3600, int priority=10, 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_record (self, str name='@', int ttl=3600, str rtype='A', str data='0.0.0.0')
 
 add (self, Record record)
 
 save_file (self, str filepath)
 

Static Public Attributes

list records = field(default_factory=list)
 

Member Function Documentation

◆ __str__()

main.Zone.__str__ ( self)

◆ add()

main.Zone.add ( self,
Record record )

◆ new_A()

main.Zone.new_A ( self,
str name = '@',
int ttl = 3600,
str data = '0.0.0.0' )

◆ new_AAAA()

main.Zone.new_AAAA ( self,
str name = '@',
int ttl = 3600,
str data = '0.0.0.0' )

◆ new_CNAME()

main.Zone.new_CNAME ( self,
str name = '@',
int ttl = 3600,
str data = '0.0.0.0' )

◆ new_MX()

main.Zone.new_MX ( self,
str name = '@',
int ttl = 3600,
int priority = 10,
str host = 'example.com' )

◆ new_record()

main.Zone.new_record ( self,
str name = '@',
int ttl = 3600,
str rtype = 'A',
str data = '0.0.0.0' )

◆ new_soa()

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 )

◆ save_file()

main.Zone.save_file ( self,
str filepath )

Member Data Documentation

◆ records

list main.Zone.records = field(default_factory=list)
static

The documentation for this class was generated from the following file: