Adjust application.yaml keys and values
[portal/ric-dashboard.git] / webapp-backend / src / main / java / org / oransc / ric / portal / dashboard / k8sapi / SimpleKubernetesClient.java
index a725172..bcfae62 100644 (file)
@@ -2,7 +2,7 @@
  * ========================LICENSE_START=================================
  * O-RAN-SC
  * %%
- * Copyright (C) 2019 AT&T Intellectual Property and Nokia
+ * Copyright (C) 2019 AT&T Intellectual Property
  * %%
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -45,8 +45,9 @@ public class SimpleKubernetesClient {
 
        public String listPods(String namespace) {
                logger.debug("listPods for namespace {}", namespace);
-               String podsUrl = new DefaultUriBuilderFactory(k8sUrl.trim()).builder().path("v1").path("namespaces")
-                               .path(namespace.trim()).path("pods").build().normalize().toString();
+               String podsUrl = new DefaultUriBuilderFactory(k8sUrl.trim()).builder().pathSegment("v1")
+                               .pathSegment("namespaces").pathSegment(namespace.trim()).pathSegment("pods").build().normalize()
+                               .toString();
                RestTemplate rt = new RestTemplate();
                ResponseEntity<String> podsResponse = rt.getForEntity(podsUrl, String.class);
                return podsResponse.getBody();