Skip to content

model changes for async cluster updates #1054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
3 changes: 3 additions & 0 deletions clientapi/arohcp/v1alpha1/cluster_state_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ const (
ClusterStateUninstalling ClusterState = "uninstalling"
// The state of the cluster is unknown.
ClusterStateUnknown ClusterState = "unknown"
// The cluster is being updated.
// This state is currently used only by aro hcp clusters.
ClusterStateUpdating ClusterState = "updating"
// The cluster is validating user input.
ClusterStateValidating ClusterState = "validating"
// The cluster is waiting for user action.
Expand Down
3 changes: 3 additions & 0 deletions clientapi/clustersmgmt/v1/cluster_state_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ const (
ClusterStateUninstalling ClusterState = "uninstalling"
// The state of the cluster is unknown.
ClusterStateUnknown ClusterState = "unknown"
// The cluster is being updated.
// This state is currently used only by aro hcp clusters.
ClusterStateUpdating ClusterState = "updating"
// The cluster is validating user input.
ClusterStateValidating ClusterState = "validating"
// The cluster is waiting for user action.
Expand Down
3 changes: 2 additions & 1 deletion model/aro_hcp/v1alpha1/cluster_resource.model
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ resource Cluster {
}

// Updates the cluster.
method Update {
@go(name="Update")
method AsyncUpdate {
in out Body Cluster
}

Expand Down
4 changes: 4 additions & 0 deletions model/clusters_mgmt/v1/cluster_state_type.model
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ enum ClusterState {
// The cluster is ready to use.
Ready

// The cluster is being updated.
// This state is currently used only by aro hcp clusters.
Updating

// The cluster is being uninstalled.
Uninstalling

Expand Down
29 changes: 15 additions & 14 deletions openapi/aro_hcp/v1alpha1/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@
}
}
},
"get": {
"description": "Retrieves the details of the cluster.",
"patch": {
"description": "Updates the cluster.",
"parameters": [
{
"name": "cluster_id",
Expand All @@ -228,8 +228,17 @@
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Cluster"
}
}
}
},
"responses": {
"200": {
"202": {
"description": "Success.",
"content": {
"application/json": {
Expand All @@ -251,8 +260,8 @@
}
}
},
"patch": {
"description": "Updates the cluster.",
"get": {
"description": "Retrieves the details of the cluster.",
"parameters": [
{
"name": "cluster_id",
Expand All @@ -263,15 +272,6 @@
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Cluster"
}
}
}
},
"responses": {
"200": {
"description": "Success.",
Expand Down Expand Up @@ -2179,6 +2179,7 @@
"resuming",
"uninstalling",
"unknown",
"updating",
"validating",
"waiting"
]
Expand Down
1 change: 1 addition & 0 deletions openapi/clusters_mgmt/v1/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -16099,6 +16099,7 @@
"resuming",
"uninstalling",
"unknown",
"updating",
"validating",
"waiting"
]
Expand Down