Skip to content

Commit 7a1fa42

Browse files
authored
Merge pull request #1054 from ashishmax31/update-cluster-models-for-async-updates
model changes for async cluster updates
2 parents dbec927 + 49946dd commit 7a1fa42

File tree

6 files changed

+28
-15
lines changed

6 files changed

+28
-15
lines changed

clientapi/arohcp/v1alpha1/cluster_state_type.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ const (
4141
ClusterStateUninstalling ClusterState = "uninstalling"
4242
// The state of the cluster is unknown.
4343
ClusterStateUnknown ClusterState = "unknown"
44+
// The cluster is being updated.
45+
// This state is currently used only by aro hcp clusters.
46+
ClusterStateUpdating ClusterState = "updating"
4447
// The cluster is validating user input.
4548
ClusterStateValidating ClusterState = "validating"
4649
// The cluster is waiting for user action.

clientapi/clustersmgmt/v1/cluster_state_type.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ const (
4141
ClusterStateUninstalling ClusterState = "uninstalling"
4242
// The state of the cluster is unknown.
4343
ClusterStateUnknown ClusterState = "unknown"
44+
// The cluster is being updated.
45+
// This state is currently used only by aro hcp clusters.
46+
ClusterStateUpdating ClusterState = "updating"
4447
// The cluster is validating user input.
4548
ClusterStateValidating ClusterState = "validating"
4649
// The cluster is waiting for user action.

model/aro_hcp/v1alpha1/cluster_resource.model

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ resource Cluster {
2222
}
2323

2424
// Updates the cluster.
25-
method Update {
25+
@go(name="Update")
26+
method AsyncUpdate {
2627
in out Body Cluster
2728
}
2829

model/clusters_mgmt/v1/cluster_state_type.model

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ enum ClusterState {
3131
// The cluster is ready to use.
3232
Ready
3333

34+
// The cluster is being updated.
35+
// This state is currently used only by aro hcp clusters.
36+
Updating
37+
3438
// The cluster is being uninstalled.
3539
Uninstalling
3640

openapi/aro_hcp/v1alpha1/openapi.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@
216216
}
217217
}
218218
},
219-
"get": {
220-
"description": "Retrieves the details of the cluster.",
219+
"patch": {
220+
"description": "Updates the cluster.",
221221
"parameters": [
222222
{
223223
"name": "cluster_id",
@@ -228,8 +228,17 @@
228228
"required": true
229229
}
230230
],
231+
"requestBody": {
232+
"content": {
233+
"application/json": {
234+
"schema": {
235+
"$ref": "#/components/schemas/Cluster"
236+
}
237+
}
238+
}
239+
},
231240
"responses": {
232-
"200": {
241+
"202": {
233242
"description": "Success.",
234243
"content": {
235244
"application/json": {
@@ -251,8 +260,8 @@
251260
}
252261
}
253262
},
254-
"patch": {
255-
"description": "Updates the cluster.",
263+
"get": {
264+
"description": "Retrieves the details of the cluster.",
256265
"parameters": [
257266
{
258267
"name": "cluster_id",
@@ -263,15 +272,6 @@
263272
"required": true
264273
}
265274
],
266-
"requestBody": {
267-
"content": {
268-
"application/json": {
269-
"schema": {
270-
"$ref": "#/components/schemas/Cluster"
271-
}
272-
}
273-
}
274-
},
275275
"responses": {
276276
"200": {
277277
"description": "Success.",
@@ -2207,6 +2207,7 @@
22072207
"resuming",
22082208
"uninstalling",
22092209
"unknown",
2210+
"updating",
22102211
"validating",
22112212
"waiting"
22122213
]

openapi/clusters_mgmt/v1/openapi.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16127,6 +16127,7 @@
1612716127
"resuming",
1612816128
"uninstalling",
1612916129
"unknown",
16130+
"updating",
1613016131
"validating",
1613116132
"waiting"
1613216133
]

0 commit comments

Comments
 (0)