use of com.sequenceiq.common.api.type.ServiceEndpointCreation in project cloudbreak by hortonworks.
the class AzureCloudProviderAssertion method assertServiceEndpoint.
@Override
public void assertServiceEndpoint(EnvironmentTestDto environmentTestDto) {
ServiceEndpointCreation serviceEndpointCreationRequest = Optional.ofNullable(environmentTestDto.getRequest().getNetwork().getServiceEndpointCreation()).orElse(ServiceEndpointCreation.DISABLED);
ServiceEndpointCreation serviceEndpointCreationResponse = environmentTestDto.getResponse().getNetwork().getServiceEndpointCreation();
if (serviceEndpointCreationRequest != serviceEndpointCreationResponse) {
String message = String.format("Service endpoint creation in request (%s) does not match that in response (%s)", serviceEndpointCreationRequest, serviceEndpointCreationResponse);
LOGGER.error(message);
throw new TestFailException(message);
}
String databasePrivateDnsZoneIdRequest = environmentTestDto.getRequest().getNetwork().getAzure().getDatabasePrivateDnsZoneId();
String databasePrivateDnsZoneIdResponse = environmentTestDto.getResponse().getNetwork().getAzure().getDatabasePrivateDnsZoneId();
if (StringUtils.isNotEmpty(databasePrivateDnsZoneIdRequest) && !databasePrivateDnsZoneIdRequest.equals(databasePrivateDnsZoneIdResponse)) {
String message = String.format("Private DNS zone id for database was requested to be %s, but is %s", databasePrivateDnsZoneIdRequest, databasePrivateDnsZoneIdResponse);
LOGGER.error(message);
throw new TestFailException(message);
}
}
Aggregations