Unsolved
1 Message
0
391
July 20th, 2022 13:00
OS10 restconf example
I'm trying to use the REST API to get configuration and modify it. I'm running:
OS10# show version
Dell EMC Networking OS10 Enterprise
Copyright (c) 1999-2020 by Dell Inc. All Rights Reserved.
OS Version: 10.5.0.4
Build Version: 10.5.0.4.638
Build Time: 2020-01-30T21:08:56+0000
System Type: S4128F-ON
Architecture: x86_64
Up Time: 2 weeks 6 days 20:57:56
From a remote host I get do a GET at the interfaces level and see:
stig@invader65:~$ curl -k -u admin:admin "https://172.17.2.13/restconf/data/ietf-interfaces:interfaces/interface"
{"ietf-interfaces:interface":[{"name":"ethernet1/1/1","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/2","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/3","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/4","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/5","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/6","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/7","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/8","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/9","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/10","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/11","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/12","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/13","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/14","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/15","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/16","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/17","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/18","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/19","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/20","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/21","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/22","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/23","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/24","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/25","type":"iana-if-type:ethernetCsmacd","dell-interface:mode":"MODE_L2DISABLED","dell-ip:ipv4":{"address":{"primary-addr":"25.0.0.1/24"}},"dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/26","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/27","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/28","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/29","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"ethernet1/1/30","type":"iana-if-type:ethernetCsmacd","dell-lldp-med:lldp-med-cfg":{},"dell-qos:qos-cfg":{"flow-control-rx":true},"dell-lldp:lldp":{}},{"name":"mgmt1/1/1","type":"dell-base-interface-common:management","dell-interface:mtu":1500,"dell-ip:ipv4":{"address":{"primary-addr":"172.17.2.13/23"}},"dell-ip:ipv6":{"autoconfig":true},"dell-lldp:lldp":{}},{"name":"null0","type":"dell-base-interface-common:null"},{"name":"vlan1","type":"iana-if-type:l2vlan","dell-interface:untagged-ports":["ethernet1/1/1","ethernet1/1/2","ethernet1/1/3","ethernet1/1/4","ethernet1/1/5","ethernet1/1/6","ethernet1/1/7","ethernet1/1/8","ethernet1/1/9","ethernet1/1/10","ethernet1/1/11","ethernet1/1/12","ethernet1/1/13","ethernet1/1/14","ethernet1/1/15","ethernet1/1/16","ethernet1/1/17","ethernet1/1/18","ethernet1/1/19","ethernet1/1/20","ethernet1/1/21","ethernet1/1/22","ethernet1/1/23","ethernet1/1/24","ethernet1/1/26","ethernet1/1/27","ethernet1/1/28","ethernet1/1/29","ethernet1/1/30"]},{"name":"loopback1","description":"loopback interface","type":"iana-if-type:softwareLoopback"}]}
If I try to do a specific interface, I get an error. Any idea what ":name" is supported to be for the interface name?
stig@invader65:~$ curl -k -u admin:admin "https://172.17.2.13/restconf/data/ietf-interfaces:interfaces/interface/ethernet1-1-25"
{"ietf-restconf:errors":{"error":[{"error-type":"rpc","error-tag":"invalid-value","error-app-tag":"data-invalid","error-path":"/interfaces/interface","error-message":"invalid value","error-info":{"bad-value":"/ethernet1-1-25","error-number":258}}]}}
DELL-Joey C
Moderator
•
3.9K Posts
0
July 20th, 2022 22:00
Hello @stigt,
Could you update the OS version to the latest, 10.5.4.0 and try again. Let me know how it goes.