#Hi RBlackhart6081 I m trying to use CLI
1 messages · Page 1 of 1 (latest)
Not sure about the CLI passthrough but Rest API usually wants "name" instead of "lif", perhaps try with that?
Also, what is the reason for CLI passthrough instead of the regular way?
Hi @umbral gust , I worked with Rob and figured it out. When the operation is PATCH body should be limited to only options to be modified. Vserver and LIF should params in this case.
There were couple of reasons I chose CLI passthrough.
- I'm actually automating interface create operation for CVO to support additional SVM configurations. Currently there is no Ansible module to support this as I need probe_port param in the payload if it's CVO.
- Since this is a custom ansible task, for dynamically supporting PATCH or DELETE operations via REST API, I was in need of writing additional step to get LIFs uuid's and merge it in the payload.
But considering even for REST CLI payload difference is needed, I'm now working on to revise this to REST API.
Oh ok, cool! Thanks for getting back to me 😃
Hi @civic hamlet Can you provide the Patch body that worked? I am trying to do same thing and getting the same error. 😉
I guess remove "lif" and "vserver"
Sure, Why not!
body:
{
"address": "10.216.4.83",
"netmask": "255.255.255.0",
"home-node": "cluster2-01",
"home-port": "e0c",
"force-subnet-association": true
}
url with param:
https://{{cluster}}/api/private/cli//network/interface?lif="sdm_svm_lif1"&vserver="sdm_svm"
Thankyou 🙂 👍