Search in sources :

Example 6 with SecurityRuleRequest

use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.security.SecurityRuleRequest in project cloudbreak by hortonworks.

the class StackToCreateFreeIpaRequestConverter method getSecurityRuleRequest.

private SecurityRuleRequest getSecurityRuleRequest(SecurityRule securityRule) {
    SecurityRuleRequest request = null;
    if (securityRule != null) {
        request = new SecurityRuleRequest();
        request.setModifiable(securityRule.isModifiable());
        request.setPorts(Arrays.stream(securityRule.getPorts()).collect(Collectors.toList()));
        request.setProtocol(securityRule.getProtocol());
        request.setSubnet(securityRule.getCidr());
    }
    LOGGER.debug("Created security rule request {} from security rule {}", request, securityRule);
    return request;
}
Also used : SecurityRuleRequest(com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.security.SecurityRuleRequest)

Aggregations

SecurityRuleRequest (com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.security.SecurityRuleRequest)6 SecurityGroupRequest (com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.security.SecurityGroupRequest)3 SecurityGroup (com.sequenceiq.freeipa.entity.SecurityGroup)2 SecurityRule (com.sequenceiq.freeipa.entity.SecurityRule)2 StackTags (com.sequenceiq.cloudbreak.cloud.model.StackTags)1 AwsInstanceTemplate (com.sequenceiq.cloudbreak.cloud.model.instance.AwsInstanceTemplate)1 Json (com.sequenceiq.cloudbreak.common.json.Json)1 BackupRequest (com.sequenceiq.common.api.backup.request.BackupRequest)1 AdlsGen2CloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters)1 GcsCloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.GcsCloudStorageV1Parameters)1 S3CloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters)1 CloudwatchParams (com.sequenceiq.common.api.telemetry.model.CloudwatchParams)1 Features (com.sequenceiq.common.api.telemetry.model.Features)1 Logging (com.sequenceiq.common.api.telemetry.model.Logging)1 Telemetry (com.sequenceiq.common.api.telemetry.model.Telemetry)1 WorkloadAnalytics (com.sequenceiq.common.api.telemetry.model.WorkloadAnalytics)1 TelemetryRequest (com.sequenceiq.common.api.telemetry.request.TelemetryRequest)1 FeatureSetting (com.sequenceiq.common.api.type.FeatureSetting)1 Backup (com.sequenceiq.freeipa.api.model.Backup)1 FreeIpaServerRequest (com.sequenceiq.freeipa.api.v1.freeipa.stack.model.FreeIpaServerRequest)1