1. Add flavor schema for nat-pool and nat-pool-list in api/drivers/flavor_schema.py
2. show flavor support and validate flavor data in api/drivers/driver.py
3. In a10-octavia, add new task class for nat pool creation
- create pool according to the flavor
- if exist but range is different -> failed
- if exist but range is same -> pass
4. The NAT pool creation task should also create nat pools in nat-pool-list
5. Add the nat pool creation task to loadbalancer create flow
6. For listener create/set, it should select nat pool with the priority nat-pool flavor < virtual-port flavor < virtual-port flavor regex
7. Handle update cases:
- Set command for loadbalancer. After update loadbalancer, nat pool should still configure properly on Thunder.
- Set command for listener. For listener update, after update Thunder should still use the proper source-nat value
8. Delete the NAT pools in nat-pool and nat-pool-list flavor when loadbalancer is deleted.
- If nat pool is reference by others, the loadbalancer delete flow should still success. (leave the nat pool for other loadbalancer to delete) And we raise a warning in this case.
9. Rrefactor nat.py in acos-client (like other slb objects in acos-client)
Config Changes
This is only required if the config has been updated in this PR
Required: Provide example config snippet within pre block
Description
please also check a10-octavia PR: https://github.com/a10networks/a10-octavia/pull/281 Feature Requirements
Design Document: https://teams.microsoft.com/l/file/27F4222F-7CDD-421B-8F0C-97A5C60B2B5D?tenantId=91d27ab9-8c5e-41d4-82e8-3d1bf81fcb2f&fileType=docx&objectUrl=https%3A%2F%2Fa10networks.sharepoint.com%2Fsites%2FOpenstack%2FShared%20Documents%2FDevelopment%2FResearch%20%26%20Design%2FSNAT%20Pools%2FSNAT%20Pools%20Design%20Document.docx&baseUrl=https%3A%2F%2Fa10networks.sharepoint.com%2Fsites%2FOpenstack&serviceName=teams&threadId=19:0f1acbb173d74758b05ee8bacb000d68@thread.tacv2&groupId=37bbf3ad-c05a-4e67-b0cc-12bcd1479beb Story: https://a10networks.atlassian.net/browse/STACK-1896
Jira Ticket
https://a10networks.atlassian.net/browse/STACK-1896
Technical Approach
Check design document for detail.
Config Changes
This is only required if the config has been updated in this PR
(Example Snippet - Remove This Before Submission)
Test Cases
Manual Testing
Please check detail test steps and logs in RD unit-test document: https://teams.microsoft.com/l/file/DA35D246-0822-42C7-BFF6-1562535E3802?tenantId=91d27ab9-8c5e-41d4-82e8-3d1bf81fcb2f&fileType=docx&objectUrl=https%3A%2F%2Fa10networks.sharepoint.com%2Fsites%2FOpenstack%2FShared%20Documents%2FDevelopment%2FResearch%20%26%20Design%2FSNAT%20Pools%2FSNAT%20Flavor%20Support%20Unit%20Test%20Notes.docx&baseUrl=https%3A%2F%2Fa10networks.sharepoint.com%2Fsites%2FOpenstack&serviceName=teams&threadId=19:0f1acbb173d74758b05ee8bacb000d68@thread.tacv2&groupId=37bbf3ad-c05a-4e67-b0cc-12bcd1479beb