private static Image image() { return Image.create( // "1234", // id IMAGE_URI, // selfLink new Date(), // creationTimestamp "", // name "", // description "RAW", // sourceType Image.RawDisk.create(URI.create("foo"), "TAR", null), // rawDisk null, // deprecated Image.Status.READY, // status Long.parseLong("881210631", 10), // archivedSizeBytes Long.parseLong("8", 10), // diskSizeGb DISK_URI.toString(), // sourceDisk "9598530021316715047", // sourceDiskId ImmutableList.of("https://www.googleapis.com/compute/v1/projects/suse-cloud/global/licenses/sles-12") // license ); } }
private static Image image(String name, Deprecated deprecated) { return Image.create( // "1234", // id URI.create("http://test.com/1234"), // selfLink new SimpleDateFormatDateService().iso8601DateParse("2012-07-16T22:16:13.468"), // creationTimestamp name, // name "", // description "RAW", // sourceType Image.RawDisk.create(URI.create("foo"), "TAR", null), // rawDisk deprecated, // deprecated Image.Status.READY, // status Long.parseLong("881210631", 10), // archivedSizeBytes Long.parseLong("8", 10), // diskSizeGb "https://www.googleapis.com/compute/v1/projects/party/zones/us-central1-a/disk/disk", // sourceDisk "9598530021316715047", // sourceDiskId ImmutableList.of("https://www.googleapis.com/compute/v1/projects/suse-cloud/global/licenses/sles-12") // license ); } }
@Consumes(APPLICATION_JSON) public Image expected(String baseUrl) { return Image.create( // "12941197498378735318", // id URI.create(baseUrl + "/centos-cloud/global/images/centos-6-2-v20120326"), // selfLink parse("2012-07-16T22:16:13.468"), // creationTimestamp "centos-6-2-v20120326", // name "DEPRECATED. CentOS 6.2 image; Created Mon, 26 Mar 2012 21:19:09 +0000", // description "RAW", // sourceType RawDisk.create(URI.create(""), "TAR", null), // rawDisk Deprecated.create( // deprecated State.DEPRECATED, // state URI.create(baseUrl + "/centos-cloud/global/images/centos-6-v20130104"), // replacement null, // deprecated null, // obsolete null // deleted ), Status.READY, // status Long.parseLong("881210631", 10), // archivedSizeBytes Long.parseLong("8", 10), // diskSizeGb baseUrl + "/party/zones/us-central1-a/disk/disk", // sourceDisk "9598530021316715047", // sourceDiskId ImmutableList.of(baseUrl + "/suse-cloud/global/licenses/sles-12") // license ); } }