@Test void getNoSqlTables() { CloudNoSqlTables expected = new CloudNoSqlTables(List.of(new CloudNoSqlTable("a"), new CloudNoSqlTable("b"))); GetPlatformNoSqlTablesResult response = new GetPlatformNoSqlTablesResult(1L, expected); doAnswer(invocation -> { Event<GetPlatformNoSqlTablesRequest> ev = invocation.getArgument(1); ev.getData().getResult().onNext(response); return null; }).when(eventBus).notify(anyString(), any(Event.class)); CloudNoSqlTables noSqlTables = underTest.getNoSqlTables( new ExtendedCloudCredential( new CloudCredential("id", "name"), "aws", "desc", "crn", "account"), "region", "aws", null); assertEquals(expected, noSqlTables); }
@Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) public CloudNoSqlTables getNoSqlTables(ExtendedCloudCredential cloudCredential, String region, String platformVariant, Map<String, String> filters) { LOGGER.debug("Get platform noSqlTables"); GetPlatformNoSqlTablesRequest request = new GetPlatformNoSqlTablesRequest(cloudCredential, cloudCredential, platformVariant, region, null); eventBus.notify(request.selector(), Event.wrap(request)); try { GetPlatformNoSqlTablesResult result = request.await(); LOGGER.debug("Platform NoSqlTablesResult result: {}", result); if (result.getStatus().equals(EventStatus.FAILED)) { LOGGER.debug("Failed to get platform NoSqlTablesResult", result.getErrorDetails()); throw new GetCloudParameterException(String.format("Failed to get NoSQL tables for the cloud provider: %s. %s", result.getStatusReason(), getCauseMessages(result.getErrorDetails())), result.getErrorDetails()); } return result.getNoSqlTables(); } catch (InterruptedException e) { LOGGER.error("Error while getting the platform NoSqlTablesResult", e); throw new OperationException(e); } }
CloudParameterService { @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) public CloudNoSqlTables getNoSqlTables(ExtendedCloudCredential cloudCredential, String region, String platformVariant, Map<String, String> filters) { LOGGER.debug("Get platform noSqlTables"); GetPlatformNoSqlTablesRequest request = new GetPlatformNoSqlTablesRequest(cloudCredential, cloudCredential, platformVariant, region, null); eventBus.notify(request.selector(), Event.wrap(request)); try { GetPlatformNoSqlTablesResult result = request.await(); LOGGER.debug("Platform NoSqlTablesResult result: {}", result); if (result.getStatus().equals(EventStatus.FAILED)) { LOGGER.debug("Failed to get platform NoSqlTablesResult", result.getErrorDetails()); throw new GetCloudParameterException(String.format("Failed to get NoSQL tables for the cloud provider: %s. %s", result.getStatusReason(), getCauseMessages(result.getErrorDetails())), result.getErrorDetails()); } return result.getNoSqlTables(); } catch (InterruptedException e) { LOGGER.error("Error while getting the platform NoSqlTablesResult", e); throw new OperationException(e); } } }
CloudParameterService { @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) public CloudNoSqlTables getNoSqlTables(ExtendedCloudCredential cloudCredential, String region, String platformVariant, Map<String, String> filters) { LOGGER.debug("Get platform noSqlTables"); GetPlatformNoSqlTablesRequest request = new GetPlatformNoSqlTablesRequest(cloudCredential, cloudCredential, platformVariant, region, null); eventBus.notify(request.selector(), Event.wrap(request)); try { GetPlatformNoSqlTablesResult result = request.await(); LOGGER.debug("Platform NoSqlTablesResult result: {}", result); if (result.getStatus().equals(EventStatus.FAILED)) { LOGGER.debug("Failed to get platform NoSqlTablesResult", result.getErrorDetails()); throw new GetCloudParameterException(String.format("Failed to get NoSQL tables for the cloud provider: %s. %s", result.getStatusReason(), getCauseMessages(result.getErrorDetails())), result.getErrorDetails()); } return result.getNoSqlTables(); } catch (InterruptedException e) { LOGGER.error("Error while getting the platform NoSqlTablesResult", e); throw new OperationException(e); } }  }
CloudParameterService { @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) public CloudNoSqlTables getNoSqlTables(ExtendedCloudCredential cloudCredential, String region, String platformVariant, Map<String, String> filters) { LOGGER.debug("Get platform noSqlTables"); GetPlatformNoSqlTablesRequest request = new GetPlatformNoSqlTablesRequest(cloudCredential, cloudCredential, platformVariant, region, null); eventBus.notify(request.selector(), Event.wrap(request)); try { GetPlatformNoSqlTablesResult result = request.await(); LOGGER.debug("Platform NoSqlTablesResult result: {}", result); if (result.getStatus().equals(EventStatus.FAILED)) { LOGGER.debug("Failed to get platform NoSqlTablesResult", result.getErrorDetails()); throw new GetCloudParameterException(String.format("Failed to get NoSQL tables for the cloud provider: %s. %s", result.getStatusReason(), getCauseMessages(result.getErrorDetails())), result.getErrorDetails()); } return result.getNoSqlTables(); } catch (InterruptedException e) { LOGGER.error("Error while getting the platform NoSqlTablesResult", e); throw new OperationException(e); } }  @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) PlatformVariants getPlatformVariants(); String getPlatformByVariant(String requestedVariant); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) PlatformDisks getDiskTypes(); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) PlatformRegions getRegions(); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) PlatformOrchestrators getOrchestrators(); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) Map<Platform, PlatformParameters> getPlatformParameters(); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudNetworks getCloudNetworks(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudSshKeys getCloudSshKeys(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudSecurityGroups getSecurityGroups(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); SpecialParameters getSpecialParameters(); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) VmRecommendations getRecommendation(String platform); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudVmTypes getVmTypesV2(ExtendedCloudCredential cloudCredential, String region, String variant,
            CdpResourceType stackType, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudRegions getRegionsV2(ExtendedCloudCredential cloudCredential, String region, String variant,
            Map<String, String> filters, boolean availabilityZonesNeeded); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudGateWays getGateways(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudIpPools getPublicIpPools(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudAccessConfigs getCloudAccessConfigs(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudEncryptionKeys getCloudEncryptionKeys(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) Map<String, InstanceGroupParameterResponse> getInstanceGroupParameters(ExtendedCloudCredential cloudCredential,
            Set<InstanceGroupParameterRequest> instanceGroups); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudNoSqlTables getNoSqlTables(ExtendedCloudCredential cloudCredential, String region, String platformVariant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudResourceGroups getResourceGroups(ExtendedCloudCredential cloudCredential, String region, String platformVariant, Map<String, String> filters); }
CloudParameterService { @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) public CloudNoSqlTables getNoSqlTables(ExtendedCloudCredential cloudCredential, String region, String platformVariant, Map<String, String> filters) { LOGGER.debug("Get platform noSqlTables"); GetPlatformNoSqlTablesRequest request = new GetPlatformNoSqlTablesRequest(cloudCredential, cloudCredential, platformVariant, region, null); eventBus.notify(request.selector(), Event.wrap(request)); try { GetPlatformNoSqlTablesResult result = request.await(); LOGGER.debug("Platform NoSqlTablesResult result: {}", result); if (result.getStatus().equals(EventStatus.FAILED)) { LOGGER.debug("Failed to get platform NoSqlTablesResult", result.getErrorDetails()); throw new GetCloudParameterException(String.format("Failed to get NoSQL tables for the cloud provider: %s. %s", result.getStatusReason(), getCauseMessages(result.getErrorDetails())), result.getErrorDetails()); } return result.getNoSqlTables(); } catch (InterruptedException e) { LOGGER.error("Error while getting the platform NoSqlTablesResult", e); throw new OperationException(e); } }  @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) PlatformVariants getPlatformVariants(); String getPlatformByVariant(String requestedVariant); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) PlatformDisks getDiskTypes(); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) PlatformRegions getRegions(); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) PlatformOrchestrators getOrchestrators(); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) Map<Platform, PlatformParameters> getPlatformParameters(); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudNetworks getCloudNetworks(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudSshKeys getCloudSshKeys(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudSecurityGroups getSecurityGroups(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); SpecialParameters getSpecialParameters(); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) VmRecommendations getRecommendation(String platform); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudVmTypes getVmTypesV2(ExtendedCloudCredential cloudCredential, String region, String variant,
            CdpResourceType stackType, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudRegions getRegionsV2(ExtendedCloudCredential cloudCredential, String region, String variant,
            Map<String, String> filters, boolean availabilityZonesNeeded); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudGateWays getGateways(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudIpPools getPublicIpPools(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudAccessConfigs getCloudAccessConfigs(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudEncryptionKeys getCloudEncryptionKeys(ExtendedCloudCredential cloudCredential, String region, String variant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) Map<String, InstanceGroupParameterResponse> getInstanceGroupParameters(ExtendedCloudCredential cloudCredential,
            Set<InstanceGroupParameterRequest> instanceGroups); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudNoSqlTables getNoSqlTables(ExtendedCloudCredential cloudCredential, String region, String platformVariant, Map<String, String> filters); @Retryable(value = GetCloudParameterException.class, maxAttempts = 5, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000)) CloudResourceGroups getResourceGroups(ExtendedCloudCredential cloudCredential, String region, String platformVariant, Map<String, String> filters); static final String ACCESS_CONFIG_TYPE; }