How to change configulation of switch by using SNMP4SDN

asked 2017-01-17 22:35:21 -0700

wataru.n gravatar image

I try to add VLAN and set ports on the physical switch by using SNMP4SDN. The physical switch is Arista7050. I refer to the following page. https://wiki.opendaylight.org/view/SNMP4SDN:User_Guide

When issuing the RestAPI to add VLAN and set ports, nothing was output.(no error)

curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/vlan:add-vlan-and-set-ports -d "{"input":{"node-id":<switch-mac-address-in-number>, "vlan-id":123, "vlan-name":'v123', "untagged-port-list":'13'}}" 

But, no chenges was rellected in configulation on the switch. I took the packet capture, It seemed no packets from the ODL host to the switch. And I saw the ODL log, no error outputed.

Is there the wrong point in the above RestAPI?

FYI, I can get VLAN table by using SNMP4SDN.

curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/vlan:get-vlan-table -d "{input:{node-id:<switch-mac-address-in-number>}}" -s | python -m json.tool
{
    "output": {
        "vlan-table-entry": [
            {
                "port-list": [
                    11,
                    10,
                    9,
                    8,
                    7,
                    6,
                    5,
                    19,
                    18,
                    17,
                    16,
                    15,
                    14,
                    12,
                    2,
                    1,
                    27,
                    26,
                    25,
                    24,
                    23,
                    22,
                    21,
                    20,
                    32,
                    31,
                    30,
                    29,
                    28
                ],
                "vlan-id": 1
            },
            {
                "port-list": [
                    2,
                    10,
                    1,
                    8,
                    7
                ],
                "vlan-id": 12
            },
...
edit retag flag offensive close merge delete