Skip to content

Commit

Permalink
Merge pull request #711 from gdbranco/feat/sda-6704
Browse files Browse the repository at this point in the history
[SDA-6704] Add delete protection resources
  • Loading branch information
gdbranco authored Mar 30, 2023
2 parents c0bff47 + b3b2161 commit 1b1d939
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

This document describes the relevant changes between releases of the API model.

## 0.0.269 Mar 30 2023
- Add `DeleteProtection` resource to `Cluster` resource.

## 0.0.268 Mar 24 2023
- Replace `OidcConfigId` for `OidcConfig` in `STS` resource.

Expand Down
4 changes: 4 additions & 0 deletions model/clusters_mgmt/v1/cluster_resource.model
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,8 @@ resource Cluster {
locator AWS {
target AWS
}

locator DeleteProtection {
target DeleteProtection
}
}
3 changes: 3 additions & 0 deletions model/clusters_mgmt/v1/cluster_type.model
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,7 @@ class Cluster {

// Contains information about BYO OIDC.
ByoOidc ByoOidc

// Delete protection
DeleteProtection DeleteProtection
}
25 changes: 25 additions & 0 deletions model/clusters_mgmt/v1/delete_protection_resource.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
Copyright (c) 2023 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Manages delete protection specific parts for a specific cluster.
resource DeleteProtection {
method Get {
out Body DeleteProtection
}
method Update {
in out Body DeleteProtection
}
}
25 changes: 25 additions & 0 deletions model/clusters_mgmt/v1/delete_protection_type.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
Copyright (c) 2023 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// DeleteProtection configuration.
struct DeleteProtection {
// Boolean flag indicating if the cluster should be be using _DeleteProtection_.
//
// By default this is `false`.
//
// To enable it a SREP needs to patch the value through OCM API
Enabled Boolean
}

0 comments on commit 1b1d939

Please sign in to comment.