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] [Updated] (LIBCLOUD-868) POWERDNS create_record

     [ https://issues.apache.org/jira/browse/LIBCLOUD-868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian updated LIBCLOUD-868:
-------------------------------
    Description: 
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 also comment parameter.

Christian

  was:
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


> 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 also comment parameter.
> Christian



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