Start a Conversation

Unsolved

M

1 Rookie

 • 

1 Message

490

December 1st, 2022 01:00

dell switch rest command error

Hi!

I use the RESTCONF commands on an OS10 model switch.

work by the guide of -"smartfabric-os-user-guide"

Most of my REST commands work ok, but when I try to use the add VLAN to port-channel command I get an error:

curl -i -k -H "Accept: application/json" -H "Content-Type: application/json" -u $USER_NAME:$PASSWORD -d '{"ietf-interfaces:interfaces":{"dell-interface-range:interface-range":[{"name":"1660","type":"iana-if-type:l2vlan","config-template":{"dell-interface:tagged-ports":["port-channel11"]}}]}}' -X PATCH https://$MGMT_IP/restconf/data/ietf-interfaces:interfaces
HTTP/1.1 400 Bad Request
Server: nginx/1.14.1
Date: Thu, 01 Dec 2022 09:22:39 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache

 {"ietf-restconf:errors":{"error":[{"error-type":"rpc","error-tag":"unknown-element","error-app-tag":"data-invalid","error-path":"/if:interfaces","error-message":"unknown object","error-info":{"bad-element":"interface-range","error-number":293}}]}}

the original command is: "switchport trunk allowed vlan 1660"

after using the cli command rest translate api: 

REST-TRANSLATE-DUR-L1D5K-82BD-SW02(conf-if-po-11)# switchport trunk allowed vlan 1660

CLI command:
switchport trunk allowed vlan 1660
Restconf request(s):
curl -i -k -H "Accept: application/json" -H "Content-Type: application/json" -u $USER_NAME:$PASSWORD -d '{"ietf-interfaces:interfaces":{"dell-interface-range:interface-range":[{"name":"1660","type":"iana-if-type:l2vlan","config-template":{"dell-interface:tagged-ports":["port-channel11"]}}]}}' -X PATCH 'https://$MGMT_IP/restconf/data/ietf-interfaces:interfaces'

4 Operator

 • 

2.7K Posts

December 1st, 2022 07:00

Hello @mosheFa


Please, check this guide RESTCONF request of CLI command: https://dell.to/3VoscNA


Regards.

December 6th, 2022 00:00

hi! @DiegoLopez 

I am the user mosheFa, thank you for your response,

 I checked this guide, but the error mentioned there it isn't the same error as mine.

to be honest it seems to be a product malfunction, maybe you have another idea? 

 

Moderator

 • 

3.9K Posts

December 6th, 2022 01:00

Hi @moshefaerman,

 

REST API configuration is limited to our support, we're not able to provide proper support advice to your issue. I don't have access to a OS10 switch to check if the OAS file from OS10 has any clue if there is any script issue. Try referring to this step to obtain the OAS file to check if it is able to provide any clue. 

 

https://dell.to/3F8s3Xt

January 19th, 2023 00:00

problem solved.

version issue

>10.5.x.x work !

soo in my case it was 10.4.x.x dell OS switch.

moshefaerman_0-1674116539544.png

 

No Events found!

Top