Merge pull request #1537 from jclouds/directional-fix

corrected argument order on DirectionalRecordDetail of ultradns
This commit is contained in:
Adrian Cole 2013-04-13 20:21:01 -07:00
commit 25a0b73436
3 changed files with 83 additions and 24 deletions

View File

@ -39,7 +39,7 @@ public class DirectionalRecordDetail {
private final DirectionalRecord record;
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) {
this.zoneName = checkNotNull(zoneName, "zoneName");
this.name = checkNotNull(name, "name");

View File

@ -52,22 +52,57 @@ public class GetDirectionalDNSRecordsForHostResponseTest extends BaseHandlerTest
public FluentIterable<DirectionalRecordDetail> expected() {
return FluentIterable.from(ImmutableSet.<DirectionalRecordDetail> builder()
.add(DirectionalRecordDetail.builder()
.zoneName("directional-example.com.")
.name("chaos.directional-example.com.")
.id("06093C2D10CB1CB1")
.zoneName("geo.jclouds.org.")
.name("www.geo.jclouds.org.")
.id("A000000000000001")
.geolocationGroup(DirectionalGroup.builder()
.id("06093C2D10CB1CB2")
.name("Geolocation field")
.id("C000000000000001")
.name("southamerica")
.build())
.sourceIpGroup(DirectionalGroup.builder()
.id("06093C2D10CB1CB4")
.name("172.16.1.0/24")
.build())
.record(DirectionalRecord.drBuilder()
.type("CNAME")
.ttl(300)
.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()
.type("A")
.ttl(60)
.ttl(500)
.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());
}

View File

@ -1,19 +1,43 @@
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getDirectionalDNSRecordsForHostResponse
<ns1:getDirectionalDNSRecordsForHostResponse
xmlns:ns1="http://webservice.api.ultra.neustar.com/v01/">
<DirectionalDNSRecordDetailList
ZoneName="directional-example.com." DName="chaos.directional-example.com.">
<DirectionalDNSRecordDetail
GeolocationGroupName="Geolocation field" GeolocationGroupId="06093C2D10CB1CB2"
SourceIPGroupName="172.16.1.0/24" SourceIPGroupId="06093C2D10CB1CB4"
TerritoriesCount="8" DirPoolRecordId="06093C2D10CB1CB1">
<DirectionalDNSRecord recordType="A" TTL="60"
noResponseRecord="false">
<InfoValues Info1Value="172.16.1.1" />
</DirectionalDNSRecord>
</DirectionalDNSRecordDetail>
xmlns:ns2="http://schema.ultraservice.neustar.com/v01/" ZoneName="geo.jclouds.org."
DName="www.geo.jclouds.org.">
<ns2:DirectionalDNSRecordDetail
GeolocationGroupName="southamerica" GeolocationGroupId="C000000000000001"
TerritoriesCount="16" DirPoolRecordId="A000000000000001">
<ns2:DirectionalDNSRecord recordType="CNAME"
TTL="300" noResponseRecord="false">
<ns2:InfoValues Info1Value="southamerica.geo.jclouds.org." />
</ns2:DirectionalDNSRecord>
</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>
</getDirectionalDNSRecordsForHostResponse>
</ns1:getDirectionalDNSRecordsForHostResponse>
</soap:Body>
</soap:Envelope>