vishesh92 commented on code in PR #7515:
URL: https://github.com/apache/cloudstack/pull/7515#discussion_r1203554020


##########
plugins/integrations/kubernetes-service/src/main/java/org/apache/cloudstack/api/command/user/kubernetes/cluster/StartKubernetesClusterCmd.java:
##########
@@ -99,6 +99,9 @@ public KubernetesCluster validateRequest() {
         if (kubernetesCluster == null) {
             throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Given 
Kubernetes cluster was not found");
         }
+        if (!kubernetesCluster.getManaged()) {
+            throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Given 
Kubernetes cluster is not managed by Apache CloudStack");

Review Comment:
   
[deleteKubernetesCluster](https://cloudstack.apache.org/api/apidocs-4.18/apis/deleteKubernetesCluster.html)
 - Handled.
   
[getKubernetesClusterConfig](https://cloudstack.apache.org/api/apidocs-4.18/apis/getKubernetesClusterConfig.html)
 should return config for any cluster if the details are present.
   
[listKubernetesClusters](https://cloudstack.apache.org/api/apidocs-4.18/apis/listKubernetesClusters.html)
 - option to filter by managed.
   
[scaleKubernetesCluster](https://cloudstack.apache.org/api/apidocs-4.18/apis/scaleKubernetesCluster.html)
 -  validateKubernetesClusterScaleParameters fails if the cluster is not 
managed.
   
[startKubernetesCluster](https://cloudstack.apache.org/api/apidocs-4.18/apis/startKubernetesCluster.html)
 - Handled
   
[stopKubernetesCluster](https://cloudstack.apache.org/api/apidocs-4.18/apis/stopKubernetesCluster.html)
 - Handled
   
[upgradeKubernetesCluster](https://cloudstack.apache.org/api/apidocs-4.18/apis/upgradeKubernetesCluster.html)
 - validateKubernetesClusterUpgradeParameters fails if the cluster is not 
managed.
   
   @weizhouapache I have verified the implementation, and I have handled all 
the APIs.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to