This YANG module provides a Netgate-defined data-model for neighbor data.
Copyright 2017-2020 Rubicon Communications, LLC.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-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-neighbor:neighbor-config": {
- "netgate-neighbor:neighbor-table": {
- "netgate-neighbor:interface": [
- {
- "netgate-neighbor:if-name": "string",
- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
]
}
}
]
}, - "netgate-neighbor:neighbor-cache-options": {
- "netgate-neighbor:ipv4": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}, - "netgate-neighbor:ipv6": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}
}
}
}
Neighbor configuration data.
netgate.neighbor.NeighborConfig to be added to list
object (netgate.neighbor.neighborconfig.NeighborTable) Neighbor mapping table. | |
object (netgate.neighbor.neighborconfig.NeighborCacheOptions) Neighbor cache options. |
{- "netgate-neighbor:neighbor-table": {
- "netgate-neighbor:interface": [
- {
- "netgate-neighbor:if-name": "string",
- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
]
}
}
]
}, - "netgate-neighbor:neighbor-cache-options": {
- "netgate-neighbor:ipv4": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}, - "netgate-neighbor:ipv6": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}
}
}
Neighbor configuration data.
netgate.neighbor.NeighborConfig to be added or updated
object (netgate.neighbor.NeighborConfig) Neighbor configuration data. |
{- "netgate-neighbor:neighbor-config": {
- "netgate-neighbor:neighbor-table": {
- "netgate-neighbor:interface": [
- {
- "netgate-neighbor:if-name": "string",
- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
]
}
}
]
}, - "netgate-neighbor:neighbor-cache-options": {
- "netgate-neighbor:ipv4": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}, - "netgate-neighbor:ipv6": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-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-neighbor:neighbor-config/neighbor-cache-options" 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-neighbor:neighbor-cache-options": {
- "netgate-neighbor:ipv4": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}, - "netgate-neighbor:ipv6": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}
}
}
Neighbor cache options.
netgate.neighbor.neighborconfig.NeighborCacheOptions to be added to list
object (netgate.neighbor.NeighborCacheOptionsConfig) Group of attributes for neighbor cache options state. | |
object (netgate.neighbor.NeighborCacheOptionsConfig) Group of attributes for neighbor cache options state. |
{- "netgate-neighbor:ipv4": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}, - "netgate-neighbor:ipv6": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}
}
Neighbor cache options.
netgate.neighbor.neighborconfig.NeighborCacheOptions to be added or updated
object (netgate.neighbor.neighborconfig.NeighborCacheOptions) Neighbor cache options. |
{- "netgate-neighbor:neighbor-cache-options": {
- "netgate-neighbor:ipv4": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}, - "netgate-neighbor:ipv6": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-cache-options" 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-neighbor:neighbor-config/neighbor-cache-options/ipv4" 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-neighbor:ipv4": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}
}
IPv4 neighbor cache options.
netgate.neighbor.NeighborCacheOptionsConfig to be added to list
object (netgate.neighbor.NeighborCacheOptionsConfig) Group of attributes for neighbor cache options state. |
{- "netgate-neighbor:ipv4": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}
}
IPv4 neighbor cache options.
netgate.neighbor.NeighborCacheOptionsConfig to be added or updated
object (netgate.neighbor.NeighborCacheOptionsConfig) Group of attributes for neighbor cache options state. |
{- "netgate-neighbor:ipv4": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-cache-options/ipv4" 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-neighbor:neighbor-config/neighbor-cache-options/ipv6" 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-neighbor:ipv4": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}
}
IPv6 neighbor cache options.
netgate.neighbor.NeighborCacheOptionsConfig to be added to list
object (netgate.neighbor.NeighborCacheOptionsConfig) Group of attributes for neighbor cache options state. |
{- "netgate-neighbor:ipv4": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}
}
IPv6 neighbor cache options.
netgate.neighbor.NeighborCacheOptionsConfig to be added or updated
object (netgate.neighbor.NeighborCacheOptionsConfig) Group of attributes for neighbor cache options state. |
{- "netgate-neighbor:ipv4": {
- "netgate-neighbor:max-age": 300,
- "netgate-neighbor:max-number": 50000
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-cache-options/ipv6" 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-neighbor:neighbor-config/neighbor-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-neighbor:neighbor-table": {
- "netgate-neighbor:interface": [
- {
- "netgate-neighbor:if-name": "string",
- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
]
}
}
]
}
}
Neighbor mapping table.
netgate.neighbor.neighborconfig.NeighborTable to be added to list
Array of objects (netgate.neighbor.neighborconfig.neighbortable.Interface) Neighbor table entry. |
{- "netgate-neighbor:interface": [
- {
- "netgate-neighbor:if-name": "string",
- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
]
}
}
]
}
Neighbor mapping table.
netgate.neighbor.neighborconfig.NeighborTable to be added or updated
object (netgate.neighbor.neighborconfig.NeighborTable) Neighbor mapping table. |
{- "netgate-neighbor:neighbor-table": {
- "netgate-neighbor:interface": [
- {
- "netgate-neighbor:if-name": "string",
- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
]
}
}
]
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-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)) }
Neighbor table entry.
netgate.neighbor.neighborconfig.neighbortable.Interface to be added to list
netgate-neighbor:if-name | string The interface on which the neighbor entry is found. |
object (netgate.neighbor.neighborconfig.neighbortable.interface.Neighbors) Addresses for which there is a neighbor Entry. |
{- "netgate-neighbor:if-name": "string",
- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
]
}
}
Neighbor table entry.
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface=%7Bif-name%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-neighbor:interface": {
- "netgate-neighbor:if-name": "string",
- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
]
}
}
}
Neighbor table entry.
if-name required | string Id of interface |
netgate.neighbor.neighborconfig.neighbortable.Interface to be added or updated
object (netgate.neighbor.neighborconfig.neighbortable.Interface) Neighbor table entry. |
{- "netgate-neighbor:interface": {
- "netgate-neighbor:if-name": "string",
- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
]
}
}
}
Neighbor table entry.
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface=%7Bif-name%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)) }
Addresses for which there is a neighbor Entry.
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface=%7Bif-name%7D/neighbors" 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-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
]
}
}
Addresses for which there is a neighbor Entry.
if-name required | string Id of interface |
netgate.neighbor.neighborconfig.neighbortable.interface.Neighbors to be added to list
Array of objects (netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry) Neighbor entry table. |
{- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
]
}
Addresses for which there is a neighbor Entry.
if-name required | string Id of interface |
netgate.neighbor.neighborconfig.neighbortable.interface.Neighbors to be added or updated
object (netgate.neighbor.neighborconfig.neighbortable.interface.Neighbors) Addresses for which there is a neighbor Entry. |
{- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
]
}
}
Addresses for which there is a neighbor Entry.
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface=%7Bif-name%7D/neighbors" 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)) }
Neighbor entry table.
if-name required | string Id of interface |
netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry to be added to list
netgate-neighbor:mac-address | string The MAC address of an neighbor entry. |
netgate-neighbor:ip-address | string The IP address whose MAC address is stated. |
netgate-neighbor:is-no-route-table-entry | boolean True if this neighbor entry is shoud have no entry made in the adjacency route table. |
{- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
Neighbor entry table.
if-name required | string Id of interface |
ip-address required | string Id of neighbor-entry |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface=%7Bif-name%7D/neighbors/neighbor-entry=%7Bip-address%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-neighbor:neighbor-entry": {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
}
Neighbor entry table.
if-name required | string Id of interface |
ip-address required | string Id of neighbor-entry |
netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry to be added or updated
object (netgate.neighbor.neighborconfig.neighbortable.interface.neighbors.NeighborEntry) Neighbor entry table. |
{- "netgate-neighbor:neighbor-entry": {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:is-no-route-table-entry": true
}
}
Neighbor entry table.
if-name required | string Id of interface |
ip-address required | string Id of neighbor-entry |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-config/neighbor-table/interface=%7Bif-name%7D/neighbors/neighbor-entry=%7Bip-address%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-neighbor:neighbor-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-neighbor:neighbor-state": {
- "netgate-neighbor:neighbor-table": {
- "netgate-neighbor:interface": [
- {
- "netgate-neighbor:if-name": "string",
- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:age": 0,
- "netgate-neighbor:is-static": true
}
]
}
}
]
}, - "netgate-neighbor:neighbor-cache-options": {
- "netgate-neighbor:ipv4": {
- "netgate-neighbor:recycle": true,
- "netgate-neighbor:max-age": 0,
- "netgate-neighbor:max-number": 0
}, - "netgate-neighbor:ipv6": {
- "netgate-neighbor:recycle": true,
- "netgate-neighbor:max-age": 0,
- "netgate-neighbor:max-number": 0
}
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-state/neighbor-cache-options" 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-neighbor:neighbor-cache-options": {
- "netgate-neighbor:ipv4": {
- "netgate-neighbor:recycle": true,
- "netgate-neighbor:max-age": 0,
- "netgate-neighbor:max-number": 0
}, - "netgate-neighbor:ipv6": {
- "netgate-neighbor:recycle": true,
- "netgate-neighbor:max-age": 0,
- "netgate-neighbor:max-number": 0
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-state/neighbor-cache-options/ipv4" 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-neighbor:ipv4": {
- "netgate-neighbor:recycle": true,
- "netgate-neighbor:max-age": 0,
- "netgate-neighbor:max-number": 0
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-state/neighbor-cache-options/ipv6" 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-neighbor:ipv4": {
- "netgate-neighbor:recycle": true,
- "netgate-neighbor:max-age": 0,
- "netgate-neighbor:max-number": 0
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-state/neighbor-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-neighbor:neighbor-table": {
- "netgate-neighbor:interface": [
- {
- "netgate-neighbor:if-name": "string",
- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:age": 0,
- "netgate-neighbor:is-static": true
}
]
}
}
]
}
}
Neighbor table entry.
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-state/neighbor-table/interface=%7Bif-name%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-neighbor:interface": {
- "netgate-neighbor:if-name": "string",
- "netgate-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:age": 0,
- "netgate-neighbor:is-static": true
}
]
}
}
}
Addresses for which there is a neighbor Entry.
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-state/neighbor-table/interface=%7Bif-name%7D/neighbors" 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-neighbor:neighbors": {
- "netgate-neighbor:neighbor-entry": [
- {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:age": 0,
- "netgate-neighbor:is-static": true
}
]
}
}
Neighbor entry table.
if-name required | string Id of interface |
ip-address required | string Id of neighbor-entry |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-neighbor:neighbor-state/neighbor-table/interface=%7Bif-name%7D/neighbors/neighbor-entry=%7Bip-address%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-neighbor:neighbor-entry": {
- "netgate-neighbor:mac-address": "string",
- "netgate-neighbor:ip-address": "string",
- "netgate-neighbor:age": 0,
- "netgate-neighbor:is-static": true
}
}