Assigned Sites

A tenant has a set of assigned sites, to which it can deploy applications.

The tenant's parent tenant assigns sites to the tenant by creating a resource in /config/tenants/<tenant-name>/assigned-sites/<site-name>.

A tenant can see the sites it has been assigned by viewing assigned-sites in the operational state, i.e., /state/assigned-sites.

A tenant can add its own (private) labels to a site by modifying the assigned site resource in the configuration, i.e, /config/assigned-sites/<site-name>.

Create a new assigned site

SecurityaccessToken
Request
query Parameters
validate
string <enumeration>

Validate the request but do not actually perform the requested operation

Value: "true"
Request Body schema:
name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$
object

Map of string keys and values that can be used to organize and categorize (scope and select) objects.

In addition to the configured labels, all labels configured by the site provider, and the system-provided labels in the list below are added by the system to the operational state, which means that they are available for matching.

  • system/name: contains the value of the site's name
  • system/type: contains the value of the site's type

A label name consists of an optional prefix followed by /, followed by a name segment. The optional prefix is a DNS host name (must match inet:domain-name). The name segment must match ava:name.

The prefix system is used for labels assigned by the system.

Label names without prefixes are reserved for application owners.

For example:

  • system/controller
  • example.com/location.city
  • example.com/color
  • color
Array of objects

Combined list of GPUs on all hosts within the site accessible by the tenant.

resource-profile
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$
site-profiles
Array of strings <name>

Reference to the site profiles applied to this site. Multiple profiles may be assigned to a single site and in such case the settings are combined.

Note that these site profile settings might be overridden by inherited site profile settings created by site provider tenant(s).

Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict (instance exists)

503

Service Unavailable (strongbox sealed)

post/v1/config/assigned-sites
Request samples
name: gothenburg-bergakungen
labels:
  system/type: edge
  system/name: gothenburg-bergakungen
  region: sw-west
gpus:
  - uuid: GPU-de663f3f-856c-4e48-9269-c2269169bfda
    name: NVIDIA GeForce
    serial: "12345678"
    memory: 2048 MiB
    driver-version: 525.85.5
    compute-mode: Default
    compute-capability: "8.0"
    display-mode: Disabled
resource-profile: appowner-profile
site-profiles:
  - sweden

Retrieve the configuration of all assigned sites

SecurityaccessToken
Request
query Parameters
fields
string

Retrieve only requested fields from the resource

See section fields

validate
string <enumeration>

Validate the request but do not actually perform the requested operation

Value: "true"
keys
string <enumeration>

Retrieve only the keys for the list

Value: "true"
count
string <enumeration>

Retrieve only the number of elements in the list

Value: "true"
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

412

Precondition Failed

503

Service Unavailable (strongbox sealed)

get/v1/config/assigned-sites
Response samples
- name: gothenburg-bergakungen
  labels:
    system/type: edge
    system/name: gothenburg-bergakungen
    region: sw-west
  gpus:
    - uuid: GPU-de663f3f-856c-4e48-9269-c2269169bfda
      name: NVIDIA GeForce
      serial: "12345678"
      memory: 2048 MiB
      driver-version: 525.85.5
      compute-mode: Default
      compute-capability: "8.0"
      display-mode: Disabled
  resource-profile: appowner-profile
  site-profiles:
    - sweden
  

Update an assigned site

SecurityaccessToken
Request
path Parameters
assigned-site-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of assigned-site

query Parameters
validate
string <enumeration>

Validate the request but do not actually perform the requested operation

Value: "true"
Request Body schema:
name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$
object

Map of string keys and values that can be used to organize and categorize (scope and select) objects.

In addition to the configured labels, all labels configured by the site provider, and the system-provided labels in the list below are added by the system to the operational state, which means that they are available for matching.

  • system/name: contains the value of the site's name
  • system/type: contains the value of the site's type

A label name consists of an optional prefix followed by /, followed by a name segment. The optional prefix is a DNS host name (must match inet:domain-name). The name segment must match ava:name.

The prefix system is used for labels assigned by the system.

Label names without prefixes are reserved for application owners.

For example:

  • system/controller
  • example.com/location.city
  • example.com/color
  • color
Array of objects

Combined list of GPUs on all hosts within the site accessible by the tenant.

