diff --git a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/GleSYSPropertiesBuilder.java b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/GleSYSPropertiesBuilder.java
index 0103d0e9f3..dba345ad19 100644
--- a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/GleSYSPropertiesBuilder.java
+++ b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/GleSYSPropertiesBuilder.java
@@ -28,6 +28,7 @@ import java.util.Properties;
import org.jclouds.PropertiesBuilder;
import static org.jclouds.glesys.reference.GleSYSConstants.PROPERTY_GLESYS_DEFAULT_DC;
+import static org.jclouds.location.reference.LocationConstants.PROPERTY_ZONES;
/**
* Builds properties used in GleSYS Clients
@@ -41,7 +42,8 @@ public class GleSYSPropertiesBuilder extends PropertiesBuilder {
Properties properties = super.defaultProperties();
properties.setProperty(PROPERTY_ENDPOINT, "https://api.glesys.com");
properties.setProperty(PROPERTY_API_VERSION, "1");
- properties.setProperty(PROPERTY_ISO3166_CODES, "US-CA,US-VA,BR-SP");
+ properties.setProperty(PROPERTY_ZONES, "Amsterdam,Falkenberg,New York City,Stockholm");
+ properties.setProperty(PROPERTY_ISO3166_CODES, "NL-NH,SE-N,US-NY,SE-AB");
properties.setProperty(PROPERTY_ZONE + ".Amsterdam." + ISO3166_CODES, "NL-NH");
properties.setProperty(PROPERTY_ZONE + ".Falkenberg." + ISO3166_CODES, "SE-N");
properties.setProperty(PROPERTY_ZONE + ".New York City." + ISO3166_CODES, "US-NY");
diff --git a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/compute/options/GleSYSTemplateOptions.java b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/compute/options/GleSYSTemplateOptions.java
index 1fd817fe51..03f989fafb 100644
--- a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/compute/options/GleSYSTemplateOptions.java
+++ b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/compute/options/GleSYSTemplateOptions.java
@@ -33,7 +33,7 @@ import com.google.common.net.InetAddresses;
* Contains options supported by the
* {@link ComputeService#createNodesInGroup(String, int, TemplateOptions)} and
* {@link ComputeService#createNodesInGroup(String, int, TemplateOptions)} operations on the
- * gogrid provider.
+ * glesys provider.
*
*
Usage
The recommended way to instantiate a {@link GleSYSTemplateOptions} object is to
* statically import {@code GleSYSTemplateOptions.*} and invoke a static creation method followed by
diff --git a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/domain/Domain.java b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/domain/Domain.java
index 5aa645dfed..7d322f3c80 100644
--- a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/domain/Domain.java
+++ b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/domain/Domain.java
@@ -35,13 +35,13 @@ public class Domain implements Comparable {
}
public static class Builder {
- private String domain;
+ private String domainName;
private Date createTime;
private int recordCount;
- private boolean glesysNameServer;
+ private boolean useGlesysNameServer;
- public Builder domain(String domain) {
- this.domain = domain;
+ public Builder domainName(String domainName) {
+ this.domainName = domainName;
return this;
}
@@ -55,38 +55,39 @@ public class Domain implements Comparable {
return this;
}
- public Builder glesysNameServer(boolean glesysNameServer) {
- this.glesysNameServer = glesysNameServer;
+ public Builder useGlesysNameServer(boolean useGlesysNameServer) {
+ this.useGlesysNameServer = useGlesysNameServer;
return this;
}
public Domain build() {
- return new Domain(domain, createTime, recordCount, glesysNameServer);
+ return new Domain(domainName, createTime, recordCount, useGlesysNameServer);
}
public Builder fromDomain(Domain in) {
- return new Builder();
+ return new Builder().domainName(in.getDomainName()).createTime(in.getCreateTime()).recordCount(in.getRecordCount()).useGlesysNameServer(in.isGlesysNameServer());
}
}
- private final String domain;
- @SerializedName("create_time")
+ @SerializedName("domainname")
+ private final String domainName;
+ @SerializedName("createtime")
private final Date createTime;
- @SerializedName("count")
+ @SerializedName("recordcount")
private final int recordCount;
- @SerializedName("glesysnameserver")
- private final boolean glesysNameServer;
+ @SerializedName("usingglesysnameserver")
+ private final boolean useGlesysNameServer;
- public Domain(String domain, Date createTime, int recordCount, boolean glesysNameServer) {
- this.domain = domain;
+ public Domain(String domainName, Date createTime, int recordCount, boolean useGlesysNameServer) {
+ this.domainName = domainName;
this.createTime = createTime;
this.recordCount = recordCount;
- this.glesysNameServer = glesysNameServer;
+ this.useGlesysNameServer = useGlesysNameServer;
}
/** @return the domain name, ex. "jclouds.org" */
- public String getDomain() {
- return domain;
+ public String getDomainName() {
+ return domainName;
}
/** @return the date the domain was registered with GleSYS */
@@ -100,18 +101,18 @@ public class Domain implements Comparable {
}
/** @return true if a GleSYS nameserver holds the records */
- public boolean getGlesysNameServer() {
- return glesysNameServer;
+ public boolean isGlesysNameServer() {
+ return useGlesysNameServer;
}
@Override
public int hashCode() {
- return Objects.hashCode(domain);
+ return Objects.hashCode(domainName);
}
@Override
public int compareTo(Domain other) {
- return domain.compareTo(other.getDomain());
+ return domainName.compareTo(other.getDomainName());
}
@Override
@@ -120,7 +121,7 @@ public class Domain implements Comparable {
return true;
}
if (object instanceof Domain) {
- return Objects.equal(domain, ((Domain) object).domain);
+ return Objects.equal(domainName, ((Domain) object).domainName);
} else {
return false;
}
@@ -128,7 +129,7 @@ public class Domain implements Comparable {
@Override
public String toString() {
- return String.format("[domain=%s, createTime=%s, count=%d, glesysnameserver=%b]", domain, createTime, recordCount, glesysNameServer);
+ return String.format("[domainname=%s, createtime=%s, count=%d, useglesysnameserver=%b]", domainName, createTime, recordCount, useGlesysNameServer);
}
}
\ No newline at end of file
diff --git a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/domain/DomainRecord.java b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/domain/DomainRecord.java
index 3ea489648b..dd3b92cf9f 100644
--- a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/domain/DomainRecord.java
+++ b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/domain/DomainRecord.java
@@ -33,7 +33,7 @@ public class DomainRecord implements Comparable {
public static class Builder {
private String id;
- private String zone;
+ private String domainname;
private String host;
private String type;
private String data;
@@ -44,9 +44,8 @@ public class DomainRecord implements Comparable {
return this;
}
-
- public Builder zone(String zone) {
- this.zone = zone;
+ public Builder domainname(String domainname) {
+ this.domainname = domainname;
return this;
}
@@ -71,24 +70,24 @@ public class DomainRecord implements Comparable {
}
public DomainRecord build() {
- return new DomainRecord(id, zone, host, type, data, ttl);
+ return new DomainRecord(id, domainname, host, type, data, ttl);
}
public Builder fromDomainRecord(DomainRecord in) {
- return new Builder().id(in.getId()).zone(in.getZone()).host(in.getHost()).type(in.getType()).data(in.getData()).ttl(in.getTtl());
+ return new Builder().id(in.getId()).domainname(in.getDomainName()).host(in.getHost()).type(in.getType()).data(in.getData()).ttl(in.getTtl());
}
}
private final String id;
- private final String zone;
+ private final String domainname;
private final String host;
private final String type;
private final String data;
private final int ttl;
- public DomainRecord(String id, String zone, String host, String type, String data, int ttl) {
+ public DomainRecord(String id, String domainname, String host, String type, String data, int ttl) {
this.id = id;
- this.zone = zone;
+ this.domainname = domainname;
this.host = host;
this.type = type;
this.data = data;
@@ -106,8 +105,8 @@ public class DomainRecord implements Comparable {
/**
* @return the zone content of the record
*/
- public String getZone() {
- return zone;
+ public String getDomainName() {
+ return domainname;
}
/**
@@ -163,7 +162,7 @@ public class DomainRecord implements Comparable {
@Override
public String toString() {
- return String.format("[id=%s, zone=%s, host=%s, type=%s, data=%s, ttl=%d]", id, zone, host, type, data, ttl);
+ return String.format("[id=%s, domainname=%s, host=%s, type=%s, data=%s, ttl=%d]", id, domainname, host, type, data, ttl);
}
}
\ No newline at end of file
diff --git a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/domain/ServerDetails.java b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/domain/ServerDetails.java
index 5a5c8a3b7b..4a22f9d19c 100644
--- a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/domain/ServerDetails.java
+++ b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/domain/ServerDetails.java
@@ -42,9 +42,9 @@ public class ServerDetails extends Server {
private String description;
private String templateName;
private int cpuCores;
- private int memorySize;
- private int diskSize;
- private int transfer;
+ private int memorySizeMB;
+ private int diskSizeGB;
+ private int transferGB;
private Cost cost;
private List ips;
@@ -63,18 +63,18 @@ public class ServerDetails extends Server {
return this;
}
- public Builder memorySize(int memorySize) {
- this.memorySize = memorySize;
+ public Builder memorySizeMB(int memorySizeMB) {
+ this.memorySizeMB = memorySizeMB;
return this;
}
- public Builder diskSize(int diskSize) {
- this.diskSize = diskSize;
+ public Builder diskSizeGB(int diskSizeGB) {
+ this.diskSizeGB = diskSizeGB;
return this;
}
- public Builder transfer(int transfer) {
- this.transfer = transfer;
+ public Builder transferGB(int transferGB) {
+ this.transferGB = transferGB;
return this;
}
@@ -93,12 +93,12 @@ public class ServerDetails extends Server {
}
public ServerDetails build() {
- return new ServerDetails(id, hostname, datacenter, platform, templateName, description, cpuCores, memorySize, diskSize, transfer, cost, ips);
+ return new ServerDetails(id, hostname, datacenter, platform, templateName, description, cpuCores, memorySizeMB, diskSizeGB, transferGB, cost, ips);
}
public Builder fromServerDetails(ServerDetails in) {
- return fromServer(in).templateName(in.getTemplateName()).memorySize(in.getMemorySizeMB()).diskSize(in.getDiskSizeGB()).cpuCores(in.getCpuCores()).cost(in.getCost())
- .description(in.getDescription()).ips(in.getIps());
+ return fromServer(in).templateName(in.getTemplateName()).memorySizeMB(in.getMemorySizeMB()).diskSizeGB(in.getDiskSizeGB()).cpuCores(in.getCpuCores()).cost(in.getCost())
+ .transferGB(in.getTransferGB()).description(in.getDescription()).ips(in.getIps());
}
@Override
@@ -133,23 +133,24 @@ public class ServerDetails extends Server {
@SerializedName("cpucores")
private final int cpuCores;
@SerializedName("memorysize")
- private final int memorySize;
+ private final int memorySizeMB;
@SerializedName("disksize")
- private final int diskSize;
- private final int transfer;
+ private final int diskSizeGB;
+ @SerializedName("transfer")
+ private final int transferGB;
private final Cost cost;
@SerializedName("iplist")
private final List ips;
public ServerDetails(String id, String hostname, String datacenter, String platform, String templateName,
- String description, int cpuCores, int memorySize, int diskSize, int transfer, Cost cost, List ips) {
+ String description, int cpuCores, int memorySizeMB, int diskSizeGB, int transferGB, Cost cost, List ips) {
super(id, hostname, datacenter, platform);
this.templateName = checkNotNull(templateName, "template");
this.description = description;
this.cpuCores = cpuCores;
- this.memorySize = memorySize;
- this.diskSize = diskSize;
- this.transfer = transfer;
+ this.memorySizeMB = memorySizeMB;
+ this.diskSizeGB = diskSizeGB;
+ this.transferGB = transferGB;
this.cost = checkNotNull(cost, "cost");
this.ips = ips == null ? ImmutableList.of() : ips;
}
@@ -172,21 +173,21 @@ public class ServerDetails extends Server {
* @return the disk of the server in GB
*/
public int getDiskSizeGB() {
- return diskSize;
+ return diskSizeGB;
}
/**
* @return the memory of the server in MB
*/
public int getMemorySizeMB() {
- return memorySize;
+ return memorySizeMB;
}
/**
* @return the transfer of the server
*/
public int getTransferGB() {
- return transfer;
+ return transferGB;
}
/**
@@ -213,8 +214,8 @@ public class ServerDetails extends Server {
@Override
public String toString() {
return String.format(
- "[id=%s, hostname=%s, datacenter=%s, platform=%s, templateName=%s, description=%s, cpuCores=%d, memorySize=%d, diskSize=%d, transfer=%d, cost=%s, ips=%s]", id,
- hostname, datacenter, platform, templateName, description, cpuCores, memorySize, diskSize, transfer, cost, ips);
+ "[id=%s, hostname=%s, datacenter=%s, platform=%s, templateName=%s, description=%s, cpuCores=%d, memorySizeMB=%d, diskSizeGB=%d, transferGB=%d, cost=%s, ips=%s]", id,
+ hostname, datacenter, platform, templateName, description, cpuCores, memorySizeMB, diskSizeGB, transferGB, cost, ips);
}
}
diff --git a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/features/DomainAsyncClient.java b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/features/DomainAsyncClient.java
index 45e2a5bfea..9cbf479c27 100644
--- a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/features/DomainAsyncClient.java
+++ b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/features/DomainAsyncClient.java
@@ -64,14 +64,14 @@ public interface DomainAsyncClient {
*/
@POST
@Path("/domain/add/format/json")
- ListenableFuture addDomain(@FormParam("name") String name, AddDomainOptions... options);
+ ListenableFuture addDomain(@FormParam("domainname") String name, AddDomainOptions... options);
/**
* @see DomainClient#editDomain
*/
@POST
@Path("/domain/edit/format/json")
- ListenableFuture editDomain(@FormParam("domain") String domain, DomainOptions... options);
+ ListenableFuture editDomain(@FormParam("domainname") String domain, DomainOptions... options);
/**
@@ -79,23 +79,23 @@ public interface DomainAsyncClient {
*/
@POST
@Path("/domain/delete/format/json")
- ListenableFuture deleteDomain(@FormParam("domain") String domain);
+ ListenableFuture deleteDomain(@FormParam("domainname") String domain);
/**
* @see DomainClient#listRecords
*/
@POST
- @Path("/domain/list_records/format/json")
+ @Path("/domain/listrecords/format/json")
@SelectJson("records")
@Consumes(MediaType.APPLICATION_JSON)
- ListenableFuture> listRecords(@FormParam("domain") String domain);
+ ListenableFuture> listRecords(@FormParam("domainname") String domain);
/**
* @see DomainClient#addRecord
*/
@POST
- @Path("/domain/add_record/format/json")
- ListenableFuture addRecord(@FormParam("domain") String domain, @FormParam("host") String host,
+ @Path("/domain/addrecord/format/json")
+ ListenableFuture addRecord(@FormParam("domainname") String domain, @FormParam("host") String host,
@FormParam("type") String type, @FormParam("data") String data,
AddRecordOptions... options);
@@ -103,14 +103,14 @@ public interface DomainAsyncClient {
* @see DomainClient#editRecord
*/
@POST
- @Path("/domain/update_record/format/json")
- ListenableFuture editRecord(@FormParam("record_id") String record_id, EditRecordOptions... options);
+ @Path("/domain/updaterecord/format/json")
+ ListenableFuture editRecord(@FormParam("recordid") String record_id, EditRecordOptions... options);
/**
* @see DomainClient#deleteRecord
*/
@POST
- @Path("/domain/delete_record/format/json")
- ListenableFuture deleteRecord(@FormParam("record_id") String recordId);
+ @Path("/domain/deleterecord/format/json")
+ ListenableFuture deleteRecord(@FormParam("recordid") String recordId);
}
\ No newline at end of file
diff --git a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/features/ServerAsyncClient.java b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/features/ServerAsyncClient.java
index dbcf00029f..7928b79a67 100644
--- a/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/features/ServerAsyncClient.java
+++ b/sandbox-providers/glesys/src/main/java/org/jclouds/glesys/features/ServerAsyncClient.java
@@ -128,7 +128,7 @@ public interface ServerAsyncClient {
ListenableFuture