gateway

Usage: oredge gateway 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 gateway

Usage: oredge gateway create [OPTIONS]

OPTIONS:
    --name string                      name.
    --tag integer                      tag, can add multiple times.
    --partition integer                partition id.
    --map-to-k8s bool                  true or false.
    --k8s integer                      k8s id.
    --is-gray-partition bool           is gray partition, true or false.


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

Example

Create gateway

# oredge gateway create --name test --partition 1
ID: 1

Create gateway map to k8s

# oredge gateway create --name test-k8s --partition 1 --map-to-k8s true --k8s 1
ID: 2

List gateways

Usage: oredge gateway 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 gateway list
ID    NAME        PARTITION    MAP TO K8S    K8S    CREATE TIME            MODIFY TIME
1     default     1            false                2021-05-21 05:41:32    2021-05-21 05:41:32
2     test        1            false                2021-05-21 05:43:23    2021-05-21 05:43:23
4     test-k8s    1            true          1      2021-05-21 05:44:38    2021-05-21 05:44:38

Get gateway detail

Usage: oredge gateway show [id] [OPTIONS]

OPTIONS:
    --id integer                       id.

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

Example

# oredge gateway show 1
ID         : 1
NAME       : default
PARTITION  : 1
MAP TO K8S : false
K8S        :
CREATE TIME: 2021-05-21 05:41:32
MODIFY TIME: 2021-05-21 05:41:32

Modify gateway

Usage: oredge gateway modify [id] [OPTIONS]

OPTIONS:
    --id integer                       id.
    --name string                      name.
    --tag integer                      tag, can add multiple times.
    --partition integer                partition id.
    --map-to-k8s bool                  true or false.
    --k8s integer                      k8s id.
    --is-gray-partition bool           is gray partition, true or false.

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

Example

# ./oredge gateway modify 1 --name "default"
OK

Delete gateway

Usage: oredge gateway delete [id] [OPTIONS]

OPTIONS:
    --id integer                       id.

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

Example

# oredge gateway delete 1
OK