- public String listPods(@PathVariable(PP_CLUSTER) String cluster, @PathVariable(PP_NAMESPACE) String namespace,
- HttpServletResponse response) {
- logger.debug("listPods: cluster {}, namespace {}", cluster, namespace);
- if (CLUSTER_AUX.equalsIgnoreCase(cluster)) {
- return ciAuxClient.listPods(namespace);
- } else if (CLUSTER_PLT.equalsIgnoreCase(cluster) || CLUSTER_RIC.equalsIgnoreCase(cluster)) {
- return ciPltClient.listPods(namespace);
+ public String listPods(@PathVariable(DashboardConstants.RIC_INSTANCE_KEY) String instanceKey, //
+ @PathVariable(PP_CLUSTER) String cluster, //
+ @PathVariable(PP_NAMESPACE) String namespace, HttpServletResponse response) {
+ logger.debug("listPods: instance {} cluster {} namespace {}", instanceKey, cluster, namespace);
+ SimpleKubernetesClient client = simpleKubernetesClientBuilder.getSimpleKubernetesClient(instanceKey);
+ if (CLUSTER_PLT.equalsIgnoreCase(cluster) || CLUSTER_RIC.equalsIgnoreCase(cluster)) {
+ return client.listPods(namespace);