diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSApi.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSApi.java index ed94b5d851..a7009d7b9e 100644 --- a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSApi.java +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSApi.java @@ -21,6 +21,7 @@ package org.jclouds.ultradns.ws; import org.jclouds.rest.annotations.Delegate; import org.jclouds.rest.annotations.PayloadParam; import org.jclouds.ultradns.ws.domain.Account; +import org.jclouds.ultradns.ws.features.LBPoolApi; import org.jclouds.ultradns.ws.features.ResourceRecordApi; import org.jclouds.ultradns.ws.features.TaskApi; import org.jclouds.ultradns.ws.features.ZoneApi; @@ -54,6 +55,15 @@ public interface UltraDNSWSApi { @Delegate ResourceRecordApi getResourceRecordApiForZone(@PayloadParam("zoneName") String zoneName); + /** + * Provides synchronous access to Load Balancing Pool features. + * + * @param zoneName + * zoneName including a trailing dot + */ + @Delegate + LBPoolApi getLBPoolApiForZone(@PayloadParam("zoneName") String zoneName); + /** * Provides synchronous access to Task features. */ diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSApiMetadata.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSApiMetadata.java index a82a68fd14..65237b7336 100644 --- a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSApiMetadata.java +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSApiMetadata.java @@ -66,7 +66,7 @@ public class UltraDNSWSApiMetadata extends BaseRestApiMetadata { .identityName("Username") .credentialName("Password") .version("v01") - .documentation(URI.create("https://www.ultradns.net/api/NUS_API_XML_SOAP.pdf")) + .documentation(URI.create("https://portal.ultradns.com/static/docs/NUS_API_XML_SOAP.pdf")) .defaultEndpoint("https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01") .defaultProperties(UltraDNSWSApiMetadata.defaultProperties()) .defaultModule(UltraDNSWSRestClientModule.class); diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSAsyncApi.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSAsyncApi.java index dc0b9bf655..5977a2544e 100644 --- a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSAsyncApi.java +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSAsyncApi.java @@ -28,6 +28,7 @@ import org.jclouds.rest.annotations.RequestFilters; import org.jclouds.rest.annotations.VirtualHost; import org.jclouds.rest.annotations.XMLResponseParser; import org.jclouds.ultradns.ws.domain.Account; +import org.jclouds.ultradns.ws.features.LBPoolAsyncApi; import org.jclouds.ultradns.ws.features.ResourceRecordAsyncApi; import org.jclouds.ultradns.ws.features.TaskAsyncApi; import org.jclouds.ultradns.ws.features.ZoneAsyncApi; @@ -72,6 +73,15 @@ public interface UltraDNSWSAsyncApi { @Delegate ResourceRecordAsyncApi getResourceRecordApiForZone(@PayloadParam("zoneName") String zoneName); + /** + * Provides asynchronous access to Load Balancing Pool features. + * + * @param zoneName + * zoneName including a trailing dot + */ + @Delegate + LBPoolAsyncApi getLBPoolApiForZone(@PayloadParam("zoneName") String zoneName); + /** * Provides asynchronous access to Task features. */ diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSProviderMetadata.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSProviderMetadata.java index 1a0b1b3cc0..748056c3be 100644 --- a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSProviderMetadata.java +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSProviderMetadata.java @@ -61,7 +61,7 @@ public class UltraDNSWSProviderMetadata extends BaseProviderMetadata { .name("Neustar UltraDNS WS") .apiMetadata(new UltraDNSWSApiMetadata()) .homepage(URI.create("http://www.neustar.biz/enterprise/dns-services/what-is-external-dns")) - .console(URI.create("https://www.ultradns.net")) + .console(URI.create("https://portal.ultradns.com")) .iso3166Codes("US-CA", "US-VA") // TODO .endpoint("https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01") .defaultProperties(UltraDNSWSProviderMetadata.defaultProperties()); diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/config/UltraDNSWSRestClientModule.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/config/UltraDNSWSRestClientModule.java index 04664db99e..56dea55dbc 100644 --- a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/config/UltraDNSWSRestClientModule.java +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/config/UltraDNSWSRestClientModule.java @@ -29,6 +29,8 @@ import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.config.RestClientModule; import org.jclouds.ultradns.ws.UltraDNSWSApi; import org.jclouds.ultradns.ws.UltraDNSWSAsyncApi; +import org.jclouds.ultradns.ws.features.LBPoolApi; +import org.jclouds.ultradns.ws.features.LBPoolAsyncApi; import org.jclouds.ultradns.ws.features.ResourceRecordApi; import org.jclouds.ultradns.ws.features.ResourceRecordAsyncApi; import org.jclouds.ultradns.ws.features.TaskApi; @@ -50,6 +52,7 @@ public class UltraDNSWSRestClientModule extends RestClientModule, Class> DELEGATE_MAP = ImmutableMap., Class> builder() .put(ZoneApi.class, ZoneAsyncApi.class) .put(ResourceRecordApi.class, ResourceRecordAsyncApi.class) + .put(LBPoolApi.class, LBPoolAsyncApi.class) .put(TaskApi.class, TaskAsyncApi.class).build(); public UltraDNSWSRestClientModule() { diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/LBPool.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/LBPool.java new file mode 100644 index 0000000000..65aca2ac7d --- /dev/null +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/LBPool.java @@ -0,0 +1,182 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.ultradns.ws.domain; + +import static com.google.common.base.Preconditions.checkNotNull; + +import com.google.common.base.Objects; +import com.google.common.base.Optional; + +/** + * + * @author Adrian Cole + */ +public final class LBPool { + + private final String zoneId; + private final String id; + private final String name; + private final Type type; + private final Optional responseMethod; + + private LBPool(String zoneId, String id, String name, Type type, Optional responseMethod) { + this.zoneId = checkNotNull(zoneId, "zoneId"); + this.id = checkNotNull(id, "id"); + this.name = checkNotNull(name, "name for %s", id); + this.type = checkNotNull(type, "type for %s", name); + this.responseMethod = checkNotNull(responseMethod, "responseMethod for %s", name); + } + + /** + * The ID of the zone. + */ + public String getZoneId() { + return zoneId; + } + + /** + * The ID of the pool. + */ + public String getId() { + return id; + } + + /** + * The name of the pool. ex. {@code jclouds.org.} + */ + public String getName() { + return name; + } + + /** + * The type of the pool + */ + public Type getType() { + return type; + } + + /** + * The response method + */ + public Optional getResponseMethod() { + return responseMethod; + } + + @Override + public int hashCode() { + return Objects.hashCode(zoneId, id, name, type, responseMethod); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + LBPool that = LBPool.class.cast(obj); + return Objects.equal(this.zoneId, that.zoneId) && Objects.equal(this.id, that.id) + && Objects.equal(this.name, that.name) && Objects.equal(this.type, that.type) + && Objects.equal(this.responseMethod, that.responseMethod); + } + + @Override + public String toString() { + return Objects.toStringHelper(this).omitNullValues().add("zoneId", zoneId).add("id", id).add("name", name) + .add("type", type).add("responseMethod", responseMethod.orNull()).toString(); + } + + public static enum Type { + + RD, RR, SB, TC, UNRECOGNIZED; + + public static Type fromValue(String type) { + try { + return valueOf(checkNotNull(type, "type")); + } catch (IllegalArgumentException e) { + return UNRECOGNIZED; + } + } + } + + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return builder().from(this); + } + + public final static class Builder { + private String zoneId; + private String id; + private String name; + private Type type; + private Optional responseMethod = Optional.absent(); + + /** + * @see LBPool#getZoneId() + */ + public Builder zoneId(String zoneId) { + this.zoneId = zoneId; + return this; + } + + /** + * @see LBPool#getId() + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * @see LBPool#getName() + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * @see LBPool#getType() + */ + public Builder type(Type type) { + this.type = type; + return this; + } + + /** + * @see LBPool#getResponseMethod() + */ + public Builder responseMethod(Type responseMethod) { + this.responseMethod = Optional.fromNullable(responseMethod); + return this; + } + + public LBPool build() { + return new LBPool(zoneId, id, name, type, responseMethod); + } + + public Builder from(LBPool in) { + return this.zoneId(in.zoneId).id(in.id).name(in.name).type(in.type).responseMethod(in.responseMethod.orNull()); + } + } +} diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/PoolRecord.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/PoolRecord.java new file mode 100644 index 0000000000..fe2a6058de --- /dev/null +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/PoolRecord.java @@ -0,0 +1,168 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.ultradns.ws.domain; + +import static com.google.common.base.Preconditions.checkNotNull; + +import com.google.common.base.Objects; + +/** + * + * @author Adrian Cole + */ +public final class PoolRecord { + + private final String poolId; + private final String id; + private final String description; + private final String type; + private final String pointsTo; + + private PoolRecord(String poolId, String id, String description, String type, String pointsTo) { + this.poolId = checkNotNull(poolId, "poolId"); + this.id = checkNotNull(id, "id"); + this.description = checkNotNull(description, "description for %s", id); + this.type = checkNotNull(type, "type for %s", description); + this.pointsTo = checkNotNull(pointsTo, "pointsTo for %s", description); + } + + /** + * The ID of the pool. + */ + public String getPoolId() { + return poolId; + } + + /** + * The ID of the record. + */ + public String getId() { + return id; + } + + /** + * The description of the record. ex. {@code SiteBacker pool via API} + */ + public String getDescription() { + return description; + } + + /** + * The type of the record ex. ex. {@code A} + */ + public String getType() { + return type; + } + + /** + * What the record points to ex. {@code 172.16.8.1} + */ + public String getPointsTo() { + return pointsTo; + } + + @Override + public int hashCode() { + return Objects.hashCode(poolId, id, description, type, pointsTo); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PoolRecord that = PoolRecord.class.cast(obj); + return Objects.equal(this.poolId, that.poolId) && Objects.equal(this.id, that.id) + && Objects.equal(this.description, that.description) && Objects.equal(this.type, that.type) + && Objects.equal(this.pointsTo, that.pointsTo); + } + + @Override + public String toString() { + return Objects.toStringHelper(this).omitNullValues().add("poolId", poolId).add("id", id).add("description", description) + .add("type", type).add("pointsTo", pointsTo).toString(); + } + + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return builder().from(this); + } + + public final static class Builder { + private String poolId; + private String id; + private String description; + private String type; + private String pointsTo; + + /** + * @see PoolRecord#getPoolId() + */ + public Builder poolId(String poolId) { + this.poolId = poolId; + return this; + } + + /** + * @see PoolRecord#getId() + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * @see PoolRecord#getDescription() + */ + public Builder description(String description) { + this.description = description; + return this; + } + + /** + * @see PoolRecord#getType() + */ + public Builder type(String type) { + this.type = type; + return this; + } + + /** + * @see PoolRecord#getPointsTo() + */ + public Builder pointsTo(String pointsTo) { + this.pointsTo = pointsTo; + return this; + } + + public PoolRecord build() { + return new PoolRecord(poolId, id, description, type, pointsTo); + } + + public Builder from(PoolRecord in) { + return this.poolId(in.poolId).id(in.id).description(in.description).type(in.type).pointsTo(in.pointsTo); + } + } +} diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/features/LBPoolApi.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/features/LBPoolApi.java new file mode 100644 index 0000000000..50c0072e87 --- /dev/null +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/features/LBPoolApi.java @@ -0,0 +1,66 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.ultradns.ws.features; + +import org.jclouds.rest.ResourceNotFoundException; +import org.jclouds.ultradns.ws.domain.LBPool; +import org.jclouds.ultradns.ws.domain.LBPool.Type; +import org.jclouds.ultradns.ws.domain.PoolRecord; + +import com.google.common.collect.FluentIterable; + +/** + * @see LBPoolAsyncApi + * @author Adrian Cole + */ +public interface LBPoolApi { + + /** + * Returns all pools in the zone. + * + * @throws ResourceNotFoundException + * if the zone doesn't exist + */ + FluentIterable list() throws ResourceNotFoundException; + + /** + * Returns all records in the pool. + * + * @throws ResourceNotFoundException + * if the pool doesn't exist + */ + FluentIterable listRecords(String poolId) throws ResourceNotFoundException; + + /** + * Returns all pools with the specified {@link LBPool#getType()} + * + * @param type + * the {@link LBPool#getType() type} + * @throws ResourceNotFoundException + * if the zone doesn't exist + */ + FluentIterable listByType(Type type) throws ResourceNotFoundException; + + /** + * removes a pool and all its records and probes + * + * @param id the {@link LBPool#getId() id} + */ + void delete(String id); +} diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/features/LBPoolAsyncApi.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/features/LBPoolAsyncApi.java new file mode 100644 index 0000000000..cbc5d43c39 --- /dev/null +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/features/LBPoolAsyncApi.java @@ -0,0 +1,88 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.ultradns.ws.features; + +import javax.inject.Named; +import javax.ws.rs.POST; + +import org.jclouds.Fallbacks.VoidOnNotFoundOr404; +import org.jclouds.rest.ResourceNotFoundException; +import org.jclouds.rest.annotations.Fallback; +import org.jclouds.rest.annotations.Payload; +import org.jclouds.rest.annotations.PayloadParam; +import org.jclouds.rest.annotations.RequestFilters; +import org.jclouds.rest.annotations.VirtualHost; +import org.jclouds.rest.annotations.XMLResponseParser; +import org.jclouds.ultradns.ws.domain.LBPool; +import org.jclouds.ultradns.ws.domain.LBPool.Type; +import org.jclouds.ultradns.ws.domain.PoolRecord; +import org.jclouds.ultradns.ws.filters.SOAPWrapWithPasswordAuth; +import org.jclouds.ultradns.ws.xml.LBPoolListHandler; +import org.jclouds.ultradns.ws.xml.PoolRecordListHandler; + +import com.google.common.collect.FluentIterable; +import com.google.common.util.concurrent.ListenableFuture; + +/** + * @see LBPoolApi + * @see + * @see + * @author Adrian Cole + */ +@RequestFilters(SOAPWrapWithPasswordAuth.class) +@VirtualHost +public interface LBPoolAsyncApi { + + /** + * @see LBPoolApi#list() + */ + @Named("getLoadBalancingPoolsByZone") + @POST + @XMLResponseParser(LBPoolListHandler.class) + @Payload("{zoneName}all") + ListenableFuture> list() throws ResourceNotFoundException; + + /** + * @see LBPoolApi#listRecords(String) + */ + @Named("getPoolRecords") + @POST + @XMLResponseParser(PoolRecordListHandler.class) + @Payload("{poolId}") + ListenableFuture> listRecords(@PayloadParam("poolId") String poolId) throws ResourceNotFoundException; + + /** + * @see LBPoolApi#listByType(String) + */ + @Named("getLoadBalancingPoolsByZone") + @POST + @XMLResponseParser(LBPoolListHandler.class) + @Payload("{zoneName}{type}") + ListenableFuture> listByType(@PayloadParam("type") Type type) + throws ResourceNotFoundException; + + /** + * @see LBPoolApi#delete(String) + */ + @Named("deleteLBPool") + @POST + @Payload("{lbPoolID}Yes") + @Fallback(VoidOnNotFoundOr404.class) + ListenableFuture delete(@PayloadParam("lbPoolID") String id); +} diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/LBPoolHandler.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/LBPoolHandler.java new file mode 100644 index 0000000000..d5c8544227 --- /dev/null +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/LBPoolHandler.java @@ -0,0 +1,61 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.ultradns.ws.xml; + +import static org.jclouds.util.SaxUtils.cleanseAttributes; +import static org.jclouds.util.SaxUtils.equalsOrSuffix; + +import java.util.Map; + +import org.jclouds.http.functions.ParseSax; +import org.jclouds.ultradns.ws.domain.LBPool; +import org.jclouds.ultradns.ws.domain.LBPool.Builder; +import org.jclouds.ultradns.ws.domain.LBPool.Type; +import org.xml.sax.Attributes; + +/** + * + * @author Adrian Cole + */ +public class LBPoolHandler extends ParseSax.HandlerForGeneratedRequestWithResult { + + private Builder pool = LBPool.builder(); + + @Override + public LBPool getResult() { + try { + return pool.build(); + } finally { + pool = LBPool.builder(); + } + } + + @Override + public void startElement(String uri, String localName, String qName, Attributes attrs) { + Map attributes = cleanseAttributes(attrs); + if (equalsOrSuffix(qName, "LBPoolData")) { + pool.zoneId(attributes.get("zoneid")); + } else if (equalsOrSuffix(qName, "PoolData")) { + Type responseMethod = attributes.containsKey("ResponseMethod") ? Type.fromValue(attributes + .get("ResponseMethod")) : null; + pool.id(attributes.get("PoolId")).name(attributes.get("PoolName")) + .type(Type.fromValue(attributes.get("PoolType"))).responseMethod(responseMethod); + } + } +} diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/LBPoolListHandler.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/LBPoolListHandler.java new file mode 100644 index 0000000000..540cb8e09f --- /dev/null +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/LBPoolListHandler.java @@ -0,0 +1,65 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.ultradns.ws.xml; + +import static org.jclouds.util.SaxUtils.equalsOrSuffix; + +import org.jclouds.http.functions.ParseSax; +import org.jclouds.ultradns.ws.domain.LBPool; +import org.xml.sax.Attributes; + +import com.google.common.collect.FluentIterable; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableSet.Builder; +import com.google.inject.Inject; + +/** + * + * @author Adrian Cole + */ +public class LBPoolListHandler extends ParseSax.HandlerForGeneratedRequestWithResult> { + + private final LBPoolHandler poolHandler; + + private Builder pools = ImmutableSet. builder(); + + @Inject + public LBPoolListHandler(LBPoolHandler poolHandler) { + this.poolHandler = poolHandler; + } + + @Override + public FluentIterable getResult() { + return FluentIterable.from(pools.build()); + } + + @Override + public void startElement(String url, String name, String qName, Attributes attributes) { + if (equalsOrSuffix(qName, "LBPoolData") || equalsOrSuffix(qName, "PoolData")) { + poolHandler.startElement(url, name, qName, attributes); + } + } + + @Override + public void endElement(String uri, String name, String qName) { + if (equalsOrSuffix(qName, "LBPoolData")) { + pools.add(poolHandler.getResult()); + } + } +} diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/PoolRecordHandler.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/PoolRecordHandler.java new file mode 100644 index 0000000000..4ee4576581 --- /dev/null +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/PoolRecordHandler.java @@ -0,0 +1,59 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.ultradns.ws.xml; + +import static org.jclouds.util.SaxUtils.cleanseAttributes; +import static org.jclouds.util.SaxUtils.equalsOrSuffix; + +import java.util.Map; + +import org.jclouds.http.functions.ParseSax; +import org.jclouds.ultradns.ws.domain.PoolRecord; +import org.xml.sax.Attributes; + +/** + * + * @author Adrian Cole + */ +public class PoolRecordHandler extends ParseSax.HandlerForGeneratedRequestWithResult { + + private PoolRecord poolRecord; + + @Override + public PoolRecord getResult() { + try { + return poolRecord; + } finally { + poolRecord = null; + } + } + + @Override + public void startElement(String uri, String localName, String qName, Attributes attrs) { + Map attributes = cleanseAttributes(attrs); + if (equalsOrSuffix(qName, "PoolRecordData")) { + poolRecord = PoolRecord.builder() + .poolId(attributes.get("poolId")) + .id(attributes.get("poolRecordID")) + .description(attributes.get("description")) + .type(attributes.get("recordType")) + .pointsTo(attributes.get("pointsTo")).build(); + } + } +} diff --git a/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/PoolRecordListHandler.java b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/PoolRecordListHandler.java new file mode 100644 index 0000000000..61c5d1397d --- /dev/null +++ b/labs/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/PoolRecordListHandler.java @@ -0,0 +1,65 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.ultradns.ws.xml; + +import static org.jclouds.util.SaxUtils.equalsOrSuffix; + +import org.jclouds.http.functions.ParseSax; +import org.jclouds.ultradns.ws.domain.PoolRecord; +import org.xml.sax.Attributes; + +import com.google.common.collect.FluentIterable; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableSet.Builder; +import com.google.inject.Inject; + +/** + * + * @author Adrian Cole + */ +public class PoolRecordListHandler extends ParseSax.HandlerForGeneratedRequestWithResult> { + + private final PoolRecordHandler zoneHandler; + + private Builder zones = ImmutableSet. builder(); + + @Inject + public PoolRecordListHandler(PoolRecordHandler zoneHandler) { + this.zoneHandler = zoneHandler; + } + + @Override + public FluentIterable getResult() { + return FluentIterable.from(zones.build()); + } + + @Override + public void startElement(String url, String name, String qName, Attributes attributes) { + if (equalsOrSuffix(qName, "PoolRecordData")) { + zoneHandler.startElement(url, name, qName, attributes); + } + } + + @Override + public void endElement(String uri, String name, String qName) { + if (equalsOrSuffix(qName, "PoolRecordData")) { + zones.add(zoneHandler.getResult()); + } + } +} diff --git a/labs/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/LBPoolApiExpectTest.java b/labs/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/LBPoolApiExpectTest.java new file mode 100644 index 0000000000..b771f577d0 --- /dev/null +++ b/labs/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/LBPoolApiExpectTest.java @@ -0,0 +1,103 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.ultradns.ws.features; + +import static org.testng.Assert.assertEquals; + +import org.jclouds.http.HttpRequest; +import org.jclouds.http.HttpResponse; +import org.jclouds.ultradns.ws.UltraDNSWSApi; +import org.jclouds.ultradns.ws.domain.LBPool.Type; +import org.jclouds.ultradns.ws.internal.BaseUltraDNSWSApiExpectTest; +import org.jclouds.ultradns.ws.parse.GetLoadBalancingPoolsByZoneResponseTest; +import org.jclouds.ultradns.ws.parse.GetPoolRecordsResponseTest; +import org.testng.annotations.Test; + +/** + * @author Adrian Cole + */ +@Test(groups = "unit", testName = "LBPoolApiExpectTest") +public class LBPoolApiExpectTest extends BaseUltraDNSWSApiExpectTest { + + HttpRequest list = HttpRequest.builder().method("POST") + .endpoint("https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01") + .addHeader("Host", "ultra-api.ultradns.com:8443") + .payload(payloadFromResourceWithContentType("/list_lbpools.xml", "application/xml")).build(); + + HttpResponse listResponse = HttpResponse.builder().statusCode(200) + .payload(payloadFromResourceWithContentType("/lbpools.xml", "application/xml")).build(); + + public void testListWhenResponseIs2xx() { + UltraDNSWSApi success = requestSendsResponse(list, listResponse); + + assertEquals( + success.getLBPoolApiForZone("jclouds.org.").list().toString(), + new GetLoadBalancingPoolsByZoneResponseTest().expected().toString()); + } + + HttpRequest listByType = HttpRequest.builder().method("POST") + .endpoint("https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01") + .addHeader("Host", "ultra-api.ultradns.com:8443") + .payload(payloadFromResourceWithContentType("/list_lbpools_by_type.xml", "application/xml")).build(); + + public void testListByTypeWhenResponseIs2xx() { + UltraDNSWSApi success = requestSendsResponse(listByType, listResponse); + + assertEquals( + success.getLBPoolApiForZone("jclouds.org.").listByType(Type.RD).toString(), + new GetLoadBalancingPoolsByZoneResponseTest().expected().toString()); + } + + HttpRequest listRecords = HttpRequest.builder().method("POST") + .endpoint("https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01") + .addHeader("Host", "ultra-api.ultradns.com:8443") + .payload(payloadFromResourceWithContentType("/list_poolrecords.xml", "application/xml")).build(); + + HttpResponse listRecordsResponse = HttpResponse.builder().statusCode(200) + .payload(payloadFromResourceWithContentType("/poolrecords.xml", "application/xml")).build(); + + public void testListRecordsWhenResponseIs2xx() { + UltraDNSWSApi success = requestSendsResponse(listRecords, listRecordsResponse); + + assertEquals( + success.getLBPoolApiForZone("jclouds.org.").listRecords("04053D8E57C7931F").toString(), + new GetPoolRecordsResponseTest().expected().toString()); + } + + HttpRequest delete = HttpRequest.builder().method("POST") + .endpoint("https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01") + .addHeader("Host", "ultra-api.ultradns.com:8443") + .payload(payloadFromResourceWithContentType("/delete_lbpool.xml", "application/xml")).build(); + + HttpResponse deleteResponse = HttpResponse.builder().statusCode(404) + .payload(payloadFromResourceWithContentType("/lbpool_deleted.xml", "application/xml")).build(); + + public void testDeleteWhenResponseIs2xx() { + UltraDNSWSApi success = requestSendsResponse(delete, deleteResponse); + success.getZoneApi().delete("04053D8E57C7931F"); + } + + HttpResponse poolDoesntExist = HttpResponse.builder().message("Server Epoolor").statusCode(500) + .payload(payloadFromResource("/lbpool_doesnt_exist.xml")).build(); + + public void testDeleteWhenResponseRRNotFound() { + UltraDNSWSApi notFound = requestSendsResponse(delete, poolDoesntExist); + notFound.getZoneApi().delete("04053D8E57C7931F"); + } +} diff --git a/labs/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/LBPoolApiLiveTest.java b/labs/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/LBPoolApiLiveTest.java new file mode 100644 index 0000000000..1ff44081dc --- /dev/null +++ b/labs/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/features/LBPoolApiLiveTest.java @@ -0,0 +1,103 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.ultradns.ws.features; + +import static com.google.common.base.Preconditions.checkNotNull; +import static org.testng.Assert.assertTrue; + +import org.jclouds.rest.ResourceNotFoundException; +import org.jclouds.ultradns.ws.domain.Account; +import org.jclouds.ultradns.ws.domain.LBPool; +import org.jclouds.ultradns.ws.domain.LBPool.Type; +import org.jclouds.ultradns.ws.domain.PoolRecord; +import org.jclouds.ultradns.ws.domain.Zone; +import org.jclouds.ultradns.ws.internal.BaseUltraDNSWSApiLiveTest; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +/** + * @author Adrian Cole + */ +@Test(groups = "live", singleThreaded = true, testName = "LBPoolApiLiveTest") +public class LBPoolApiLiveTest extends BaseUltraDNSWSApiLiveTest { + + private Account account; + + @Override + @BeforeClass(groups = { "integration", "live" }) + public void setupContext() { + super.setupContext(); + account = context.getApi().getCurrentAccount(); + } + + private void checkLBPool(LBPool pool) { + checkNotNull(pool.getZoneId(), "ZoneId cannot be null for a LBPool %s", pool); + checkNotNull(pool.getId(), "Id cannot be null for a LBPool %s", pool); + checkNotNull(pool.getName(), "Name cannot be null for a LBPool %s", pool); + checkNotNull(pool.getType(), "Type cannot be null for a LBPool %s", pool); + checkNotNull(pool.getResponseMethod(), "ResponseMethod cannot be null for a LBPool %s", pool); + } + + private void checkPoolRecord(PoolRecord record) { + checkNotNull(record.getPoolId(), "PoolId cannot be null for a PoolRecord %s", record); + checkNotNull(record.getId(), "Id cannot be null for a PoolRecord %s", record); + checkNotNull(record.getDescription(), "Description cannot be null for a PoolRecord %s", record); + checkNotNull(record.getPointsTo(), "PointsTo cannot be null for a PoolRecord %s", record); + checkNotNull(record.getType(), "Type cannot be null for a PoolRecord %s", record); + } + + @Test + public void testListLBPools() { + for (Zone zone : context.getApi().getZoneApi().listByAccount(account.getId())) { + for (LBPool pool : api(zone.getName()).list()) { + checkLBPool(pool); + } + } + } + + @Test + public void testListLBPoolsByType() { + for (Zone zone : context.getApi().getZoneApi().listByAccount(account.getId())) { + for (LBPool pool : api(zone.getName()).list()) { + assertTrue(api(zone.getName()).listByType(pool.getType()).contains(pool)); + break; + } + } + } + + @Test + public void testListLBPoolRecords() { + for (Zone zone : context.getApi().getZoneApi().listByAccount(account.getId())) { + for (LBPool pool : api(zone.getName()).listByType(Type.RR)) { + for (PoolRecord record : api(zone.getName()).listRecords(pool.getId())) { + checkPoolRecord(record); + } + } + } + } + + @Test(expectedExceptions = ResourceNotFoundException.class, expectedExceptionsMessageRegExp = "Zone does not exist in the system.") + public void testListLBPoolsWhenZoneIdNotFound() { + api("AAAAAAAAAAAAAAAA").list(); + } + + private LBPoolApi api(String zoneName) { + return context.getApi().getLBPoolApiForZone(zoneName); + } +} diff --git a/labs/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetLoadBalancingPoolsByZoneResponseTest.java b/labs/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetLoadBalancingPoolsByZoneResponseTest.java new file mode 100644 index 0000000000..f7e46e9299 --- /dev/null +++ b/labs/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetLoadBalancingPoolsByZoneResponseTest.java @@ -0,0 +1,77 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.ultradns.ws.parse; + +import static org.testng.Assert.assertEquals; + +import java.io.InputStream; + +import org.jclouds.http.functions.BaseHandlerTest; +import org.jclouds.ultradns.ws.domain.LBPool; +import org.jclouds.ultradns.ws.domain.LBPool.Type; +import org.jclouds.ultradns.ws.xml.LBPoolListHandler; +import org.testng.annotations.Test; + +import com.google.common.collect.FluentIterable; +import com.google.common.collect.ImmutableList; + +/** + * @author Adrian Cole + */ +@Test(testName = "GetLoadBalancingPoolsByZoneResponseTest") +public class GetLoadBalancingPoolsByZoneResponseTest extends BaseHandlerTest { + + public void test() { + InputStream is = getClass().getResourceAsStream("/lbpools.xml"); + + FluentIterable expected = expected(); + + LBPoolListHandler handler = injector.getInstance(LBPoolListHandler.class); + FluentIterable result = factory.create(handler).parse(is); + + assertEquals(result.toSet().toString(), expected.toSet().toString()); + } + + public FluentIterable expected() { + return FluentIterable.from(ImmutableList. builder() + .add(LBPool.builder() + .zoneId("0000000000000001") + .id("000000000000001") + .name("us-west-1c.app.jclouds.org.") + .type(Type.TC).build()) + .add(LBPool.builder() + .zoneId("0000000000000001") + .id("000000000000002") + .name("app-uswest1.jclouds.org.") + .type(Type.RD) + .responseMethod(Type.RR).build()) + .add(LBPool.builder() + .zoneId("0000000000000001") + .id("000000000000003") + .name("app-uswest2.jclouds.org.") + .type(Type.RD) + .responseMethod(Type.RR).build()) + .add(LBPool.builder() + .zoneId("0000000000000001") + .id("000000000000004") + .name("app-euwest.jclouds.org.") + .type(Type.RD) + .responseMethod(Type.RR).build()).build()); + } +} \ No newline at end of file diff --git a/labs/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetPoolRecordsResponseTest.java b/labs/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetPoolRecordsResponseTest.java new file mode 100644 index 0000000000..26ab403f84 --- /dev/null +++ b/labs/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetPoolRecordsResponseTest.java @@ -0,0 +1,65 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.ultradns.ws.parse; + +import static org.testng.Assert.assertEquals; + +import java.io.InputStream; + +import org.jclouds.http.functions.BaseHandlerTest; +import org.jclouds.ultradns.ws.domain.PoolRecord; +import org.jclouds.ultradns.ws.xml.PoolRecordListHandler; +import org.testng.annotations.Test; + +import com.google.common.collect.FluentIterable; +import com.google.common.collect.ImmutableSet; + +/** + * @author Adrian Cole + */ +@Test(testName = "GetPoolRecordsResponseTest") +public class GetPoolRecordsResponseTest extends BaseHandlerTest { + + public void test() { + InputStream is = getClass().getResourceAsStream("/poolrecords.xml"); + + FluentIterable expected = expected(); + + PoolRecordListHandler handler = injector.getInstance(PoolRecordListHandler.class); + FluentIterable result = factory.create(handler).parse(is); + + assertEquals(result.toSet().toString(), expected.toSet().toString()); + } + + public FluentIterable expected() { + return FluentIterable.from(ImmutableSet. builder() + .add(PoolRecord.builder() + .poolId("0603399D0413BC46") + .id("0603399D0413BC47") + .description("SiteBacker pool via API") + .type("A") + .pointsTo("172.16.8.1").build()) + .add(PoolRecord.builder() + .poolId("0603399D0413BC46") + .id("060339A30416430C") + .description("SiteBacker pool via API") + .type("A") + .pointsTo("172.16.8.2").build()).build()); + } +} diff --git a/labs/ultradns-ws/src/test/resources/delete_lbpool.xml b/labs/ultradns-ws/src/test/resources/delete_lbpool.xml new file mode 100644 index 0000000000..133805f818 --- /dev/null +++ b/labs/ultradns-ws/src/test/resources/delete_lbpool.xml @@ -0,0 +1 @@ +identitycredential04053D8E57C7931F \ No newline at end of file diff --git a/labs/ultradns-ws/src/test/resources/lbpool_deleted.xml b/labs/ultradns-ws/src/test/resources/lbpool_deleted.xml new file mode 100644 index 0000000000..b6d0bd3d0e --- /dev/null +++ b/labs/ultradns-ws/src/test/resources/lbpool_deleted.xml @@ -0,0 +1 @@ +Successful \ No newline at end of file diff --git a/labs/ultradns-ws/src/test/resources/lbpool_doesnt_exist.xml b/labs/ultradns-ws/src/test/resources/lbpool_doesnt_exist.xml new file mode 100644 index 0000000000..6550a2a982 --- /dev/null +++ b/labs/ultradns-ws/src/test/resources/lbpool_doesnt_exist.xml @@ -0,0 +1 @@ +soap:ServerFault occurred while processing.2103No Resource Record with GUID found in the system AAAAAAAAAAAAAAAA \ No newline at end of file diff --git a/labs/ultradns-ws/src/test/resources/lbpools.xml b/labs/ultradns-ws/src/test/resources/lbpools.xml new file mode 100644 index 0000000000..8c6e42bf27 --- /dev/null +++ b/labs/ultradns-ws/src/test/resources/lbpools.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/labs/ultradns-ws/src/test/resources/list_lbpools.xml b/labs/ultradns-ws/src/test/resources/list_lbpools.xml new file mode 100644 index 0000000000..869d54af9c --- /dev/null +++ b/labs/ultradns-ws/src/test/resources/list_lbpools.xml @@ -0,0 +1 @@ +identitycredentialjclouds.org.all \ No newline at end of file diff --git a/labs/ultradns-ws/src/test/resources/list_lbpools_by_type.xml b/labs/ultradns-ws/src/test/resources/list_lbpools_by_type.xml new file mode 100644 index 0000000000..b2d3423aec --- /dev/null +++ b/labs/ultradns-ws/src/test/resources/list_lbpools_by_type.xml @@ -0,0 +1 @@ +identitycredentialjclouds.org.RD \ No newline at end of file diff --git a/labs/ultradns-ws/src/test/resources/list_poolrecords.xml b/labs/ultradns-ws/src/test/resources/list_poolrecords.xml new file mode 100644 index 0000000000..6b09704e1c --- /dev/null +++ b/labs/ultradns-ws/src/test/resources/list_poolrecords.xml @@ -0,0 +1 @@ +identitycredential04053D8E57C7931F \ No newline at end of file diff --git a/labs/ultradns-ws/src/test/resources/poolrecords.xml b/labs/ultradns-ws/src/test/resources/poolrecords.xml new file mode 100644 index 0000000000..86783736dc --- /dev/null +++ b/labs/ultradns-ws/src/test/resources/poolrecords.xml @@ -0,0 +1,18 @@ + + + + + + + + + + +