netgate-dataplane API (19.02)

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

Content type
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)
cpu
object (netgate.dataplane.dataplaneconfig.Cpu)
dpdk
object (netgate.dataplane.dataplaneconfig.Dpdk)
ip6
object (netgate.dataplane.dataplaneconfig.Ip6)
ip
object (netgate.dataplane.dataplaneconfig.Ip)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

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

Content type
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

Content type
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

workers
integer <int32>

Number of worker threads

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "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

Content type
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.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

Content type
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

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

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "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

Content type
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.

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

Content type
application/yang-data+json
<