// image_size="${RAW_SIZE}" < disk.raw.gz
command.addQuoted(glanceUploadUrl);
command.setTimeout(TimeSpan.FIFTEEN_MINUTES);
ProcessExecution execution = target.executeCommand(command);
String imageId;
// String imageLocation;
{
// {"image": {"status": "active", "name": null, "deleted": false,
// "container_format": null, "created_at":
// "2011-04-10T00:15:57.563479",
// "disk_format": null, "updated_at":
// "2011-04-10T00:21:29.300219", "id": 8, "location":
// "file:///var/lib/glance/images/8", "checksum":
// "bfbd641fe10edb3ecea933303e5408ec", "is_public": false,
// "deleted_at":
// null, "properties":
// {}, "size": 8577351680}}
// {"image": {"status": "active", "name": "image-1324662647963", "deleted": false, "container_format": null,
// "created_at": "2011-12-23T17:50:48.265346", "disk_format": "qcow2",
// "updated_at": "2011-12-23T17:51:42.229359", "properties": {}, "min_disk": 0, "id":
// "f41d4043-f608-ea2f-a642-e7621bec2b66", "checksum": "ffeafdc8757658b481f3b1a3c2a33c98", "owner": null,
// "is_public": true, "deleted_at": null, "min_ram": 0, "size": 925761536}}
try {
JSONObject json = new JSONObject(execution.getStdOut());
JSONObject image = json.getJSONObject("image");
// imageLocation = image.getString("location");
imageId = image.getString("id");
} catch (JSONException e) {
log.warn("Image upload returned: " + execution.getStdOut());
throw new OpsException("Error parsing return value from image upload", e);
}
}
if (tags != null) {