Drop AUX cluster pod list from Platform status 50/2050/1
authorLott, Christopher (cl778h) <cl778h@att.com>
Tue, 17 Dec 2019 16:10:37 +0000 (11:10 -0500)
committerLott, Christopher (cl778h) <cl778h@att.com>
Tue, 17 Dec 2019 16:10:37 +0000 (11:10 -0500)
Change-Id: I797f104047aacfc1d3a5ee11c2a10e1a44ae06bb
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
docs/release-notes.rst
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/CaasIngressConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/CaasIngressController.java
webapp-backend/src/main/resources/application.yaml
webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/CaasIngressMockConfiguration.java
webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/CaasIngressControllerTest.java
webapp-backend/src/test/resources/caas-ingress-ricaux-pods.json [deleted file]
webapp-frontend/src/app/platform/platform.component.html

index 697f46e..8ef088e 100644 (file)
@@ -5,11 +5,12 @@
 RIC Dashboard Release Notes
 ===========================
 
-Version 2.0.0, 2 Dec 2019
--------------------------
+Version 2.0.0, 22 Dec 2019
+--------------------------
 * Change application properties file to YAML format
 * Add mock list of RIC instances to application properties
 * Add admin controller method to fetch list of RIC instances
+* Drop AUX cluster container list fetched via CAAS Ingress
 
 Version 1.3.0, 26 Nov 2019
 --------------------------
index 4363679..dd9449d 100644 (file)
@@ -44,37 +44,25 @@ public class CaasIngressConfiguration {
        private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
        // Populated by the autowired constructor
-       private final String caasIngressAuxUrl;
        private final String caasIngressPltUrl;
 
        @Autowired
        public CaasIngressConfiguration( //
-                       @Value("${caasingress.aux.url.prefix}") final String auxUrlPrefix, //
-                       @Value("${caasingress.aux.url.suffix}") final String auxUrlSuffix, //
                        @Value("${caasingress.plt.url.prefix}") final String pltUrlPrefix,
                        @Value("${caasingress.plt.url.suffix}") final String pltUrlSuffix,
                        @Value("${caasingress.insecure}") final Boolean insecureFlag) //
                        throws KeyManagementException, NoSuchAlgorithmException {
-               logger.debug("ctor caasingress aux prefix '{}' suffix '{}'", auxUrlPrefix, auxUrlSuffix);
                logger.debug("ctor caasingress plt prefix '{}' suffix '{}'", pltUrlPrefix, pltUrlSuffix);
                logger.debug("ctor caasingress insecure flag {}", insecureFlag);
-               caasIngressAuxUrl = new DefaultUriBuilderFactory(auxUrlPrefix.trim()).builder().path(auxUrlSuffix.trim())
-                               .build().normalize().toString();
                caasIngressPltUrl = new DefaultUriBuilderFactory(pltUrlPrefix.trim()).builder().path(pltUrlSuffix.trim())
                                .build().normalize().toString();
-               logger.info("Configuring CAAS-Ingress URLs: aux {}, plt {}", caasIngressAuxUrl, caasIngressPltUrl);
+               logger.info("Configuring CAAS-Ingress URL: plt {}", caasIngressPltUrl);
                if (insecureFlag != null && insecureFlag) {
                        logger.warn("ctor: insecure flag set, disabling SSL checks");
                        HttpsURLConnectionUtils.turnOffSslChecking();
                }
        }
 
-       @Bean
-       // The bean (method) name must be globally unique
-       public SimpleKubernetesClient ciAuxApi() {
-               return new SimpleKubernetesClient(caasIngressAuxUrl);
-       }
-
        @Bean
        // The bean (method) name must be globally unique
        public SimpleKubernetesClient ciPltApi() {
index ad375f9..f8272b3 100644 (file)
@@ -64,22 +64,17 @@ public class CaasIngressController {
        public static final String PP_CLUSTER = "cluster";
        public static final String PP_NAMESPACE = "namespace";
        // Parameter values
-       public static final String CLUSTER_AUX = "aux";
        public static final String CLUSTER_PLT = "plt";
        public static final String CLUSTER_RIC = "ric"; // alternate for PLT
 
-       private final SimpleKubernetesClient ciAuxClient;
        private final SimpleKubernetesClient ciPltClient;
 
        @Autowired
-       public CaasIngressController(final SimpleKubernetesClient ciAuxApi, final SimpleKubernetesClient ciPltApi) {
-               Assert.notNull(ciAuxApi, "auxApi must not be null");
+       public CaasIngressController(final SimpleKubernetesClient ciPltApi) {
                Assert.notNull(ciPltApi, "pltApi must not be null");
-               this.ciAuxClient = ciAuxApi;
                this.ciPltClient = ciPltApi;
                if (logger.isDebugEnabled())
-                       logger.debug("ctor: configured with aux api {}, plt api {}", ciAuxClient.getClass().getName(),
-                                       ciPltClient.getClass().getName());
+                       logger.debug("ctor: configured with plt api {}", ciPltClient.getClass().getName());
        }
 
        /*
@@ -92,9 +87,7 @@ public class CaasIngressController {
        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)) {
+               if (CLUSTER_PLT.equalsIgnoreCase(cluster) || CLUSTER_RIC.equalsIgnoreCase(cluster)) {
                        return ciPltClient.listPods(namespace);
                } else {
                        logger.warn("listPods: unknown cluster {}", cluster);
index ae4bdee..ab7ff6f 100644 (file)
@@ -69,10 +69,6 @@ e2mgr:
 caasingress:
     # Set insecure=true to disable SSL certificate and hostname checking
     insecure: true
-    aux:
-        url:
-            prefix: https://jar-app-props-default-caas-ingress-aux-URL
-            suffix: /api
     plt:
         url:
             prefix: https://jar-app-props-default-caas-ingress-plt-URL
index bd94c2e..56a01ab 100644 (file)
@@ -50,13 +50,11 @@ public class CaasIngressMockConfiguration {
        @Value("${mock.config.delay:0}")
        private int delayMs;
 
-       private final String auxPods;
        private final String pltPods;
 
        public CaasIngressMockConfiguration() throws IOException {
                logger.info("Configuring mock CAAS-Ingres clients");
                // Files in src/test/resources
-               auxPods = readDataFromPath("caas-ingress-ricaux-pods.json");
                pltPods = readDataFromPath("caas-ingress-ricplt-pods.json");
        }
 
@@ -78,17 +76,6 @@ public class CaasIngressMockConfiguration {
                return sb.toString();
        }
 
-       @Bean
-       // Use the same name as regular configuration
-       public SimpleKubernetesClient ciAuxApi() throws IOException {
-               SimpleKubernetesClient mockClient = mock(SimpleKubernetesClient.class);
-               doAnswer(inv -> {
-                       logger.debug("listPods for aux");
-                       return auxPods;
-               }).when(mockClient).listPods("ricaux");
-               return mockClient;
-       }
-
        @Bean
        // Use the same name as regular configuration
        public SimpleKubernetesClient ciPltApi() throws IOException {
index 2292b9c..41dfcaf 100644 (file)
@@ -32,18 +32,6 @@ public class CaasIngressControllerTest extends AbstractControllerTest {
 
        private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-       @Test
-       public void auxTest() {
-               final String nsAux = "ricaux";
-               URI uri = buildUri(null, CaasIngressController.CONTROLLER_PATH, CaasIngressController.PODS_METHOD,
-                               CaasIngressController.PP_CLUSTER, CaasIngressController.CLUSTER_AUX, CaasIngressController.PP_NAMESPACE,
-                               nsAux);
-               logger.info("Invoking {}", uri);
-               String s = testRestTemplateStandardRole().getForObject(uri, String.class);
-               Assertions.assertFalse(s.isEmpty());
-               Assertions.assertTrue(s.contains(nsAux));
-       }
-
        @Test
        public void pltTest() {
                final String nsPlt = "ricplt";
diff --git a/webapp-backend/src/test/resources/caas-ingress-ricaux-pods.json b/webapp-backend/src/test/resources/caas-ingress-ricaux-pods.json
deleted file mode 100644 (file)
index 216b7db..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-       "kind": "PodList",
-       "apiVersion": "v1",
-       "metadata": {
-               "selfLink": "/api/v1/namespaces/ricaux/pods",
-               "resourceVersion": "1594484"
-       },
-       "items": []
-}
index c4b4666..b28eb0d 100644 (file)
@@ -19,6 +19,4 @@
   -->
   <div class="platform__section">
     <rd-caas-ingress cluster="RIC" namespace="ricplt"></rd-caas-ingress>
-    <hr>
-    <rd-caas-ingress cluster="AUX" namespace="ricaux"></rd-caas-ingress>
   </div>