-
Notifications
You must be signed in to change notification settings - Fork 59
Remove grpc as required param in local mr resource #899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2c99501
Add workaround for RHOAIENG-40875 and remove grpc as required param i…
dbasunag 6a62341
Merge branch 'main' into workaround
dbasunag 017026b
Merge branch 'main' into workaround
dbasunag 2ae03bd
updates to take our workaround
dbasunag 0cde7b3
Merge branch 'main' into workaround
dbasunag File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
94 changes: 94 additions & 0 deletions
94
utilities/resources/model_registry_modelregistry_opendatahub_io.py
This file contains hidden or 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,94 @@ | ||
| # Generated using https://github.com/RedHatQE/openshift-python-wrapper/blob/main/scripts/resource/README.md | ||
|
|
||
| from typing import Any | ||
|
|
||
| from ocp_resources.exceptions import MissingRequiredArgumentError | ||
| from ocp_resources.resource import NamespacedResource | ||
|
|
||
|
|
||
| class ModelRegistry(NamespacedResource): | ||
| """ | ||
| ModelRegistry is the Schema for the modelregistries API | ||
| """ | ||
|
|
||
| api_group: str = NamespacedResource.ApiGroup.MODELREGISTRY_OPENDATAHUB_IO | ||
|
|
||
| def __init__( | ||
| self, | ||
| downgrade_db_schema_version: int | None = None, | ||
| enable_database_upgrade: bool | None = None, | ||
| grpc: dict[str, Any] | None = None, | ||
| kube_rbac_proxy: dict[str, Any] | None = None, | ||
| mysql: dict[str, Any] | None = None, | ||
| oauth_proxy: dict[str, Any] | None = None, | ||
| postgres: dict[str, Any] | None = None, | ||
| rest: dict[str, Any] | None = None, | ||
| **kwargs: Any, | ||
| ) -> None: | ||
| r""" | ||
| Args: | ||
| downgrade_db_schema_version (int): Database downgrade schema version value. If set the database schema | ||
| version is downgraded to the set value during initialization | ||
| (Optional Parameter) | ||
|
|
||
| enable_database_upgrade (bool): Flag specifying database upgrade option. If set to true, it enables | ||
| database migration during initialization (Optional parameter) | ||
|
|
||
| grpc (dict[str, Any]): Deprecated: Configuration for gRPC endpoint is deprecated and will be | ||
| removed in a future release | ||
|
|
||
| kube_rbac_proxy (dict[str, Any]): kube-rbac-proxy configuration options | ||
|
|
||
| mysql (dict[str, Any]): MySQL configuration options | ||
|
|
||
| oauth_proxy (dict[str, Any]): OpenShift OAuth proxy configuration options | ||
|
|
||
| postgres (dict[str, Any]): PostgreSQL configuration options | ||
|
|
||
| rest (dict[str, Any]): Configuration for REST endpoint | ||
|
|
||
| """ | ||
| super().__init__(**kwargs) | ||
|
|
||
| self.downgrade_db_schema_version = downgrade_db_schema_version | ||
| self.enable_database_upgrade = enable_database_upgrade | ||
| self.grpc = grpc | ||
| self.kube_rbac_proxy = kube_rbac_proxy | ||
| self.mysql = mysql | ||
| self.oauth_proxy = oauth_proxy | ||
| self.postgres = postgres | ||
| self.rest = rest | ||
|
|
||
| def to_dict(self) -> None: | ||
|
|
||
| super().to_dict() | ||
|
|
||
| if not self.kind_dict and not self.yaml_file: | ||
| if self.rest is None: | ||
| raise MissingRequiredArgumentError(argument="self.rest") | ||
|
|
||
| self.res["spec"] = {} | ||
| _spec = self.res["spec"] | ||
|
|
||
| _spec["grpc"] = self.grpc | ||
| _spec["rest"] = self.rest | ||
|
|
||
| if self.downgrade_db_schema_version is not None: | ||
| _spec["downgrade_db_schema_version"] = self.downgrade_db_schema_version | ||
|
|
||
| if self.enable_database_upgrade is not None: | ||
| _spec["enable_database_upgrade"] = self.enable_database_upgrade | ||
|
|
||
| if self.kube_rbac_proxy is not None: | ||
| _spec["kubeRBACProxy"] = self.kube_rbac_proxy | ||
|
|
||
| if self.mysql is not None: | ||
| _spec["mysql"] = self.mysql | ||
|
|
||
| if self.oauth_proxy is not None: | ||
| _spec["oauthProxy"] = self.oauth_proxy | ||
|
|
||
| if self.postgres is not None: | ||
| _spec["postgres"] = self.postgres | ||
|
|
||
| # End of generated code | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.