Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,53 @@ void list() {
.resource(
DropletResource.builder()
.id("fdf3851c-def8-4de1-87f1-6d4543189e22")
.state(DropletState.STAGED)
.state(DropletState.PROCESSING_UPLOAD)
.error(null)
.lifecycle(
Lifecycle.builder()
.type(LifecycleType.DOCKER)
.data(DockerData.builder().build())
.build())
.executionMetadata("[PRIVATE DATA HIDDEN IN LISTS]")
.processType(
"redacted_message",
"[PRIVATE DATA HIDDEN IN LISTS]")
.image(
"cloudfoundry/diego-docker-app-custom:latest")
.checksum(null)
.stack(null)
.createdAt("2016-03-17T00:00:01Z")
.updatedAt("2016-03-17T21:41:32Z")
.link(
"self",
Link.builder()
.href(
"https://api.example.org/v3/droplets/fdf3851c-def8-4de1-87f1-6d4543189e22")
.build())
.link(
"package",
Link.builder()
.href(
"https://api.example.org/v3/packages/c5725684-a02f-4e59-bc67-8f36ae944688")
.build())
.link(
"app",
Link.builder()
.href(
"https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396")
.build())
.link(
"assign_current_droplet",
Link.builder()
.href(
"https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet")
.method("PATCH")
.build())
.build())
.resource(
DropletResource.builder()
.id("fdf3851c-def8-4de1-87f1-6d4543189e23")
.state(DropletState.AWAITING_UPLOAD)
.error(null)
.lifecycle(
Lifecycle.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,41 @@
},
{
"guid": "fdf3851c-def8-4de1-87f1-6d4543189e22",
"state": "STAGED",
"state": "PROCESSING_UPLOAD",
"error": null,
"lifecycle": {
"type": "docker",
"data": {}
},
"execution_metadata": "[PRIVATE DATA HIDDEN IN LISTS]",
"process_types": {
"redacted_message": "[PRIVATE DATA HIDDEN IN LISTS]"
},
"image": "cloudfoundry/diego-docker-app-custom:latest",
"checksum": null,
"buildpacks": null,
"stack": null,
"created_at": "2016-03-17T00:00:01Z",
"updated_at": "2016-03-17T21:41:32Z",
"links": {
"self": {
"href": "https://api.example.org/v3/droplets/fdf3851c-def8-4de1-87f1-6d4543189e22"
},
"package": {
"href": "https://api.example.org/v3/packages/c5725684-a02f-4e59-bc67-8f36ae944688"
},
"app": {
"href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396"
},
"assign_current_droplet": {
"href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet",
"method": "PATCH"
}
}
},
{
"guid": "fdf3851c-def8-4de1-87f1-6d4543189e23",
"state": "AWAITING_UPLOAD",
"error": null,
"lifecycle": {
"type": "docker",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,17 @@ public enum DropletState {
/**
* The staged state
*/
STAGED("STAGED");
STAGED("STAGED"),

/**
* The awaiting upload state
*/
AWAITING_UPLOAD("AWAITING_UPLOAD"),

/**
* The processing upload state
*/
PROCESSING_UPLOAD("PROCESSING_UPLOAD");

private final String value;

Expand All @@ -62,6 +72,10 @@ public static DropletState from(String s) {
return FAILED;
case "staged":
return STAGED;
case "awaiting_upload":
return AWAITING_UPLOAD;
case "processing_upload":
return PROCESSING_UPLOAD;
default:
throw new IllegalArgumentException(String.format("Unknown droplet state: %s", s));
}
Expand Down