Skip to content

Commit c2ef170

Browse files
authored
Merge pull request #661 from fmui/instance-state3
Indicate if a Service Instance is still usable after a failed update or deprovisioning and if an update can be repeated
2 parents 5aaffc8 + e914b8f commit c2ef170

3 files changed

Lines changed: 51 additions & 2 deletions

File tree

openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,10 @@ components:
779779
- failed
780780
description:
781781
type: string
782+
instance_usable:
783+
type: boolean
784+
update_repeatable:
785+
type: boolean
782786

783787
ServiceBindingResource:
784788
type: object
@@ -930,6 +934,10 @@ components:
930934
type: string
931935
description:
932936
type: string
937+
instance_usable:
938+
type: boolean
939+
update_repeatable:
940+
type: boolean
933941

934942
securitySchemes:
935943
basicAuth:

spec.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ For error responses, the following fields are defined:
329329
| --- | --- | --- |
330330
| error | string | A single word in camel case that uniquely identifies the error condition. If present, MUST be a non-empty string. |
331331
| description | string | A user-facing error message explaining why the request failed. If present, MUST be a non-empty string. |
332+
| instance_usable | boolean | If an update or deprovisioning operation failed, this flag indicates whether or not the Service Instance is still usable. If `true`, the Service Instance can still be used, `false` otherwise. This field MUST NOT be present for errors of other operations. Defaults to `true`. |
333+
| update_repeatable | boolean | If an update operation failed, this flag indicates whether this update can be repeated or not. If `true`, the same update operation MAY be repeated and MAY succeed; if `false`, repeating the same update operation will fail again. This field MUST NOT be present for errors of other operations. Defaults to `true`. |
332334

333335
### Error Codes
334336

@@ -788,7 +790,9 @@ For success responses, the following fields are defined:
788790
| Response Field | Type | Description |
789791
| --- | --- | --- |
790792
| state* | string | Valid values are `in progress`, `succeeded`, and `failed`. While `"state": "in progress"`, the Platform SHOULD continue polling. A response with `"state": "succeeded"` or `"state": "failed"` MUST cause the Platform to cease polling. |
791-
| description | string | A user-facing message that can be used to tell the user details about the status of the operation. |
793+
| description | string | A user-facing message that can be used to tell the user details about the status of the operation. If present, MUST be a non-empty string. |
794+
| instance_usable | boolean | If an update or deprovisioning operation failed, this flag indicates whether or not the Service Instance is still usable. If `true`, the Service Instance can still be used, `false` otherwise. This field MUST NOT be present for errors of other operations. Defaults to `true`. |
795+
| update_repeatable | boolean | If an update operation failed, this flag indicates whether this update can be repeated or not. If `true`, the same update operation MAY be repeated and MAY succeed; if `false`, repeating the same update operation will fail again. This field MUST NOT be present for errors of other operations. Defaults to `true`. |
792796

793797
The response MAY also include the `Retry-After` HTTP header. This header will
794798
indicate how long the Platform SHOULD wait before polling again and is
@@ -1232,6 +1236,28 @@ Responses with any other status code MUST be interpreted as a failure.
12321236
When the response includes a 4xx or 5xx status code, the Service Broker MUST
12331237
NOT apply any of the requested changes to the Service Instance.
12341238

1239+
When an update fails, the Service Instance can still be usable or unusable
1240+
or its state could be unknown to the Platform. If a Service Instance became
1241+
unusable, another update MAY repair the Service Instance.
1242+
The Platform SHOULD NOT allow the creation of new bindings of an unusable
1243+
Service Instance until the instance has been deleted or repaired by a
1244+
subsequent update.
1245+
If the broker does not indicate in the
1246+
[Error response](#service-broker-errors) or
1247+
[Last Operation response](#polling-last-operation-for-service-instances)
1248+
whether the Service Instance is usable or not, the Platform SHOULD assume
1249+
it is still usable.
1250+
1251+
A failed update might be repeatable. If the Service Broker
1252+
indicates in the [Error response](#service-broker-errors) or
1253+
[Last Operation response](#polling-last-operation-for-service-instances)
1254+
that retrying this update does not make sense, the Platform SHOULD NOT
1255+
repeat this update.
1256+
For example, if a certain plan change is not supported by the
1257+
Service Broker, all subsequent attempts will always fail, and the
1258+
Platform SHOULD NOT retry this.
1259+
Other updates MAY be possible.
1260+
12351261
#### Body
12361262

12371263
For success responses, the following fields are defined:
@@ -1743,6 +1769,14 @@ $ curl 'http://username:password@service-broker-url/v2/service_instances/:instan
17431769
Responses with any other status code MUST be interpreted as a failure and the
17441770
Platform MUST remember the Service Instance.
17451771

1772+
When a deprovisioning fails, the Service Instance can still be usable or
1773+
unusable or its state could be unknown. If a Service Instance becomes unusable,
1774+
the Platform SHOULD NOT request new Service Bindings for that Service Instance.
1775+
If the broker does not indicate in the [Error response](#service-broker-errors)
1776+
or [Last Operation response](#polling-last-operation-for-service-instances)
1777+
whether the Service Instance is usable or not, the Platform SHOULD assume it is
1778+
still usable.
1779+
17461780
#### Body
17471781

17481782
For success responses, the following fields are defined:

swagger.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,10 @@ definitions:
686686
- failed
687687
description:
688688
type: string
689+
instance_usable:
690+
type: boolean
691+
update_repeatable:
692+
type: boolean
689693
ServiceBindingResource:
690694
type: object
691695
properties:
@@ -801,7 +805,10 @@ definitions:
801805
type: string
802806
description:
803807
type: string
804-
808+
instance_usable:
809+
type: boolean
810+
update_repeatable:
811+
type: boolean
805812
securityDefinitions:
806813
basicAuth:
807814
type: basic

0 commit comments

Comments
 (0)