Add default interface helper (#677)

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
This commit is contained in:
Pascal Vizeli 2020-10-15 11:00:12 +02:00 committed by GitHub
parent 91ca69b728
commit abb95d32cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -1591,6 +1591,7 @@ Get network information.
{
"interfaces": {
"eth0": {
"interface": "eth0",
"ip_address": "192.168.1.100/24",
"gateway": "192.168.1.1",
"id": "Wired connection 1",
@ -2236,7 +2237,7 @@ Some of the endpoints uses placeholders indicated with `[]` in the endpoint URL.
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| addon | The slug for the addon, to get the slug you can call `/addons`, to call endpoints for the add-on calling the endpoints you can use `self`as the slug. |
| application | The name of a application, call `/audio/info` to get the correct name |
| interface | A valid interface name, example `eth0`, to get the interface name you can call `/network/info` |
| interface | A valid interface name, example `eth0`, to get the interface name you can call `/network/info`. You can use `default` to get the primary interface |
| registry | A registry hostname defined in the container registry configuration, to get the hostname you can call `/docker/registries` |
| service | The service name for a service on the host. |
| snapshot | A valid snapshot slug, example `skuwe823`, to get the slug you can call `/snapshots` |

View File

@ -92,6 +92,7 @@ These models are describing objects that are getting returned from the superviso
| key | type | description |
| ----------- | ------- | ---------------------------------------------------------------------------- |
| interface | string | The interface name i.e eth0. |
| ip_address | string | The IP address and the netmask in a X.X.X.X/XX format. |
| gateway | string | The IP address of the gateway. |
| id | string | The ID of the interface. |