Skip to content

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

@Verma-Anukul

Description

@Verma-Anukul

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions