netgate-vxlan API (24.06)

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

Copyright 2018-2020 Rubicon Communications, LLC.

vxlan-config

returns netgate.vxlan.VxlanConfig

Configuration for VXLAN tunnels.

Responses

Request samples

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
{
  • "netgate-vxlan:vxlan-config": {
    }
}

creates netgate.vxlan.VxlanConfig

Configuration for VXLAN tunnels.

Request Body schema: application/yang-data+json

netgate.vxlan.VxlanConfig to be added to list

object (netgate.vxlan.vxlanconfig.VxlanTable)

VXLAN table.

Responses

Request samples

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

creates or updates netgate.vxlan.VxlanConfig

Configuration for VXLAN tunnels.

Request Body schema: application/yang-data+json

netgate.vxlan.VxlanConfig to be added or updated

object (netgate.vxlan.VxlanConfig)

Configuration for VXLAN tunnels.

Responses

Request samples

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

removes netgate.vxlan.VxlanConfig

Configuration for VXLAN tunnels.

Responses

Request samples

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

VXLAN table.

Responses

Request samples

package main

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

func main() {

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

creates netgate.vxlan.vxlanconfig.VxlanTable

VXLAN table.

Request Body schema: application/yang-data+json

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

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

VXLAN tunnel name.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-vxlan:tunnel": [
    ]
}

creates or updates netgate.vxlan.vxlanconfig.VxlanTable

VXLAN table.

Request Body schema: application/yang-data+json

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

object (netgate.vxlan.vxlanconfig.VxlanTable)

VXLAN table.

Responses

Request samples

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

removes netgate.vxlan.vxlanconfig.VxlanTable

VXLAN table.

Responses

Request samples

package main

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

func main() {

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

VXLAN tunnel name.

Request Body schema: application/yang-data+json

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

netgate-vxlan:vni
integer <int64>

VNI value, u24.

netgate-vxlan: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.

netgate-vxlan:encap-route-table
string

The name of an encapsulation route table.

netgate-vxlan:name
string

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

netgate-vxlan:mcast-if-name
string

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

netgate-vxlan:src-ip-address
string

The source IP address.

netgate-vxlan:dst-ip-address
string

The destination IP address.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-vxlan:vni": 0,
  • "netgate-vxlan:instance": 0,
  • "netgate-vxlan:encap-route-table": "string",
  • "netgate-vxlan:name": "string",
  • "netgate-vxlan:mcast-if-name": "string",
  • "netgate-vxlan:src-ip-address": "string",
  • "netgate-vxlan:dst-ip-address": "string"
}

returns netgate.vxlan.vxlanconfig.vxlantable.Tunnel

VXLAN tunnel name.

path Parameters
name
required
string

Id of tunnel

Responses

Request samples

package main

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

func main() {

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

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

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

object (netgate.vxlan.vxlanconfig.vxlantable.Tunnel)

VXLAN tunnel name.

Responses

Request samples

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

removes netgate.vxlan.vxlanconfig.vxlantable.Tunnel

VXLAN tunnel name.

path Parameters
name
required
string

Id of tunnel

Responses

Request samples

package main

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

func main() {

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

State of the VXLAN tunnels.

Responses

Request samples

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

returns netgate.vxlan.vxlanstate.VxlanTable

VXLAN table.

Responses

Request samples

package main

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

func main() {

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

returns netgate.vxlan.vxlanstate.vxlantable.Tunnel

VXLAN tunnel name.

path Parameters
name
required
string

Id of tunnel

Responses

Request samples

package main

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

func main() {

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