Skip to content

Commit fa33c88

Browse files
authored
run_kubectl_command
update input and output formats
1 parent 5c0f3a5 commit fa33c88

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

hpecp/k8s_cluster.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,9 @@ def run_kubectl_command(self, id, op='create', yaml=''):
678678
Parameters
679679
------
680680
id: str
681-
The k8s cluster ID (ID = 1 or 2 etc, not the base path as /api/v2/k8s_cluster/1)
681+
The k8s cluster ID (i.e., '/api/v2/k8s_cluster/1')
682682
op: str
683-
op can be one of create,delete,update
683+
op can be either 'create' or 'delete'
684684
yaml: str
685685
base64 encoding of the yaml file
686686
@@ -699,11 +699,11 @@ def run_kubectl_command(self, id, op='create', yaml=''):
699699
}
700700

701701
response = self.client._request(
702-
url="/api/v2/k8scluster/{id}/kubectl",
702+
url="{}/kubectl".format(id),
703703
http_method="post",
704704
description=(
705705
"K8sClusterController/" "run_kubectl_command"
706706
),
707-
data=json,
707+
data=data,
708708
)
709-
return response.json()
709+
return response.text

0 commit comments

Comments
 (0)