Fix issue with multiple records in recordset

Story: #2010527
Task: #47136

Sort records in recordset so it can be compared to existing ones
and not to trigger update in case of a different order.

Change-Id: Ib5d2af56616532174c29ec2be86827ccd0a17940
This commit is contained in:
Sagi Shnaidman
2023-02-01 12:02:35 +02:00
parent 01e1742acf
commit edd4e1b2e9
3 changed files with 8 additions and 4 deletions

View File

@@ -181,6 +181,10 @@ class DnsRecordsetModule(OpenStackModule):
module_min_sdk_version = '0.28.0'
def _needs_update(self, params, recordset):
if params['records'] is not None:
params['records'] = sorted(params['records'])
if recordset['records'] is not None:
recordset['records'] = sorted(recordset['records'])
for k in ('description', 'records', 'ttl', 'type'):
if k not in params:
continue