resource-profile
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$
site-profiles
Array of strings <name>

Reference to the site profiles applied to this site. Multiple profiles may be assigned to a single site and in such case the settings are combined.

Note that these site profile settings might be overridden by inherited site profile settings created by site provider tenant(s).

Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

412

Precondition Failed

503

Service Unavailable (strongbox sealed)

patch/v1/config/assigned-sites/{assigned-site-name}
Request samples
name: gothenburg-bergakungen
labels:
  system/type: edge
  system/name: gothenburg-bergakungen
  region: sw-west
gpus:
  - uuid: GPU-de663f3f-856c-4e48-9269-c2269169bfda
    name: NVIDIA GeForce
    serial: "12345678"
    memory: 2048 MiB
    driver-version: 525.85.5
    compute-mode: Default
    compute-capability: "8.0"
    display-mode: Disabled
resource-profile: appowner-profile
site-profiles:
  - sweden

Delete an assigned site

SecurityaccessToken
Request
path Parameters
assigned-site-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of assigned-site

query Parameters
validate
string <enumeration>

Validate the request but do not actually perform the requested operation

Value: "true"
Responses
204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

412

Precondition Failed

503

Service Unavailable (strongbox sealed)

delete/v1/config/assigned-sites/{assigned-site-name}

Replace or create a new assigned site

SecurityaccessToken
Request
path Parameters
assigned-site-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of assigned-site

query Parameters
validate
string <enumeration>

Validate the request but do not actually perform the requested operation

Value: "true"
Request Body schema:
name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$
object

Map of string keys and values that can be used to organize and categorize (scope and select) objects.

In addition to the configured labels, all labels configured by the site provider, and the system-provided labels in the list below are added by the system to the operational state, which means that they are available for matching.

  • system/name: contains the value of the site's name
  • system/type: contains the value of the site's type

A label name consists of an optional prefix followed by /, followed by a name segment. The optional prefix is a DNS host name (must match inet:domain-name). The name segment must match ava:name.

The prefix system is used for labels assigned by the system.

Label names without prefixes are reserved for application owners.

For example:

  • system/controller
  • example.com/location.city
  • example.com/color
  • color
Array of objects

Combined list of GPUs on all hosts within the site accessible by the tenant.

resource-profile
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$
site-profiles
Array of strings <name>

Reference to the site profiles applied to this site. Multiple profiles may be assigned to a single site and in such case the settings are combined.

Note that these site profile settings might be overridden by inherited site profile settings created by site provider tenant(s).

Responses
201

Created

204

No Content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

412

Precondition Failed

503

Service Unavailable (strongbox sealed)

put/v1/config/assigned-sites/{assigned-site-name}
Request samples
name: gothenburg-bergakungen
labels:
  system/type: edge
  system/name: gothenburg-bergakungen
  region: sw-west
gpus:
  - uuid: GPU-de663f3f-856c-4e48-9269-c2269169bfda
    name: NVIDIA GeForce
    serial: "12345678"
    memory: 2048 MiB
    driver-version: 525.85.5
    compute-mode: Default
    compute-capability: "8.0"
    display-mode: Disabled
resource-profile: appowner-profile
site-profiles:
  - sweden

Retrieve the configuration of an assigned site

SecurityaccessToken
Request
path Parameters
assigned-site-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of assigned-site

query Parameters
fields
string

Retrieve only requested fields from the resource

See section fields

validate
string <enumeration>

Validate the request but do not actually perform the requested operation

Value: "true"
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

412

Precondition Failed

503

Service Unavailable (strongbox sealed)

get/v1/config/assigned-sites/{assigned-site-name}
Response samples
name: gothenburg-bergakungen
labels:
  system/type: edge
  system/name: gothenburg-bergakungen
  region: sw-west
gpus:
  - uuid: GPU-de663f3f-856c-4e48-9269-c2269169bfda
    name: NVIDIA GeForce
    serial: "12345678"
    memory: 2048 MiB
    driver-version: 525.85.5
    compute-mode: Default
    compute-capability: "8.0"
    display-mode: Disabled
resource-profile: appowner-profile
site-profiles:
  - sweden

Retrieve the state of all assigned sites

SecurityaccessToken
Request
query Parameters
fields
string

