micafer commented on code in PR #2177:
URL: https://github.com/apache/libcloud/pull/2177#discussion_r3689831663


##########
libcloud/dns/drivers/route53.py:
##########
@@ -237,13 +237,71 @@ def update_record(self, record, name=None, type=None, 
data=None, extra=None):
     def delete_record(self, record):
         try:
             r = record
-            batch = [("DELETE", r.name, r.type, r.data, r.extra)]
-            self._post_changeset(record.zone, batch)
+
+            # Multiple value records need to be handled specially - Route53
+            # only accepts a DELETE for a record set which lists every value
+            # in that set, so values for the other records need to be sent
+            # as well.
+
+            if r.extra.get("_multi_value", False) and 
r.extra.get("_other_records", []):
+                self._delete_multi_value_record(record=r)
+            else:
+                batch = [("DELETE", r.name, r.type, r.data, r.extra)]
+                self._post_changeset(record.zone, batch)

Review Comment:
   @Sanjays2402 could you please take a look?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to