private boolean isPortSecurityEnableUpdated(NeutronPort neutronPort) { LOG.trace("isPortSecuirtyEnableUpdated:" + neutronPort); if (neutronPort != null && neutronPort.getOriginalPort() != null && neutronPort.getOriginalPort().getPortSecurityEnabled() != null && neutronPort.getPortSecurityEnabled() != null && neutronPort.getOriginalPort().getPortSecurityEnabled() != neutronPort .getPortSecurityEnabled()) { return true; } return false; }
private void processPortSecurityEnableUpdated(NeutronPort neutronPort) { LOG.trace("processPortSecurityEnableUpdated:" + neutronPort); securityServicesManager.syncFixedSecurityGroup(neutronPort, neutronPort.getPortSecurityEnabled()); }
@Override public boolean isPortSecurityEnabled(OvsdbTerminationPointAugmentation intf) { NeutronPort neutronPort = getNeutronPortFromCache(intf); if (null == neutronPort) { LOG.error("Neutron Port is null: " + intf); return false; } if (neutronPort.getPortSecurityEnabled()) { LOG.info("Port Security is enabled for Port: " + neutronPort); return true; } LOG.info("Port Security is not enabled for Port: " + neutronPort); return false; }
private void syncSecurityGroup(NeutronSecurityRule securityRule,NeutronPort port, boolean write) { if (!port.getPortSecurityEnabled()) { LOG.info("Port security not enabled port", port); return; } if (null != securityRule.getSecurityRemoteGroupID()) { List<Neutron_IPs> vmIpList = securityServicesManager .getVmListForSecurityGroup(port.getID(), securityRule.getSecurityRemoteGroupID()); for (Neutron_IPs vmIp :vmIpList ) { securityServicesManager.syncSecurityRule(port, securityRule, vmIp, write); } } else { securityServicesManager.syncSecurityRule(port, securityRule, null, write); } }
ans.setPortSecurityEnabled(this.getPortSecurityEnabled());
if (neutronPort.getPortSecurityEnabled() != null) { portSecurityBuilder.setPortSecurityEnabled(neutronPort.getPortSecurityEnabled());
if (neutronPort.getPortSecurityEnabled()) { this.processSecurityGroupUpdate(neutronPort);