This YANG module provides a Netgate-defined data-model for SPAN data.
Copyright 2018-2020 Rubicon Communications, LLC.
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)) }
{- "netgate-span:span-config": {
- "netgate-span:span-table": {
- "netgate-span:source": [
- {
- "netgate-span:if-name-src": "string",
- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
]
}
}
}
Switched Port Analyzer (SPAN) configuration.
netgate.span.SpanConfig to be added to list
object (netgate.span.spanconfig.SpanTable) SPAN table. |
{- "netgate-span:span-table": {
- "netgate-span:source": [
- {
- "netgate-span:if-name-src": "string",
- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
]
}
}
Switched Port Analyzer (SPAN) configuration.
netgate.span.SpanConfig to be added or updated
object (netgate.span.SpanConfig) Switched Port Analyzer (SPAN) configuration. |
{- "netgate-span:span-config": {
- "netgate-span:span-table": {
- "netgate-span:source": [
- {
- "netgate-span:if-name-src": "string",
- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
]
}
}
}
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)) }
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)) }
{- "netgate-span:span-table": {
- "netgate-span:source": [
- {
- "netgate-span:if-name-src": "string",
- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
]
}
}
SPAN table.
netgate.span.spanconfig.SpanTable to be added to list
Array of objects (netgate.span.spanconfig.spantable.Source) Mirrored source interface. |
{- "netgate-span:source": [
- {
- "netgate-span:if-name-src": "string",
- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
]
}
SPAN table.
netgate.span.spanconfig.SpanTable to be added or updated
object (netgate.span.spanconfig.SpanTable) SPAN table. |
{- "netgate-span:span-table": {
- "netgate-span:source": [
- {
- "netgate-span:if-name-src": "string",
- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
]
}
}
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)) }
Mirrored source interface.
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. |
{- "netgate-span:if-name-src": "string",
- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
Mirrored source interface.
if-name-src required | string Id of source |
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)) }
{- "netgate-span:source": {
- "netgate-span:if-name-src": "string",
- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
}
Mirrored source interface.
if-name-src required | string Id of source |
netgate.span.spanconfig.spantable.Source to be added or updated
object (netgate.span.spanconfig.spantable.Source) Mirrored source interface. |
{- "netgate-span:source": {
- "netgate-span:if-name-src": "string",
- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
}
Mirrored source interface.
if-name-src required | string Id of source |
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)) }
The set of destinations for one source.
if-name-src required | string Id of source |
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)) }
{- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
The set of destinations for one source.
if-name-src required | string Id of source |
netgate.span.spanconfig.spantable.source.DestinationTable to be added to list
Array of objects (netgate.span.spanconfig.spantable.source.destinationtable.Destination) The destination interface. |
{- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
The set of destinations for one source.
if-name-src required | string Id of source |
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. |
{- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
The set of destinations for one source.
if-name-src required | string Id of source |
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)) }
The destination interface.
if-name-src required | string Id of source |
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" |
{- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
The destination interface.
if-name-src required | string Id of source |
if-name-dst required | string Id of destination |
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)) }
{- "netgate-span:destination": {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
}
The destination interface.
if-name-src required | string Id of source |
if-name-dst required | string Id of destination |
netgate.span.spanconfig.spantable.source.destinationtable.Destination to be added or updated
object (netgate.span.spanconfig.spantable.source.destinationtable.Destination) The destination interface. |
{- "netgate-span:destination": {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
}
The destination interface.
if-name-src required | string Id of source |
if-name-dst required | string Id of destination |
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)) }
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)) }
{- "netgate-span:span-state": {
- "netgate-span:span-table": {
- "netgate-span:source": [
- {
- "netgate-span:if-name-src": "string",
- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
]
}
}
}
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)) }
{- "netgate-span:span-table": {
- "netgate-span:source": [
- {
- "netgate-span:if-name-src": "string",
- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
]
}
}
Mirrored source interface.
if-name-src required | string Id of source |
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)) }
{- "netgate-span:source": {
- "netgate-span:if-name-src": "string",
- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
}
The set of destinations for one source.
if-name-src required | string Id of source |
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)) }
{- "netgate-span:destination-table": {
- "netgate-span:destination": [
- {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
]
}
}
The destination interface.
if-name-src required | string Id of source |
if-name-dst required | string Id of destination |
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)) }
{- "netgate-span:destination": {
- "netgate-span:if-name-dst": "string",
- "netgate-span:layer": "hw",
- "netgate-span:state": "disabled"
}
}