@RequestMapping(value = "/", method = RequestMethod.GET) DaemonTask<Halconfig, PersistentStorage> getPersistentStorage(@PathVariable String deploymentName, @ModelAttribute ValidationSettings validationSettings) { return GenericGetRequest.<PersistentStorage>builder() .getter(() -> persistentStorageService.getPersistentStorage(deploymentName)) .validator(() -> persistentStorageService.validatePersistentStorage(deploymentName)) .description("Get persistent storage settings") .build() .execute(validationSettings); }
public void setPersistentStore(String deploymentName, PersistentStore newPersistentStore) { PersistentStorage persistentStorage = getPersistentStorage(deploymentName); switch (newPersistentStore.persistentStoreType()) { case S3: persistentStorage.setS3((S3PersistentStore) newPersistentStore); break; case GCS: persistentStorage.setGcs((GcsPersistentStore) newPersistentStore); break; case AZS: persistentStorage.setAzs((AzsPersistentStore) newPersistentStore); break; case ORACLE: persistentStorage.setOracle((OraclePersistentStore) newPersistentStore); break; case ORACLEBMCS: persistentStorage.setOraclebmcs((OracleBMCSPersistentStore) newPersistentStore); break; default: throw new RuntimeException("Unknown persistent store " + newPersistentStore.persistentStoreType()); } }
public void setPersistentStore(String deploymentName, PersistentStore newPersistentStore) { PersistentStorage persistentStorage = getPersistentStorage(deploymentName); switch (newPersistentStore.persistentStoreType()) { case S3: persistentStorage.setS3((S3PersistentStore) newPersistentStore); break; case GCS: persistentStorage.setGcs((GcsPersistentStore) newPersistentStore); break; case AZS: persistentStorage.setAzs((AzsPersistentStore) newPersistentStore); break; case ORACLE: persistentStorage.setOracle((OraclePersistentStore) newPersistentStore); break; case ORACLEBMCS: persistentStorage.setOraclebmcs((OracleBMCSPersistentStore) newPersistentStore); break; default: throw new RuntimeException("Unknown persistent store " + newPersistentStore.persistentStoreType()); } }
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 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 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); }