Fix for issue #1035: glesys provider appears to be incompatible with current glesys API version

This commit is contained in:
petergardfjall 2012-12-06 08:59:59 +01:00
parent d9aaf94bd7
commit 7a9b0bae13
6 changed files with 198 additions and 87 deletions

View File

@ -173,9 +173,9 @@ public class GleSYSComputeServiceAdapter implements ComputeServiceAdapter<Server
for (Entry<String, AllowedArgumentsForCreateServer> platformToArgs : api.getServerApi()
.getAllowedArgumentsForCreateByPlatform().entrySet())
for (String datacenter : platformToArgs.getValue().getDataCenters())
for (int diskSizeGB : platformToArgs.getValue().getDiskSizesInGB())
for (int cpuCores : platformToArgs.getValue().getCpuCoreOptions())
for (int memorySizeMB : platformToArgs.getValue().getMemorySizesInMB()) {
for (int diskSizeGB : platformToArgs.getValue().getDiskSizesInGB().getAllowedUnits())
for (int cpuCores : platformToArgs.getValue().getCpuCoreOptions().getAllowedUnits())
for (int memorySizeMB : platformToArgs.getValue().getMemorySizesInMB().getAllowedUnits()) {
ImmutableSet.Builder<String> templatesSupportedBuilder = ImmutableSet.builder();
for (OSTemplate template : images) {
if (template.getPlatform().equals(platformToArgs.getKey())

View File

@ -0,0 +1,118 @@
package org.jclouds.glesys.domain;
import static com.google.common.base.Preconditions.checkNotNull;
import java.beans.ConstructorProperties;
import java.util.Set;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
/**
* Represents the allowed arguments for a certain server resource type (such as
* disksize, memorysize, cpucores, and transfer).
* <p/>
* This is a composite type consisting of both the set of allowed units for the
* resource type as well as the cost per unit.
*
* @see AllowedArgumentsForCreateServer
* @author Peter Gardfjäll
*/
public class AllowedArguments {
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromAllowedArgument(this);
}
public static class Builder {
protected Cost costPerUnit;
protected Set<Integer> allowedUnits;
/**
* @see AllowedArguments#getCostPerUnit()
*/
public Builder costPerUnit(Cost costPerUnit) {
this.costPerUnit = costPerUnit;
return this;
}
/**
* @see AllowedArguments#getAllowedUnits()
*/
public Builder allowedUnits(Set<Integer> allowedUnits) {
this.allowedUnits = ImmutableSet.copyOf(checkNotNull(allowedUnits,
"allowedUnits"));
return this;
}
public Builder allowedUnits(Integer... allowedUnits) {
return allowedUnits(ImmutableSet.copyOf(allowedUnits));
}
public AllowedArguments build() {
return new AllowedArguments(this.costPerUnit, this.allowedUnits);
}
public Builder fromAllowedArgument(AllowedArguments in) {
return this.costPerUnit(in.getCostPerUnit()).allowedUnits(
in.getAllowedUnits());
}
}
private final Cost costPerUnit;
private final Set<Integer> allowedUnits;
@ConstructorProperties({ "costperunit", "units" })
protected AllowedArguments(Cost costPerUnit, Set<Integer> units) {
this.costPerUnit = checkNotNull(costPerUnit, "costPerUnit");
this.allowedUnits = ImmutableSet.copyOf(checkNotNull(units,
"allowedUnits"));
}
/**
* @return the cost per unit.
*/
public Cost getCostPerUnit() {
return this.costPerUnit;
}
/**
* @return the set of allowed units for the resource type.
*/
public Set<Integer> getAllowedUnits() {
return this.allowedUnits;
}
@Override
public int hashCode() {
return Objects.hashCode(this.costPerUnit, this.allowedUnits);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if ((obj == null) || (getClass() != obj.getClass())) {
return false;
}
AllowedArguments that = AllowedArguments.class.cast(obj);
return Objects.equal(this.costPerUnit, that.costPerUnit)
&& Objects.equal(this.allowedUnits, that.allowedUnits);
}
protected ToStringHelper string() {
return Objects.toStringHelper("").add("costPerUnit", this.costPerUnit)
.add("allowedUnits", this.allowedUnits);
}
@Override
public String toString() {
return string().toString();
}
}

View File

@ -35,93 +35,78 @@ import com.google.common.collect.ImmutableSet;
*/
public class AllowedArgumentsForCreateServer {
public static Builder<?> builder() {
return new ConcreteBuilder();
public static Builder builder() {
return new Builder();
}
public Builder<?> toBuilder() {
return new ConcreteBuilder().fromAllowedArgumentsForCreateServer(this);
public Builder toBuilder() {
return new Builder().fromAllowedArgumentsForCreateServer(this);
}
public abstract static class Builder<T extends Builder<T>> {
protected abstract T self();
protected Set<Integer> diskSizes = ImmutableSet.of();
protected Set<Integer> memorySizes = ImmutableSet.of();
protected Set<Integer> cpuCores = ImmutableSet.of();
public static class Builder {
protected AllowedArguments diskSizes;
protected AllowedArguments memorySizes;
protected AllowedArguments cpuCores;
protected Set<String> templates = ImmutableSet.of();
protected Set<Integer> transfers = ImmutableSet.of();
protected AllowedArguments transfers;
protected Set<String> dataCenters = ImmutableSet.of();
/**
* @see AllowedArgumentsForCreateServer#getDiskSizesInGB()
*/
public T diskSizes(Set<Integer> diskSizes) {
this.diskSizes = ImmutableSet.copyOf(checkNotNull(diskSizes, "diskSizesInGB"));
return self();
public Builder diskSizes(AllowedArguments diskSizes) {
this.diskSizes = checkNotNull(diskSizes, "diskSizesInGB");
return this;
}
public T diskSizes(Integer... in) {
return diskSizes(ImmutableSet.copyOf(in));
}
/**
* @see AllowedArgumentsForCreateServer#getMemorySizesInMB()
*/
public T memorySizes(Set<Integer> memorySizes) {
this.memorySizes = ImmutableSet.copyOf(checkNotNull(memorySizes, "memorySizesInMB"));
return self();
public Builder memorySizes(AllowedArguments memorySizes) {
this.memorySizes = checkNotNull(memorySizes, "memorySizesInMB");
return this;
}
public T memorySizes(Integer... in) {
return memorySizes(ImmutableSet.copyOf(in));
}
/**
* @see AllowedArgumentsForCreateServer#getCpuCoreOptions()
*/
public T cpuCores(Set<Integer> cpuCores) {
this.cpuCores = ImmutableSet.copyOf(checkNotNull(cpuCores, "cpuCoreOptions"));
return self();
public Builder cpuCores(AllowedArguments cpuCores) {
this.cpuCores = checkNotNull(cpuCores, "cpuCoreOptions");
return this;
}
public T cpuCores(Integer... in) {
return cpuCores(ImmutableSet.copyOf(in));
}
/**
* @see AllowedArgumentsForCreateServer#getTemplateNames()
*/
public T templates(Set<String> templates) {
public Builder templates(Set<String> templates) {
this.templates = ImmutableSet.copyOf(checkNotNull(templates, "templateNames"));
return self();
return this;
}
public T templates(String... in) {
public Builder templates(String... in) {
return templates(ImmutableSet.copyOf(in));
}
/**
* @see AllowedArgumentsForCreateServer#getTransfersInGB()
*/
public T transfers(Set<Integer> transfers) {
this.transfers = ImmutableSet.copyOf(checkNotNull(transfers, "transfersInGB"));
return self();
}
public T transfers(Integer... in) {
return transfers(ImmutableSet.copyOf(in));
public Builder transfers(AllowedArguments transfers) {
this.transfers = checkNotNull(transfers, "transfersInGB");
return this;
}
/**
* @see AllowedArgumentsForCreateServer#getDataCenters()
*/
public T dataCenters(Set<String> dataCenters) {
public Builder dataCenters(Set<String> dataCenters) {
this.dataCenters = ImmutableSet.copyOf(checkNotNull(dataCenters, "dataCenters"));
return self();
return this;
}
public T dataCenters(String... in) {
public Builder dataCenters(String... in) {
return dataCenters(ImmutableSet.copyOf(in));
}
@ -129,7 +114,7 @@ public class AllowedArgumentsForCreateServer {
return new AllowedArgumentsForCreateServer(diskSizes, memorySizes, cpuCores, templates, transfers, dataCenters);
}
public T fromAllowedArgumentsForCreateServer(AllowedArgumentsForCreateServer in) {
public Builder fromAllowedArgumentsForCreateServer(AllowedArgumentsForCreateServer in) {
return this
.diskSizes(in.getDiskSizesInGB())
.memorySizes(in.getMemorySizesInMB())
@ -140,29 +125,22 @@ public class AllowedArgumentsForCreateServer {
}
}
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
@Override
protected ConcreteBuilder self() {
return this;
}
}
private final Set<Integer> diskSizesInGB;
private final Set<Integer> memorySizesInMB;
private final Set<Integer> cpuCoreOptions;
private final AllowedArguments diskSizesInGB;
private final AllowedArguments memorySizesInMB;
private final AllowedArguments cpuCoreOptions;
private final Set<String> templateNames;
private final Set<Integer> transfersInGB;
private final AllowedArguments transfersInGB;
private final Set<String> dataCenters;
@ConstructorProperties({
"disksize", "memorysize", "cpucores", "template", "transfer", "datacenter"
})
protected AllowedArgumentsForCreateServer(Set<Integer> diskSizesInGB, Set<Integer> memorySizesInMB, Set<Integer> cpuCoreOptions, Set<String> templateNames, Set<Integer> transfersInGB, Set<String> dataCenters) {
this.diskSizesInGB = ImmutableSet.copyOf(checkNotNull(diskSizesInGB, "diskSizesInGB"));
this.memorySizesInMB = ImmutableSet.copyOf(checkNotNull(memorySizesInMB, "memorySizesInMB"));
this.cpuCoreOptions = ImmutableSet.copyOf(checkNotNull(cpuCoreOptions, "cpuCoreOptions"));
protected AllowedArgumentsForCreateServer(AllowedArguments diskSizesInGB, AllowedArguments memorySizesInMB, AllowedArguments cpuCoreOptions, Set<String> templateNames, AllowedArguments transfersInGB, Set<String> dataCenters) {
this.diskSizesInGB = checkNotNull(diskSizesInGB, "diskSizesInGB");
this.memorySizesInMB = checkNotNull(memorySizesInMB, "memorySizesInMB");
this.cpuCoreOptions = checkNotNull(cpuCoreOptions, "cpuCoreOptions");
this.templateNames = ImmutableSet.copyOf(checkNotNull(templateNames, "templateNames"));
this.transfersInGB = ImmutableSet.copyOf(checkNotNull(transfersInGB, "transfersInGB"));
this.transfersInGB = checkNotNull(transfersInGB, "transfersInGB");
this.dataCenters = ImmutableSet.copyOf(checkNotNull(dataCenters, "dataCenters"));
}
@ -170,7 +148,7 @@ public class AllowedArgumentsForCreateServer {
* @return a list of disk sizes, in GB, that can be used for creating servers on this platform
* @see org.jclouds.glesys.domain.OSTemplate#getMinDiskSize()
*/
public Set<Integer> getDiskSizesInGB() {
public AllowedArguments getDiskSizesInGB() {
return this.diskSizesInGB;
}
@ -178,14 +156,14 @@ public class AllowedArgumentsForCreateServer {
* @return a list of memory sizes, in MB, that can be used for creating servers on this platform
* @see org.jclouds.glesys.domain.OSTemplate#getMinMemSize()
*/
public Set<Integer> getMemorySizesInMB() {
public AllowedArguments getMemorySizesInMB() {
return this.memorySizesInMB;
}
/**
* @return a list of which core counts can be used for creating servers on this platform
*/
public Set<Integer> getCpuCoreOptions() {
public AllowedArguments getCpuCoreOptions() {
return this.cpuCoreOptions;
}
@ -200,7 +178,7 @@ public class AllowedArgumentsForCreateServer {
/**
* @return the list of transfer settings available for creating servers on this platform
*/
public Set<Integer> getTransfersInGB() {
public AllowedArguments getTransfersInGB() {
return this.transfersInGB;
}

View File

@ -26,6 +26,7 @@ import java.util.Map;
import javax.ws.rs.core.MediaType;
import org.jclouds.glesys.domain.AllowedArguments;
import org.jclouds.glesys.domain.AllowedArgumentsForCreateServer;
import org.jclouds.glesys.domain.Console;
import org.jclouds.glesys.domain.Cost;
@ -93,26 +94,40 @@ public class ServerApiExpectTest extends BaseGleSYSApiExpectTest {
HttpResponse.builder().statusCode(204).payload(payloadFromResource("/server_allowed_arguments.json")).build()).getServerApi();
Map<String, AllowedArgumentsForCreateServer> expected = Maps.newLinkedHashMap();
AllowedArguments openvzAllowedMemorySizes = AllowedArguments.builder().allowedUnits(128, 256, 512, 768, 1024, 1536, 2048, 2560, 3072, 3584, 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, 12288, 14336, 16384).costPerUnit(Cost.builder().amount(0.09).currency("SEK").timePeriod("month").build()).build();
AllowedArguments openvzAllowedDiskSizes = AllowedArguments.builder().allowedUnits(5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 140, 150).costPerUnit(Cost.builder().amount(2.2).currency("SEK").timePeriod("month").build()).build();
AllowedArguments openvzAllowedCpuCores = AllowedArguments.builder().allowedUnits(1, 2, 3, 4, 5, 6, 7, 8).costPerUnit(Cost.builder().amount(30).currency("SEK").timePeriod("month").build()).build();
AllowedArguments openvzAllowedTransfers = AllowedArguments.builder().allowedUnits(50, 100, 250, 500, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000).costPerUnit(Cost.builder().amount(0.2).currency("SEK").timePeriod("month").build()).build();
AllowedArgumentsForCreateServer openvz = AllowedArgumentsForCreateServer.builder()
.dataCenters("Amsterdam", "Falkenberg", "New York City", "Stockholm")
.memorySizes(128, 256, 512, 768, 1024, 1536, 2048, 2560, 3072, 3584, 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, 12288)
.diskSizes(5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 140, 150)
.cpuCores(1, 2, 3, 4, 5, 6, 7, 8)
.memorySizes(openvzAllowedMemorySizes)
.diskSizes(openvzAllowedDiskSizes)
.cpuCores(openvzAllowedCpuCores)
.templates("Centos 5", "Centos 5 64-bit", "Centos 6 32-bit", "Centos 6 64-bit", "Debian 5.0 32-bit",
"Debian 5.0 64-bit", "Debian 6.0 32-bit", "Debian 6.0 64-bit", "Fedora Core 11", "Fedora Core 11 64-bit",
"Gentoo", "Gentoo 64-bit", "Scientific Linux 6", "Scientific Linux 6 64-bit", "Slackware 12",
"Ubuntu 10.04 LTS 32-bit", "Ubuntu 10.04 LTS 64-bit", "Ubuntu 11.04 64-bit")
.transfers(50, 100, 250, 500, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000)
"Debian 5.0 64-bit", "Debian 6.0 32-bit", "Debian 6.0 64-bit", "Fedora Core 11", "Fedora Core 11 64-bit",
"Gentoo", "Gentoo 64-bit", "Scientific Linux 6", "Scientific Linux 6 64-bit", "Slackware 12",
"Ubuntu 10.04 LTS 32-bit", "Ubuntu 10.04 LTS 64-bit", "Ubuntu 11.04 64-bit", "Ubuntu 12.04 LTS 32-bit",
"Ubuntu 12.04 LTS 64-bit")
.transfers(openvzAllowedTransfers)
.build();
AllowedArguments xenAllowedMemorySizes = AllowedArguments.builder().allowedUnits(512, 768, 1024, 1536, 2048, 2560, 3072, 3584, 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, 12288, 14336, 16384).costPerUnit(Cost.builder().amount(0.09).currency("SEK").timePeriod("month").build()).build();
AllowedArguments xenAllowedDiskSizes = AllowedArguments.builder().allowedUnits(5, 10, 20, 30, 40, 50, 80, 100, 120, 140, 150, 160, 160, 200, 250, 300).costPerUnit(Cost.builder().amount(2.2).currency("SEK").timePeriod("month").build()).build();
AllowedArguments xenAllowedCpuCores = AllowedArguments.builder().allowedUnits(1, 2, 3, 4, 5, 6, 7, 8).costPerUnit(Cost.builder().amount(30).currency("SEK").timePeriod("month").build()).build();
AllowedArguments xenAllowedTransfers = AllowedArguments.builder().allowedUnits(50, 100, 250, 500, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000).costPerUnit(Cost.builder().amount(0.2).currency("SEK").timePeriod("month").build()).build();
AllowedArgumentsForCreateServer xen = AllowedArgumentsForCreateServer.builder()
.memorySizes(512, 768, 1024, 1536, 2048, 2560, 3072, 3584, 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, 12288, 14336, 16384)
.diskSizes(5, 10, 20, 30, 40, 50, 80, 100, 120, 140, 150, 160, 160, 200, 250, 300)
.cpuCores(1, 2, 3, 4, 5, 6, 7, 8)
.templates("CentOS 5.5 x64", "CentOS 5.5 x86", "Centos 6 x64", "Centos 6 x86", "Debian-6 x64",
"Debian 5.0.1 x64", "FreeBSD 8.2", "Gentoo 10.1 x64", "Ubuntu 8.04 x64", "Ubuntu 10.04 LTS 64-bit",
"Ubuntu 10.10 x64", "Ubuntu 11.04 x64", "Windows Server 2008 R2 x64 std",
"Windows Server 2008 R2 x64 web", "Windows Server 2008 x64 web", "Windows Server 2008 x86 web")
.transfers(50, 100, 250, 500, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000)
.memorySizes(xenAllowedMemorySizes)
.diskSizes(xenAllowedDiskSizes)
.cpuCores(xenAllowedCpuCores)
.templates("CentOS 5.5 x64", "CentOS 5.5 x86", "Centos 6 x64", "Centos 6 x86",
"Debian-6 x64", "Debian 5.0.1 x64", "FreeBSD 8.2", "FreeBSD 9.0",
"Gentoo 10.1 x64", "OpenSUSE 11.4 64-bit", "Ubuntu 8.04 x64",
"Ubuntu 10.04 LTS 64-bit", "Ubuntu 10.10 x64", "Ubuntu 11.04 x64",
"Ubuntu 12.04 x64", "Ubuntu 12.04 x86", "Windows Server 2008 R2 x64 std",
"Windows Server 2008 R2 x64 web", "Windows Server 2008 x64 web")
.transfers(xenAllowedTransfers)
.dataCenters("Falkenberg")
.build();
expected.put("Xen", xen);

View File

@ -98,12 +98,12 @@ public class ServerApiLiveTest extends BaseGleSYSApiWithAServerLiveTest {
assertNotNull(t);
assert t.getDataCenters().size() > 0 : t;
assert t.getCpuCoreOptions().size() > 0 : t;
assert t.getDiskSizesInGB().size() > 0 : t;
assert t.getMemorySizesInMB().size() > 0 : t;
assert t.getCpuCoreOptions().getAllowedUnits().size() > 0 : t;
assert t.getDiskSizesInGB().getAllowedUnits().size() > 0 : t;
assert t.getMemorySizesInMB().getAllowedUnits().size() > 0 : t;
assert t.getTemplateNames().size() > 0 : t;
assert t.getTransfersInGB().size() > 0 : t;
assert t.getTransfersInGB().size() > 0 : t;
assert t.getTransfersInGB().getAllowedUnits().size() > 0 : t;
assert t.getTransfersInGB().getAllowedUnits().size() > 0 : t;
}
public void testListTemplates() throws Exception {

View File

@ -1 +1 @@
{"response":{"status":{"code":200,"timestamp":"2012-02-08T17:07:38+01:00","text":"OK"},"argumentslist":{"Xen":{"disksize":[5,10,20,30,40,50,80,100,120,140,150,160,160,200,250,300],"memorysize":[512,768,1024,1536,2048,2560,3072,3584,4096,5120,6144,7168,8192,9216,10240,11264,12288,14336,16384],"cpucores":[1,2,3,4,5,6,7,8],"template":["CentOS 5.5 x64","CentOS 5.5 x86","Centos 6 x64","Centos 6 x86","Debian-6 x64","Debian 5.0.1 x64","FreeBSD 8.2","Gentoo 10.1 x64","Ubuntu 8.04 x64","Ubuntu 10.04 LTS 64-bit","Ubuntu 10.10 x64","Ubuntu 11.04 x64","Windows Server 2008 R2 x64 std","Windows Server 2008 R2 x64 web","Windows Server 2008 x64 web","Windows Server 2008 x86 web"],"transfer":[50,100,250,500,1000,2000,3000,4000,5000,6000,7000,8000,9000,10000],"datacenter":["Falkenberg"]},"OpenVZ":{"disksize":[5,10,20,30,40,50,60,70,80,90,100,120,140,150],"memorysize":[128,256,512,768,1024,1536,2048,2560,3072,3584,4096,5120,6144,7168,8192,9216,10240,11264,12288],"cpucores":[1,2,3,4,5,6,7,8],"template":["Centos 5","Centos 5 64-bit","Centos 6 32-bit","Centos 6 64-bit","Debian 5.0 32-bit","Debian 5.0 64-bit","Debian 6.0 32-bit","Debian 6.0 64-bit","Fedora Core 11","Fedora Core 11 64-bit","Gentoo","Gentoo 64-bit","Scientific Linux 6","Scientific Linux 6 64-bit","Slackware 12","Ubuntu 10.04 LTS 32-bit","Ubuntu 10.04 LTS 64-bit","Ubuntu 11.04 64-bit"],"transfer":[50,100,250,500,1000,2000,3000,4000,5000,6000,7000,8000,9000,10000],"datacenter":["Amsterdam","Falkenberg","New York City","Stockholm"]}},"debug":{"input":[]}}}
{"response":{"status":{"code":200,"timestamp":"2012-12-05T08:15:17+01:00","text":"OK"},"argumentslist":{"Xen":{"disksize":{"costperunit":{"amount":2.2,"currency":"SEK","timeperiod":"month"},"units":[5,10,20,30,40,50,80,100,120,140,150,160,200,250,300]},"memorysize":{"costperunit":{"amount":0.09,"currency":"SEK","timeperiod":"month"},"units":[512,768,1024,1536,2048,2560,3072,3584,4096,5120,6144,7168,8192,9216,10240,11264,12288,14336,16384]},"cpucores":{"costperunit":{"amount":30,"currency":"SEK","timeperiod":"month"},"units":[1,2,3,4,5,6,7,8]},"template":["CentOS 5.5 x64","CentOS 5.5 x86","Centos 6 x64","Centos 6 x86","Debian-6 x64","Debian 5.0.1 x64","FreeBSD 8.2","FreeBSD 9.0","Gentoo 10.1 x64","OpenSUSE 11.4 64-bit","Ubuntu 8.04 x64","Ubuntu 10.04 LTS 64-bit","Ubuntu 10.10 x64","Ubuntu 11.04 x64","Ubuntu 12.04 x64","Ubuntu 12.04 x86","Windows Server 2008 R2 x64 std","Windows Server 2008 R2 x64 web","Windows Server 2008 x64 web"],"transfer":{"costperunit":{"amount":0.2,"currency":"SEK","timeperiod":"month"},"units":[50,100,250,500,1000,2000,3000,4000,5000,6000,7000,8000,9000,10000]},"datacenter":["Falkenberg"]},"OpenVZ":{"disksize":{"costperunit":{"amount":2.2,"currency":"SEK","timeperiod":"month"},"units":[5,10,20,30,40,50,60,70,80,90,100,120,140,150]},"memorysize":{"costperunit":{"amount":0.09,"currency":"SEK","timeperiod":"month"},"units":[128,256,512,768,1024,1536,2048,2560,3072,3584,4096,5120,6144,7168,8192,9216,10240,11264,12288,14336,16384]},"cpucores":{"costperunit":{"amount":30,"currency":"SEK","timeperiod":"month"},"units":[1,2,3,4,5,6,7,8]},"transfer":{"costperunit":{"amount":0.2,"currency":"SEK","timeperiod":"month"},"units":[50,100,250,500,1000,2000,3000,4000,5000,6000,7000,8000,9000,10000]},"template":["Centos 5","Centos 5 64-bit","Centos 6 32-bit","Centos 6 64-bit","Debian 5.0 32-bit","Debian 5.0 64-bit","Debian 6.0 32-bit","Debian 6.0 64-bit","Fedora Core 11","Fedora Core 11 64-bit","Gentoo","Gentoo 64-bit","Scientific Linux 6","Scientific Linux 6 64-bit","Slackware 12","Ubuntu 10.04 LTS 32-bit","Ubuntu 10.04 LTS 64-bit","Ubuntu 11.04 64-bit","Ubuntu 12.04 LTS 32-bit","Ubuntu 12.04 LTS 64-bit"],"datacenter":["Amsterdam","Falkenberg","New York City","Stockholm"]}},"debug":{"input":[]}}}