This YANG module provides packet tracing operations.
Copyright 2020 Rubicon Communications, LLC.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/operations/netgate-trace:trace-filter-clear" req, _ := http.NewRequest("POST", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
operates on netgate.trace.TraceFilterSet
object (netgate.trace.tracefilterset.Input) |
{- "input": {
- "netgate-trace:filter": {
- "netgate-trace:max-packets": 0,
- "netgate-trace:type": "include",
- "netgate-trace:node-name": "string"
}
}
}
operates on netgate.trace.TracePacketsCapture
object (netgate.trace.tracepacketscapture.Input) |
{- "input": {
- "netgate-trace:filter": true,
- "netgate-trace:max-packets": 50,
- "netgate-trace:pre-clear": true,
- "netgate-trace:node-name": "string",
- "netgate-trace:verbose": true
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/operations/netgate-trace:trace-packets-clear" req, _ := http.NewRequest("POST", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
operates on netgate.trace.TracePacketsGet
object (netgate.trace.tracepacketsget.Input) |
{- "input": {
- "netgate-trace:max-packets": 50
}
}
{- "output": {
- "netgate-trace:packets": {
- "netgate-trace:packet": [
- {
- "netgate-trace:number": 0,
- "netgate-trace:log": "string",
- "netgate-trace:thread-id": 0
}
]
}
}
}