You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Christian (JIRA)" <ji...@apache.org> on 2016/10/27 22:04:58 UTC

[jira] [Created] (LIBCLOUD-868) POWERDNS create_record

Christian created LIBCLOUD-868:
----------------------------------

             Summary: POWERDNS create_record
                 Key: LIBCLOUD-868
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-868
             Project: Libcloud
          Issue Type: Bug
          Components: DNS
         Environment: linux python3.5 pip version of libcloud
            Reporter: Christian


create_record is not compatible with the powerdns 4.0 rest api.
the code creates the json as follow:

record = {
            'content': data,
            'disabled': False,
            'name': name,
            'ttl': extra['ttl'],
            'type': type,
        }
        payload = {'rrsets': [{'name': name,
                               'type': type,
                               'changetype': 'REPLACE',
                               'records': [record]
                               }]
                   }

Instead the portocol wants:

{ "rrsets":
  [
    {
      "name": <string>,
      "type": <string>,
      "ttl": <int>,
      "changetype": <changetype>,
      "records":
        [
          {
            "content": <string>,
            "disabled": <bool>,
            "set-ptr": <bool>
          }, ...
        ],
      "comments":
        [
          {
            "account": <string>,
            "content": <string>,
            "modfied_at": <int>
          }, ...
        ]
    },
    { ... }
  ]
}

I'll manage to modify the method and to add aldo comment parameter.

Christian



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)