DNS actor adapter requests and responses
This section describes the adapter requests and responses for the DNS adapter.
Create A record operation
Creates a new A record for the DNS server. An A record maps a domain name to an IPv4 or an IPv6 address.
The following table describes the input elements for the Create A record operation.
Adapter request elements for the Create A record operation
Element | Description | Required |
---|---|---|
<operation-name> | Specifies the name of the operation: | Yes |
<secret-key-location> | Specifies the location where the secret key, which is used to connect to the DNS server is located | Conditional; required if not specified in the adapter configuration |
<secret-key-name> | Specifies the secret key configured with the DNS server | Conditional; required if <secret-key-location> is not specified |
<secret-key-data> | Specifies the secret key data that matches the <secret-key-name> element | Conditional; required if <secret-key-location> is not specified |
<dns-zone> | Specifies the target DNS zone | Conditional; required if not specified in the adapter configuration |
<dns-server> | Specifies the host name or IP address of the target DNS server | Conditional; required if not specified in the adapter configuration |
<reverse-dns-zone> | Specifies the target reverse DNS zone | Conditional; required if not specified in the adapter configuration |
<reverse-dns-server> | Specifies the host name or IP address of the target reverse DNS server | Conditional; required if not specified in the adapter configuration |
<host-name> | Specifies the host name for which an A record is to be created | Yes |
<ip-address> | Specifies the IP address for which an A record is to be created | Yes |
Sample adapter request for creating a DNS record with type A
<bmc-adapter-dns-actor>
<operation-name>dns-add-A-record</operation-name>
<target>
<secret-key-location>/etc/ddns-update.key</secret-key-location>
<dns-zone>dnsbind.com</dns-zone>
<dns-server>10.129.69.38</dns-server>
<reverse-dns-server>10.129.69.38</reverse-dns-server>
<reverse-dns-zone>69.129.10.in-addr.arpa</reverse-dns-zone>
</target>
<parameters>
<host-name>TestHost</host-name>
<ip-address>10.129.54.109</ip-address>
</parameters>
</bmc-adapter-dns-actor>
Sample adapter response for creating the DNS Record with type A
<dns-response>
<metadata>
<response-count>1</response-count>
<status>success</status>
</metadata>
<add-A-record-response>
<metadata>
<os-id>Linux</os-id>
<os-version>2.6.18-238.el5</os-version>
<os-arch>amd64</os-arch>
<status>success</status>
<target>10.129.69.38</target>
</metadata>
<commands-output>
<command-output>
<metadata>
<command>nsupdate -k "/etc/ddns-update.key" -v "/opt/bmc/ao/cdpnew/bin/ADD-DNS-A-b7b166f6-dfda-4afe-a07a-a09d00bf422b.txt"</command>
<line-count>5</line-count>
<execution-milliseconds>50</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">Outgoing update query:</line>
<line index="2">;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 0</line>
<line index="3">;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0</line>
<line index="4">;; UPDATE SECTION:</line>
<line index="5">TestHost.dnsbind.com. 86400 IN A 10.129.54.109</line>
</output>
</command-output>
</commands-output>
<operation-result>
<status>success</status>
<info-message>Operation execution successful</info-message>
<error-message />
<command-output>Outgoing update query:;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 0;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0;; UPDATE SECTION:JainewArec.dnsbind.com. 86400 IN A 10.129.54.109</command-output>
</operation-result>
</add-A-record-response>
</dns-response>
Sample adapter request for Create A record operation with the <secret-key-name>
and <secret-key-data>
elements
<bmc-adapter-dns-actor>
<operation-name>dns-add-A-record</operation-name>
<target>
<secret-key-name>ddns-update</secret-key-name>
<secret-key-data>Kf6wMyO1Uo6F1mW**********+**********+lif16x2l+2vBoESOz3fbWlvHDVN5Xvw3EOisCTTxyQdHf90Zg==</secret-key-data>
<dns-zone>dnsbind.com</dns-zone>
<dns-server>10.129.69.38</dns-server>
<reverse-dns-server>10.129.69.38</reverse-dns-server>
<reverse-dns-zone>69.129.10.in-addr.arpa</reverse-dns-zone>
</target>
<parameters>
<host-name>DeepakTest</host-name>
<ip-address>10.129.54.109</ip-address>
<reverse-ip-address>109.54.129.10</reverse-ip-address>
</parameters>
</bmc-adapter-dns-actor>
Sample adapter response for Create A record operation with the <secret-key-name>
and <secret-key-data>
elements
<dns-response>
<metadata>
<response-count>1</response-count>
<status>success</status>
</metadata>
<add-A-record-response>
<metadata>
<os-id>Linux</os-id>
<os-version>2.6.18-238.el5</os-version>
<os-arch>amd64</os-arch>
<status>success</status>
<target>10.129.69.38</target>
</metadata>
<commands-output>
<command-output>
<metadata>
<command>nsupdate -y "ddns-update":"Kf6wMyO1Uo6F1mWnBlZuMAa8B+UAOHXd3DYE+lif16x2l+2vBoESOz3fbWlvHDVN5Xvw3EOisCTTxyQdHf90Zg==" -v "/opt/bmc/ao/cdpnew/bin/ADD-DNS-A-f158c7aa-2e75-4462-852e-70ca0e80c3da.txt"</command>
<line-count>5</line-count>
<execution-milliseconds>19</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">Outgoing update query:</line>
<line index="2">;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 0</line>
<line index="3">;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0</line>
<line index="4">;; UPDATE SECTION:</line>
<line index="5">DeepakTest.dnsbind.com. 86400 IN A 10.129.54.109</line>
</output>
</command-output>
</commands-output>
<operation-result>
<status>success</status>
<info-message>Operation execution successful</info-message>
<error-message />
<command-output>Outgoing update query:;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 0;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0;; UPDATE SECTION:DeepakTest.dnsbind.com. 86400 IN A 10.129.54.109</command-output>
</operation-result>
</add-A-record-response>
</dns-response>
Delete A record operation
The Delete A record deletes an A record from the DNS server.
The following table describes the input elements for the Delete A record operation.
Adapter request elements for the Delete A record operation
Element | Description | Required |
---|---|---|
<operation-name> | Specifies the name of the operation: | Yes |
<secret-key-location> | Specifies the location where the secret key, which is used to connect to the DNS server is located | Conditional; required if not specified in the adapter configuration |
<secret-key-name> | Specifies the secret key configured with the DNS server | Conditional; required if <secret-key-location> is not specified |
<secret-key-data> | Specifies the secret key data that matches the <secret-key-name> element | Conditional; required if <secret-key-location> is not specified |
<dns-zone> | Specifies the target DNS zone | Conditional; required if not specified in the adapter configuration |
<dns-server> | Specifies the host name or IP address of the target DNS server | Conditional; required if not specified in the adapter configuration |
<reverse-dns-zone> | Specifies the target reverse DNS zone | Conditional; required if not specified in the adapter configuration |
<reverse-dns-server> | Specifies the host name or IP address of the target reverse DNS server | Conditional; required if not specified in the adapter configuration |
<host-name> | Specifies the host name for which an A record is to be deleted | Yes |
<ip-address> | Specifies the IP address for which an A record is to be deleted | Yes |
Sample adapter request for deleting an A record
<bmc-adapter-dns-actor>
<operation-name>dns-delete-A-record</operation-name>
<target>
<secret-key-location>/etc/ddns-update.key</secret-key-location>
<dns-zone>dnsbind.com</dns-zone>
<dns-server>10.129.69.38</dns-server>
<reverse-dns-server>10.129.69.38</reverse-dns-server>
<reverse-dns-zone>69.129.10.in-addr.arpa</reverse-dns-zone>
</target>
<parameters>
<host-name>TestHost</host-name>
<ip-address>10.129.54.109</ip-address>
</parameters>
</bmc-adapter-dns-actor>
Sample adapter response for deleting an A record
<dns-response>
<metadata>
<response-count>1</response-count>
<status>success</status>
</metadata>
<delete-A-record-response>
<metadata>
<os-id>Linux</os-id>
<os-version>2.6.18-238.el5</os-version>
<os-arch>amd64</os-arch>
<status>success</status>
<target>10.129.69.38</target>
</metadata>
<commands-output>
<command-output>
<metadata>
<command>nsupdate -k "/etc/ddns-update.key" -v "/opt/bmc/ao/cdpnew/bin/DELETE-DNS-A-468c8677-7cea-4ee5-aa6f-f2975f820663.txt"</command>
<line-count>5</line-count>
<execution-milliseconds>55</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">Outgoing update query:</line>
<line index="2">;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 0</line>
<line index="3">;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0</line>
<line index="4">;; UPDATE SECTION:</line>
<line index="5">TestHost.dnsbind.com. 0 NONE A 10.129.54.109</line>
</output>
</command-output>
</commands-output>
<operation-result>
<status>success</status>
<info-message>Operation execution successful</info-message>
<error-message />
<command-output>Outgoing update query:;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 0;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0;; UPDATE SECTION:TestHost.dnsbind.com. 0 NONE A 10.129.54.109</command-output>
</operation-result>
</delete-A-record-response>
</dns-response>
Create PTR record operation
The Create PTR record operation creates a PTR record on a DNS server. A PTR record maps an IP address to a host name.
The following table describes the input elements for the Create PTR record operation.
Adapter request elements for the Create PTR record operation
Element | Description | Required |
---|---|---|
<operation-name> | Specifies the name of the operation: | Yes |
<reverse-dns-secret-key-location> | Specifies the location where the secret key, which is used to connect to the reverse DNS server is located | Conditional; required if not specified in the adapter configuration |
<reverse-dns-secret-key-name> | Specifies the secret key configured with the reverse DNS server | Conditional; required if <reverse-dns-secret-key-location> is not specified |
| Specifies the secret key data that matches the <reverse-dns-secret-key-name> element | Conditional; required if <reverse-dns-secret-key-location> is not specified |
<dns-zone> | Specifies the target DNS zone | Conditional; required if not specified in the adapter configuration |
<dns-server> | Specifies the host name or IP address of the target DNS server | Conditional; required if not specified in the adapter configuration |
<reverse-dns-zone> | Specifies the target reverse DNS zone | Conditional; required if not specified in the adapter configuration |
<reverse-dns-server> | Specifies the host name or IP address of the target reverse DNS server | Conditional; required if not specified in the adapter configuration |
<host-name> | Specifies the host name for which a PTR record is to be created | Yes |
<reverse-ip-address> | Specifies the reverse IP address for the PTR record | Yes |
Sample <items>
XML for creating a PTR record
<items>
<item>
<target>
<reverse-dns-secret-key-location>/etc/ddns-update.key</reverse-dns-secret-key-location>
<dns-zone>dnsbind.com</dns-zone>
<dns-server>10.129.69.38</dns-server>
<reverse-dns-server>10.129.69.38</reverse-dns-server>
<reverse-dns-zone>69.129.10.in-addr.arpa</reverse-dns-zone>
<reverse-dns-secret-key-location>/etc/ddns-update.key</reverse-dns-secret-key-location>
</target>
<parameters>
<host-name>dim</host-name>
<reverse-ip-address>112.69.129.10</reverse-ip-address>
</parameters>
</item>
</items>
Sample adapter request for creating a PTR record
<bmc-adapter-dns-actor>
<operation-name>dns-add-PTR-record</operation-name>
<target>
<reverse-dns-secret-key-location>/etc/ddns-update.key</reverse-dns-secret-key-location>
<dns-zone>dnsbind.com</dns-zone>
<dns-server>10.129.69.38</dns-server>
<reverse-dns-server>10.129.69.38</reverse-dns-server>
<reverse-dns-zone>69.129.10.in-addr.arpa</reverse-dns-zone>
</target>
<parameters>
<host-name>dim</host-name>
<reverse-ip-address>112.69.129.10</reverse-ip-address>
</parameters>
</bmc-adapter-dns-actor>
Sample adapter response for creating a PTR record
<dns-response>
<metadata>
<response-count>1</response-count>
<status>success</status>
</metadata>
<add-PTR-record-response>
<metadata>
<os-id>Linux</os-id>
<os-version>2.6.18-238.el5</os-version>
<os-arch>amd64</os-arch>
<status>success</status>
<target>10.129.69.38</target>
</metadata>
<commands-output>
<command-output>
<metadata>
<command>nsupdate -k "/etc/ddns-update.key" -v "/tmp/ADD-DNS-PTR-3d03d7e1-64e1-469a-bc5b-e5145ea16e60.txt"</command>
<line-count>5</line-count>
<execution-milliseconds>39</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">Outgoing update query:</line>
<line index="2">;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 0</line>
<line index="3">;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0</line>
<line index="4">;; UPDATE SECTION:</line>
<line index="5">112.69.129.10.in-addr.arpa. 86400 IN PTR dim.dnsbind.com.</line>
</output>
</command-output>
</commands-output>
<operation-result>
<status>success</status>
<info-message>Operation execution successful</info-message>
<error-message />
<command-output>Outgoing update query:;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 0;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0;; UPDATE SECTION:112.69.129.10.in-addr.arpa. 86400 IN PTR dim.dnsbind.com.</command-output>
</operation-result>
</add-PTR-record-response>
</dns-response>
Delete PTR record operation
The Delete PTR record operation deletes a PTR record from a DNS server.
The following table describes the input elements for the Delete PTR record operation.
Adapter request elements for the Delete PTR record operation
Element | Description | Required |
---|---|---|
<operation-name> | Specifies the name of the operation: | Yes |
<reverse-dns-secret-key-location> | Specifies the location where the secret key, which is used to connect to the reverse DNS server is located | Conditional; required if not specified in the adapter configuration |
<reverse-dns-secret-key-name> | Specifies the secret key configured with the reverse DNS server | Conditional; required if <reverse-dns-secret-key-location> is not specified |
<reverse-dns-secret-key-data> | Specifies the secret key data that matches the <reverse-dns-secret-key-name> element | Conditional; required if <reverse-dns-secret-key-location> is not specified |
<dns-zone> | Specifies the target DNS zone | Conditional; required if not specified in the adapter configuration |
<dns-server> | Specifies the host name or IP address of the target DNS server | Conditional; required if not specified in the adapter configuration |
<reverse-dns-zone> | Specifies the target reverse DNS zone | Conditional; required if not specified in the adapter configuration |
<reverse-dns-server> | Specifies the host name or IP address of the target reverse DNS server | Conditional; required if not specified in the adapter configuration |
<host-name> | Specifies the host name for which a PTR record is to be deleted | Yes |
<reverse-ip-address> | Specifies the reverse IP address for the PTR record | Yes |
Sample adapter request for deleting a PTR record
<bmc-adapter-dns-actor>
<operation-name>dns-delete-PTR-record</operation-name>
<target>
<reverse-dns-secret-key-location>/etc/ddns-update.key</reverse-dns-secret-key-location>
<dns-zone>dnsbind.com</dns-zone>
<dns-server>10.129.69.38</dns-server>
<reverse-dns-server>10.129.69.38</reverse-dns-server>
<reverse-dns-zone>69.129.10.in-addr.arpa</reverse-dns-zone>
</target>
<parameters>
<host-name>dim</host-name>
<reverse-ip-address>112.69.129.10</reverse-ip-address>
</parameters>
</bmc-adapter-dns-actor>
Sample adapter response for deleting a PTR record
<dns-response>
<metadata>
<response-count>1</response-count>
<status>success</status>
</metadata>
<delete-PTR-record-response>
<metadata>
<os-id>Linux</os-id>
<os-version>2.6.18-238.el5</os-version>
<os-arch>amd64</os-arch>
<status>success</status>
<target>10.129.69.38</target>
</metadata>
<commands-output>
<command-output>
<metadata>
<command>nsupdate -k "/etc/ddns-update.key" -v "/tmp/DELETE-DNS-PTR-bbb6df54-c067-42d1-b20f-10e1a852caa2.txt"</command>
<line-count>5</line-count>
<execution-milliseconds>45</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">Outgoing update query:</line>
<line index="2">;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 0</line>
<line index="3">;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0</line>
<line index="4">;; UPDATE SECTION:</line>
<line index="5">112.69.129.10.in-addr.arpa. 0 ANY PTR </line>
</output>
</command-output>
</commands-output>
<operation-result>
<status>success</status>
<info-message>Operation execution successful</info-message>
<error-message />
<command-output>Outgoing update query:;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 0;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0;; UPDATE SECTION:112.69.129.10.in-addr.arpa. 0 ANY PTR </command-output>
</operation-result>
</delete-PTR-record-response>
</dns-response>
Lookup DNS record operation
The Lookup DNS operation finds an A or a PTR record on a DNS server.
The following table describes the input elements for the Lookup DNS Record operation.
Element | Description | Required |
---|---|---|
<operation-name> | Specifies the name of the operation: | Yes |
<secret-key-location> | Specifies the location where the secret key, which is used to connect to the DNS server is located | No |
<secret-key-name> | Specifies the secret key configured with the DNS server | Conditional; required if <secret-key-location> is not specified |
<secret-key-data> | Specifies the secret key data that matches the <secret-key-name> element | Conditional; required if <secret-key-location> is not specified |
<dns-zone> | Specifies the target DNS zone | Conditional; required if not specified in the adapter configuration |
<dns-server> | Specifies the host name or IP address of the target DNS server | Conditional; required if not specified in the adapter configuration |
<reverse-dns-zone> | Specifies the target reverse DNS zone | Conditional; required if not specified in the adapter configuration |
<reverse-dns-server> | Specifies the host name or IP address of the target reverse DNS server | Conditional; required if not specified in the adapter configuration |
<host-name> | Specifies the host name required to find a DNS record | Yes |
<ip-address> | Specifies the IP address required to find a DNS record | No |
Sample adapter request for the lookup DNS operation
<bmc-adapter-dns-actor>
<operation-name>dns-lookup</operation-name>
<target>
<secret-key-location>/etc/ddns-update.key</secret-key-location>
<dns-zone>dnsbind.com</dns-zone>
<dns-server>10.129.69.38</dns-server>
</target>
<parameters>
<host-name>JainewArec</host-name>
<ip-address>10.129.54.109</ip-address>
</parameters>
</bmc-adapter-dns-actor>
Sample adapter response for the lookup DNS operation
<dns-response>
<metadata>
<response-count>1</response-count>
<status>success</status>
</metadata>
<lookup-response>
<metadata>
<os-id>Linux</os-id>
<os-version>2.6.18-238.el5</os-version>
<os-arch>amd64</os-arch>
<status>success</status>
<target>10.129.69.38</target>
</metadata>
<commands-output>
<command-output>
<metadata>
<command>nslookup "JainewArec.dnsbind.com" "10.129.69.38"</command>
<line-count>4</line-count>
<execution-milliseconds>29</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">Server: 10.129.69.38</line>
<line index="2">Address: 10.129.69.38#53</line>
<line index="3">Name: JainewArec.dnsbind.com</line>
<line index="4">Address: 10.129.54.109</line>
</output>
</command-output>
</commands-output>
<operation-result>
<status>success</status>
<info-message>Operation execution successful</info-message>
<error-message />
<command-output>Server: 10.129.69.38Address: 10.129.69.38#53Name: JainewArec.dnsbind.comAddress: 10.129.54.109</command-output>
</operation-result>
</lookup-response>
</dns-response>
Comments
Log in or register to comment.