dns

Usage: oredge dns ACTION [OPTIONS]

ACTION:
    create
    list
    show
    modify
    delete

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

Create DNS zone

Usage: oredge dns create [OPTIONS]

OPTIONS:
    --nameserver json                  nameserver, can add multiple times.
        domain string                  domain.
        ttl integer                    ttl.
        unit string                    min, hour, day.
    --map-to-k8s bool                  true or false.
    --k8s integer                      k8s id.
    --zone string                      zone.
    --soa-email string                 soa email.
    --gid integer                      user group id, can add multiple times.

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

Example

# oredge dns create --nameserver '{"domain":"ns1.test.com","ttl":1,"unit":"hour"}' --zone test.com
ID: 1

List DNS zones

Usage: oredge dns list [OPTIONS]

OPTIONS:
    --page integer                     page, 1(default).
    --page-size integer                page size, 20(default).

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

Example

# ./oredge dns list
ID    NAMESERVER      ZONE        MAP TO K8S    K8S    CREATE TIME            MODIFY TIME
1     ns1.test.com    test.com    false                2021-05-25 00:18:56    2021-05-25 00:18:56

Get DNS zone detail

Usage: oredge dns show [id] [OPTIONS]

OPTIONS:
    --id integer                       page, 1(default).

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

Example

# oredge dns show 1
ID         : 1
NAME       :
NAMESERVER : ns1.test.com
ZONE       : test.com
SOA EMAIL  :
MAP TO K8S : 0
K8S        :
CREATE TIME: 2021-05-25 00:18:56
MODIFY TIME: 2021-05-25 00:18:56

Modify DNS zone

Usage: oredge dns modify [id] [OPTIONS]

OPTIONS:
    --id integer                       id.
    --nameserver json                  nameserver, can add multiple times.
        domain string                  domain.
        ttl integer                    ttl.
        unit string                    min, hour, day.
    --map-to-k8s bool                  true or false.
    --k8s integer                      k8s id.
    --zone string                      zone.
    --soa-email string                 soa email.
    --gid integer                      user group id, can add multiple times.

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

Example

# oredge dns modify 1 --nameserver '{"domain":"ns1.test.com","ttl":1,"unit":"hour"}' --zone test.com
OK

Delete DNS zone

Usage: oredge dns delete [id] [OPTIONS]

OPTIONS:
    --id integer                       page, 1(default).

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

Example

# oredge dns delete 1
OK