netgate-vxlan API (19.02)

This YANG module provides a Netgate-defined data-model for VXLAN data.

Copyright 2018-2019 Rubicon Communications, LLC.

vxlan-config

returns netgate.vxlan.VxlanConfig

get /data/netgate-vxlan:vxlan-config

Example URL

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

Configuration for VXLAN tunnels.

Responses

200

netgate.vxlan.VxlanConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-vxlan:vxlan-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-vxlan:vxlan-config":
    {
    }
}

creates netgate.vxlan.VxlanConfig

post /data/netgate-vxlan:vxlan-config

Example URL

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

Configuration for VXLAN tunnels.

Request Body schema: application/yang-data+json

netgate.vxlan.VxlanConfig to be added to list

vxlan-table
object (netgate.vxlan.vxlanconfig.VxlanTable)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "vxlan-table":
    {
    }
}

creates or updates netgate.vxlan.VxlanConfig

put /data/netgate-vxlan:vxlan-config

Example URL

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

Configuration for VXLAN tunnels.

Request Body schema: application/yang-data+json

netgate.vxlan.VxlanConfig to be added or updated

netgate-vxlan:vxlan-config
object (netgate.vxlan.VxlanConfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.vxlan.VxlanConfig

delete /data/netgate-vxlan:vxlan-config

Example URL

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

Configuration for VXLAN tunnels.

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-vxlan:vxlan-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.vxlan.vxlanconfig.VxlanTable

get /data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table

Example URL

https://hostname/restconf/data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table

VXLAN table.

Responses

200

netgate.vxlan.vxlanconfig.VxlanTable

400

Internal error

Request samples

Copy
package main

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

func main() {

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

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

creates netgate.vxlan.vxlanconfig.VxlanTable

post /data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table

Example URL

https://hostname/restconf/data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table

VXLAN table.

Request Body schema: application/yang-data+json

netgate.vxlan.vxlanconfig.VxlanTable to be added to list

tunnel
Array of objects (netgate.vxlan.vxlanconfig.vxlantable.Tunnel)

VXLAN tunnel name.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "tunnel":
    [
    ]
}

creates or updates netgate.vxlan.vxlanconfig.VxlanTable

put /data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table

Example URL

https://hostname/restconf/data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table

VXLAN table.

Request Body schema: application/yang-data+json

netgate.vxlan.vxlanconfig.VxlanTable to be added or updated

netgate-vxlan:vxlan-table
object (netgate.vxlan.vxlanconfig.VxlanTable)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-vxlan:vxlan-table":
    {
    }
}

removes netgate.vxlan.vxlanconfig.VxlanTable

delete /data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table

Example URL

https://hostname/restconf/data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table

VXLAN table.

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-vxlan:vxlan-config/netgate-vxlan:vxlan-table"

	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.vxlan.vxlanconfig.vxlantable.Tunnel

post /data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table/netgate-vxlan:tunnel

Example URL

https://hostname/restconf/data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table/netgate-vxlan:tunnel

VXLAN tunnel name.

Request Body schema: application/yang-data+json

netgate.vxlan.vxlanconfig.vxlantable.Tunnel to be added to list

vni
integer <int64>

VNI value, u24.

decap-next-node
string

The name of the decapsulation next graph node.

instance
integer <int64>

Each VXLAN creates an interface. The created interface will be named 'vxlan_tunnel', where the is the instance number. The instance number must be unique across all VXLAN entries.

encap-route-table
string

The name of an encapsulation route table.

name
string

The VXLAN tunnel identifier. A unique name for this VXLAN tunnel.

mcast-if-name
string

The interface to use, along with a multicast destination IP address, if a multicast destination is desired.

src-ip-address
string

The source IP address.

dst-ip-address
string

The destination IP address.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "vni": 0,
  • "decap-next-node": "string",
  • "instance": 0,
  • "encap-route-table": "string",
  • "name": "string",
  • "mcast-if-name": "string",
  • "src-ip-address": "string",
  • "dst-ip-address": "string"
}

returns netgate.vxlan.vxlanconfig.vxlantable.Tunnel

get /data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table/netgate-vxlan:tunnel={name}

Example URL

https://hostname/restconf/data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table/netgate-vxlan:tunnel={name}

VXLAN tunnel name.

path Parameters
name
required
string

Id of tunnel

Responses

200

netgate.vxlan.vxlanconfig.vxlantable.Tunnel

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table/netgate-vxlan:tunnel=%7Bname%7D"

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

creates netgate.vxlan.vxlanconfig.vxlantable.Tunnel

post /data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table/netgate-vxlan:tunnel={name}

Example URL

https://hostname/restconf/data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table/netgate-vxlan:tunnel={name}

VXLAN tunnel name.

path Parameters
name
required
string

Id of tunnel

Request Body schema: application/yang-data+json

netgate.vxlan.vxlanconfig.vxlantable.Tunnel to be added to list

vni
integer <int64>

VNI value, u24.

decap-next-node
string

The name of the decapsulation next graph node.

instance
integer <int64>

Each VXLAN creates an interface. The created interface will be named 'vxlan_tunnel', where the is the instance number. The instance number must be unique across all VXLAN entries.

encap-route-table
string

The name of an encapsulation route table.

name
string

The VXLAN tunnel identifier. A unique name for this VXLAN tunnel.

mcast-if-name
string

The interface to use, along with a multicast destination IP address, if a multicast destination is desired.

src-ip-address
string

The source IP address.

dst-ip-address
string

The destination IP address.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "vni": 0,
  • "decap-next-node": "string",
  • "instance": 0,
  • "encap-route-table": "string",
  • "name": "string",
  • "mcast-if-name": "string",
  • "src-ip-address": "string",
  • "dst-ip-address": "string"
}

creates or updates netgate.vxlan.vxlanconfig.vxlantable.Tunnel

put /data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table/netgate-vxlan:tunnel={name}

Example URL

https://hostname/restconf/data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table/netgate-vxlan:tunnel={name}

VXLAN tunnel name.

path Parameters
name
required
string

Id of tunnel

Request Body schema: application/yang-data+json

netgate.vxlan.vxlanconfig.vxlantable.Tunnel to be added or updated

netgate-vxlan:tunnel
object (netgate.vxlan.vxlanconfig.vxlantable.Tunnel)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-vxlan:tunnel":
    {
    }
}

removes netgate.vxlan.vxlanconfig.vxlantable.Tunnel

delete /data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table/netgate-vxlan:tunnel={name}

Example URL

https://hostname/restconf/data/netgate-vxlan:vxlan-config/netgate-vxlan:vxlan-table/netgate-vxlan:tunnel={name}

VXLAN tunnel name.

path Parameters
name
required
string

Id of tunnel

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-vxlan:vxlan-config/netgate-vxlan:vxlan-table/netgate-vxlan:tunnel=%7Bname%7D"

	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))

}

vxlan-state

returns netgate.vxlan.VxlanState

get /data/netgate-vxlan:vxlan-state

Example URL

https://hostname/restconf/data/netgate-vxlan:vxlan-state

State of the VXLAN tunnels.

Responses

200

netgate.vxlan.VxlanState

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-vxlan:vxlan-state"

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

returns netgate.vxlan.vxlanstate.VxlanTable

get /data/netgate-vxlan:vxlan-state/netgate-vxlan:vxlan-table

Example URL

https://hostname/restconf/data/netgate-vxlan:vxlan-state/netgate-vxlan:vxlan-table

VXLAN table.

Responses

200

netgate.vxlan.vxlanstate.VxlanTable

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-vxlan:vxlan-state/netgate-vxlan:vxlan-table"

	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-vxlan:vxlan-table":
    {