Programming Information

Note

This document will be updated as the DMS protocol is implemented.

Dmsdmd Communications Protocol

The Python plug in protocol is WSGI, very similar to Fast CGI, and the wire communications is JSON RPC over http/https

The server to be tightly coded to a standard so it behaves reasonably. Clients won’t have to be so fussy, but should not request anything they are not coded to deal with! Comprehensive error processing by the client is encouraged.

The protocol will be JSON-RPC over HTTP 1.1+. This will enable the processing of multiple requests over the same TCP connection. TCP connections to the server will be cacheable, and can be held open up to a limit set on the server. Multiple POSTs over the connection are allowed, and multiple RPC requests can be submitted within a POST request, with the id: set to a UUID string generated as per RFC 4122.

JSON/RPC 2.0 specification will be used. JSON RFC 4627 will be used as the data format.

JSON-RPC over HTTP will be used to access the server, with the limitation being that HTTP POST shall be used, not GET with its encoded URL.... (blech!). Batch mode requests will also be implemented.

Authentication will be via HTTP Basic authentication, with the deployed implementation using HTTPS for integrity. Privileged access stratification will be achieved by accessing different Python WSGI scripts at different URLs. Initially 2 different levels of access will be provided:

  1. Customer for Reseller and ISP customer front ends,
  2. HelpDesk for normal administrative work on the DNS.

Comprehensive administrative functionality will be available via the zone-tool command line UI on the Master DNS server.

Error Information

Errors shall be python exceptions translated to JSON-RPC errors. The ‘data’ section will contain relevant exception attributes, along with an error message. There will different classes of error, dependent on the operation being performed.

Errors to do with Zone Instance submission will return RR Group and RRS index information into the ZI structure sent in the request.

Please not that zones outside the client role are treated as if they do not exist unless otherwise noted.

Please see DMS Errors for a full listing.

Editing Cycle

Please note that an edit cycle starts with the edit_zone call below, and is finished with an update_zone call. When edit locking is enabled for the zone (typically only hel pdesk, admin, and special customers) the tickle_editlock (keep a locked editing session live, called on receiving any data from web browser) and ‘cancel_edit_zone’ (to cancel edit session) calls should be used.

Incremental Updates

The update_rrs call is to be used for incremental updates. The update_type is a unique ID identifying the operation type, of which only one per zone can be queued at a time. Each update call eventually generates a new ZI incorporating the changes after the call returns. When the call is made, a forward-looking check is made with the current (or candidate) ZI to make sure the changes to be made are consistent.

This mechanism is only for the simple consistent changes required for adding/removing a Web site to a domain, adding/removing mail MX records for adding Web hosting or Mail to a domain.

Note

The error checking is forward looking and would probably fail to produce a published zone for complex change sets. It is NOT for making general editing changes such as these to the zone. Use the i:ref:Editing-Cycle above for user UI editing sessions, not this.

JSON RPC Calls

Errors are exceptions in dms.exceptions, as listed below

list_zone()

list_zone(names, [reference], [include_deleted], [toggle_deleted], [include_disabled])

names

array of wildcard-names

reference

customer ID or other ID meta data

include_deleted

boolean true/false whether to include deleted domains in listing

toggle_deleted

boolean true/false list only deleted domains

include_disabled

boolean true/false include disabled domains, defaults to true

To list domains. Many wild carded domains can be specified. Response will either be the list of domain names, or an empty list as domains cannot be found. Customer facing DMIs will be set up so that a ZoneSearchPatternError exception will be thrown if list_zone is called with no names, or names set to *, without reference being given.

.._rpccall_list_zi:

list_zi()

list_zi(name)

name

domain to list

List all zis for a domain. Returns just the base zone_sm object, and the list of zis all_zis. The published zi is the zi in the zone_sm object, and its full structure is returned, Each zi is accompanied by its ctime and mtime. The output is shown below in show_zone().

show_zone()

show_zone(name, [zi_id])

show_zone_text()

show_zone_text(name, [zi_id], [all_rrs])

name

domain to show.

zi_id

optional zone instance

all_rrs

optional NOT showing of Apex RRs. Only for show_zone_text

Like the previous operation, except that the full zi returned can be given.

show_zone_text() returns a zone file text blob, JSON encoded. Note that this means new line, tab, etc are encoded as ‘n’, ‘t’ not as a control characters.

Sample JSON dump of output of show_zone. Note that “sectags” sub-array only shows up in Admin DMS client RPC interface:

{    'all_zis': [          {
                        'ctime': 'Mon Mar 5 14:11:25 2012',
                        'mtime': 'Mon Mar 5 14:46:21 2012',
                        'ptime': 'Mon Mar 5 14:46:21 2012',
                        'zi_id': 45,
                        'zone_id': 32}],
    'alt_sg_name': null,
    'auto_dnssec': false,
    'ctime': 'Mon Mar 5 14:11:25 2012',
    'deleted_start': null,
    'edit_lock': false,
    'edit_lock_token': null,
    'inc_updates': false,
    'lock_state': 'EDIT_UNLOCK',
    'mtime': 'Mon Mar 5 14:11:25 2012',
    'name': 'anathoth.net.',
    'nsec3': false,
    'reference': 'net24',
    'sectags': [{'sectag_label': 'Admin'}],
    'soa_serial': 2012030500,
    'sg_name': 'net24-one',
    'state': 'PUBLISHED',
    'use_apex_ns': true,
    'zi': {   'ctime': 'Mon Mar 5 14:11:25 2012',
              'mtime': 'Mon Mar 5 14:46:21 2012',
              'ptime': 'Mon Mar 5 14:46:21 2012',
              'rr_groups': [    {    'comment': 'Apex resource records for anathoth.net.',
                                     'rrs': [   {   'class': 'IN',
                                                    'disable': false,
                                                    'label': '@',
                                                    'lock_ptr': false,
                                                    'rdata': 'ns2.anathoth.net.',
                                                    'reference': null,

                                           'rr_id': 5126,
                                           'ttl': null,
                                           'type': 'NS',
                                           'zi_id': 45},
                                       {   'class': 'IN',
                                           'disable': false,
                                           'label': '@',
                                           'lock_ptr': false,
                                           'rdata': 'ns1i.anathoth.net.',
                                            'reference': null,
                                            'rr_id': 5125,
                                            'ttl': null,
                                            'type': 'NS',
                                            'zi_id': 45},
                                        {   'class': 'IN',
                                            'disable': false,
                                            'label': '@',
                                            'lock_ptr': false,
                                            'rdata': 'ns1.anathoth.net. soa.net24.net.nz. 2012030500 7200 7200 604800 86400',
                                            'reference': null,
                                            'rr_id': 5124,
                                            'ttl': null,
                                            'type': 'SOA',
                                            'zi_id': 45}],
                             'tag': 'APEX_RRS'}],
       'soa_expire': '7d',
       'soa_minimum': '24h',
       'soa_mname': 'ns1.net24.net.nz.',
       'soa_refresh': '7200',
       'soa_retry': '7200',
       'soa_rname': 'soa.net24.net.nz.',
       'soa_serial': 2012030500,
       'soa_ttl': null,
       'zi_id': 45,
       'zone_id': 32,
       'zone_ttl': '24h'},
   'zi_candidate_id': 45,
   'zi_id': 45,
   'zone_id': 32,
   'zone_type': 'DynDNSZoneSM'}

