Skip to content

Commit

Permalink
Merge pull request #758 from gabriel-farache/osdfm_api
Browse files Browse the repository at this point in the history
Complete OSD FM api for SDK usage
  • Loading branch information
tiwillia authored Jun 5, 2023
2 parents 4a0574b + 1fb6c3a commit aa41294
Show file tree
Hide file tree
Showing 10 changed files with 197 additions and 1 deletion.
23 changes: 23 additions & 0 deletions model/osd_fleet_mgmt/v1/label_reference_type.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
Copyright (c) 2022 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.
*/

// label reference settings of the cluster.
struct LabelReference {
// Id of the Label associated to the OSD FM managed cluster
Id String
// link to the Label associated to the OSD FM managed cluster
Href String
}
20 changes: 20 additions & 0 deletions model/osd_fleet_mgmt/v1/label_request_payload.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Copyright (c) 2022 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.
*/

struct LabelRequestPayload {
Key String
Value String
}
34 changes: 34 additions & 0 deletions model/osd_fleet_mgmt/v1/label_resource.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
Copyright (c) 2022 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 label.
resource Label {
// Retrieves the details of the cluster.
method Get {
out Body Label
}

// Creates the label.
method Post {
in Request LabelRequestPayload
out Response Label
}

// Deletes the label.
method Delete {

}
}
25 changes: 25 additions & 0 deletions model/osd_fleet_mgmt/v1/label_type.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
Copyright (c) 2022 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.
*/

// label settings of the cluster.
struct Label {
// Label ID associated to the OSD FM managed cluster
Id String
// Label key associated to the OSD FM managed cluster
Key String
// Label value associated to the OSD FM managed cluster
Value String
}
41 changes: 41 additions & 0 deletions model/osd_fleet_mgmt/v1/labels_resource.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
Copyright (c) 2022 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 labels.
resource Labels {
// Retrieves the list of labels.
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

// Total number of items of the collection that match the search criteria,
// regardless of the size of the page.
out Total Integer

// Retrieved a list of labels.
out Items []Label
}


// Returns a reference to the resource that manages a specific label.
locator Label {
target Label
variable ID
}
}
5 changes: 5 additions & 0 deletions model/osd_fleet_mgmt/v1/management_cluster_resource.model
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ resource ManagementCluster {
method Delete {
}

// Reference to the resource that manages the collection of label
locator Labels {
target Labels
}

}
14 changes: 13 additions & 1 deletion model/osd_fleet_mgmt/v1/management_cluster_type.model
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ class ManagementCluster {
// Status of cluster
Status String

// Management cluster handling the management cluster
//Sector of cluster
Sector String

// Service cluster handling the management cluster
link Parent ManagementClusterParent

// Labels on management cluster
link LabelsReference []LabelReference

// Creation timestamp of the cluster
CreationTimestamp Date

// Update timestamp of the cluster
UpdateTimestamp Date
}
23 changes: 23 additions & 0 deletions model/osd_fleet_mgmt/v1/provision_shard_reference_type.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
Copyright (c) 2022 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.
*/

// Provision Shards Reference of the cluster.
struct ProvisionShardsReference {
// Id of the Provision Shards associated to the Ocluster
Id String
// link to the Provision Shards associated to the cluster
Href String
}
4 changes: 4 additions & 0 deletions model/osd_fleet_mgmt/v1/service_cluster_resource.model
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ resource ServiceCluster {

}

// Reference to the resource that manages the collection of label
locator Labels {
target Labels
}
}
9 changes: 9 additions & 0 deletions model/osd_fleet_mgmt/v1/service_cluster_type.model
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,13 @@ class ServiceCluster {

//Status of cluster
Status String

//Sector of cluster
Sector String

// Labels refrences on service cluster
link LabelsReference []LabelReference

// Provision shard reference for the service cluster
link ProvisionShardsReference ProvisionShardsReference
}

0 comments on commit aa41294

Please sign in to comment.