From 7ebe387255deb042509c95fefdea0d46b6336e13 Mon Sep 17 00:00:00 2001 From: adriancole Date: Sat, 13 Apr 2013 17:49:03 -0700 Subject: [PATCH] corrected argument order on DirectionalRecordDetail of ultradns --- .../ws/domain/DirectionalRecordDetail.java | 2 +- ...ectionalDNSRecordsForHostResponseTest.java | 57 +++++++++++++++---- .../src/test/resources/directionalrecords.xml | 48 ++++++++++++---- 3 files changed, 83 insertions(+), 24 deletions(-) diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalRecordDetail.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalRecordDetail.java index ecd9456843..0a5a27f194 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalRecordDetail.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalRecordDetail.java @@ -39,7 +39,7 @@ public class DirectionalRecordDetail { private final DirectionalRecord record; private DirectionalRecordDetail(String zoneName, String name, String id, - Optional geolocationGroup, Optional group, + Optional group, Optional geolocationGroup, Optional sourceIpGroup, DirectionalRecord record) { this.zoneName = checkNotNull(zoneName, "zoneName"); this.name = checkNotNull(name, "name"); diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalDNSRecordsForHostResponseTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalDNSRecordsForHostResponseTest.java index a3942c7f5e..fecda7e0e7 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalDNSRecordsForHostResponseTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalDNSRecordsForHostResponseTest.java @@ -52,22 +52,57 @@ public class GetDirectionalDNSRecordsForHostResponseTest extends BaseHandlerTest public FluentIterable expected() { return FluentIterable.from(ImmutableSet. 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()); } diff --git a/providers/ultradns-ws/src/test/resources/directionalrecords.xml b/providers/ultradns-ws/src/test/resources/directionalrecords.xml index 43a54752ab..3428ccae51 100644 --- a/providers/ultradns-ws/src/test/resources/directionalrecords.xml +++ b/providers/ultradns-ws/src/test/resources/directionalrecords.xml @@ -1,19 +1,43 @@ - - - - - - + xmlns:ns2="http://schema.ultraservice.neustar.com/v01/" ZoneName="geo.jclouds.org." + DName="www.geo.jclouds.org."> + + + + + + + + + + + + + + + + + + + + - +