#create ifgrp via ONTAP REST API

1 messages · Page 1 of 1 (latest)

upper wyvern
#

I am trying to create an ifgrp in ONTAP and add required data ports to it. In POST request body, how can I specify ifgrp name and also add multiple data ports in one go?

Sharing POST request JSON format-
{
"enabled": true,
"type": "lag",
"lag": {
"distribution_policy": "port",
"member_ports": [
{
"name": "e3a",
"node": {
"name": "fpsa-a50-u0909-01"
}
}
],
"mode": "multimode_lacp"
},
"node": {
"name": "fpsa-a50-u0909-01"
}
}

turbid laurel
#

member_ports is a list, have you tried putting in more than one item in that list?

zenith helm
upper wyvern
#
{
    "enabled": true,
    "name": "a0a",
    "type": "lag",
    "lag": {
        "distribution_policy": "port",
        "member_ports": [
            {
                "name": "e3a"
            },
            {
                "name": "e3b"
            },
            {
                "name": "e3c"
            },
            {
                "name": "e3d"
            }
        ],
        "mode": "multimode_lacp"
    },
    "node": {
        "name": "fpsa-a50-u0909-01"
    }
}```
#

I tried with above JSON POST request, looks like ifgrp "name" parameter is not supported with REST

#

Got Error: Bad Request

{
  "error": {
    "message": "Field \"name\" cannot be set in this operation",
    "code": "262196",
    "target": "name"
  }
}```
#

if I remove the "name" parameter, then for ifgrp name by default it takes name "a0a", "a0b" and so on

#

Can someone please confirm on this?

hollow lintel
#

Yeah I've run into this, you can't specify the name of an ifgrp when creating via the RestAPI. I've hit this too. You have to let the system automatically name the ifgrp, which I dont like. Though in all my testing, if not other ifgrps exist, it will create a0a as the name.

I have customers that use different names, so I use the Ansible modules and force it to use ZAPI (which works for now, but will stop when ZAPI fully disappears in the near future). The other option is to use the cli command API to pass ONTAP CLI commands directly via the API.

turbid laurel
#

officially not before 9.18.1 (or was it 9.19.1?) IIRC. But my gues is that it will stay with us for a while longer, hidden behind the "suspended" switch