UNSOLVED

mosheFa

updated

4 years ago

M

mosheFa

1 Rookie

1 Message

0

580

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'

  • DiegoLopez

    6 Operator

    2668 Posts

    287

    0

    Posted December 1st, 2022 07:00

    Hello @mosheFa


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


    Regards.

  • 225

    0

    Posted 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? 

     

  • DELL-Joey C

    Moderator

    4170 Posts

    20965 Points

    223

    0

    Posted 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

    DELL-Joey C

    Social Media and Communities Professional

    Dell Technologies | Enterprise Support Services

    #IWork4Dell

    Did I answer your query? Please click on ‘Mark as Accepted Answer’ if I did. 

  • 110

    0

    Posted 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