File tree Expand file tree Collapse file tree 3 files changed +97
-3
lines changed
cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets
cloudfoundry-client-reactor/src/test
java/org/cloudfoundry/reactor/client/v3/droplets
resources/fixtures/client/v3/droplets Expand file tree Collapse file tree 3 files changed +97
-3
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,53 @@ void list() {
339
339
.resource (
340
340
DropletResource .builder ()
341
341
.id ("fdf3851c-def8-4de1-87f1-6d4543189e22" )
342
- .state (DropletState .STAGED )
342
+ .state (DropletState .PROCESSING_UPLOAD )
343
+ .error (null )
344
+ .lifecycle (
345
+ Lifecycle .builder ()
346
+ .type (LifecycleType .DOCKER )
347
+ .data (DockerData .builder ().build ())
348
+ .build ())
349
+ .executionMetadata ("[PRIVATE DATA HIDDEN IN LISTS]" )
350
+ .processType (
351
+ "redacted_message" ,
352
+ "[PRIVATE DATA HIDDEN IN LISTS]" )
353
+ .image (
354
+ "cloudfoundry/diego-docker-app-custom:latest" )
355
+ .checksum (null )
356
+ .stack (null )
357
+ .createdAt ("2016-03-17T00:00:01Z" )
358
+ .updatedAt ("2016-03-17T21:41:32Z" )
359
+ .link (
360
+ "self" ,
361
+ Link .builder ()
362
+ .href (
363
+ "https://api.example.org/v3/droplets/fdf3851c-def8-4de1-87f1-6d4543189e22" )
364
+ .build ())
365
+ .link (
366
+ "package" ,
367
+ Link .builder ()
368
+ .href (
369
+ "https://api.example.org/v3/packages/c5725684-a02f-4e59-bc67-8f36ae944688" )
370
+ .build ())
371
+ .link (
372
+ "app" ,
373
+ Link .builder ()
374
+ .href (
375
+ "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" )
376
+ .build ())
377
+ .link (
378
+ "assign_current_droplet" ,
379
+ Link .builder ()
380
+ .href (
381
+ "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet" )
382
+ .method ("PATCH" )
383
+ .build ())
384
+ .build ())
385
+ .resource (
386
+ DropletResource .builder ()
387
+ .id ("fdf3851c-def8-4de1-87f1-6d4543189e23" )
388
+ .state (DropletState .AWAITING_UPLOAD )
343
389
.error (null )
344
390
.lifecycle (
345
391
Lifecycle .builder ()
Original file line number Diff line number Diff line change 56
56
},
57
57
{
58
58
"guid" : " fdf3851c-def8-4de1-87f1-6d4543189e22" ,
59
- "state" : " STAGED" ,
59
+ "state" : " PROCESSING_UPLOAD" ,
60
+ "error" : null ,
61
+ "lifecycle" : {
62
+ "type" : " docker" ,
63
+ "data" : {}
64
+ },
65
+ "execution_metadata" : " [PRIVATE DATA HIDDEN IN LISTS]" ,
66
+ "process_types" : {
67
+ "redacted_message" : " [PRIVATE DATA HIDDEN IN LISTS]"
68
+ },
69
+ "image" : " cloudfoundry/diego-docker-app-custom:latest" ,
70
+ "checksum" : null ,
71
+ "buildpacks" : null ,
72
+ "stack" : null ,
73
+ "created_at" : " 2016-03-17T00:00:01Z" ,
74
+ "updated_at" : " 2016-03-17T21:41:32Z" ,
75
+ "links" : {
76
+ "self" : {
77
+ "href" : " https://api.example.org/v3/droplets/fdf3851c-def8-4de1-87f1-6d4543189e22"
78
+ },
79
+ "package" : {
80
+ "href" : " https://api.example.org/v3/packages/c5725684-a02f-4e59-bc67-8f36ae944688"
81
+ },
82
+ "app" : {
83
+ "href" : " https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396"
84
+ },
85
+ "assign_current_droplet" : {
86
+ "href" : " https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet" ,
87
+ "method" : " PATCH"
88
+ }
89
+ }
90
+ },
91
+ {
92
+ "guid" : " fdf3851c-def8-4de1-87f1-6d4543189e23" ,
93
+ "state" : " AWAITING_UPLOAD" ,
60
94
"error" : null ,
61
95
"lifecycle" : {
62
96
"type" : " docker" ,
Original file line number Diff line number Diff line change @@ -43,7 +43,17 @@ public enum DropletState {
43
43
/**
44
44
* The staged state
45
45
*/
46
- STAGED ("STAGED" );
46
+ STAGED ("STAGED" ),
47
+
48
+ /**
49
+ * The awaiting upload state
50
+ */
51
+ AWAITING_UPLOAD ("AWAITING_UPLOAD" ),
52
+
53
+ /**
54
+ * The processing upload state
55
+ */
56
+ PROCESSING_UPLOAD ("PROCESSING_UPLOAD" );
47
57
48
58
private final String value ;
49
59
@@ -62,6 +72,10 @@ public static DropletState from(String s) {
62
72
return FAILED ;
63
73
case "staged" :
64
74
return STAGED ;
75
+ case "awaiting_upload" :
76
+ return AWAITING_UPLOAD ;
77
+ case "processing_upload" :
78
+ return PROCESSING_UPLOAD ;
65
79
default :
66
80
throw new IllegalArgumentException (String .format ("Unknown droplet state: %s" , s ));
67
81
}
You can’t perform that action at this time.
0 commit comments