Skip to content

Commit

Permalink
Merge pull request #806 from Ankit152/ocm-1791
Browse files Browse the repository at this point in the history
[OCM-1791] OCM SDK: Release SDK with updated API
  • Loading branch information
ciaranRoche authored Aug 24, 2023
2 parents a97b39b + ba0ce0e commit 9790c95
Show file tree
Hide file tree
Showing 20 changed files with 468 additions and 3 deletions.
5 changes: 5 additions & 0 deletions model/addons_mgmt/v1/addon_cluster_resources.model
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ resource Cluster {
locator AddonInquiries {
target AddonInquiries
}

// Reference to the installations of addon on a specific cluster
locator Addons {
target AddonInstallations
}
}
33 changes: 33 additions & 0 deletions model/addons_mgmt/v1/addon_installation_billing_model_type.model
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 model/addons_mgmt/v1/addon_installation_billing_type.model
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
}
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 model/addons_mgmt/v1/addon_installation_parameter_type.model
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 model/addons_mgmt/v1/addon_installation_parameters_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 addon installation parameter
struct AddonInstallationParameters {
// list of addon installation parameters
Items []AddonInstallationParameter
}
36 changes: 36 additions & 0 deletions model/addons_mgmt/v1/addon_installation_resource.model
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 {
}
}
48 changes: 48 additions & 0 deletions model/addons_mgmt/v1/addon_installation_state_type.model
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
}
54 changes: 54 additions & 0 deletions model/addons_mgmt/v1/addon_installation_type.model
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
}
49 changes: 49 additions & 0 deletions model/addons_mgmt/v1/addon_installations_resource.model
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
}
}
30 changes: 30 additions & 0 deletions model/addons_mgmt/v1/addon_metrics_federation_type.model
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
}
5 changes: 5 additions & 0 deletions model/addons_mgmt/v1/addon_parameter_type.model
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,9 @@ struct AddonParameter {

// Conditions in which this parameter is valid for
Conditions []AddonRequirement

Addon Addon

// Indicates the weight of the AddonParameter which would be used by sort order
Order Integer
}
3 changes: 3 additions & 0 deletions model/addons_mgmt/v1/addon_status_condition_type.model
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ struct AddonStatusCondition {

// Reason for the condition
Reason String

// Message for the condition
Message String
}
Loading

0 comments on commit 9790c95

Please sign in to comment.