#Private CLI calls failing for PATCH request

1 messages · Page 1 of 1 (latest)

agile hill
#

Since ONTAP doesnot have API endpoint for "firewall policy" command, we had to use private-cli API endpoint to create/modify firewall policies. When we try to modify existing firewall policy using "private-cli" API endpoint, it throws below error

"Field \"policy\" is not supported in the body of a PATCH.",

Observed this behavior for other commands too while running PATCH operation.
Below the output from python code.

c.system.services.firewall.policy.modify(service='http', allow_address='0.0.0.0/0', name='FIREWALL_POLICY_NAME', svm='VSERVER_NAME')

DEBUG:narest.system.services.firewall.policy:Modifying system services firewall policy "FIREWALL_POLICY_NAME" in VSERVER_NAME vserver
DEBUG:narest.system.services.firewall.policy:PATCH resource URI: https://CLUSTER/api/private/cli/system/services/firewall/policy?return_records=true&return_timeout=60, payload: {'policy': 'FIREWALL_POLICY_NAME', 'service': 'http', 'allow-list': ['0.0.0.0/0'], 'vserver': 'VSERVER_NAME'}
DEBUG:narest.ontap:REST API response received in text format: {
  "error": {
    "message": "Field \"policy\" is not supported in the body of a PATCH.",
    "code": "262203",
    "target": "policy"
  }
}

We have a support case opened for this and we are redirected to this channel to get help from devs. Can you assist further here? Need a solution for this issue as we have automations that need to be able to modify firewall policies.