From: Pieter Lexis Date: Tue, 12 Sep 2017 16:17:02 +0000 (+0200) Subject: Fix Zone object rendering X-Git-Tag: rec-4.1.0-rc1~46^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d500cf42f484f1ac34e1305b17207235941ae40;p=thirdparty%2Fpdns.git Fix Zone object rendering --- diff --git a/docs/common/api/zone.rst b/docs/common/api/zone.rst index 6fa1fa1a13..f47be1efb9 100644 --- a/docs/common/api/zone.rst +++ b/docs/common/api/zone.rst @@ -1,28 +1,3 @@ -Zones in the API -================ - -Zone ----- - -A Zone object represents an authoritative DNS Zone. - -A Resource Record Set (below as "RRset") are all records for a given name and type. - -Comments are per-RRset. - -.. json:object:: Zone - - Represents a configured zone in the PowerDNS server. - - :property string id: Opaque zone id (string), assigned by the Server. Do not interpret. Guaranteed to be safe for embedding in URLs. - :property string name: Name of the zone (e.g. "example.com.") **must** have a trailing dot - :property string type: Set to "Zone" - :property string url: API endpoint for this zone - :property string kind: Zone kind, one of "Native", "Master", "Slave" on the Authoritative Server. One of "Native", "Forwarded" on the Recursor. - :property [RRSet] rrsets: RRSets in this zone - - .. include:: ../../http-api/zone-properties.rst - RRSet ----- diff --git a/docs/conf.py b/docs/conf.py index 9c7226432f..05f67d598c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -76,7 +76,8 @@ language = None exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.venv', 'security-advisories/security-policy.rst', - 'common/secpoll.rst'] + 'common/secpoll.rst', + 'common/api/zone.rst'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' diff --git a/docs/http-api/index.rst b/docs/http-api/index.rst index 6f4dc5de3d..8127c5b04c 100644 --- a/docs/http-api/index.rst +++ b/docs/http-api/index.rst @@ -45,7 +45,7 @@ The following documents describe the JSON objects available in the API: ../common/api/dataformat ../common/api/server - ../common/api/zone + zone ../common/api/configsetting ../common/api/statisticitem cryptokeyitem diff --git a/docs/http-api/zone-properties.rst b/docs/http-api/zone.rst similarity index 72% rename from docs/http-api/zone-properties.rst rename to docs/http-api/zone.rst index dda636e0d1..d5f31e79b9 100644 --- a/docs/http-api/zone-properties.rst +++ b/docs/http-api/zone.rst @@ -1,4 +1,25 @@ - +Zones +===== + +Zone +---- + +A Zone object represents an authoritative DNS Zone. + +A Resource Record Set (below as "RRset") are all records for a given name and type. + +Comments are per-RRset. + +.. json:object:: Zone + + Represents a configured zone in the PowerDNS server. + + :property string id: Opaque zone id (string), assigned by the server, should not be interpreted by the application. Guaranteed to be safe for embedding in URLs. + :property string name: Name of the zone (e.g. "example.com.") MUST have a trailing dot + :property string type: Set to "Zone" + :property string url: API endpoint for this zone + :property string kind: Zone kind, one of "Native", "Master", "Slave" + :property [RRSet] rrsets: RRSets in this zone :property integer serial: The SOA serial number :property integer notified_serial: The SOA serial notifications have been sent out for :property [str] masters: List of IP addresses configured as a master for this zone ("Slave" type zones only) @@ -8,7 +29,7 @@ :property bool presigned: Whether or not the zone is pre-signed (not implemented) :property string soa_edit: The :ref:`metadata-soa-edit` metadata item :property string soa_edit_api: The :ref:`metadata-soa-edit-api` metadata item - :property string zone: May contain a BIND-style zone file when creating a zone + :property string zone: MAY contain a BIND-style zone file when creating a zone :property str account: MAY be set. Its value is defined by local policy :property [str] nameservers: MAY be sent in client bodies during creation, and MUST NOT be sent by the server. Simple list of strings of nameserver names, including the trailing dot. Not required for slave zones. @@ -40,3 +61,5 @@ These things are not supported through the API. When creating a slave zone, it is recommended to not set any of ``nameservers``, ``records`` or ``zone``. + +.. include:: ../common/api/zone.rst diff --git a/pdns/recursordist/docs/conf.py b/pdns/recursordist/docs/conf.py index 19d0b305ef..2862469930 100644 --- a/pdns/recursordist/docs/conf.py +++ b/pdns/recursordist/docs/conf.py @@ -77,7 +77,8 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'http-api/override.rst', 'common/zonemetadata.rst', 'common/endpoint-servers-config.rst', - 'common/secpoll.rst'] + 'common/secpoll.rst', + 'common/api/zone.rst'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' diff --git a/pdns/recursordist/docs/http-api/index.rst b/pdns/recursordist/docs/http-api/index.rst index aa4780ebae..133eb6f40e 100644 --- a/pdns/recursordist/docs/http-api/index.rst +++ b/pdns/recursordist/docs/http-api/index.rst @@ -11,7 +11,7 @@ The following documents contain the information for the PowerDNS API: ../common/api/dataformat ../common/api/server - ../common/api/zone + zone ../common/api/configsetting ../common/api/statisticitem diff --git a/pdns/recursordist/docs/http-api/zone-properties.rst b/pdns/recursordist/docs/http-api/zone-properties.rst deleted file mode 100644 index 07844128d8..0000000000 --- a/pdns/recursordist/docs/http-api/zone-properties.rst +++ /dev/null @@ -1,4 +0,0 @@ -The Zone object in the Recursor also supportes these elements: - -:property [str] servers: For zones of type "Forwarded", addresses to send the queries to -:property bool recursion_desired: For zones of type "Forwarded", Whether or not the RD bit should be set in the query diff --git a/pdns/recursordist/docs/http-api/zone.rst b/pdns/recursordist/docs/http-api/zone.rst new file mode 100644 index 0000000000..71611cf3c5 --- /dev/null +++ b/pdns/recursordist/docs/http-api/zone.rst @@ -0,0 +1,26 @@ +Zones +===== + +Zone +---- + +A Zone object represents an authoritative DNS Zone. + +A Resource Record Set (below as "RRset") are all records for a given name and type. + +Comments are per-RRset. + +.. json:object:: Zone + + Represents a configured zone in the PowerDNS server. + + :property string id: Opaque zone id (string), assigned by the server, should not be interpreted by the application. Guaranteed to be safe for embedding in URLs. + :property string name: Name of the zone (e.g. "example.com.") MUST have a trailing dot + :property string type: Set to "Zone" + :property string url: API endpoint for this zone + :property string kind: Zone kind, one of "Native", "Forwarded". + :property [RRSet] rrsets: RRSets in this zone + :property [str] servers: For zones of type "Forwarded", addresses to send the queries to + :property bool recursion_desired: For zones of type "Forwarded", Whether or not the RD bit should be set in the query + +.. include:: ../common/api/zone.rst