Coder Social home page Coder Social logo

octodns_cloudns's Introduction

ClouDNS API provider for octoDNS

An octoDNS provider that targets ClouDNS.

Installation

Command line

pip install octodns-cloudns

requirements.txt/setup.py

Pinning specific versions or SHAs is recommended to avoid unplanned upgrades.

Versions
# Start with the latest versions and don't just copy what's here
octodns==0.9.14
octodns-cloudns==0.0.1

Configuration

providers:
  cloudns_account:
    class: octodns.provider.cloudns.ClouDNSProvider
    auth_id: <api_auth_id>
    auth_password: <api_auth_password>

Support Information

GeoDNS records

ClouDNSProvider suports GeoDNS records

Records

ClouDNSProvider suports ะ, AAAA, ALIAS, CAA, CNAME, DNAME, MX, NS, PTR, SPF, SRV, SSHFP, TXT, TLSA, LOC and NAPTR

Dynamic

ClouDNSProvider does not support dynamic records.

Development

See the /script/ directory for some tools to help with the development process. They generally follow the Script to rule them all pattern. Most useful is ./script/bootstrap which will create a venv and install both the runtime and development related requirements. It will also hook up a pre-commit hook that covers most of what's run by CI.

octodns_cloudns's People

Contributors

venkoul99 avatar boyanpeychev avatar

Stargazers

Yves Ledermann avatar

Watchers

 avatar

octodns_cloudns's Issues

Error Processing Plans Involving CNAME Records

Thank you very much for the plugin, it's nice having something first-party to use in our OctoDNS setup.

We're having a problem when making changes involving CNAME records. It might involve other records types without a #values property, but I've only hit it with CNAME.

Here is the error trace:

Traceback (most recent call last):
  File "/usr/local/bin/octodns-sync", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/octodns/cmds/sync.py", line 62, in main
    manager.sync(
  File "/usr/local/lib/python3.8/site-packages/octodns/manager.py", line 856, in sync
    total_changes += target.apply(plan)
  File "/usr/local/lib/python3.8/site-packages/octodns/provider/base.py", line 2[98]job
    self._apply(plan)
  File "/usr/local/lib/python3.8/site-packages/octodns_cloudns/__init__.py", line 692, in _apply
    getattr(self, f"_apply_{class_name.lower()}")(change)
  File "/usr/local/lib/python3.8/site-packages/octodns_cloudns/__init__.py", line 658, in _apply_delete
    record_ids = self.records_are_same(existing)
  File "/usr/local/lib/python3.8/site-packages/octodns_cloudns/__init__.py", line 583, in records_are_same
    for value in existing.values:
AttributeError: 'CnameRecord' object has no attribute 'values'

This error stems from how OctoDNS CnameRecords are using the ValueMixin as opposed to the ValuesMixin (or something else that provides .values) since it can only ever have a single value. So it gets .value.

In your #records_are_same function, it's assuming that everything has a #values, here.

I'm guessing the solution would be to just make sure values exists before going down that branch? I'm afraid I don't fully appreciate what's going on in #record_are_same to weigh in with a PR. I'd guess it's either skip it, or refactor that chunk of logic so it can be executed on a single .value if that's what the record has?

Please let me know if I can be of assistance sorting this out.

TXT records trailing dot

When creating TXT records, the value is set without a trailing dot (.). On a subsequent run, octoDNS will prompt to update the record as ClouDNS returns a trailing dot for the record. Attempting to perform this update then duplicates the record in ClouDNS.

Trying to set the record with a trailing dot from the get-go results in an infinite loop where more and more dots are added each time.

Provider Class

Hi
i have to use class: octodns_cloudns.ClouDNSProvider instead of octodns.provider.cloudns.ClouDNSProvider
or i got the error octodns.manager.ManagerException: Unknown provider class: octodns.provider.cloudns.ClouDNSProvider
is that something worng on my side or does the readme and the docs need some update?

(installed via pip: pip install octodns_cloudns)

TXT records need additional escaping

When creating a TXT record with a + in its value (eg. DKIM keys), it needs to be manually URL-encoded as %2B. This causes octoDNS to want to update the record every time, even though its value hasn't changed.

Sending a + makes a whitespace appear in its place, whilst sending it as \+ makes it disappear completely.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.