Fix:If multiple targets are part of an OCI provider record operation, create a new record for each target. #4993
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The OCI provider currently does not support creating DNS records with multiple IP addresses. Below is example output from the current master branch code showing the failure.
This fix handles the case where multiple IP's are part of the operation request by breaking them apart into individual newRecordOperations and adjusts the endpoints so the records can be rectified accordingly.
Also adds a warning message, since OCI DNS does not support the set-identifier field in the actual DNS Record.
Below is the output and result of the same request that failed above on current master, but produces the expected results from this branch.
And here are the expected DNS results.
Updated the test framework and added tests to verify multiple records. Improved test code coverage from 67.2% -> 78.2%.
Also tested this change extensively in an OCI development cluster environment.
Fixes #4940
Checklist