corrected argument order on DirectionalRecordDetail of ultradns

This commit is contained in:
adriancole 2013-04-13 17:49:03 -07:00
parent 53da87cba0
commit 7ebe387255
3 changed files with 83 additions and 24 deletions

View File

@ -39,7 +39,7 @@ public class DirectionalRecordDetail {
private final DirectionalRecord record; private final DirectionalRecord record;
private DirectionalRecordDetail(String zoneName, String name, String id, private DirectionalRecordDetail(String zoneName, String name, String id,
Optional<DirectionalGroup> geolocationGroup, Optional<DirectionalGroup> group, Optional<DirectionalGroup> group, Optional<DirectionalGroup> geolocationGroup,
Optional<DirectionalGroup> sourceIpGroup, DirectionalRecord record) { Optional<DirectionalGroup> sourceIpGroup, DirectionalRecord record) {
this.zoneName = checkNotNull(zoneName, "zoneName"); this.zoneName = checkNotNull(zoneName, "zoneName");
this.name = checkNotNull(name, "name"); this.name = checkNotNull(name, "name");

View File

@ -52,22 +52,57 @@ public class GetDirectionalDNSRecordsForHostResponseTest extends BaseHandlerTest
public FluentIterable<DirectionalRecordDetail> expected() { public FluentIterable<DirectionalRecordDetail> expected() {
return FluentIterable.from(ImmutableSet.<DirectionalRecordDetail> builder() return FluentIterable.from(ImmutableSet.<DirectionalRecordDetail> builder()
.add(DirectionalRecordDetail.builder() .add(DirectionalRecordDetail.builder()
.zoneName("directional-example.com.") .zoneName("geo.jclouds.org.")
.name("chaos.directional-example.com.") .name("www.geo.jclouds.org.")
.id("06093C2D10CB1CB1") .id("A000000000000001")
.geolocationGroup(DirectionalGroup.builder() .geolocationGroup(DirectionalGroup.builder()
.id("06093C2D10CB1CB2") .id("C000000000000001")
.name("Geolocation field") .name("southamerica")
.build()) .build())
.sourceIpGroup(DirectionalGroup.builder() .record(DirectionalRecord.drBuilder()
.id("06093C2D10CB1CB4") .type("CNAME")
.name("172.16.1.0/24") .ttl(300)
.build()) .noResponseRecord(false)
.rdata("southamerica.geo.jclouds.org.").build()).build())
.add(DirectionalRecordDetail.builder()
.zoneName("geo.jclouds.org.")
.name("www.geo.jclouds.org.")
.id("A000000000000002")
.group(DirectionalGroup.builder()
.id("B000000000000001")
.name("All Non-Configured Regions")
.build())
.record(DirectionalRecord.drBuilder() .record(DirectionalRecord.drBuilder()
.type("A") .type("A")
.ttl(60) .ttl(500)
.noResponseRecord(false) .noResponseRecord(false)
.rdata("172.16.1.1").build()).build()) .rdata("1.1.1.2").build()).build())
.add(DirectionalRecordDetail.builder()
.zoneName("geo.jclouds.org.")
.name("www.geo.jclouds.org.")
.id("A000000000000003")
.geolocationGroup(DirectionalGroup.builder()
.id("C000000000000002")
.name("antarctica-unsupported")
.build())
.record(DirectionalRecord.drBuilder()
.type("A")
.ttl(0)
.noResponseRecord(true)
.rdata("No Data Response").build()).build())
.add(DirectionalRecordDetail.builder()
.zoneName("geo.jclouds.org.")
.name("www.geo.jclouds.org.")
.id("A000000000000004")
.geolocationGroup(DirectionalGroup.builder()
.id("C000000000000003")
.name("alazona")
.build())
.record(DirectionalRecord.drBuilder()
.type("A")
.ttl(86400) // default
.noResponseRecord(false)
.rdata("1.1.1.1").build()).build())
.build()); .build());
} }

View File

@ -1,19 +1,43 @@
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body> <soap:Body>
<getDirectionalDNSRecordsForHostResponse <ns1:getDirectionalDNSRecordsForHostResponse
xmlns:ns1="http://webservice.api.ultra.neustar.com/v01/"> xmlns:ns1="http://webservice.api.ultra.neustar.com/v01/">
<DirectionalDNSRecordDetailList <DirectionalDNSRecordDetailList
ZoneName="directional-example.com." DName="chaos.directional-example.com."> xmlns:ns2="http://schema.ultraservice.neustar.com/v01/" ZoneName="geo.jclouds.org."
<DirectionalDNSRecordDetail DName="www.geo.jclouds.org.">
GeolocationGroupName="Geolocation field" GeolocationGroupId="06093C2D10CB1CB2" <ns2:DirectionalDNSRecordDetail
SourceIPGroupName="172.16.1.0/24" SourceIPGroupId="06093C2D10CB1CB4" GeolocationGroupName="southamerica" GeolocationGroupId="C000000000000001"
TerritoriesCount="8" DirPoolRecordId="06093C2D10CB1CB1"> TerritoriesCount="16" DirPoolRecordId="A000000000000001">
<DirectionalDNSRecord recordType="A" TTL="60" <ns2:DirectionalDNSRecord recordType="CNAME"
noResponseRecord="false"> TTL="300" noResponseRecord="false">
<InfoValues Info1Value="172.16.1.1" /> <ns2:InfoValues Info1Value="southamerica.geo.jclouds.org." />
</DirectionalDNSRecord> </ns2:DirectionalDNSRecord>
</DirectionalDNSRecordDetail> </ns2:DirectionalDNSRecordDetail>
<ns2:DirectionalDNSRecordDetail
TerritoriesCount="302/323" DirPoolRecordId="A000000000000002"
GroupName="All Non-Configured Regions" GroupId="B000000000000001">
<ns2:DirectionalDNSRecord recordType="A"
TTL="500" noResponseRecord="false">
<ns2:InfoValues Info1Value="1.1.1.2" />
</ns2:DirectionalDNSRecord>
</ns2:DirectionalDNSRecordDetail>
<ns2:DirectionalDNSRecordDetail
GeolocationGroupName="antarctica-unsupported" GeolocationGroupId="C000000000000002"
TerritoriesCount="3" DirPoolRecordId="A000000000000003">
<ns2:DirectionalDNSRecord recordType="A"
TTL="0" noResponseRecord="true">
<ns2:InfoValues Info1Value="No Data Response" />
</ns2:DirectionalDNSRecord>
</ns2:DirectionalDNSRecordDetail>
<ns2:DirectionalDNSRecordDetail
GeolocationGroupName="alazona" GeolocationGroupId="C000000000000003"
TerritoriesCount="2" DirPoolRecordId="A000000000000004">
<ns2:DirectionalDNSRecord recordType="A"
TTL="86400" noResponseRecord="false">
<ns2:InfoValues Info1Value="1.1.1.1" />
</ns2:DirectionalDNSRecord>
</ns2:DirectionalDNSRecordDetail>
</DirectionalDNSRecordDetailList> </DirectionalDNSRecordDetailList>
</getDirectionalDNSRecordsForHostResponse> </ns1:getDirectionalDNSRecordsForHostResponse>
</soap:Body> </soap:Body>
</soap:Envelope> </soap:Envelope>