Reference For: developers

API: networks

Operations of the networks tag of the native REST API.

Host-bridge networks / standard port groups (create, update, delete)

POST /v1/distributed-portgroups

Creates a distributed port group on a switch.

CLI
kyvernon network portgroup-create --body <json>

Request body

application/json: CreateDistributedPortgroupRequest

NameTypeRequiredDescription
datacenterIdstring or nullThe datacenter of the switch (optional; checked when given).
idempotencyKeystring or nullIdempotency key.
ipv4HostBridgeIpv4Request or null
ipv6PortgroupIpv6Request or null
namestringyesName (1 to 80 characters).
staticAddressesobject or nullFixed IPv4 addresses by MAC.
switchIdstringyesThe switch.
vlanIdinteger (int32) or nullVLAN id, 0 for untagged; ignored when vni is set.
vniinteger (int32) or nullOverlay segment (Geneve VNI) instead of a VLAN.

Responses

StatusDescriptionSchema
201CreatedObjectView
400Invalid argument; the error body names the fieldErrorBody
409Conflict: the object exists, or expectedVersion is staleErrorBody

PUT /v1/distributed-portgroups/{id}

Changes a distributed port group (compare-and-set on expectedVersion). Addresses already allocated stay while they are in the subnet.

CLI
kyvernon network portgroup-update <id> --body <json>

Parameters

NameInTypeRequiredDescription
idpathstringyesDistributed port group id (dvportgroup-N)

Request body

application/json: UpdateDistributedPortgroupRequest

NameTypeRequiredDescription
expectedVersioninteger (int64)yesVersion the change is based on.
ipv4HostBridgeIpv4Request or null
ipv6PortgroupIpv6Request or null
namestring or nullName.
staticAddressesobject or nullFixed IPv4 addresses by MAC (replaces the map).
vlanIdinteger (int32) or nullVLAN id (clears vni).
vniinteger (int32) or nullVNI (replaces the VLAN).

Responses

StatusDescriptionSchema
200OKObjectView
400Invalid argument; the error body names the fieldErrorBody
409Conflict: the object exists, or expectedVersion is staleErrorBody

DELETE /v1/distributed-portgroups/{id}

Deletes a distributed port group no NIC uses.

CLI
kyvernon network portgroup-delete <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesDistributed port group id (dvportgroup-N)

Responses

StatusDescriptionSchema
204Done; no body
412Failed precondition; the error body says whichErrorBody

POST /v1/distributed-switches

Creates a distributed switch in a datacenter's network folder.

CLI
kyvernon network dvs-create --body <json>

Request body

application/json: CreateDistributedSwitchRequest

NameTypeRequiredDescription
datacenterIdstringyesThe datacenter; the switch goes into its network folder.
hostUplinksarray of HostUplinksRequest or nullThe physical NICs of member hosts behind the uplinks.
hostsarray of string or nullMember hosts (default none).
idempotencyKeystring or nullIdempotency key.
mtuinteger (int32) or nullMTU (576 to 9216; default 1500).
namestringyesName (1 to 80 characters).
uplinkNamesarray of string or nullUplink names (default uplink1 to uplink<uplinks>).
uplinksinteger (int32) or nullNumber of uplinks (default 1).

Responses

StatusDescriptionSchema
201CreatedObjectView
400Invalid argument; the error body names the fieldErrorBody
409Conflict: the object exists, or expectedVersion is staleErrorBody

PUT /v1/distributed-switches/{id}

Changes a distributed switch (compare-and-set on expectedVersion).

CLI
kyvernon network dvs-update <id> --body <json>

Parameters

NameInTypeRequiredDescription
idpathstringyesDistributed switch id (dvs-N)

Request body

application/json: UpdateDistributedSwitchRequest

NameTypeRequiredDescription
expectedVersioninteger (int64)yesVersion the change is based on.
hostUplinksarray of HostUplinksRequest or nullThe physical NICs of member hosts (replaces the list).
hostsarray of string or nullMember hosts.
mtuinteger (int32) or nullMTU.
namestring or nullName.
uplinkNamesarray of string or nullUplink names.
uplinksinteger (int32) or nullNumber of uplinks.

Responses

StatusDescriptionSchema
200OKObjectView
400Invalid argument; the error body names the fieldErrorBody
409Conflict: the object exists, or expectedVersion is staleErrorBody

DELETE /v1/distributed-switches/{id}

Deletes a distributed switch without port groups.

CLI
kyvernon network dvs-delete <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesDistributed switch id (dvs-N)

Responses

StatusDescriptionSchema
204Done; no body
412Failed precondition; the error body says whichErrorBody

GET /v1/network/realization

Realization of the OVN logical networks (docs/network/DESIGN.md §6.3): the model generation, the Northbound connection and realization, the counters' state and every host's report. enabled: false when the controller has no [ovn].

CLI
kyvernon network realization

Responses

StatusDescriptionSchema
200OKOvnStatusView

POST /v1/networks

Creates a host-bridge network under a datacenter.

CLI
kyvernon network create --body <json>

Request body

application/json: CreateNetworkRequest

NameTypeRequiredDescription
backingHostBridgeBackingRequestyesHow NICs reach the hosts (host-bridge only in this slice).
datacenterIdstringyesDatacenter that owns the network (datacenter-N).
hostsarray of string or nullHosts offering this network (host-N). Empty or omitted: all hosts under the datacenter.
idempotencyKeystring or nullIdempotency key.
namestringyesDisplay name (1..=80 characters).
vlanIdinteger (int32) or nullVLAN id, 0 for untagged (default 0).

Responses

StatusDescriptionSchema
201CreatedObjectView
400Invalid argument; the error body names the fieldErrorBody
409Conflict: the object exists, or expectedVersion is staleErrorBody

PUT /v1/networks/{id}

Updates a host-bridge network (compare-and-set).

CLI
kyvernon network update <id> --body <json>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the network

Request body

application/json: UpdateNetworkRequest

NameTypeRequiredDescription
backingHostBridgeBackingRequest or null
expectedVersioninteger (int64)yesVersion the client read; fails with CONFLICT if it changed.
hostsarray of string or nullReplace the hosts list.
namestring or nullNew display name.
vlanIdinteger (int32) or nullNew VLAN id.

Responses

StatusDescriptionSchema
200OKObjectView
400Invalid argument; the error body names the fieldErrorBody
409Conflict: the object exists, or expectedVersion is staleErrorBody

DELETE /v1/networks/{id}

Deletes a network. Refuses when any VM still has a NIC on it.

CLI
kyvernon network delete <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the network

Responses

StatusDescriptionSchema
204Done; no body
400Invalid argument; the error body names the fieldErrorBody
412Failed precondition; the error body says whichErrorBody

Version 0.1.