Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to create New PortChannel interface from gNMI/REST interface #153

Open
Verma-Anukul opened this issue Jan 20, 2025 · 0 comments
Open

Comments

@Verma-Anukul
Copy link
Contributor

Verma-Anukul commented Jan 20, 2025

Tries to create new Portchannel interface from gNMI/REST interface as per

https://github.com/sonic-net/SONiC/pull/1727/files#diff-45020a7beac3c0a4d8784dd0bdda1794293296b8d73242331a44df21c33a11ebR207

But it failed with error "error-message":"PortChannel: PortChannel105 does not exist"
Which look expected from the code point of view
https://github.com/sonic-net/sonic-mgmt-common/pull/142/files#diff-753eb0e758dab69d496cdc202f7c75f8f26eceae09271978fe0b91d5b854c230L236

[ xfmr_intf.go #263 ]

curl -X PUT -k "https://localhost/restconf/data/openconfig-interfaces:interfaces/interface=PortChannel105" -H "accept: */*" -H "Content-Type: application/yang-data+json" -d "{\"openconfig-interfaces:interface\":[{\"name\":\"PortChannel105\",\"config\":{\"name\":\"PortChannel105\",\"mtu\":9000,\"description\":\"tst_pc\",\"enabled\":true},\"openconfig-if-aggregate:aggregation\":{\"config\":{\"min-links\":3}}}]}"

{"ietf-restconf:errors":{"error":[{"error-type":"application","error-tag":"invalid-value","error-message":"PortChannel: PortChannel105 does not exist"}]}}

HLD and Logs provided in HLD confirms that using PUT method we can create a new Portchannel, but codewise Replace operation should give an error for non existent ports.
What is the expected behavior here.

Also which operation is correct from REST and gNMI prospective.

@nagarwal03
Please help us in understanding this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant