Merge "Add force parameter for VpcIpAddressAllocationApi"

This commit is contained in:
Zuul 2024-11-27 00:26:26 +00:00 committed by Gerrit Code Review
commit c8a80f7e6f

View File

@ -5449,7 +5449,8 @@ class NsxVpcIpAddressAllocationApi(NsxPolicyResourceBase):
ip_address_block_visibility="EXTERNAL",
ip_address_type="IPV4",
ip_block=IGNORE,
tags=IGNORE):
tags=IGNORE,
force=False):
ip_address_allocation_id = self._init_obj_uuid(
ip_address_allocation_id)
ip_address_allocation_def = self._init_def(
@ -5465,14 +5466,14 @@ class NsxVpcIpAddressAllocationApi(NsxPolicyResourceBase):
ip_block=ip_block,
tags=tags,
patch=True)
self._create_or_store(ip_address_allocation_def)
self._create_or_store(ip_address_allocation_def, force=force)
return ip_address_allocation_id
def delete(self, tenant, ip_address_allocation_id):
def delete(self, tenant, ip_address_allocation_id, force=False):
ip_address_allocation_def = self.entry_def(
tenant=tenant,
ip_address_allocation_id=ip_address_allocation_id)
self._delete_with_retry(ip_address_allocation_def)
self._delete_with_retry(ip_address_allocation_def, force=force)
def get(self, tenant, ip_address_allocation_id, silent=False):
ip_address_allocation_def = self.entry_def(