Retrieve only requested fields from the resource

See section fields

site
string

Send the request to the specfifed site

content
string <enumeration>

Filter descendant nodes in the response

Enum: "config" "nonconfig"
keys
string <enumeration>

Retrieve only the keys for the list

Value: "true"
count
string <enumeration>

Retrieve only the number of elements in the list

Value: "true"
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

get/v1/state/assigned-sites
Response samples
- name: gothenburg-bergakungen
  descriptive-name: Bergakungen
  type: edge
  location:
    latitude: 57.7
    longitude: 11.99
    description: Sk�negatan
  connection-state:
    connected: true
    last-connect: 2021-11-22T12:09:56Z
    last-disconnect: 2021-01-22T12:09:56Z
  labels:
    system/type: edge
    system/name: gothenburg-bergakungen
    region: sw-west
  host-labels:
    camera: present
  volume-labels:
    speed:
      - fast
      - slow
  system-volumes:
    daemon-socket: /var/run/my-daemon.sock
  device-labels:
    rtc: /dev/rtc0
    tty:
      - /dev/ttyS1
      - /dev/ttyS2
      - /dev/ttyS3
  gpus:
    - uuid: GPU-de663f3f-856c-4e48-9269-c2269169bfda
      name: NVIDIA GeForce
      serial: "12345678"
      memory: 2048 MiB
      driver-version: 525.85.5
      compute-mode: Default
      compute-capability: "8.0"
      display-mode: Disabled
  gpu-labels:
    - name: gpu-display
      max-number-gpus: 1
      matching-gpus:
        - uuid: GPU-de663f3f-856c-4e48-9269-c2269169bfda
  network-interface-labels:
    scope: global
  resource-profile: appowner-profile
  site-profiles:
    - sweden
  application-upgrade-windows:
    - days-of-week: Friday, Saturday
      start-time: 01:00
      timezone: site-local
      duration: 4h
  inherited-application-upgrade-windows:
    - days-of-week: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
      start-time: 00:00
      timezone: UTC
      duration: 6h
  deployed-applications: 3
  warning: false
  application-upgrades-blocked: true
  

Retrieve the state of an assigned site

SecurityaccessToken
Request
path Parameters
assigned-site-name
required
string <name> ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$

name of assigned-site

query Parameters
fields
string

Retrieve only requested fields from the resource

See section fields

site
string

Send the request to the specfifed site

content
string <enumeration>

Filter descendant nodes in the response

Enum: "config" "nonconfig"
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

503

Service Unavailable (strongbox sealed)

get/v1/state/assigned-sites/{assigned-site-name}
Response samples
name: gothenburg-bergakungen
descriptive-name: Bergakungen
type: edge
location:
  latitude: 57.7
  longitude: 11.99
  description: Sk�negatan
connection-state:
  connected: true
  last-connect: 2021-11-22T12:09:56Z
  last-disconnect: 2021-01-22T12:09:56Z
labels:
  system/type: edge
  system/name: gothenburg-bergakungen
  region: sw-west
host-labels:
  camera: present
volume-labels:
  speed:
    - fast
    - slow
system-volumes:
  daemon-socket: /var/run/my-daemon.sock
device-labels:
  rtc: /dev/rtc0
  tty:
    - /dev/ttyS1
    - /dev/ttyS2
    - /dev/ttyS3
gpus:
  - uuid: GPU-de663f3f-856c-4e48-9269-c2269169bfda
    name: NVIDIA GeForce
    serial: "12345678"
    memory: 2048 MiB
    driver-version: 525.85.5
    compute-mode: Default
    compute-capability: "8.0"
    display-mode: Disabled
gpu-labels:
  - name: gpu-display
    max-number-gpus: 1
    matching-gpus:
      - uuid: GPU-de663f3f-856c-4e48-9269-c2269169bfda
network-interface-labels:
  scope: global
resource-profile: appowner-profile
site-profiles:
  - sweden
application-upgrade-windows:
  - days-of-week: Friday, Saturday
    start-time: 01:00
    timezone: site-local
    duration: 4h
inherited-application-upgrade-windows:
  - days-of-week: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
    start-time: 00:00
    timezone: UTC
    duration: 6h
deployed-applications: 3
warning: false
application-upgrades-blocked: true