Search in sources :

Example 1 with DeleteDnsEntryResponse

use of com.cloudera.thunderhead.service.publicendpointmanagement.PublicEndpointManagementProto.DeleteDnsEntryResponse in project cloudbreak by hortonworks.

the class GrpcClusterDnsClient method deleteDnsEntryWithIp.

public DeleteDnsEntryResponse deleteDnsEntryWithIp(String accountId, String endpoint, String environment, boolean wildcard, List<String> ips, Optional<String> requestId) {
    try (ManagedChannelWrapper channelWrapper = makeWrapper()) {
        ClusterDnsClient client = makeClient(channelWrapper.getChannel(), regionAwareInternalCrnGeneratorFactory.iam().getInternalCrnForServiceAsString());
        LOGGER.info("Delete a dns entry with account id: {} and requestId: {} for ips: {}", accountId, requestId, String.join(",", ips));
        DeleteDnsEntryResponse response = client.deleteDnsEntryWithIp(requestId.orElse(UUID.randomUUID().toString()), accountId, endpoint, environment, wildcard, ips);
        LOGGER.info("Dns entry deletion finished for ips {}", String.join(",", ips));
        return response;
    }
}
Also used : ManagedChannelWrapper(com.sequenceiq.cloudbreak.grpc.ManagedChannelWrapper) DeleteDnsEntryResponse(com.cloudera.thunderhead.service.publicendpointmanagement.PublicEndpointManagementProto.DeleteDnsEntryResponse)

Example 2 with DeleteDnsEntryResponse

use of com.cloudera.thunderhead.service.publicendpointmanagement.PublicEndpointManagementProto.DeleteDnsEntryResponse in project cloudbreak by hortonworks.

the class GrpcClusterDnsClient method deleteDnsEntryWithCloudDns.

public DeleteDnsEntryResponse deleteDnsEntryWithCloudDns(String accountId, String endpoint, String environment, String cloudDns, String hostedZoneId, Optional<String> requestId) {
    try (ManagedChannelWrapper channelWrapper = makeWrapper()) {
        ClusterDnsClient client = makeClient(channelWrapper.getChannel(), regionAwareInternalCrnGeneratorFactory.iam().getInternalCrnForServiceAsString());
        LOGGER.info("Delete a dns entry with account id: {} and requestId: {} for cloud DNS: {}", accountId, requestId, client);
        DeleteDnsEntryResponse response = client.deleteDnsEntryWithCloudDns(requestId.orElse(UUID.randomUUID().toString()), accountId, endpoint, environment, cloudDns, hostedZoneId);
        LOGGER.info("Dns entry deletion finished for cloud DNS {}", cloudDns);
        return response;
    }
}
Also used : ManagedChannelWrapper(com.sequenceiq.cloudbreak.grpc.ManagedChannelWrapper) DeleteDnsEntryResponse(com.cloudera.thunderhead.service.publicendpointmanagement.PublicEndpointManagementProto.DeleteDnsEntryResponse)

Aggregations

DeleteDnsEntryResponse (com.cloudera.thunderhead.service.publicendpointmanagement.PublicEndpointManagementProto.DeleteDnsEntryResponse)2 ManagedChannelWrapper (com.sequenceiq.cloudbreak.grpc.ManagedChannelWrapper)2