Route53 get_record_sets: filter type after name
According to the documentation [1], name should be filtered first, followed by type. > If you specify both Name and Type > The results begin with the first resource record set in the list > whose name is greater than or equal to Name, and whose type is > greater than or equal to Type. [1]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListResourceRecordSets.html
This commit is contained in:
parent
df493ea18d
commit
a9319fad04
@ -200,12 +200,12 @@ class FakeZone(BaseModel):
|
||||
|
||||
def get_record_sets(self, start_type, start_name):
|
||||
record_sets = list(self.rrsets) # Copy the list
|
||||
if start_type:
|
||||
record_sets = [
|
||||
record_set for record_set in record_sets if record_set.type_ >= start_type]
|
||||
if start_name:
|
||||
record_sets = [
|
||||
record_set for record_set in record_sets if record_set.name >= start_name]
|
||||
if start_type:
|
||||
record_sets = [
|
||||
record_set for record_set in record_sets if record_set.type_ >= start_type]
|
||||
|
||||
return record_sets
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user