Skip to content

Commit

Permalink
Merge pull request #832 from den-rgb/OCM-3277
Browse files Browse the repository at this point in the history
OCM-3277 | feat: Added open api model for trusted ips
  • Loading branch information
zgalor authored Sep 11, 2023
2 parents 4a82698 + 9065ac6 commit 1417a4e
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changes

This document describes the relevant changes between releases of the API model.
## 0.0.317 September 11 2023
- Add new resources and type for `TrustedIps`

## 0.0.316 September 6 2023
- Add `CIDRBlockp` field to `Subnetwork` and `CloudVPC`
Expand Down
5 changes: 5 additions & 0 deletions model/clusters_mgmt/v1/root_resource.model
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,9 @@ resource Root {
locator NetworkVerifications {
target NetworkVerifications
}

// Reference to the resource that manages the collection of trusted ip addresses.
locator TrustedIPAddresses {
target TrustedIps
}
}
23 changes: 23 additions & 0 deletions model/clusters_mgmt/v1/trusted_ip_resource.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
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 a specific trusted ip address.
resource TrustedIp {
// Retrieves the trusted ip adresses.
method Get {
out Body TrustedIp
}
}
39 changes: 39 additions & 0 deletions model/clusters_mgmt/v1/trusted_ips_resource.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
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 the collection of trusted ip addresses of a cluster.
resource TrustedIps {
// Retrieves the list of trusted ip addresses.
method List {
// Index of the requested page, where one corresponds to the first page.
in out Page Integer = 1

// Number of items contained in the returned page.
in out Size Integer = 100

// Total number of items of the collection.
out Total Integer

// Retrieved list of trusted ip addresses.
out Items []TrustedIp
}

// Reference to the resource that manages a specific trusted Ip address.
locator TrustedIp {
target TrustedIp
variable ID
}
}
21 changes: 21 additions & 0 deletions model/clusters_mgmt/v1/trusted_ips_type.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
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.
*/

// Representation of a trusted ip address in clusterdeployment.
class TrustedIp {
// The boolean set to show if the ip is enabled.
Enabled Boolean
}

0 comments on commit 1417a4e

Please sign in to comment.