jclouds/jclouds — pull request #1039 by petergardfjall (2012-12-05 12:33:58+00:00)
Title: Brings glesys jclouds provider up to speed with latest GleSYS API version. Fix for https://github.com/jclouds/jclouds/issues/1035

A fix that brings glesys jclouds provider up to speed with latest GleSYS API version. See https://github.com/jclouds/jclouds/issues/1035 for more details.

The diskSizes, cpuCores, memorySizes and transfers fields of the AllowedArgumentsForCreateServer class have been updated to align better with the json response from the https://api.glesys.com/server/allowedarguments/format/json method. To this end, their types have been changed from Set to a composite type AllowedArguments, which contains both the set of allowed units as well as the cost of each unit.

The reason being that the output of the method that used to look like this:
"Xen": {
"disksize": [
5,
10,
...
300
],
now follows this structure:

"Xen": {
"disksize": {
"costperunit": {
"amount": 2.2,
"currency": "SEK",
"timeperiod": "month"
},
"units": [
5,
10,
...
300
]
},

The expected output of the operation has also been updated in the unit tests.