Skip to content
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

SDK: Import all Kubernetes Models #2148

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions hack/gen-python-sdk/post_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,7 @@ def _rewrite_helper(input_file, output_file, rewrite_rules):
if (output_file == "sdk/python/v1beta1/kubeflow/katib/models/__init__.py"):
lines.append("\n")
lines.append("# Import Kubernetes models.\n")
lines.append("from kubernetes.client import V1ObjectMeta\n")
lines.append("from kubernetes.client import V1ListMeta\n")
lines.append("from kubernetes.client import V1Container\n")
lines.append("from kubernetes.client import V1HTTPGetAction\n")
lines.append("from kubernetes.client import V1ManagedFieldsEntry\n")
lines.append("from kubernetes.client import V1OwnerReference\n")
lines.append("from kubernetes.client import *\n")

with open(output_file, 'w') as f:
f.writelines(lines)
Expand Down
7 changes: 1 addition & 6 deletions sdk/python/v1beta1/kubeflow/katib/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,4 @@
from kubeflow.katib.models.v1beta1_trial_template import V1beta1TrialTemplate

# Import Kubernetes models.
from kubernetes.client import V1ObjectMeta
from kubernetes.client import V1ListMeta
from kubernetes.client import V1Container
from kubernetes.client import V1HTTPGetAction
from kubernetes.client import V1ManagedFieldsEntry
from kubernetes.client import V1OwnerReference
from kubernetes.client import *