-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #806 from Ankit152/ocm-1791
[OCM-1791] OCM SDK: Release SDK with updated API
- Loading branch information
Showing
20 changed files
with
468 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
model/addons_mgmt/v1/addon_installation_billing_model_type.model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
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 an billing model field. | ||
enum BillingModel { | ||
@json(name = "marketplace") | ||
Marketplace | ||
|
||
@json(name = "marketplace-aws") | ||
MarketplaceAws | ||
|
||
@json(name = "marketplace-rhm") | ||
MarketplaceRhm | ||
|
||
@json(name = "marketplace-azure") | ||
MarketplaceAzure | ||
|
||
@json(name = "standard") | ||
Standard | ||
} |
33 changes: 33 additions & 0 deletions
33
model/addons_mgmt/v1/addon_installation_billing_type.model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
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 an add-on installation billing. | ||
struct AddonInstallationBilling { | ||
// Indicates the type of this object | ||
Kind String | ||
|
||
// Unique identifier of the object | ||
Id String | ||
|
||
// Self link | ||
Href String | ||
|
||
// Billing Model for addon resources | ||
BillingModel BillingModel | ||
|
||
// Account ID for billing market place | ||
BillingMarketplaceAccount String | ||
} |
27 changes: 27 additions & 0 deletions
27
model/addons_mgmt/v1/addon_installation_object_reference_type.model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
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 object reference/subscription | ||
struct ObjectReference { | ||
// Indicates the type of this object. | ||
Kind String | ||
|
||
// Unique identifier of the object. | ||
Id String | ||
|
||
// Self Link | ||
Href String | ||
} |
30 changes: 30 additions & 0 deletions
30
model/addons_mgmt/v1/addon_installation_parameter_type.model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
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 addon installation parameter | ||
struct AddonInstallationParameter { | ||
// Indicates the type of this object | ||
Kind String | ||
|
||
// Unique identifier of the object | ||
Id String | ||
|
||
// Self link | ||
Href String | ||
|
||
// Value of the parameter | ||
Value String | ||
} |
21 changes: 21 additions & 0 deletions
21
model/addons_mgmt/v1/addon_installation_parameters_type.model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 addon installation parameter | ||
struct AddonInstallationParameters { | ||
// list of addon installation parameters | ||
Items []AddonInstallationParameter | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
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 addon installation. | ||
resource AddonInstallation { | ||
// Retrieves the details of the addon installation. | ||
method Get { | ||
out Body AddonInstallation | ||
} | ||
|
||
// Updates the addon installation. | ||
method Update { | ||
// DryRun indicates the request body will not be persisted when dryRun=true. | ||
@http(name = "dryRun") | ||
in DryRun Boolean | ||
|
||
in out Body AddonInstallation | ||
} | ||
|
||
// Deletes the addon installation. | ||
method Delete { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
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 addon installation state | ||
enum AddonInstallationState { | ||
@json(name = "deleting") | ||
Deleting | ||
|
||
@json(name = "failed") | ||
Failed | ||
|
||
@json(name = "installing") | ||
Installing | ||
|
||
@json(name = "pending") | ||
Pending | ||
|
||
@json(name = "ready") | ||
Ready | ||
|
||
@json(name = "upgrading") | ||
Upgrading | ||
|
||
@json(name = "deleted") | ||
Deleted | ||
|
||
@json(name = "delete-pending") | ||
DeletePending | ||
|
||
@json(name = "delete-failed") | ||
DeleteFailed | ||
|
||
@json(name = "undefined") | ||
Undefined | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
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 addon installation | ||
class AddonInstallation { | ||
// Addon installed | ||
Addon Addon | ||
|
||
// Addon version of the addon | ||
AddonVersion AddonVersion | ||
|
||
// Billing of addon installation. | ||
Billing AddonInstallationBilling | ||
|
||
// Date and time when the add-on was initially installed in the cluster. | ||
CreationTimestamp Date | ||
|
||
// Version of the operator installed by the add-on. | ||
OperatorVersion String | ||
|
||
// Current CSV installed on cluster | ||
CsvName String | ||
|
||
// Parameters in the installation | ||
Parameters AddonInstallationParameters | ||
|
||
// Addon Installation State | ||
State AddonInstallationState | ||
|
||
// Subscription for the addon installation | ||
Subscription ObjectReference | ||
|
||
// Reason for the current State. | ||
StateDescription String | ||
|
||
// Date and time when the add-on installation information was last updated. | ||
UpdatedTimestamp Date | ||
|
||
// Date and time when the add-on installation deleted at. | ||
DeletedTimestamp Date | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
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 collection of addon installations for a specific cluster | ||
resource AddonInstallations { | ||
// Retrieves the list of addon installations for a cluster. | ||
method List { | ||
// Index of the requested page, where one corresponds to the first page. | ||
in out Page Integer = 1 | ||
|
||
// Maximum number of items that will be contained in the returned page. | ||
in out Size Integer = 100 | ||
|
||
// If the parameter isn't provided, or if the value is empty, then the order of the | ||
// results is undefined. | ||
in Order String | ||
|
||
// Total number of items of the collection regardless of the size of the page. | ||
out Total Integer | ||
|
||
// Retrieved list of addon installations | ||
out Items []AddonInstallation | ||
} | ||
|
||
// Create a new addon status and add it to the collection of addons installation. | ||
method Add { | ||
// Description of the addon installation. | ||
in out Body AddonInstallation | ||
} | ||
|
||
// Returns a reference to the service that manages a specific addon installation. | ||
locator Addon { | ||
target AddonInstallation | ||
variable ID | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
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 Metrics Federation | ||
struct MetricsFederation { | ||
// Indicates the name of the service port fronting the prometheus server. | ||
PortName String | ||
|
||
// Namespace where the prometheus server is running. | ||
Namespace String | ||
|
||
// List of series names to federate from the prometheus server. | ||
MatchNames []String | ||
|
||
// List of labels used to discover the prometheus server(s) to be federated. | ||
MatchLabels [String]String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.