File tree Expand file tree Collapse file tree 6 files changed +102
-5
lines changed Expand file tree Collapse file tree 6 files changed +102
-5
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ def to_hash
31
31
data : {
32
32
guid : app . space_guid
33
33
}
34
+ } ,
35
+ current_droplet : {
36
+ data : {
37
+ guid : app . droplet_guid
38
+ }
34
39
}
35
40
} ,
36
41
metadata : {
Original file line number Diff line number Diff line change 33
33
"data": {
34
34
"guid": "2f35885d-0c9d-4423-83ad-fd05066f8576"
35
35
}
36
+ },
37
+ "current_droplet": {
38
+ "data": {
39
+ "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16"
40
+ }
36
41
}
37
42
},
38
43
"links": {
101
106
"data": {
102
107
"guid": "2f35885d-0c9d-4423-83ad-fd05066f8576"
103
108
}
109
+ },
110
+ "droplet": {
111
+ "data": {
112
+ "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16"
113
+ }
104
114
}
105
115
},
106
116
"links": {
174
184
"data": {
175
185
"guid": "2f35885d-0c9d-4423-83ad-fd05066f8576"
176
186
}
187
+ },
188
+ "current_droplet": {
189
+ "data": {
190
+ "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16"
191
+ }
177
192
}
178
193
},
179
194
"links": {
245
260
"data": {
246
261
"guid": "2f35885d-0c9d-4423-83ad-fd05066f8576"
247
262
}
263
+ },
264
+ "current_droplet": {
265
+ "data": {
266
+ "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16"
267
+ }
248
268
}
249
269
},
250
270
"links": {
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ Name | Type | Description
16
16
**state** | _string_ | Current desired state of the app; valid values are `STOPPED` or `STARTED`
17
17
**lifecycle** | [_lifecycle object_](#the-lifecycle-object) | Provides the default lifecycle object for the application. This lifecycle will be used when staging and running the application. The staging lifecycle can be overridden on [builds](#builds)
18
18
**relationships.space** | [_to-one relationship_](#to-one-relationships) | The space the app is contained in
19
+ **relationships.current_droplet** | [_to-one relationship_](#to-one-relationships) | The current droplet used by the application
19
20
**metadata.labels** | [_label object_](#labels) | Labels applied to the app
20
21
**metadata.annotations** | [_annotation object_](#annotations) | Annotations added to the app
21
22
**links** | [_links object_](#links) | Links to related resources
Original file line number Diff line number Diff line change 59
59
data : { buildpacks : [ buildpack . name ] , stack : stack . name }
60
60
} ,
61
61
relationships : {
62
- space : { data : { guid : space . guid } }
62
+ space : { data : { guid : space . guid } } ,
63
+ current_droplet : { data : { guid : nil } }
63
64
} ,
64
65
metadata : {
65
66
labels : {
158
159
'data' => {
159
160
'guid' => space . guid
160
161
}
162
+ } ,
163
+ 'current_droplet' => {
164
+ 'data' => {
165
+ 'guid' => nil
166
+ }
161
167
}
162
168
} ,
163
169
'created_at' => iso8601 ,
280
286
'data' => {
281
287
'guid' => space . guid
282
288
}
289
+ } ,
290
+ 'current_droplet' => {
291
+ 'data' => {
292
+ 'guid' => nil
293
+ }
283
294
}
284
295
} ,
285
296
'created_at' => iso8601 ,
377
388
data : { buildpacks : [ ] , stack : app_model1 . lifecycle_data . stack }
378
389
} ,
379
390
relationships : {
380
- space : { data : { guid : space . guid } }
391
+ space : { data : { guid : space . guid } } ,
392
+ current_droplet : { data : { guid : nil } }
381
393
} ,
382
394
metadata : {
383
395
labels : { } ,
414
426
data : { buildpacks : [ ] , stack : app_model2 . lifecycle_data . stack }
415
427
} ,
416
428
relationships : {
417
- space : { data : { guid : space2 . guid } }
429
+ space : { data : { guid : space2 . guid } } ,
430
+ current_droplet : { data : { guid : nil } }
418
431
} ,
419
432
metadata : {
420
433
labels : { } ,
570
583
'data' => {
571
584
'guid' => space . guid
572
585
}
586
+ } ,
587
+ 'current_droplet' => {
588
+ 'data' => {
589
+ 'guid' => nil
590
+ }
573
591
}
574
592
} ,
575
593
'created_at' => iso8601 ,
605
623
'data' => {
606
624
'guid' => space . guid
607
625
}
626
+ } ,
627
+ 'current_droplet' => {
628
+ 'data' => {
629
+ 'guid' => nil
630
+ }
608
631
}
609
632
} ,
610
633
'created_at' => iso8601 ,
1310
1333
data : { buildpacks : [ buildpack . name ] , stack : app_model . lifecycle_data . stack }
1311
1334
} ,
1312
1335
relationships : {
1313
- space : { data : { guid : space . guid } }
1336
+ space : { data : { guid : space . guid } } ,
1337
+ current_droplet : { data : { guid : app_model . droplet_guid } }
1314
1338
} ,
1315
1339
metadata : {
1316
1340
labels : { } ,
1376
1400
'data' => {
1377
1401
'guid' => space . guid
1378
1402
}
1403
+ } ,
1404
+ 'current_droplet' => {
1405
+ 'data' => {
1406
+ 'guid' => app_model . droplet_guid
1407
+ }
1379
1408
}
1380
1409
} ,
1381
1410
'links' => {
1423
1452
'data' => {
1424
1453
'guid' => space . guid
1425
1454
}
1455
+ } ,
1456
+ 'current_droplet' => {
1457
+ 'data' => {
1458
+ 'guid' => app_model . droplet_guid
1459
+ }
1426
1460
}
1427
1461
} ,
1428
1462
'links' => {
2069
2103
'data' => {
2070
2104
'guid' => space . guid
2071
2105
}
2106
+ } ,
2107
+ 'current_droplet' => {
2108
+ 'data' => {
2109
+ 'guid' => nil
2110
+ }
2072
2111
}
2073
2112
} ,
2074
2113
'created_at' => iso8601 ,
2294
2333
'data' => {
2295
2334
'guid' => space . guid
2296
2335
}
2336
+ } ,
2337
+ 'current_droplet' => {
2338
+ 'data' => {
2339
+ 'guid' => droplet . guid
2340
+ }
2297
2341
}
2298
2342
} ,
2299
2343
'links' => {
2629
2673
'data' => {
2630
2674
'guid' => space . guid
2631
2675
}
2676
+ } ,
2677
+ 'current_droplet' => {
2678
+ 'data' => {
2679
+ 'guid' => droplet . guid
2680
+ }
2632
2681
}
2633
2682
} ,
2634
2683
'links' => {
2793
2842
'data' => {
2794
2843
'guid' => space . guid
2795
2844
}
2845
+ } ,
2846
+ 'current_droplet' => {
2847
+ 'data' => {
2848
+ 'guid' => droplet . guid
2849
+ }
2796
2850
}
2797
2851
} ,
2798
2852
'links' => {
Original file line number Diff line number Diff line change 399
399
'data' => {
400
400
'guid' => space . guid
401
401
}
402
+ } ,
403
+ 'current_droplet' => {
404
+ 'data' => {
405
+ 'guid' => nil
406
+ }
402
407
}
403
408
} ,
404
409
'created_at' => iso8601 ,
463
468
'data' => {
464
469
'guid' => space . guid
465
470
}
471
+ } ,
472
+ 'current_droplet' => {
473
+ 'data' => {
474
+ 'guid' => nil
475
+ }
466
476
}
467
477
} ,
468
478
'created_at' => iso8601 ,
501
511
'data' => {
502
512
'guid' => space2 . guid
503
513
}
514
+ } ,
515
+ 'current_droplet' => {
516
+ 'data' => {
517
+ 'guid' => nil
518
+ }
504
519
}
505
520
} ,
506
521
'created_at' => iso8601 ,
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ module VCAP::CloudController::Presenters::V3
7
7
VCAP ::CloudController ::AppModel . make (
8
8
name : 'Davis' ,
9
9
environment_variables : { 'some' => 'stuff' } ,
10
- desired_state : 'STOPPED'
10
+ desired_state : 'STOPPED' ,
11
+ droplet : VCAP ::CloudController ::DropletModel . make
11
12
)
12
13
end
13
14
@@ -53,6 +54,7 @@ module VCAP::CloudController::Presenters::V3
53
54
expect ( result [ :lifecycle ] [ :data ] [ :stack ] ) . to eq ( 'the-happiest-stack' )
54
55
expect ( result [ :lifecycle ] [ :data ] [ :buildpacks ] ) . to eq ( [ 'git://***:***@github.com/repo' , 'limabean' ] )
55
56
expect ( result [ :relationships ] [ :space ] [ :data ] [ :guid ] ) . to eq ( app . space . guid )
57
+ expect ( result [ :relationships ] [ :current_droplet ] [ :data ] [ :guid ] ) . to eq ( app . droplet . guid )
56
58
expect ( result [ :metadata ] [ :labels ] ) . to eq ( { } )
57
59
expect ( result [ :metadata ] [ :annotations ] ) . to eq ( { } )
58
60
end
You can’t perform that action at this time.
0 commit comments