netgate-span API (24.06)

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

Copyright 2018-2020 Rubicon Communications, LLC.

span-config

returns netgate.span.SpanConfig

Switched Port Analyzer (SPAN) configuration.

Responses

Request samples

package main

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

func main() {

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

creates netgate.span.SpanConfig

Switched Port Analyzer (SPAN) configuration.

Request Body schema: application/yang-data+json

netgate.span.SpanConfig to be added to list

object (netgate.span.spanconfig.SpanTable)

SPAN table.

Responses

Request samples

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

creates or updates netgate.span.SpanConfig

Switched Port Analyzer (SPAN) configuration.

Request Body schema: application/yang-data+json

netgate.span.SpanConfig to be added or updated

object (netgate.span.SpanConfig)

Switched Port Analyzer (SPAN) configuration.

Responses

Request samples

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

removes netgate.span.SpanConfig

Switched Port Analyzer (SPAN) configuration.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-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.span.spanconfig.SpanTable

SPAN table.

Responses

Request samples

package main

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

func main() {

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

creates netgate.span.spanconfig.SpanTable

SPAN table.

Request Body schema: application/yang-data+json

netgate.span.spanconfig.SpanTable to be added to list

Array of objects (netgate.span.spanconfig.spantable.Source)

Mirrored source interface.

Responses

Request samples

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

creates or updates netgate.span.spanconfig.SpanTable

SPAN table.

Request Body schema: application/yang-data+json

netgate.span.spanconfig.SpanTable to be added or updated

object (netgate.span.spanconfig.SpanTable)

SPAN table.

Responses

Request samples

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

removes netgate.span.spanconfig.SpanTable

SPAN table.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-config/span-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.span.spanconfig.spantable.Source

Mirrored source interface.

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.Source to be added to list

netgate-span:if-name-src
string

The source interface that will be mirrored.

object (netgate.span.spanconfig.spantable.source.DestinationTable)

The set of destinations for one source.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-span:if-name-src": "string",
  • "netgate-span:destination-table": {
    }
}

returns netgate.span.spanconfig.spantable.Source

Mirrored source interface.

path Parameters
if-name-src
required
string

Id of source

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-config/span-table/source=%7Bif-name-src%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-span:source": {
    }
}

creates or updates netgate.span.spanconfig.spantable.Source

Mirrored source interface.

path Parameters
if-name-src
required
string

Id of source

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.Source to be added or updated

object (netgate.span.spanconfig.spantable.Source)

Mirrored source interface.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-span:source": {
    }
}

removes netgate.span.spanconfig.spantable.Source

Mirrored source interface.

path Parameters
if-name-src
required
string

Id of source

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-config/span-table/source=%7Bif-name-src%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))

}

returns netgate.span.spanconfig.spantable.source.DestinationTable

The set of destinations for one source.

path Parameters
if-name-src
required
string

Id of source

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-config/span-table/source=%7Bif-name-src%7D/destination-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-span:destination-table": {
    }
}

creates netgate.span.spanconfig.spantable.source.DestinationTable

The set of destinations for one source.

path Parameters
if-name-src
required
string

Id of source

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.source.DestinationTable to be added to list

Array of objects (netgate.span.spanconfig.spantable.source.destinationtable.Destination)

The destination interface.

Responses

Request samples

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

creates or updates netgate.span.spanconfig.spantable.source.DestinationTable

The set of destinations for one source.

path Parameters
if-name-src
required
string

Id of source

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.source.DestinationTable to be added or updated

object (netgate.span.spanconfig.spantable.source.DestinationTable)

The set of destinations for one source.

Responses

Request samples

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

removes netgate.span.spanconfig.spantable.source.DestinationTable

The set of destinations for one source.

path Parameters
if-name-src
required
string

Id of source

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-config/span-table/source=%7Bif-name-src%7D/destination-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.span.spanconfig.spantable.source.destinationtable.Destination

The destination interface.

path Parameters
if-name-src
required
string

Id of source

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.source.destinationtable.Destination to be added to list

netgate-span:if-name-dst
string

The destination interface receiving mirrored packets.

netgate-span:layer
string (netgate.span.SpanLayer)
Enum: "hw" "l2"
netgate-span:state
string (netgate.span.SpanStateT)
Enum: "disabled" "rx" "tx" "both"

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-span:if-name-dst": "string",
  • "netgate-span:layer": "hw",
  • "netgate-span:state": "disabled"
}

returns netgate.span.spanconfig.spantable.source.destinationtable.Destination

The destination interface.

path Parameters
if-name-src
required
string

Id of source

if-name-dst
required
string

Id of destination

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-config/span-table/source=%7Bif-name-src%7D/destination-table/destination=%7Bif-name-dst%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-span:destination": {
    }
}

creates or updates netgate.span.spanconfig.spantable.source.destinationtable.Destination

The destination interface.

path Parameters
if-name-src
required
string

Id of source

if-name-dst
required
string

Id of destination

Request Body schema: application/yang-data+json

netgate.span.spanconfig.spantable.source.destinationtable.Destination to be added or updated

object (netgate.span.spanconfig.spantable.source.destinationtable.Destination)

The destination interface.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-span:destination": {
    }
}

removes netgate.span.spanconfig.spantable.source.destinationtable.Destination

The destination interface.

path Parameters
if-name-src
required
string

Id of source

if-name-dst
required
string

Id of destination

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-config/span-table/source=%7Bif-name-src%7D/destination-table/destination=%7Bif-name-dst%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))

}

span-state

returns netgate.span.SpanState

Switched Port Analyzer (SPAN) state.

Responses

Request samples

package main

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

func main() {

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

returns netgate.span.spanstate.SpanTable

SPAN table.

Responses

Request samples

package main

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

func main() {

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

returns netgate.span.spanstate.spantable.Source

Mirrored source interface.

path Parameters
if-name-src
required
string

Id of source

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-state/span-table/source=%7Bif-name-src%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-span:source": {
    }
}

returns netgate.span.spanstate.spantable.source.DestinationTable

The set of destinations for one source.

path Parameters
if-name-src
required
string

Id of source

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-state/span-table/source=%7Bif-name-src%7D/destination-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-span:destination-table": {
    }
}

returns netgate.span.spanstate.spantable.source.destinationtable.Destination

The destination interface.

path Parameters
if-name-src
required
string

Id of source

if-name-dst
required
string

Id of destination

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-span:span-state/span-table/source=%7Bif-name-src%7D/destination-table/destination=%7Bif-name-dst%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-span:destination": {
    }
}