Skip to content

Commit ba11018

Browse files
authored
fix(k8scluster): add exception handling
1 parent 0ec0267 commit ba11018

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hpecp/cli/k8scluster.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,15 @@ def k8smanifest(self):
158158
yaml.dump(yaml.load(json.dumps(response), Loader=yaml.FullLoader,))
159159
)
160160

161+
@base.intercept_exception
161162
def get_installed_addons(self, id):
162163
"""Retrieve the installed addons on the cluster.
163164
164165
:param id: get installed addons for a specific cluster
165166
"""
166167
print(base.get_client().k8s_cluster.get(id=id).addons)
167168

169+
@base.intercept_exception
168170
def get_available_addons(self, id=None, k8s_version=None):
169171
"""Retrieve the available addons for a cluster.
170172
@@ -194,6 +196,7 @@ def get_available_addons(self, id=None, k8s_version=None):
194196
)
195197
)
196198

199+
@base.intercept_exception
197200
def add_addons(self, id, addons, wait_for_ready_sec=0):
198201
"""Retrieve the installed addons on the cluster.
199202
@@ -223,6 +226,7 @@ def statuses(self,):
223226
"""Return a list of valid statuses."""
224227
print([s.name for s in K8sClusterStatus])
225228

229+
@base.intercept_exception
226230
def k8s_supported_versions(
227231
self,
228232
output="json",

0 commit comments

Comments
 (0)