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 processSecurityGroupUpdate(NeutronPort neutronPort) { LOG.trace("processSecurityGroupUpdate:" + neutronPort); /** * Get updated data and original data for the the changed. Identify the security groups that got * added and removed and call the appropriate providers for updating the flows. */ try { List<NeutronSecurityGroup> addedGroup = getsecurityGroupChanged(neutronPort, neutronPort.getOriginalPort()); List<NeutronSecurityGroup> deletedGroup = getsecurityGroupChanged(neutronPort.getOriginalPort(), neutronPort); if (null != addedGroup && !addedGroup.isEmpty()) { securityServicesManager.syncSecurityGroup(neutronPort,addedGroup,true); } if (null != deletedGroup && !deletedGroup.isEmpty()) { securityServicesManager.syncSecurityGroup(neutronPort,deletedGroup,false); } } catch (Exception e) { LOG.error("Exception in processSecurityGroupUpdate", e); } }
this.updatePortInCleanupCache(neutronPort, neutronPort.getOriginalPort()); if (neutronPort.getPortSecurityEnabled()) { this.processSecurityGroupUpdate(neutronPort);