netgate-route API (21.07) adding a static route
-
I am attempting to add a static route via RESTCONF and it appears the YANG model may not be complete. Below is the output that I am getting:
[root@myhostname ~]# curl -f -X GET http://tnsr/restconf/data/netgate-route:route-config
{
"netgate-route:route-config": {
"dynamic": {
"netgate-bgp:bgp": {
"global-options": {
"enable": false
}
},
"netgate-frr:manager": {
"global-options": {
"ptm": false
}
},
"netgate-ospf:ospf": {
"global-options": {
"enable": false
}
},
"netgate-ospf6:ospf6": {
"global-options": {
"enable": false
}
},
"netgate-rip:rip": {
"global-options": {
"enable": false
}
}
}
}
}
[root@myhostname ~]#which is not showing the "static": { } option I see here:
https://docs.netgate.com/tnsr/en/latest/api/netgate-route.htmlThis shows my current failures when attempting to view an existing static route:
[root@myhostname ~]# curl -f -X GET http://tnsr/restconf/data/netgate-route:route-config/netgate-route:static -v
About to connect() to tnsr port 80 (#0)
Trying 123.123.123.123...
Connected to tnsr (123.123.123.123) port 80 (#0)
Server auth using Basic with user 'ansible'
GET /restconf/data/netgate-route:route-config/netgate-route:static HTTP/1.1
Authorization: Basic YW5zaWJsZToxcWF6MndzeCFRQVpAV1NY
User-Agent: curl/7.29.0
Host: tnsr
Accept: /The requested URL returned error: 404 Not Found
Closing connection 0
curl: (22) The requested URL returned error: 404 Not Found
[root@myhostname ~]#What is the best way for me to view/add/delete a static route via the RESTCONF API?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy