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;
}
Aggregations