- // Force this onto the console by using level WARN
- logger.warn("main: version '{}' successful start", getImplementationVersion(MethodHandles.lookup().lookupClass()));
+ }
+
+ @Override
+ public void run(String... args) throws Exception {
+ // Ensure output appears on the console by using level WARN
+ logger.warn("run: version '{}'", getImplementationVersion(MethodHandles.lookup().lookupClass()));
+ // Validate configuration
+ List<RicRegion> regions = instanceConfig.getRegions();
+ Assert.notEmpty(regions, "Region list empty");
+ for (RicRegion r : regions) {
+ Assert.notEmpty(r.getInstances(), "Instance list empty for region " + r.getName());
+ for (RicInstance it : r.getInstances()) {
+ logger.warn("run: RIC region {} instance {}", r, it);
+ Assert.hasText(it.getKey(), "Instance key missing");
+ Assert.hasText(it.getName(), "Name missing for instance " + it.getKey());
+ Assert.hasText(it.getAppUrlPrefix(), "App URL prefix missing for instance " + it.getKey());
+ Assert.hasText(it.getCaasUrlPrefix(), "Caas URL prefix missing for instance " + it.getKey());
+ Assert.hasText(it.getPltUrlPrefix(), "Plt URL prefix missing for instance " + it.getKey());
+ }
+ }