NSX PATCH IP Prefix list requires a complete body from GET to update the list
search cancel

NSX PATCH IP Prefix list requires a complete body from GET to update the list

book

Article ID: 374616

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Using the PATCH API call to add a network to the IP Prefix list overwrites the list with a single new entry rather than updating the list with the latest entry.

Environment

VMware NSX-T Data Center 3.x
VMware NSX 4.1.x

Resolution

All policy APIs require the user to READ - MODIFY - PATCH with the entire payload. 

If the entire payload is not provided, the system assumes the user is trying to 

  • create a new object

    or 

  • update the fields not provided in the payload to null or system defaults

As an alternative, if the user wants to pass in just a part of the payload, then a feature called "partial patch" is supported. 
Once the partial patch is enabled, the user can provide part of the payload and the system will retain the remaining fields.


Documentation: Section: 2.7.1.8 NSX Partial Patch

PATCH https://NSX-IP/policy/api/v1/system-config/nsx-partial-patch-config
{
  "enable_partial_patch": "true"
}

No resolution is needed. It's as per API design.