@Test public void okWhenS3LocationIsValid() { SdxCloudStorageRequest cloudStorageRequest = new SdxCloudStorageRequest(); cloudStorageRequest.setBaseLocation("s3a: S3CloudStorageV1Parameters params = new S3CloudStorageV1Parameters(); params.setInstanceProfile("instanceProfile"); cloudStorageRequest.setS3(params); underTest.validateCloudStorage(CloudPlatform.AWS.toString(), cloudStorageRequest); }
protected void validateCloudStorage(String cloudPlatform, SdxCloudStorageRequest cloudStorage) { if (CloudPlatform.AWS.name().equalsIgnoreCase(cloudPlatform)) { if (cloudStorage.getS3() == null || StringUtils.isEmpty(cloudStorage.getS3().getInstanceProfile())) { throw new BadRequestException("instance profile must be defined for S3"); } if (!cloudStorage.getBaseLocation().startsWith(FileSystemType.S3.getProtocol() + ": throw new BadRequestException("AWS baselocation missing protocol. please specify s3a: } } }
CloudStorageManifester { protected void validateCloudStorage(String cloudPlatform, SdxCloudStorageRequest cloudStorage) { if (CloudPlatform.AWS.name().equalsIgnoreCase(cloudPlatform)) { if (cloudStorage.getS3() == null || StringUtils.isEmpty(cloudStorage.getS3().getInstanceProfile())) { throw new BadRequestException("instance profile must be defined for S3"); } if (!cloudStorage.getBaseLocation().startsWith(FileSystemType.S3.getProtocol() + ": throw new BadRequestException("AWS baselocation missing protocol. please specify s3a: } } } }
CloudStorageManifester { protected void validateCloudStorage(String cloudPlatform, SdxCloudStorageRequest cloudStorage) { if (CloudPlatform.AWS.name().equalsIgnoreCase(cloudPlatform)) { if (cloudStorage.getS3() == null || StringUtils.isEmpty(cloudStorage.getS3().getInstanceProfile())) { throw new BadRequestException("instance profile must be defined for S3"); } if (!cloudStorage.getBaseLocation().startsWith(FileSystemType.S3.getProtocol() + ": throw new BadRequestException("AWS baselocation missing protocol. please specify s3a: } } }  }
CloudStorageManifester { protected void validateCloudStorage(String cloudPlatform, SdxCloudStorageRequest cloudStorage) { if (CloudPlatform.AWS.name().equalsIgnoreCase(cloudPlatform)) { if (cloudStorage.getS3() == null || StringUtils.isEmpty(cloudStorage.getS3().getInstanceProfile())) { throw new BadRequestException("instance profile must be defined for S3"); } if (!cloudStorage.getBaseLocation().startsWith(FileSystemType.S3.getProtocol() + ": throw new BadRequestException("AWS baselocation missing protocol. please specify s3a: } } }  CloudStorageRequest initCloudStorageRequest(DetailedEnvironmentResponse environment,
            ClusterV4Request clusterRequest, SdxCluster sdxCluster, SdxClusterRequest sdxClusterRequest); }
CloudStorageManifester { protected void validateCloudStorage(String cloudPlatform, SdxCloudStorageRequest cloudStorage) { if (CloudPlatform.AWS.name().equalsIgnoreCase(cloudPlatform)) { if (cloudStorage.getS3() == null || StringUtils.isEmpty(cloudStorage.getS3().getInstanceProfile())) { throw new BadRequestException("instance profile must be defined for S3"); } if (!cloudStorage.getBaseLocation().startsWith(FileSystemType.S3.getProtocol() + ": throw new BadRequestException("AWS baselocation missing protocol. please specify s3a: } } }  CloudStorageRequest initCloudStorageRequest(DetailedEnvironmentResponse environment,
            ClusterV4Request clusterRequest, SdxCluster sdxCluster, SdxClusterRequest sdxClusterRequest);  }