Adding support for UPSERT'ing route53 records
This commit is contained in:
parent
100ec4e7c8
commit
826ba82f6e
3 changed files with 37 additions and 2 deletions
|
|
@ -70,6 +70,28 @@ def test_rrset():
|
|||
rrsets = conn.get_all_rrsets(zoneid)
|
||||
rrsets.should.have.length_of(0)
|
||||
|
||||
changes = ResourceRecordSets(conn, zoneid)
|
||||
change = changes.add_change("UPSERT", "foo.bar.testdns.aws.com", "A")
|
||||
change.add_value("1.2.3.4")
|
||||
changes.commit()
|
||||
|
||||
rrsets = conn.get_all_rrsets(zoneid, type="A")
|
||||
rrsets.should.have.length_of(1)
|
||||
rrsets[0].resource_records[0].should.equal('1.2.3.4')
|
||||
|
||||
changes = ResourceRecordSets(conn, zoneid)
|
||||
change = changes.add_change("UPSERT", "foo.bar.testdns.aws.com", "A")
|
||||
change.add_value("5.6.7.8")
|
||||
changes.commit()
|
||||
|
||||
rrsets = conn.get_all_rrsets(zoneid, type="A")
|
||||
rrsets.should.have.length_of(1)
|
||||
rrsets[0].resource_records[0].should.equal('5.6.7.8')
|
||||
|
||||
changes = ResourceRecordSets(conn, zoneid)
|
||||
changes.add_change("DELETE", "foo.bar.testdns.aws.com", "A")
|
||||
changes.commit()
|
||||
|
||||
changes = ResourceRecordSets(conn, zoneid)
|
||||
change = changes.add_change("CREATE", "foo.bar.testdns.aws.com", "A")
|
||||
change.add_value("1.2.3.4")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue