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
--------------------------
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() {
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());
}
/*
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);
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
@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");
}
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 {
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";
+++ /dev/null
-{
- "kind": "PodList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/namespaces/ricaux/pods",
- "resourceVersion": "1594484"
- },
- "items": []
-}
-->
<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>