rigado config create

Send an app set, time, network, or EAP mode command to a gateway

Synopsis

Manages configuring a Gateway based on the contents of a JSON file. The format of the configuration JSON can be seen here: https://docs.rigado.com/projects/edge-direct-api/en/latest/#definition-ConfigurationState

Edge Direct can manage app set, time, network, and EAP mode configurations for gateways that have a sufficient revision. For these gateways, Edge Direct will manage the configuration regardless of whether or not the gateway is currently online.

The default-ethernet-dhcp connection in network configurations cannot be changed; including that connection in your configuration file will result in an error.

Examples:

{
  "type": "APP_SET",
  "settings": {
    "my-custom-app": {
      "service": {
        "count": {
          "token": "super secret",
          "endpoint": "http://localhost:8080"
        },
        "scanner": {
          "enabled": true
        }
      }
    }
  }
}

{
  "type": "TIME",
  "settings": {
    "ntp": {
      "server": "ntp.ubuntu.com",
      "backup": "pool.ntp.org"
    },
    "zone": "America/Los_Angeles"
  }
}

{
  "type": "NETWORK",
  "meta": "APPLY_AFTER_RESET",
  "settings": {
    "connections": {
      "forCell": {
        "ipv4": {
          "addresses": "192.168.0.1,8,191.178.0.5",
          "dns": [
            "192.168.1.15",
            "172.16.254.1"
          ],
          "method": "manual",
          "may-fail": true,
          "route-metric": -3
        },
        "connection": {
          "type": "gsm",
          "id": "forCell"
        },
        "gsm": {
          "username": "someUser",
          "password": "vsecure",
          "apn": "someApn"
        }
      },
      "forEth": {
        "ipv4": {
          "addresses": "192.168.0.1,8,191.178.0.5",
          "dns": [
            "192.168.1.15",
            "172.16.254.1"
          ],
          "method": "manual",
          "may-fail": true,
          "route-metric": -3
        },
        "connection": {
          "type": "802-3-ethernet",
          "id": "forEth",
          "interface-name": "eth0"
        }
      },
      "forWireless": {
        "ipv4": {
          "addresses": "192.168.0.1,8,191.178.0.5",
          "dns": [
            "192.168.1.15",
            "172.16.254.1"
          ],
          "method": "manual",
          "may-fail": true,
          "route-metric": -3
        },
        "connection": {
          "type": "802-11-wireless",
          "id": "forWireless",
          "autoconnect-priority": 99,
          "interface-name": "wlan0"
        },
        "802-11-wireless": {
          "channel": 23,
          "band": "bg",
          "ssid": "daSSID",
          "security": "802-11-wireless-security"
        }
      },
      "forWirelessWSec": {
        "ipv4": {
          "addresses": "192.168.0.1,8,191.178.0.5",
          "dns": [
            "192.168.1.15",
            "172.16.254.1"
          ],
          "method": "manual",
          "may-fail": true,
          "route-metric": -3
        },
        "connection": {
          "type": "802-11-wireless",
          "id": "forWirelessWSec",
          "autoconnect-priority": 99,
          "interface-name": "wlan0"
        },
        "802-11-wireless": {
          "channel": 23,
          "band": "bg",
          "ssid": "daSSID",
          "security": "802-11-wireless-security"
        },
        "802-11-wireless-security": {
          "key-mgmt": "wpa-eap"
        },
        "802-1x": {
          "eap": [
            "peap",
            "ttls"
          ],
          "identity": "eIdent",
          "phase2-auth": "ephase2",
          "password": "epass"
        }
      }
    }
  }
}

{
  "type": "EAP_MODE",
  "settings": {
    "enabled": true,
    "channel": "edge"
  }
}

Usage

$ rigado config create --serial SERIAL_NUMBER --filename FILENAME [--dryRun] [flags]

Options

    --dry-run           Only check the validity of the form of the configuration JSON given the configuration type without performing the configuration operation.
    --filename string   Filename containing configuration JSON (required)
-h, --help              help for create
    --serial string     The serial number of the gateway unit the configuration is for. (required)

Options inherited from parent commands

    --apisecret string   API Secret for authentication (instead of user-based auth)
    --apitoken string    API Token for authentication (instead of user-based auth)
-j, --json               Output JSON instead of formatted strings, when possible.