netgate-dataplane API (19.05)

This module defines startup configuration settings for VPP.

This includes items related to how VPP itself is run, such as memory allocations, which devices to manage, which drivers to use.

This does not include dataplane configurations such as the IP address assigned to an interface or IP routes. to the underlying data-model elements for the Netgate router.

Copyright 2018-2019 Rubicon Communications, LLC.

dataplane-config

returns netgate.dataplane.DataplaneConfig

get /data/netgate-dataplane:dataplane-config

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config

dataplane startup configurations

Responses

200

netgate.dataplane.DataplaneConfig

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-dataplane:dataplane-config"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-dataplane:dataplane-config":
    {
    }
}

creates netgate.dataplane.DataplaneConfig

post /data/netgate-dataplane:dataplane-config

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config

dataplane startup configurations

Request Body schema: application/yang-data+json

netgate.dataplane.DataplaneConfig to be added to list

nat
object (netgate.dataplane.dataplaneconfig.Nat)
ip
object (netgate.dataplane.dataplaneconfig.Ip)
cpu
object (netgate.dataplane.dataplaneconfig.Cpu)
dpdk
object (netgate.dataplane.dataplaneconfig.Dpdk)
statseg
object (netgate.dataplane.dataplaneconfig.Statseg)
ip6
object (netgate.dataplane.dataplaneconfig.Ip6)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "nat":
    {
    },
  • "ip":
    {
    },
  • "cpu":
    {
    },
  • "dpdk":
    {
    },
  • "statseg":
    {
    },
  • "ip6":
    {
    }
}

creates or updates netgate.dataplane.DataplaneConfig

put /data/netgate-dataplane:dataplane-config

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config

dataplane startup configurations

Request Body schema: application/yang-data+json

netgate.dataplane.DataplaneConfig to be added or updated

netgate-dataplane:dataplane-config
object (netgate.dataplane.DataplaneConfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-dataplane:dataplane-config":
    {
    }
}

removes netgate.dataplane.DataplaneConfig

delete /data/netgate-dataplane:dataplane-config

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config

dataplane startup configurations

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-dataplane:dataplane-config"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.dataplane.dataplaneconfig.Cpu

get /data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu

cpu stanza

Responses

200

netgate.dataplane.dataplaneconfig.Cpu

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-dataplane:cpu":
    {
    }
}

creates netgate.dataplane.dataplaneconfig.Cpu

post /data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu

cpu stanza

Request Body schema: application/yang-data+json

netgate.dataplane.dataplaneconfig.Cpu to be added to list

main-core
integer <int64>

Assign main thread to a specific core.

coremask-workers
integer <int32>

Place worker threads according to the bitmap hex-mask.

scheduler-priority
integer <int64>

Scheduling priority. Only valid if the 'scheduler-policy' is set to 'fifo' or 'rr'.

skip-cores
integer <int64>

Sets number of CPU core(s) to be skipped.

corelist-workers
object (netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers)
scheduler-policy
string (netgate.dataplane.DataplaneSchedulerPolicy)
Enum:"rr" "fifo" "batch" "idle" "other"
workers
integer <int32>

Number of worker threads

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "main-core": 0,
  • "coremask-workers": 0,
  • "scheduler-priority": 0,
  • "skip-cores": 0,
  • "corelist-workers":
    {
    },
  • "scheduler-policy": "rr",
  • "workers": 0
}

creates or updates netgate.dataplane.dataplaneconfig.Cpu

put /data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu

cpu stanza

Request Body schema: application/yang-data+json

netgate.dataplane.dataplaneconfig.Cpu to be added or updated

netgate-dataplane:cpu
object (netgate.dataplane.dataplaneconfig.Cpu)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-dataplane:cpu":
    {
    }
}

removes netgate.dataplane.dataplaneconfig.Cpu

delete /data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu

cpu stanza

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers

get /data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu/netgate-dataplane:corelist-workers

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu/netgate-dataplane:corelist-workers

returns netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers

Responses

200

netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu/netgate-dataplane:corelist-workers"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-dataplane:corelist-workers":
    {
    }
}

creates netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers

post /data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu/netgate-dataplane:corelist-workers

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu/netgate-dataplane:corelist-workers

creates netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers

Request Body schema: application/yang-data+json

netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers to be added to list

corelist-worker
Array of integers <int64>

Place worker threads according to the list of cores.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "corelist-worker":
    [
    ]
}

creates or updates netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers

put /data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu/netgate-dataplane:corelist-workers

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu/netgate-dataplane:corelist-workers

creates or updates netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers

Request Body schema: application/yang-data+json

netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers to be added or updated

netgate-dataplane:corelist-workers
object (netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-dataplane:corelist-workers":
    {
    }
}

removes netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers

delete /data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu/netgate-dataplane:corelist-workers

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu/netgate-dataplane:corelist-workers

removes netgate.dataplane.dataplaneconfig.cpu.coreworkers.corelist.CorelistWorkers

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:cpu/netgate-dataplane:corelist-workers"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.dataplane.dataplaneconfig.Dpdk

get /data/netgate-dataplane:dataplane-config/netgate-dataplane:dpdk

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:dpdk

dpdk stanza

Responses

200

netgate.dataplane.dataplaneconfig.Dpdk

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:dpdk"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-dataplane:dpdk":
    {
    }
}

creates netgate.dataplane.dataplaneconfig.Dpdk

post /data/netgate-dataplane:dataplane-config/netgate-dataplane:dpdk

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:dpdk

dpdk stanza

Request Body schema: application/yang-data+json

netgate.dataplane.dataplaneconfig.Dpdk to be added to list

no-multi-seg
boolean

Disable mutli-segment buffers.

vdev
Array of objects (netgate.dataplane.dataplaneconfig.dpdk.Vdev)

Configs for a software cryptodev

uio-driver
string (netgate.dataplane.UioDriverT)
Enum:"igb_uio" "uio_pci_generic" "vfio-pci"
dev
Array of objects (netgate.dataplane.dataplaneconfig.dpdk.Dev)

Configs for a NIC or crypto device

no-tx-checksum-offload
boolean

Disable transmit checksum offload.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "no-multi-seg": true,
  • "vdev":
    [
    ],
  • "uio-driver": "igb_uio",
  • "dev":
    [
    ],
  • "no-tx-checksum-offload": true
}

creates or updates netgate.dataplane.dataplaneconfig.Dpdk

put /data/netgate-dataplane:dataplane-config/netgate-dataplane:dpdk

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:dpdk

dpdk stanza

Request Body schema: application/yang-data+json

netgate.dataplane.dataplaneconfig.Dpdk to be added or updated

netgate-dataplane:dpdk
object (netgate.dataplane.dataplaneconfig.Dpdk)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-dataplane:dpdk":
    {
    }
}

removes netgate.dataplane.dataplaneconfig.Dpdk

delete /data/netgate-dataplane:dataplane-config/netgate-dataplane:dpdk

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:dpdk

dpdk stanza

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:dpdk"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

creates netgate.dataplane.dataplaneconfig.dpdk.Dev

post /data/netgate-dataplane:dataplane-config/netgate-dataplane:dpdk/netgate-dataplane:dev

Example URL

https://hostname/restconf/data/netgate-dataplane:dataplane-config/netgate-dataplane:dpdk/netgate-dataplane:dev

Configs for a NIC or crypto device

Request Body schema: application/yang-data+json

netgate.dataplane.dataplaneconfig.dpdk.Dev to be added to list

num-tx-queues
integer <int32>

Number of transmit queues.

name
string

Given name for a dpdk device.

device-type
string (netgate.dataplane.DeviceTypeT)
Enum:"network" "crypto"
num-rx-queues
integer <int32>

Number of receive queues.

id
string

The PCI ID for a device or 'default'.

vlan-strip-offload
string

VLAN strip offload on/off

present
boolean

Device enabled, no attributes necessarily set

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all