class AzureRegionHelper implements CloudRegionHelper<AzureRegion, AzureRegionCredentials> {

    void validateStoragePolicy(final AzurePolicy policy) {
        if (Objects.isNull(policy) ||
                (StringUtils.isBlank(policy.getIpMax()) && StringUtils.isBlank(policy.getIpMin()))) {
            return;
        }

        Assert.isTrue(StringUtils.isNotBlank(policy.getIpMax()) && StringUtils.isNotBlank(policy.getIpMin()),
                messageHelper.getMessage(MessageConstants.ERROR_AZURE_IP_RANGE_IS_INVALID, policy.getIpMax(),
                        policy.getIpMin()));
        Assert.isTrue(NetworkUtils.isValidIpAddress(policy.getIpMax()),
                messageHelper.getMessage(MessageConstants.ERROR_AZURE_IP_IS_INVALID, policy.getIpMax()));
        Assert.isTrue(NetworkUtils.isValidIpAddress(policy.getIpMin()),
                messageHelper.getMessage(MessageConstants.ERROR_AZURE_IP_IS_INVALID, policy.getIpMin()));
        Assert.isTrue(NetworkUtils.isIpRangeValid(policy), messageHelper
                .getMessage(MessageConstants.ERROR_AZURE_IP_RANGE_IS_INVALID, policy.getIpMax(), policy.getIpMin()));
    }

}