Skip to content

Commit

Permalink
[Hypershift] Expose /manifests
Browse files Browse the repository at this point in the history
* Fixes SDA-6794
  • Loading branch information
samira-barouti authored and tbrisker committed Sep 18, 2022
1 parent 2e4d478 commit b87e420
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 0 deletions.
3 changes: 3 additions & 0 deletions model/clusters_mgmt/v1/external_configuration_type.model
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ struct ExternalConfiguration {

// list of labels externally configured on the clusterdeployment.
link Labels []Label

// list of manifest externally configured for a hosted cluster.
link Manifests []Manifest
}
32 changes: 32 additions & 0 deletions model/clusters_mgmt/v1/manifest_resource.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
Copyright (c) 2020 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 Manifest.
resource Manifest {
// Retrieves the details of the manifest.
method Get {
out Body Manifest
}

// Update the manifest.
method Update {
in out Body Manifest
}

// Deletes the manifest.
method Delete {
}
}
21 changes: 21 additions & 0 deletions model/clusters_mgmt/v1/manifest_type.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
Copyright (c) 2020 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 manifestwork.
class Manifest {
// List of k8s objects to deploy on a hosted cluster.
Workloads []Interface
}
45 changes: 45 additions & 0 deletions model/clusters_mgmt/v1/manifests_resource.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
Copyright (c) 2019 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 Manifests of a cluster.
resource Manifests {
// Retrieves the list of manifests.
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 Manifests.
out Items []Manifest
}

// Adds a new manifest to a cluster.
method Add {
// Description of the manifest.
in out Body Manifest
}

// Reference to the service that manages a specific manifest.
locator Manifest {
target Manifest
variable ID
}
}

0 comments on commit b87e420

Please sign in to comment.