Git Product home page Git Product logo

cloudns-api's People

Contributors

daniel15 avatar tokiwinter avatar trunet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cloudns-api's Issues

id values exceed: 100000000

An integer check for the id is coded with a maz value of 100000000 (line: 1115).

Looks like the ids in clouDNS exceed this value.

Fx is to add another 0 - until this ID range is exeeded.

Need another maintainer

If anybody wants to help maintain this, please let me know.

Unfortunately, I am very busy (as evidenced by it taking me six months to review two PRs).

Thanks!

Need help please

Hello from germany,

is is a really nice script wich helps me so much. But i have one problem:

I need the "host=" flag empty but i could not find a solution for that. My workaround at the moment is host=@ and then i have to manual delete the @ in customer dashboard.

listrecords with host=@ does not work

Hi,

I'm having trouble with API.

  1. In the GUI interface of clouDNS, the host information is left blank.
  2. To modify the record, the following command is issued :
    MOD_ID=cloudns_api.sh -sj listrecords $ZONE host=@ type=A showid=true | jq --raw-output '.id'
    echo 'ID :' ${MOD_ID}
    cloudns_api.sh -s modify $ZONE id=${MOD_ID} record=${IP_A}

This works, but also adds '@' for the host.

  1. Applying list records again:
    cloudns_api.sh -sj listrecords $ZONE host=@ type=A showid=true

does not return a record??

Any help which can be provided?

Thanks!

Allow usage of `sub-auth-id` or `sub-auth-user` according to the documentation

Hello there,

We mainly use sub auth users for authentication in order to allow least privileges to our users.

According to the documentation, this can be used to login to the api using sub-auth-id or sub-auth-user.

You script only sets auth-id here. I have tried to change it to use sub-auth-user and it works just fine.

I will open a PR to add the possibility to use the others.

CentOS 7: old bash version doesn't support local -n

Hello ! First of all thanks for te script, I successfully created a master zone this way
cloudns_api.sh addzone 'api.net&master'

Then I attempt to create A record this way
cloudns_api.sh addrecord api.net type=A host=www record=201.139.116.6 ttl=3600

And i got this
/usr/bin/cloudns_api: línea 275: local: -n: opción inválida
local: uso: local [opción] nombre[=valor] ...
mar dic 12 16:12:52 CST 2017: Error: type is not a valid key
/usr/bin/cloudns_api: línea 275: local: -n: opción inválida
local: uso: local [opción] nombre[=valor] ...
mar dic 12 16:12:52 CST 2017: Error: host is not a valid key
/usr/bin/cloudns_api: línea 275: local: -n: opción inválida
local: uso: local [opción] nombre[=valor] ...
mar dic 12 16:12:52 CST 2017: Error: record is not a valid key
/usr/bin/cloudns_api: línea 275: local: -n: opción inválida
local: uso: local [opción] nombre[=valor] ...
mar dic 12 16:12:52 CST 2017: Error: ttl is not a valid key

Could you help me to know what is wrong ? I am running the script in Centos 7. Thanks in advanced !

Why not rely on PATH?

Is there a reason the script specifies absolute paths for every utility it uses?

AWK="/usr/bin/awk"
BASENAME="/usr/bin/basename"
CAT="/usr/bin/cat"
CURL="/usr/bin/curl"
CUT="/usr/bin/cut"
DATE="/usr/bin/date"
ECHO="builtin echo"
EVAL="builtin eval"
GETOPTS="builtin getopts"
GREP="/usr/bin/grep"
JQ="/usr/bin/jq"
SED="/usr/bin/sed"
SLEEP="/usr/bin/sleep"
TEST="/usr/bin/test"
TR="/usr/bin/tr"
WC="/usr/bin/wc"

This is not very portable. For example, if I compile jq myself, it will normally be in /usr/local/bin rather than /usr/bin, and Debian usually has date in /bin/date rather than /usr/bin/date.

These are the changes I had to make to get it running on Debian and Ubuntu:

--- a/bin/cloudns_api.sh
+++ b/bin/cloudns_api.sh
@@ -5,13 +5,13 @@ BASENAME="/usr/bin/basename"
 CAT="/usr/bin/cat"
 CURL="/usr/bin/curl"
 CUT="/usr/bin/cut"
-DATE="/usr/bin/date"
+DATE="/bin/date"
 ECHO="builtin echo"
 EVAL="builtin eval"
 GETOPTS="builtin getopts"
-GREP="/usr/bin/grep"
+GREP="/bin/grep"
 JQ="/usr/bin/jq"
-SED="/usr/bin/sed"
+SED="/bin/sed"
-SLEEP="/usr/bin/sleep"
+SLEEP="/bin/sleep"
 TEST="/usr/bin/test"
 TR="/usr/bin/tr"

It would be easier to just rely on these being on the path rather than explicitly specifying the absolute path to them.

id record value

Hello.

Why it's showing this error when I try to get the id records?

./cloudns_api.sh listrecords domain.xxx showid=true

./cloudns_api.sh: line 275: local: -n: invalid option
local: usage: local [option] name[=value] ...
Error: showid is not a valid key

Tks

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.