public ProblemSet validatePersistentStore(String deploymentName, String persistentStoreType) { NodeFilter filter = new NodeFilter() .setDeployment(deploymentName) .setPersistentStore(persistentStoreType); return validateService.validateMatchingFilter(filter); } }
public ProblemSet validatePersistentStore(String deploymentName, String persistentStoreType) { NodeFilter filter = new NodeFilter() .setDeployment(deploymentName) .setPersistentStore(persistentStoreType); return validateService.validateMatchingFilter(filter); } }
public ProblemSet validatePersistentStorage(String deploymentName) { PersistentStorage storage = getPersistentStorage(deploymentName); NodeFilter filter = new NodeFilter() .setDeployment(deploymentName) .setPersistentStorage(); if (storage.getPersistentStoreType() != null) { filter.setPersistentStore(storage.getPersistentStoreType().getId()); } return validateService.validateMatchingFilter(filter); }
public PersistentStore getPersistentStore(String deploymentName, String persistentStoreType) { NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setPersistentStore(persistentStoreType); List<PersistentStore> matching = lookupService.getMatchingNodesOfType(filter, PersistentStore.class); switch (matching.size()) { case 0: throw new ConfigNotFoundException(new ConfigProblemBuilder(Problem.Severity.FATAL, "No persistent store with name \"" + persistentStoreType + "\" could be found") .setRemediation("Create a new persistent store with name \"" + persistentStoreType + "\"").build()); case 1: return matching.get(0); default: throw new IllegalConfigException(new ConfigProblemBuilder(Problem.Severity.FATAL, "More than one persistent store with name \"" + persistentStoreType + "\" found") .setRemediation("Manually delete or rename duplicate persistent stores with name \"" + persistentStoreType + "\" in your halconfig file").build()); } }
public ProblemSet validatePersistentStorage(String deploymentName) { PersistentStorage storage = getPersistentStorage(deploymentName); NodeFilter filter = new NodeFilter() .setDeployment(deploymentName) .setPersistentStorage(); if (storage.getPersistentStoreType() != null) { filter.setPersistentStore(storage.getPersistentStoreType().getId()); } return validateService.validateMatchingFilter(filter); }
public PersistentStore getPersistentStore(String deploymentName, String persistentStoreType) { NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setPersistentStore(persistentStoreType); List<PersistentStore> matching = lookupService.getMatchingNodesOfType(filter, PersistentStore.class); switch (matching.size()) { case 0: throw new ConfigNotFoundException(new ConfigProblemBuilder(Problem.Severity.FATAL, "No persistent store with name \"" + persistentStoreType + "\" could be found") .setRemediation("Create a new persistent store with name \"" + persistentStoreType + "\"").build()); case 1: return matching.get(0); default: throw new IllegalConfigException(new ConfigProblemBuilder(Problem.Severity.FATAL, "More than one persistent store with name \"" + persistentStoreType + "\" found") .setRemediation("Manually delete or rename duplicate persistent stores with name \"" + persistentStoreType + "\" in your halconfig file").build()); } }
public ProblemSet validateDeployment(String deploymentName) { PersistentStorage storage = storageService.getPersistentStorage(deploymentName); NodeFilter filter = new NodeFilter() .setDeployment(deploymentName) .withAnyProvider() .withAnyAccount() .setFeatures() .setSecurity(); if (storage.getPersistentStoreType() != null) { filter.setPersistentStore(storage.getPersistentStoreType().getId()); } return validateService.validateMatchingFilter(filter); }
public ProblemSet validateDeployment(String deploymentName) { PersistentStorage storage = storageService.getPersistentStorage(deploymentName); NodeFilter filter = new NodeFilter() .setDeployment(deploymentName) .withAnyProvider() .withAnyAccount() .setFeatures() .setSecurity(); if (storage.getPersistentStoreType() != null) { filter.setPersistentStore(storage.getPersistentStoreType().getId()); } return validateService.validateMatchingFilter(filter); }