netgate-dataplane API (19.08)

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)
buffers
object (netgate.dataplane.dataplaneconfig.Buffers)
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

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

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.Buffers

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

Example URL

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

VPP pre-allocated buffers configuration

Responses

200

netgate.dataplane.dataplaneconfig.Buffers

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:buffers"

	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:buffers":
    {
    }
}

creates netgate.dataplane.dataplaneconfig.Buffers

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

Example URL

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

VPP pre-allocated buffers configuration

Request Body schema: application/yang-data+json

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

default-data-size
integer <int64>

Amount of memory allocated per-buffer

buffers-per-numa
integer <int64>

Pre-allocated buffers count

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "default-data-size": 0,
  • "buffers-per-numa": 0
}

creates or updates netgate.dataplane.dataplaneconfig.Buffers

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

Example URL

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

VPP pre-allocated buffers configuration

Request Body schema: application/yang-data+json

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

netgate-dataplane:buffers
object (netgate.dataplane.dataplaneconfig.Buffers)

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:buffers":
    {
    }
}

removes netgate.dataplane.dataplaneconfig.Buffers

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

Example URL

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

VPP pre-allocated buffers configuration

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:buffers"

	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

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

Reque