create_zone()

create_zone(<name> <reference> <login_id> [zi_data] [sectags] [sg_name] [edit_lock] [auto_dnssec] [nesc3] [inc_updates] )

create_zone()[unpriveleged]

create_zone(<name> <reference> <login_id>)

copy_zone()

copy_zone(<src_name> <name> <reference> <login_id> [zi_id] [sectags] [sg_name] [edit_lock] [auto_dnssec] [nesc3] [inc_updates]

src_name

source domain to be copied

zi_id

source ZI to be copied

name

domain to be created

reference

reference for domain being created - can be missed, but domain will be owned by default_ref, ie RESELLER-NZ

login_id

DMI login ID. Email address, or numerical login_id

zi_data

optional zi_data (for feeding in a template)

sg_name

optional sg where zone is to be created Admin DMS only.

sectags

optional list of security tags for new zone. Admin DMS only. Same array/object format as listing above.

edit_lock

optional boolean for turning on edit_lock mode, default false

auto_dnssec

optional boolean for turning on automatic DNSSEC, default false

nsec3

optional boolean for enabling NSEC3 under DNSSEC, default false

inc_updates

optional boolean for enabling incremental updates for zone, default true for basic interface, false for help desk and admin interfaces.

Return

Returns true

Errors are returned if a zone already exists. Optional zi_data in the format above can be feed in for a template. Please note that Apex SOA and NS records will not be taken. Basic call used by default for reseller websites and ISP DNS front ends

enable_zone()

enable_zone(<name>)

name

domain to be enabled.

Returns

Returns true

Errors will be returned if the zone does not exist.

disable_zone()

disable_zone(<name>)

name

domain to be enabled.

Returns

Returns true

Errors will be returned if the zone does not exist.

delete_zone()

delete_zone(<name>)

name

domain to be enabled.

Returns

Returns true

Errors will be returned if the zone does not exist.

set_zone()

set_zone(<name> [edit_lock] [auto_dnssec] [nsec3] [inc_updates])

name

domain to be created

edit_lock

optional boolean for turning on edit_lock mode, default false

auto_dnssec

optional boolean for turning on automatic DNSSEC, default false

nsec3

optional boolean for enabling NSEC3 under DNSSEC, default false

inc_updates

optional boolean for enabling incremental updates for zone, default true for basic interface, false for help desk and admin interfaces.

Returns

Returns true

Errors are returned if a zone already exists.

undelete_zone()

undelete_zone(<zone_id>)

zone_id

Id of deleted zone to be undeleted

Returns

Returns true

Undelete a zone.. This can only be done to a deleted zone, and if there are no active zones with the same name.

destroy_zone()

destroy_zone(<zone_id>)

zone_id

Id of deleted zone to be destroyed

Returns

Returns true

Destroy a zone.. This can only be done to a deleted zone.

copy_zi()

copy_zi(<src_name>, <name>, [zi_id])

src_name

Source zone name

name

destination domain name

login_id

DMI login ID. Email address, or numerical login_id

zi_id

ZI ID to be copied, default published ZI of source zone.

Returns

Returns true

Copy a ZI from a source zone to another.

delete_zi()

delete_zi(<name> <zi_id>)

name

domain name

zi_id

ZI ID

Delete a zi. This can only be done for a ZI that is not currently in use.

edit_zone()

edit_zone(<name> <login_id> [zi_id])

name

domain to be edited.

zi_id

optional zone-instance number or Null

Returns

Returns: list (zone_zi_data, edit_lock_token).

Can be: [zi_data, edit_lock_token] if edit_lock obtained.

[zi_data, Null] if zone does not have edit locking enabled.

Errors are returned if the zone does not exist, zi_id is invalid, an edit_lock is not able to be obtained.

Returns a zone structure, with a list of all zis in database for domain, accompanied by the zi’s date. This structure is the one show above for show_zone().

The zi structure contains all the SOA data. Depending on the value of use_apex_ns, for True the Apex NS records are supplied, and the secondary DNS server parameters of the SOA record are set-able. Otherwise, the Apex NS records are not supplied as they are the global DNS secondary server settings, and the only editable SOA fields (always editable) are soa_minimum, soa_ttl, and zone_ttl. Dmsdmd always generates the SOA record for a zone from the values in the zi structure, and automatically calculates the zone SOA serial number based on the algorithm used in the RFCs(RFC 2316 Sec 3.4.2.2, RFC 1982 Section 3) and conventional serial number guidelines based on the date, if it is possible.

The zi_id parameter defaults to the published ZI, and another ZI can be given. The edit lock is an optional feature zone state machine that can be enabled from zone-tool for domains the are often edited, to prevent unpredictable updates to published zones (Ie 2 people editing server.isp.net simultaneously, and then one having his changes wiped out by the later publish action). The edit lock is covered by an inactivity timeout which is reset by the tickle_editlock() method.

tickle_editlock()

tickle_editlock(<name>, <edit_lock_token>)

name

domain being edited

edit_lock_token

edit lock token to be tickled

Notification of UI activity to reset edit lock time out.

cancel_edit_zone()

cancel_edit_zone(<name>, <edit_lock_token>)

name

domain being edited

edit_lock_token

edit lock token to be canceled

Cancels a locked zone editing session.

update_zone()

update_zone(<name>, <zi_data>, <login_id>, [edit_lock_token])

name

domain to be updated

zi_data

new zi structure to be published.

login_id

DMI login_id. Email format, or numerical string.

edit_lock_token

Must be supplied to finish an edit locked session.

Saves zi_data to database for a zone. Queues a ZoneSMEditUpdate (edit_locked zone event) or ZoneSMUpdate event to publish domain with new zi.

show_sectags()

show_sectags()

List all possible security tags. This command is only available with Admin level DMS client privilege. Sectags are created and deleted from the one_tool command line. Each WSGI back end has its privilege assigned by configuring it with a given security tag.

show_zone_sectags()

show_zone_sectags(<name>)

name

domain to be queried.

List the security attached to the given zone. This command is only available with Admin level DMS client privilege.

add_zone_sectag()

add_zone_sectag(<name>, <sectag>)

name

domain

sectag

sectag to be added

Returns

Returns true

Adds a sectag to a zone. Admin Level DMS client privilege only.

delete_zone_sectag()

delete_zone_sectag(<name>, <sectag>):

name

domain

sectag

sectag to be deleted

Returns

Returns true

Deletes a sectag from a zone. Admin Level DMS client privilege only.

replace_zone_sectags()

replace_zone_sectags(<name>, <sectags>)

name

domain to be operated on

sectags

list of sectags as per above format in listing.

Completely replaces the zones current sectags with the ones specified in the list. This command is only available with Admin level DMS client privilege.

Thus you can use show_sectags() to get all possible sectags, show_zone_sectags() to fill out check boxes in a dialogue/list, and then call replace_zone_sectags() with all checked values when user clicks <OK>/submits in Web UI.

sign_zone()

sign_zone(<name>)

name

domain to be operated on.

Returns

Returns true

Resign a DNSSEC zone.

load_keys()

load_keys(<name>)

name

domain to be operated on.

Returns

Returns true

Load the DNSSEC keys for a zone.

refresh_zone()

refresh_zone(<name>)

name

domain to be refreshed.

Returns

Returns true

Refresh/update the contents of a zone from the DB into the DNS. Issues a publish event to zone.

reset_zone()

reset_zone(<name>)

name

domain to be reset

Returns

Returns true

Resets the zone state machine. Useful for when dmsdmd has an internal error, or when named is mis-configured for write access.

refresh_zone_ttl()

refresh_zone_ttl(<name> [zone_ttl])

name

domain name of zone

zone_ttl

named TTL string

Returns

Returns true

Refresh a zones TTL, using the global default for zone creation if none given.

show_configsm()

show_configsm()

Returns

Returns true

Show the current status of the master named configuration state machine. Useful as it show when the next rndc config can happen.

create_reference()

create_reference(<reference>)

reference

entity reference string

Returns

Returns true

Creates an entity reference string in the DMS for use with a set of zones.

delete_reference()

delete_reference(<reference>)

reference

entity reference string

Returns

Returns true

Deletes an unused entity reference string from the DMS when there are no more zones against it.

rename_reference()

rename_reference(<reference> <dst_reference>)

reference

original entity reference string

dst_reference

new entity reference string

Returns

Returns true

Rename a reference in the DMS. This should check with the user first to see if they really want to do this. I can see someone like Mike wanting to use this from DMI if the ID in the DMS zone database is wrong, if it is an account ID.

list_reference()

list_reference([reference-wildcard], [<reference-wildcard], ...)

reference-wildcard

reference wildcard string.

Returns

Returns list of references in JSON.

Lists references. Help desk and admin level functionality.

set_zone_reference()

set_zone_reference(<name>, <reference>)

name

domain to be operated on

reference

reference to be set on domain

Returns

Returns true

Change the reference on a domain. Again Admin level only functionality.

rr_query_db()

rr_query_db(<label> [name] [type] [rdata] [zi_id] [show_all])

label

host name or other DNS label

name

domain to be queried

type

RR type

rdata

RR rdata string

zi_id

ZI ID

show_all

boolean rue/false, show all records, including disabled ones.

Query the DB ala the OS libc/libresolv hostname() call. This uses a cross zone DB query looking for any records. This is Admin level only functionality.

update_rrs()

update_rrs(<name> <update_data> <update_type> <login_id>)

name

domain being updated

update_data

update data for zone

update_type

client update type

login_id

Email format, or numerical string.

Do incremental updates on a zone. The update data is the same ZI data format as in create_zone()

Example update file from equiv zone_tool update_rrs command:

$ORIGIN       foo.bar.org.
          $UPDATE_TYPE SpannerReplacement_ShouldBeUUIDperClientOpType

          ;!RROP:DELETE
          ns5                   IN    ANY        ""    ; All records for ns5
          ;!RROP:DELETE
          ns7                   IN    A          ""    ; All A records for ns2
          ;!RROP:DELETE
          ns67                  IN    A          192.168.2.3 ; Specific record

          ;!RROP:ADD
          ns99                  IN    TXT        "Does not know Maxwell Smart"
          ;!RROP:ADD
          ns99                  IN    AAAA            2002:fac::1

          ;!RROP:UPDATE_RRTYPE
          ns99            IN AAAA                ::1

The ZI data RRs are augmented with the update_op property, which takes the RROP text values of ADD, DELETE, and UPDATE_RRTYPE. As seen above the DELETE update_op can use RR type ANY, and blank rdata as wildcards. UPDATE_RRTYPE replaces all records of that type for the DNS zone node concerned.

The update_type property is used to make sure that only one update_type is queued per zone for execution. Each update is a unique transaction for the zone concerned.

Note that their are separate privilege levels for the Admin, help desk, and ordinary customer front ends, and these can affect the auto reverse parameters that can be used in the call, exactly the same as for update_zone()/create_zone() above.

Example of the JSON params object feed to the update_rrs() call:

{    'name': 'foo.bar.org.',
     'update_data': {   'rr_groups': [  { 'rrs': [
                                          { 'class': 'IN',
                                            'disable':  false,
                                            'force_reverse': false,
                                            'label': 'ns5.foo.bar.org.',
                                            'lock_ptr': false,
                                            'rdata': null,
                                            'reference': null,
                                            'type': 'ANY',
                                            'update_op': 'DELETE'},
                                          { 'class': 'IN',
                                            'disable': false,
                                            'force_reverse': false,
                                            'label': 'ns7.foo.bar.org.',
                                            'lock_ptr': false,
                                            'rdata': null,
                                            'reference': null,
                                            'type': 'A',
                                            'update_op': 'DELETE'},
                                          { 'class': 'IN',
                                            'disable': false,
                                            'force_reverse': false,
                                            'label': 'ns67.foo.bar.org.',
                                            'lock_ptr': false,
                                            'rdata': '192.168.2.3',
                                            'reference': null,
                                            'type': 'A',
                                            'update_op': 'DELETE'}]},
                                       {  'rrs': [
                                          { 'class': 'IN',
                                            'disable': false,
                                            'force_reverse': false,
                                            'label': 'ns99.foo.bar.org.',
                                            'lock_ptr': false,
                                            'rdata': '"Does not know Maxwell Smart"',
                                            'reference': null,
                                            'type': 'TXT',
                                            'update_op': 'ADD'},
                                          { 'class': 'IN',
                                            'disable': false,
                                            'force_reverse': false,
                                            'label': 'ns99.foo.bar.org.',
                                            'lock_ptr': false,
                                            'rdata': '2002:fac::1',
                                            'reference': null,
                                            'type': 'AAAA',
                                            'update_op': 'ADD'}]},
                                        { 'rrs': [
                                          { 'class': 'IN',
                                            'disable': false,
                                            'force_reverse': false,
                                            'label': 'ns99.foo.bar.org.',
                                            'lock_ptr': false,
                                            'rdata': '::1',
                                            'reference': null,
                                            'type': 'AAAA',
                                            'update_op': 'UPDATE_RRTYPE'}
                                            ]}
                                       ]},
     'update_type': 'SpannerReplacement_ShouldBeUUIDperClientOpType'}

set_zone_sg()

set_zone_sg(<name>, <sg_name>)

name

domain to be operated on.

sg_name

sg the zone is being moved to.

Returns

Returns true

Set the SG a zone is served on. Note that this call at present can only be used on disabled zones. Admin level only call.

set_zone_alt_sg()

set_zone_alt_sg(<name>, <sg_name>)

name

domain to be operated on.

sg_name

Alternate sg the zone is being served on.

Returns

Returns true

Set an additional SG a zone will be served on. Note that this call at present can only be used on disabled zones. Note that the SG concerned has to be refreshed. Admin level only call.

list_sg()

list_sg()

Returns

Returns list of SGs in JSON format

List all SGs that are existent on the master DNS server. Admin level only call, for populating menu drop boxes when creating zones etc.

DMS Errors

Exceptions module for the DMS

exception dms.exceptions.ActiveZoneExists(name, event_message, event_results)[source]

Bases: dms.exceptions.ZoneSmFailure

Another zone instance is active - this one cannot be activated.

  • JSONRPC Error: -69

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘event_message’ - event message
    • ‘event_results’ - event results object
exception dms.exceptions.AdminPrivilegeNeeded(domain, rr_data, field_name, msg=None)[source]

Bases: dms.exceptions.PrivilegeNeeded

Administrative privilege is needed to set this RR field

  • JSONRPC Error: -26

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.BadInitialZoneName(file_name, value, exc_msg=None)[source]

Bases: dms.exceptions.DMSError

Name of the Zone can not be determined.

  • JSONRPC Error: -55

  • JSONRPC data keys:
    • ‘file_name’ - file name being loaded.
exception dms.exceptions.BadNameOwnerError(domain, rr_data)[source]

Bases: dms.exceptions.ZoneParseError

Owner name of an A AAAA or MX record is not a valid hostname

  • JSONRPC Error: -13

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
    • ‘label_thing’ - thing given as RR label
exception dms.exceptions.BadNameRdataError(domain, rr_data, bad_name)[source]

Bases: dms.exceptions.ZoneParseError

Name in the rdata of a record is not a valid hostname

  • JSONRPC Error: -14

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
    • ‘rdata_thing’ - bad RDATA of RR
    • ‘bad_name’ - bad hostname in RDATA
exception dms.exceptions.BinaryFileError(file_name)[source]

Bases: dms.exceptions.DMSError

Trying to load a binary file.

  • JSONRPC Error: -39

  • JSONRPC data keys:
    • ‘file_name’ - file name
exception dms.exceptions.CancelEditLockFailure(name, event_message, event_results)[source]

Bases: dms.exceptions.ZoneSmFailure

For a DMI, can’t clear edit_lock for zone.

  • JSONRPC Error: -33

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘event_message’ - Cancel Event Message
    • ‘event_results’ - Event results object
exception dms.exceptions.CantFailEventById(event_id)[source]

Bases: dms.exceptions.DMSError

For an event_id, can’t fail the event because it is processed or already failed.

  • JSONRPC Error: -130

  • JSONRPC data keys:
    • ‘event_id’ - event_id being failed
exception dms.exceptions.ConfigBatchHoldFailed[source]

Bases: dms.exceptions.DMSError

Configuration SM Failed to enter CONFIG_HOLD for batch zone creation

  • JSONRPC Error: -56
exception dms.exceptions.DBReadOnlyError(exc_msg)[source]

Bases: dms.exceptions.DMSError

Database is in Read Only mode.

  • JSONRPC Error: - 122

  • JSONRPC data keys:
    • ‘exc_msg’ - original exception message
exception dms.exceptions.DMSError(*args)[source]

Bases: magcode.core.wsgi.jsonrpc_server.BaseJsonRpcError

Base DMS Error Exception

  • JSONRPC Error: JSONRPC_INTERNAL_ERROR
exception dms.exceptions.DmsdmdStillRunning(dmsdmd_pid)[source]

Bases: dms.exceptions.RestoreNamedDbError

Dmsdmd is still running

  • JSONRPC Error: -109

  • JSONRPC data keys:
    • dmsdmd_pid - dmsdmd PID
exception dms.exceptions.DuplicateRecordInZone(domain, rr_data)[source]

Bases: dms.exceptions.ZoneError

Zone already has a record for this.

  • JSONRPC Error: -20

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.DynDNSCantReadKeyError(file_, key_name)[source]

Bases: dms.exceptions.DynDNSUpdateError

Can’t read in configured TSIG for Dynamic DNS update

  • JSONRPC Error: -5

  • JSONRPC data keys:
    • ‘name’ - None
exception dms.exceptions.DynDNSUpdateError(domain, *args)[source]

Bases: dms.exceptions.UpdateError

Error during update of zone

  • JSONRPC Error: -4

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.EditLockFailure(name, event_message, event_results)[source]

Bases: dms.exceptions.ZoneSmFailure

For a DMI, can’t obtain an edit_lock for zone.

  • JSONRPC Error: -34

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘event_message’ - Lock Event Message
    • ‘event_results’ - Event results object
exception dms.exceptions.EventNotFoundById(event_id)[source]

Bases: dms.exceptions.DMSError

For an event_id, an event is not found

  • JSONRPC Error: -129

  • JSONRPC data keys:
    • ‘event_id’ - event_id being searched for
exception dms.exceptions.GenerateNotSupported(domain, rr_data)[source]

Bases: dms.exceptions.ZoneParseError

Our zone parser does not support the $GENERATE statement

  • JSONRPC Error: -54

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.HelpdeskPrivilegeNeeded(domain, rr_data, field_name, msg=None)[source]

Bases: dms.exceptions.PrivilegeNeeded

Help desk privilege is needed to set this RR field

  • JSONRPC Error: -27

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.HostnameParseError(domain, rr_data, value, info=None)[source]

Bases: dms.exceptions.DirectiveParseError

Hostname parse error while parsing zone file.

  • JSONRPC Error: -51

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.HostnameZiParseError(name, zi_field, value, exc_msg=None)[source]

Bases: dms.exceptions.ZiParseError

Zi related SOA mname or rname value error.

  • JSONRPC Error: -48

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘zi_field’ - ZI field where error found
    • ‘value’ - value in error
exception dms.exceptions.IncludeNotSupported(domain, rr_data)[source]

Bases: dms.exceptions.ZoneParseError

Our zone parser does not support the $INCLUDE statement

  • JSONRPC Error: -50

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.IncrementalUpdateNotInTrialRun(name)[source]

Bases: dms.exceptions.DMSError

Error in Incremental Update mechanism. Update mechanism not in Trial Run Mode.

  • JSONRPC Error: JSON_RPC_INTERNAL_ERROR

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.IncrementalUpdatesDisabled(name)[source]

Bases: dms.exceptions.DMSError

Incremental Updates are disabled for this zone.

  • JSONRPC Error: -90

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.InvalidDomainName(name)[source]

Bases: dms.exceptions.DMSError

Domain name is invalid.

  • JSONRPC Error: -89

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.InvalidHmacType(hmac_type)[source]

Bases: dms.exceptions.DMSError

Invalid Hmac type given

  • JSONRPC Error: -96

  • JSONRPC data keys:
    • ‘hmac_type’ - Given hmac type
exception dms.exceptions.InvalidUpdateOperation(domain, rr_data)[source]

Bases: dms.exceptions.ZoneParseError

RR type is one we don’t handle.

  • JSONRPC Error: -83

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.LabelNotInDomain(domain, rr_data)[source]

Bases: dms.exceptions.ZoneParseError

FQDN Label outside of domain

  • JSONRPC Error: -12

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
    • ‘label_thing’ - thing given as RR label
exception dms.exceptions.LoginIdError(*args)[source]

Bases: dms.exceptions.DMSError

DMS Error class to cover login_id exceptions

exception dms.exceptions.LoginIdFormatError(login_id, error)[source]

Bases: dms.exceptions.LoginIdError

A login_id can only consist of the characters ‘-_a-zA-Z0-9.@’, and must start with a letter or numeral. It also must be less than 512 characters long.

  • JSONRPC Error: -124

  • JSONRPC data keys:
    • ‘login_id’ - login_id
    • ‘error’ - error message
exception dms.exceptions.LoginIdInvalidError(error)[source]

Bases: dms.exceptions.LoginIdError

A login_id must be given, and be less than 512 characters long.

  • JSONRPC Error: -125

  • JSONRPC data keys:
    • ‘error’ - error message
exception dms.exceptions.MultipleReferencesFound(reference)[source]

Bases: dms.exceptions.DMSError

Multiple references were found

  • JSONRPC Error: -68

  • JSONRPC data keys:
    • ‘reference’ - reference code
exception dms.exceptions.NamedConfWriteError(internal_error)[source]

Bases: dms.exceptions.RestoreNamedDbError

Can’t write named.conf sections

  • JSONRPC Error: -113

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘internal_error’ - error that occured
exception dms.exceptions.NamedStillRunning(rndc_status_exit_code)[source]

Bases: dms.exceptions.RestoreNamedDbError

Named is still running

  • JSONRPC Error: -108

  • JSONRPC data keys:
    • ‘rndc_status_exit_code’ - exit code from ‘rndc status’
exception dms.exceptions.NoPreviousLabelParseError(domain)[source]

Bases: dms.exceptions.DMSError

No Previous Label seen. - This should not be reached in code

  • JSONRPC Error: -7

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.NoReferenceFound(reference)[source]

Bases: dms.exceptions.DMSError

No Reference found.

  • JSONRPC Error: -67

  • JSONRPC data keys:
    • ‘reference’ - reference code
exception dms.exceptions.NoReplicaSgFound[source]

Bases: dms.exceptions.DMSError

For a DMI, Master SG not found

  • JSONRPC Error: -128
exception dms.exceptions.NoSecTagsExist[source]

Bases: dms.exceptions.DMSError

No zone security tags found for this domain.

  • JSONRPC Error: -45
exception dms.exceptions.NoServerFound(server_name)[source]

Bases: dms.exceptions.ServerError

Server does not exist

  • JSONRPC Error: -75

  • JSONRPC data keys:
    • ‘server_name’ - server name
exception dms.exceptions.NoServerFoundByAddress(address)[source]

Bases: dms.exceptions.ServerError

Server does not exist

  • JSONRPC Error: -76

  • JSONRPC data keys:
    • ‘address’ - server address
exception dms.exceptions.NoSgFound(sg_name)[source]

Bases: dms.exceptions.DMSError

For a DMI, requested SG not found

  • JSONRPC Error: -59

  • JSONRPC data keys:
    • ‘sg_name’ - SG name
exception dms.exceptions.NoSuchZoneOnServerError(domain, server, port)[source]

Bases: dms.exceptions.UpdateError

No zone found in DNS server

  • JSONRPC Error: -6

  • JSONRPC data keys:
    • ‘name’ - zone name
    • ‘server’ - server hostname/address
    • ‘port’ - server port

This exception only occurs internally in dmsdmd, and dyndns_tool. It is not returned at all over HTTP JSON RPC.

exception dms.exceptions.NoZoneSecTagsFound(name)[source]

Bases: dms.exceptions.DMSError

No zone security tags found for this domain.

  • JSONRPC Error: -44

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.NoZonesFound(name_pattern)[source]

Bases: dms.exceptions.DMSError

For a DMI, can’t find the requested zones.

  • JSONRPC Error: -32

  • JSONRPC data keys:
    • ‘name_pattern’ - wildcard name pattern
exception dms.exceptions.Not7ValuesSOAParseError(domain, rr_data)[source]

Bases: dms.exceptions.ZoneParseError

7 fields were not supplied as required by RFC 1035

  • JSONRPC Error: -10

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
    • ‘num_soa_rdata_values’ - number of SOA fields given
exception dms.exceptions.OnlyOneLoneWildcardValid(search_pattern)[source]

Bases: dms.exceptions.ZoneSearchPatternError

Only one lone ‘*’ or ‘%’ for zone search pattern is valid

  • JSONRPC Error: -98

  • JSONRPC data keys:
    • ‘search_pattern’ - Zone search pattern
exception dms.exceptions.PidFileAccessError(pid_file, os_error)[source]

Bases: dms.exceptions.RestoreNamedDbError

PID file format error

  • JSONRPC Error: -111

  • JSONRPC data keys:
    • ‘pid_file’ - PID file name
    • ‘exception’ - Value Error Exception
exception dms.exceptions.PidFileValueError(pid_file, exception)[source]

Bases: dms.exceptions.RestoreNamedDbError

PID file format error

  • JSONRPC Error: -110

  • JSONRPC data keys:
    • ‘pid_file’ - PID file name
    • ‘exception’ - Value Error Exception
exception dms.exceptions.PrivilegeNeeded(domain, rr_data, msg=None, use_pyparsing=True, rewind_loc=False, beginning_loc=False)[source]

Bases: dms.exceptions.ZoneParseError

Privilege is needed to set this RR field

  • JSONRPC Error: JSONRPC_INTERNAL_ERROR

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.RRNoTypeGiven(domain, rr_data)[source]

Bases: dms.exceptions.ZoneParseError

RR has no type given.

  • JSONRPC Error: -97

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.RdataParseError(domain, rr_data, msg=None)[source]

Bases: dms.exceptions.ZoneParseError

Somewhere in the rdata processing (probably within dnspython) sense could not be made of the data

  • JSONRPC Error: -24

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
    • ‘rdata_thing’ - given invalid RDATA
exception dms.exceptions.ReferenceDoesNotExist(reference)[source]

Bases: dms.exceptions.DMSError

Reference does not exist.

  • JSONRPC Error: -65

  • JSONRPC data keys:
    • ‘reference’ - reference code
exception dms.exceptions.ReferenceExists(reference)[source]

Bases: dms.exceptions.DMSError

Trying to create a reference that already exists.

  • JSONRPC Error: -64

  • JSONRPC data keys:
    • ‘reference’ - reference code
exception dms.exceptions.ReferenceFormatError(reference, error)[source]

Bases: dms.exceptions.DMSError

A reference can only consist of the characters ‘-_a-zA-Z0-9.@’, and must start with a letter or numeral. It also must be less than 1024 characters long.

  • JSONRPC Error: -82

  • JSONRPC data keys:
    • ‘reference’ - reference name
    • ‘error’ - error message
exception dms.exceptions.ReferenceMustBeGiven(search_pattern)[source]

Bases: dms.exceptions.ZoneSearchPatternError

When giving a zone search pattern, a reference must be given

  • JSONRPC Error: -99

  • JSONRPC data keys:
    • ‘search_pattern’ - Zone search pattern
exception dms.exceptions.ReferenceStillUsed(reference)[source]

Bases: dms.exceptions.DMSError

Reference is still in use

  • JSONRPC Error: -66

  • JSONRPC data keys:
    • ‘reference’ - reference code
exception dms.exceptions.ReplicaSgExists(sg_name, replica_sg_name)[source]

Bases: dms.exceptions.DMSError

A master SG already exists

  • JSONRPC Error: -114

  • JSONRPC data keys:
    • ‘sg_name’ - SG name
    • ‘replica_sg_name’ - master SG name
exception dms.exceptions.RestoreNamedDbError(*args)[source]

Bases: dms.exceptions.DMSError

Subclass for Errors relating to restore_named_db DR functionality

exception dms.exceptions.ReverseNamesNotAccepted(name)[source]

Bases: dms.exceptions.InvalidDomainName

Reverse domain names are generated from CIDR network names.

  • JSONRPC Error: -91

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.RrQueryDomainError(name)[source]

Bases: dms.exceptions.DMSError

For query an RR, domain cannot start with ‘.’

  • JSONRPC Error: -81

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.RropNotSupported(domain, rr_data)[source]

Bases: dms.exceptions.ZoneParseError

Our zone parser does not support the RROP: RR flag in edit mode

  • JSONRPC Error: -85

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.SOASerialArithmeticError(domain)[source]

Bases: dms.exceptions.SOASerialError

SOA Serial Arithmetic Error. Possibly due to memory corruption

  • JSONRPC Error: -3

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.SOASerialCandidateIgnored(domain)[source]

Bases: dms.exceptions.SOASerialError

Proposed SOA Serial Candidate ignored.

  • JSONRPC Error: -118

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.SOASerialError(*args)[source]

Bases: dms.exceptions.DMSError

Ancestor for all SOA Serial arithmetic errors

exception dms.exceptions.SOASerialMustBeInteger(domain, rr_data)[source]

Bases: dms.exceptions.ZoneParseError

SOA serial number must be an integer value.

  • JSONRPC Error: -11

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
    • ‘soa_serial_thing’ - thing given as SOA serial no.
exception dms.exceptions.SOASerialOcclusionError(domain)[source]

Bases: dms.exceptions.SOASerialError

SOA Serial Occlusion Error. SOA serial as recorded in database is maximum of current SOA serial value in master DNS server.

  • JSONRPC Error: -115
exception dms.exceptions.SOASerialPublishedError(domain)[source]

Bases: dms.exceptions.SOASerialError

SOA Serial Published Error. SOA serial number update is the same as published value in database.

  • JSONRPC Error: -116
exception dms.exceptions.SOASerialRangeError(domain)[source]

Bases: dms.exceptions.SOASerialError

SOA Serial Number is out of range must be > 0 and <= 2**32 -1.

  • JSONRPC Error: -120

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.SOASerialTypeError(domain)[source]

Bases: dms.exceptions.SOASerialError

SOA Serial Number must be an integer.

  • JSONRPC Error: -121
  • JSONRPC data keys: ‘name’ - domain name
exception dms.exceptions.SecTagPermissionDenied(sectag_label)[source]

Bases: dms.exceptions.DMSError

Operations on security tags can only be done with Admin privilege

  • JSONRPC Error: -46

  • JSONRPC data keys:
    • ‘sectag_label’ - security tag label
exception dms.exceptions.ServerAddressExists(address)[source]

Bases: dms.exceptions.ServerError

Server with the given address exists

  • JSONRPC Error: -77

  • JSONRPC data keys:
    • ‘address’ - server address
exception dms.exceptions.ServerError(*args)[source]

Bases: dms.exceptions.DMSError

Ancestor class for server functions, saves code.

exception dms.exceptions.ServerExists(server_name)[source]

Bases: dms.exceptions.ServerError

Server already exists

  • JSONRPC Error: -74

  • JSONRPC data keys:
    • ‘server_name’ - server name
exception dms.exceptions.ServerNotDisabled(server_name)[source]

Bases: dms.exceptions.ServerError

Server must be disabled for operation to proeceed.

  • JSONRPC Error: -78

  • JSONRPC data keys:
    • ‘server_name’ - server name
exception dms.exceptions.ServerSmFailure(server_name, event_message, event_results)[source]

Bases: dms.exceptions.DMSError

Server SM Failure - synchronous execution of the Server SM was not successful.

  • JSONRPC Error: -79

  • JSONRPC data keys:
    • ‘server_name’ - server name
    • ‘event_message’ - Event Message
    • ‘event_results’ - Event results object
exception dms.exceptions.SgExists(sg_name)[source]

Bases: dms.exceptions.DMSError

For a DMI, SG already exists

  • JSONRPC Error: -72

  • JSONRPC data keys:
    • ‘sg_name’ - SG name
exception dms.exceptions.SgMultipleResults(sg_name)[source]

Bases: dms.exceptions.DMSError

For a DMI, search for one requested SG found multiple entities

  • JSONRPC Error: -58

  • JSONRPC data keys:
    • ‘sg_name’ - SG name
exception dms.exceptions.SgNameRequired(config_key)[source]

Bases: dms.exceptions.DMSError

SG Name is required for this configuration parameter

  • JSONRPC Error: -63

  • JSONRPC data keys:
    • ‘config_key’ - config parameter key
exception dms.exceptions.SgStillHasServers(sg_name)[source]

Bases: dms.exceptions.SgStillUsed

For a DMI, attempted deletion, SG still has servers

  • JSONRPC Error: -95

  • JSONRPC data keys:
    • ‘sg_name’ - SG name
exception dms.exceptions.SgStillHasZones(sg_name)[source]

Bases: dms.exceptions.SgStillUsed

For a DMI, attempted deletion, SG still has zones

  • JSONRPC Error: -73

  • JSONRPC data keys:
    • ‘sg_name’ - SG name
exception dms.exceptions.SgStillUsed(*args)[source]

Bases: dms.exceptions.DMSError

Container class for SG Deleteion errors

exception dms.exceptions.TickleEditLockFailure(name, event_message, event_results)[source]

Bases: dms.exceptions.ZoneSmFailure

Can’t tickle the edit lock timeout event due to an incorrect edit_lock_token

  • JSONRPC Error: -35

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘event_message’ - Timeout Event Message
    • ‘event_results’ - Event results object
exception dms.exceptions.TtlInWrongPlace(domain, rr_data, file_name=None)[source]

Bases: dms.exceptions.DirectiveParseError

$TTL not at top of zone file.

  • JSONRPC Error: -53

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.TtlParseError(domain, rr_data, value, info=None)[source]

Bases: dms.exceptions.DirectiveParseError

Hostname parse error while parsing zone file.

  • JSONRPC Error: -52

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.TtlZiParseError(name, zi_field, value, exc_msg=None)[source]

Bases: dms.exceptions.ZiParseError

Zi related ttl value error.

  • JSONRPC Error: -49

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘zi_field’ - ZI field where error found
    • ‘value’ - value in error
exception dms.exceptions.UnhandledClassError(domain, rr_data)[source]

Bases: dms.exceptions.ZoneParseError

Unhandled class for record - we only ever do IN

  • JSONRPC Error: -8

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.UnhandledTypeError(domain, rr_data)[source]

Bases: dms.exceptions.ZoneParseError

RR type is one we don’t handle.

  • JSONRPC Error: -9

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.UpdateError(domain, *args)[source]

Bases: dms.exceptions.DMSError

Error during update of zone

  • JSONRPC Error: -2

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.UpdateTypeAlreadyQueued(name, update_type)[source]

Bases: dms.exceptions.DMSError

An update of the given type is already queued for the zone

  • JSONRPC Error: -86

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘update_type’ - update type
exception dms.exceptions.UpdateTypeNotSupported(domain, rr_data)[source]

Bases: dms.exceptions.ZoneParseError

Our zone parser does not support the $UPDATE_TYPE statement in edit mode

  • JSONRPC Error: -84

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.UpdateTypeRequired(name)[source]

Bases: dms.exceptions.DMSError

An update_type is required parameter for an incremental update.

  • JSONRPC Error: -87

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.UpdateZoneFailure(name, event_message, event_results, zi_id=None)[source]

Bases: dms.exceptions.ZoneSmFailure

Can’t update zone as it is locked.

  • JSONRPC Error: -35

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘event_message’ - Timeout Event Message
    • ‘event_results’ - Event results object
    • ‘zi_id’ - ID of saved ZI
exception dms.exceptions.ZiIdAdjStringSyntaxError(zi_id)[source]

Bases: dms.exceptions.ZiIdSyntaxError

ZI id adjustment sub string has invalid syntax.

  • JSONRPC Error: -101

  • JSONRPC data keys:
    • ‘zi_id’ - given zi_id string
exception dms.exceptions.ZiIdDdMmYyyySyntaxError(zi_id)[source]

Bases: dms.exceptions.ZiIdSyntaxError

ZI id sub string has an invalid DD/MM/YYYY date.

  • JSONRPC Error: -106

  • JSONRPC data keys:
    • ‘zi_id’ - given zi_id string
exception dms.exceptions.ZiIdDdSlashMmSyntaxError(zi_id)[source]

Bases: dms.exceptions.ZiIdSyntaxError

ZI id sub string has an invalid DD/MM date.

  • JSONRPC Error: -105

  • JSONRPC data keys:
    • ‘zi_id’ - given zi_id string
exception dms.exceptions.ZiIdHhMmSyntaxError(zi_id)[source]

Bases: dms.exceptions.ZiIdSyntaxError

ZI id sub string has an invalid HH:MM time.

  • JSONRPC Error: -104

  • JSONRPC data keys:
    • ‘zi_id’ - given zi_id string
exception dms.exceptions.ZiIdIsoDateSyntaxError(zi_id)[source]

Bases: dms.exceptions.ZiIdSyntaxError

ZI id sub string has an invalid YYYY-MM-DD date.

  • JSONRPC Error: -107

  • JSONRPC data keys:
    • ‘zi_id’ - given zi_id string
exception dms.exceptions.ZiIdSyntaxError(zi_id, exc_msg=None)[source]

Bases: dms.exceptions.DMSError

ZI id given has invalid syntax.

  • JSONRPC Error: -100

  • JSONRPC data keys:
    • ‘zi_id’ - given zi_id string
exception dms.exceptions.ZiIdTimeAmountSyntaxError(zi_id)[source]

Bases: dms.exceptions.ZiIdSyntaxError

ZI id sub string has invalid time amount.

  • JSONRPC Error: -103

  • JSONRPC data keys:
    • ‘zi_id’ - given zi_id string
exception dms.exceptions.ZiIdTimeUnitSyntaxError(zi_id)[source]

Bases: dms.exceptions.ZiIdSyntaxError

ZI id sub string has an invalid time unit specifier.

  • JSONRPC Error: -102

  • JSONRPC data keys:
    • ‘zi_id’ - given zi_id string
exception dms.exceptions.ZiInUse(name, zi_id)[source]

Bases: dms.exceptions.DMSError

Trying to delete a zi that is currently published.

  • JSONRPC Error: -38

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZiNotFound(name, zi_id)[source]

Bases: dms.exceptions.ZoneNotFound

For a DMI, can’t find the requested zi.

  • JSONRPC Error: -30

  • JSONRPC data keys:
    • ‘name’ - domain name
  • JSONRPC data keys:
    • ‘zi_id’ - Zone Instance ID (can be None/Null)
exception dms.exceptions.ZiParseError(name, zi_field, value, exc_msg=None)[source]

Bases: dms.exceptions.DMSError

Zi related SOA/TTL data error.

  • JSONRPC Error: JSONRPC_INTERNAL_ERROR

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘zi_field’ - ZI field where error found
    • ‘value’ - value in error
exception dms.exceptions.ZiTextParseError(domain, pp_exc)[source]

Bases: dms.exceptions.DMSError

Parse Error. The zone file text input as zi_text must be of a valid format

  • JSONRPC Error: -126

  • JSONRPC data keys:
    • ‘parse_error’ - error message
    • ‘name’ - domain name
    • ‘lineno’ - line number
    • ‘col’ - column
    • ‘marked_iinput_line’ - input line with marked error
exception dms.exceptions.ZoneAdminPrivilegeNeeded(name)[source]

Bases: dms.exceptions.DMSError

DMI has not been assigned the privilege required to edit this zone.

  • JSONRPC Error: -127

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZoneAlreadyHasSOARecord(domain, rr_data)[source]

Bases: dms.exceptions.ZoneError

Zone already has an SOA record.

  • JSONRPC Error: -15

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.ZoneBeingCreated(name, event_message, event_results)[source]

Bases: dms.exceptions.DMSError

A zone in the creation process can not be deleted or undeleted

  • JSONRPC Error: -62

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘event_message’ - event message
    • ‘event_results’ - event results object
exception dms.exceptions.ZoneCNAMEExists(domain, rr_data)[source]

Bases: dms.exceptions.ZoneError

Zone already has a CNAME using this label.

  • JSONRPC Error: -18

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.ZoneCNAMELabelExists(domain, rr_data)[source]

Bases: dms.exceptions.ZoneError

Zone already has a CNAME using this label.

  • JSONRPC Error: -19

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.ZoneCfgItemNotFound(key)[source]

Bases: dms.exceptions.ZoneCfgItem

An item with the given key name can not be found in the zone_cfg table

  • JSONRPC Error: -61

  • JSONRPC data keys:
    • ‘key’ - item key name
exception dms.exceptions.ZoneCfgItemValueError(key, value)[source]

Bases: dms.exceptions.ZoneCfgItem

An item with the given key name can not be interpolated from its string

This can happen for string -> boolean conversions

  • JSONRPC Error: -71

  • JSONRPC data keys:
    • ‘key’ - item key name
    • ‘value’ - item value
exception dms.exceptions.ZoneCheckIntegrityNoGlue(domain, rr_data, glue_name)[source]

Bases: dms.exceptions.ZoneError

Record in zone does not have valid in zone glue

  • JSONRPC Error: -21

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.ZoneDisabled(name)[source]

Bases: dms.exceptions.DMSError

Zone disabled. Can’t do operation.

  • JSONRPC Error: -88

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZoneError(domain, rr_data, msg=None, use_pyparsing=True, rewind_loc=False, beginning_loc=False)[source]

Bases: dms.exceptions.ZoneParseError

Zone related resource record error.

  • JSONRPC Error: JSONRPC_INTERNAL_ERROR

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.ZoneExists(name)[source]

Bases: dms.exceptions.DMSError

Trying to create a zone that already exists

  • JSONRPC Error: -36

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZoneFileWriteError(name, internal_error)[source]

Bases: dms.exceptions.RestoreNamedDbError

Can’t write zone file

  • JSONRPC Error: -112

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘internal_error’ - error that occured
exception dms.exceptions.ZoneFilesStillExist(name, event_message, event_results)[source]

Bases: dms.exceptions.ZoneSmFailure

Can’t destroy/nuke a zone as its zone files still exist

  • JSONRPC Error: -70

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘event_message’ - Event Message
    • ‘event_results’ - Event results object
exception dms.exceptions.ZoneHasNoNSRecord(domain, rr_data)[source]

Bases: dms.exceptions.ZoneError

Zone has No NS records.

  • JSONRPC Error: -23

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.ZoneHasNoSOARecord(domain)[source]

Bases: dms.exceptions.DMSError

Zone has No SOA record.

  • JSONRPC Error: -22

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZoneHasNoZi(name)[source]

Bases: dms.exceptions.DMSError

For a Zone, no ZI has no candidate or published ZI

  • JSONRPC Error: - 92

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZoneMultipleResults(name)[source]

Bases: dms.exceptions.DMSError

For a DMI, search for one requested zone found multiple entities

  • JSONRPC Error: -57

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZoneNameUndefined(file_name)[source]

Bases: dms.exceptions.DMSError

Name of the Zone can not be determined.

  • JSONRPC Error: -47

  • JSONRPC data keys:
    • ‘file_name’ - file name being loaded.
exception dms.exceptions.ZoneNoAltSgForSwap(name)[source]

Bases: dms.exceptions.DMSError

Zone idoes not have an alternate SG for swapping

  • JSONRPC Error: -123

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZoneNotDeleted(name)[source]

Bases: dms.exceptions.DMSError

Trying to destroy a zone that is active

  • JSONRPC Error: -37

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZoneNotDisabled(name)[source]

Bases: dms.exceptions.DMSError

Zone disabled. Can’t do operation.

  • JSONRPC Error: -94

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZoneNotDnssecEnabled(name)[source]

Bases: dms.exceptions.DMSError

Zone is not DNSSEC enabled.

  • JSONRPC Error: -60

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZoneNotFound(name)[source]

Bases: dms.exceptions.DMSError

For a DMI, can’t find the requested zone.

  • JSONRPC Error: -28

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZoneNotFoundByZoneId(zone_id)[source]

Bases: dms.exceptions.ZoneNotFound

For a DMI, can’t find the requested zone.

  • JSONRPC Error: -29

  • JSONRPC data keys:
    • ‘zone_id’ - Zone ID
exception dms.exceptions.ZoneNotPublished(domain)[source]

Bases: dms.exceptions.DMSError

Zone Not Published. Can’t poke DNS server.

  • JSONRPC Error: -117

  • JSONRPC data keys:
    • ‘name’ - domain name
exception dms.exceptions.ZoneParseError(domain, rr_data, msg=None, use_pyparsing=True, rewind_loc=False, beginning_loc=False)[source]

Bases: dms.exceptions.DMSError

Parent class for zi RR errors

  • JSONRPC Error: JSONRPC_INTERNAL_ERROR

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.ZoneSOARecordNotAtApex(domain, rr_data)[source]

Bases: dms.exceptions.ZoneError

Zone already has an SOA record.

  • JSONRPC Error: -16

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘rr_data’ - RR data from zi, Not RDATA!
    • ‘rr_groups_index’ - index into rr_groups array.
    • ‘rrs_index’ - index of RR in rrs of rr_groups
exception dms.exceptions.ZoneSearchPatternError(*args)[source]

Bases: dms.exceptions.DMSError

Given zone search pattern is invalid

exception dms.exceptions.ZoneSecTagConfigError(sectag_label)[source]

Bases: dms.exceptions.ZoneSecTagDoesNotExist

Zone security tag for DMS server does not exist.

  • JSONRPC Error: -42

  • JSONRPC data keys:
    • ‘sectag_label’ - security tag label
exception dms.exceptions.ZoneSecTagDoesNotExist(sectag_label)[source]

Bases: dms.exceptions.DMSError

Zone security tag does not exist.

  • JSONRPC Error: -41

  • JSONRPC data keys:
    • ‘sectag_label’ - security tag label
exception dms.exceptions.ZoneSecTagExists(sectag_label)[source]

Bases: dms.exceptions.DMSError

Trying to create a security tag that already exists.

  • JSONRPC Error: -40

  • JSONRPC data keys:
    • ‘sectag_label’ - security tag label
exception dms.exceptions.ZoneSecTagStillUsed(sectag_label)[source]

Bases: dms.exceptions.DMSError

Zone security tag is still in use

  • JSONRPC Error: -43

  • JSONRPC data keys:
    • ‘sectag_label’ - security tag label
exception dms.exceptions.ZoneSmFailure(name, event_message, event_results)[source]

Bases: dms.exceptions.DMSError

Zone SM Failure - synchronous execution of the Zone SM was not successful.

  • JSONRPC Error: -80

  • JSONRPC data keys:
    • ‘name’ - domain name
    • ‘event_message’ - Event Message
    • ‘event_results’ - Event results object
exception dms.exceptions.ZoneTTLNotSetError(rr_id)[source]

Bases: dms.exceptions.DMSError

The zone ttl needs to be set in the RR database row

  • JSONRPC Error: -1

  • JSONRPC data keys:
    • ‘rr_id’ - Resource Record ID