@Test public void test_SubtreeModified() { when(networkModif.getModificationType()).thenReturn(DataObjectModification.ModificationType.SUBTREE_MODIFIED); when(rootNode.getDataBefore()).thenReturn(oldNeutronBefore); when(rootNode.getDataAfter()).thenReturn(oldNeutronAfter); mapper.onDataTreeChanged(changes); }
@Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Neutron>> changes) { for (DataTreeModification<Neutron> change : changes) { DataObjectModification<Neutron> neutronModif = change.getRootNode(); resolveAndSetNeutron(neutronModif); List<DataObjectModification<Network>> networkModifs = findModifiedData(NeutronNetworkAware.NETWORK_WILDCARD_IID, neutronModif); for (Uuid tenantFromCreatedRouterExternalNetwork : filterCreatedRouterExternalNetworksAndTransformToTenants( networkModifs)) { SecurityGroup eigSecGroup = EIG_SEC_GROUP_BUILDER.setTenantId(tenantFromCreatedRouterExternalNetwork).build(); securityGroupAware.onCreated(eigSecGroup, neutronAfter); List<SecurityRule> eigSecRules = createEigSecurityRules(tenantFromCreatedRouterExternalNetwork); for (SecurityRule eigSecRule : eigSecRules) { securityRuleAware.onCreated(eigSecRule, neutronAfter); } } onDataObjectModification(networkModifs, networkAware); List<DataObjectModification<SecurityGroup>> secGroupModifs = findModifiedData(NeutronSecurityGroupAware.SECURITY_GROUP_WILDCARD_IID, neutronModif); onDataObjectModification(secGroupModifs, securityGroupAware); List<DataObjectModification<SecurityRule>> secRuleModifs = findModifiedData(NeutronSecurityRuleAware.SECURITY_RULE_WILDCARD_IID, neutronModif); onDataObjectModification(secRuleModifs, securityRuleAware); List<DataObjectModification<Subnet>> subnetModifs = findModifiedData(NeutronSubnetAware.SUBNET_WILDCARD_IID, neutronModif); onDataObjectModification(subnetModifs, subnetAware); List<DataObjectModification<Port>> portModifs = findModifiedData(NeutronPortAware.PORT_WILDCARD_IID, neutronModif); onDataObjectModification(portModifs, portAware); List<DataObjectModification<Router>> routerModifs = findModifiedData(NeutronRouterAware.ROUTER_WILDCARD_IID, neutronModif); onDataObjectModification(routerModifs, routerAware); List<DataObjectModification<Floatingip>> floatingIpModifs = findModifiedData(NeutronFloatingIpAware.FLOATING_IP_WILDCARD_IID, neutronModif); onDataObjectModification(floatingIpModifs, floatingIpAware); } }
NeutronMapper implements ClusteredDataTreeChangeListener<Neutron>, AutoCloseable { @Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Neutron>> changes) { for (DataTreeModification<Neutron> change : changes) { DataObjectModification<Neutron> neutronModif = change.getRootNode(); resolveAndSetNeutron(neutronModif); List<DataObjectModification<Network>> networkModifs = findModifiedData(NeutronNetworkAware.NETWORK_WILDCARD_IID, neutronModif); for (Uuid tenantFromCreatedRouterExternalNetwork : filterCreatedRouterExternalNetworksAndTransformToTenants( networkModifs)) { SecurityGroup eigSecGroup = EIG_SEC_GROUP_BUILDER.setTenantId(tenantFromCreatedRouterExternalNetwork).build(); securityGroupAware.onCreated(eigSecGroup, neutronAfter); List<SecurityRule> eigSecRules = createEigSecurityRules(tenantFromCreatedRouterExternalNetwork); for (SecurityRule eigSecRule : eigSecRules) { securityRuleAware.onCreated(eigSecRule, neutronAfter); } } onDataObjectModification(networkModifs, networkAware); List<DataObjectModification<SecurityGroup>> secGroupModifs = findModifiedData(NeutronSecurityGroupAware.SECURITY_GROUP_WILDCARD_IID, neutronModif); onDataObjectModification(secGroupModifs, securityGroupAware); List<DataObjectModification<SecurityRule>> secRuleModifs = findModifiedData(NeutronSecurityRuleAware.SECURITY_RULE_WILDCARD_IID, neutronModif); onDataObjectModification(secRuleModifs, securityRuleAware); List<DataObjectModification<Subnet>> subnetModifs = findModifiedData(NeutronSubnetAware.SUBNET_WILDCARD_IID, neutronModif); onDataObjectModification(subnetModifs, subnetAware); List<DataObjectModification<Port>> portModifs = findModifiedData(NeutronPortAware.PORT_WILDCARD_IID, neutronModif); onDataObjectModification(portModifs, portAware); List<DataObjectModification<Router>> routerModifs = findModifiedData(NeutronRouterAware.ROUTER_WILDCARD_IID, neutronModif); onDataObjectModification(routerModifs, routerAware); List<DataObjectModification<Floatingip>> floatingIpModifs = findModifiedData(NeutronFloatingIpAware.FLOATING_IP_WILDCARD_IID, neutronModif); onDataObjectModification(floatingIpModifs, floatingIpAware); } } }
NeutronMapper implements ClusteredDataTreeChangeListener<Neutron>, AutoCloseable { @Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Neutron>> changes) { for (DataTreeModification<Neutron> change : changes) { DataObjectModification<Neutron> neutronModif = change.getRootNode(); resolveAndSetNeutron(neutronModif); List<DataObjectModification<Network>> networkModifs = findModifiedData(NeutronNetworkAware.NETWORK_WILDCARD_IID, neutronModif); for (Uuid tenantFromCreatedRouterExternalNetwork : filterCreatedRouterExternalNetworksAndTransformToTenants( networkModifs)) { SecurityGroup eigSecGroup = EIG_SEC_GROUP_BUILDER.setTenantId(tenantFromCreatedRouterExternalNetwork).build(); securityGroupAware.onCreated(eigSecGroup, neutronAfter); List<SecurityRule> eigSecRules = createEigSecurityRules(tenantFromCreatedRouterExternalNetwork); for (SecurityRule eigSecRule : eigSecRules) { securityRuleAware.onCreated(eigSecRule, neutronAfter); } } onDataObjectModification(networkModifs, networkAware); List<DataObjectModification<SecurityGroup>> secGroupModifs = findModifiedData(NeutronSecurityGroupAware.SECURITY_GROUP_WILDCARD_IID, neutronModif); onDataObjectModification(secGroupModifs, securityGroupAware); List<DataObjectModification<SecurityRule>> secRuleModifs = findModifiedData(NeutronSecurityRuleAware.SECURITY_RULE_WILDCARD_IID, neutronModif); onDataObjectModification(secRuleModifs, securityRuleAware); List<DataObjectModification<Subnet>> subnetModifs = findModifiedData(NeutronSubnetAware.SUBNET_WILDCARD_IID, neutronModif); onDataObjectModification(subnetModifs, subnetAware); List<DataObjectModification<Port>> portModifs = findModifiedData(NeutronPortAware.PORT_WILDCARD_IID, neutronModif); onDataObjectModification(portModifs, portAware); List<DataObjectModification<Router>> routerModifs = findModifiedData(NeutronRouterAware.ROUTER_WILDCARD_IID, neutronModif); onDataObjectModification(routerModifs, routerAware); List<DataObjectModification<Floatingip>> floatingIpModifs = findModifiedData(NeutronFloatingIpAware.FLOATING_IP_WILDCARD_IID, neutronModif); onDataObjectModification(floatingIpModifs, floatingIpAware); } } NeutronMapper(DataBroker dataProvider, EndpointService epService, BaseEndpointService baseEpService,
        @Nullable IpPrefix metadataIpPrefix, long metadataTcpPort); }
NeutronMapper implements ClusteredDataTreeChangeListener<Neutron>, AutoCloseable { @Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Neutron>> changes) { for (DataTreeModification<Neutron> change : changes) { DataObjectModification<Neutron> neutronModif = change.getRootNode(); resolveAndSetNeutron(neutronModif); List<DataObjectModification<Network>> networkModifs = findModifiedData(NeutronNetworkAware.NETWORK_WILDCARD_IID, neutronModif); for (Uuid tenantFromCreatedRouterExternalNetwork : filterCreatedRouterExternalNetworksAndTransformToTenants( networkModifs)) { SecurityGroup eigSecGroup = EIG_SEC_GROUP_BUILDER.setTenantId(tenantFromCreatedRouterExternalNetwork).build(); securityGroupAware.onCreated(eigSecGroup, neutronAfter); List<SecurityRule> eigSecRules = createEigSecurityRules(tenantFromCreatedRouterExternalNetwork); for (SecurityRule eigSecRule : eigSecRules) { securityRuleAware.onCreated(eigSecRule, neutronAfter); } } onDataObjectModification(networkModifs, networkAware); List<DataObjectModification<SecurityGroup>> secGroupModifs = findModifiedData(NeutronSecurityGroupAware.SECURITY_GROUP_WILDCARD_IID, neutronModif); onDataObjectModification(secGroupModifs, securityGroupAware); List<DataObjectModification<SecurityRule>> secRuleModifs = findModifiedData(NeutronSecurityRuleAware.SECURITY_RULE_WILDCARD_IID, neutronModif); onDataObjectModification(secRuleModifs, securityRuleAware); List<DataObjectModification<Subnet>> subnetModifs = findModifiedData(NeutronSubnetAware.SUBNET_WILDCARD_IID, neutronModif); onDataObjectModification(subnetModifs, subnetAware); List<DataObjectModification<Port>> portModifs = findModifiedData(NeutronPortAware.PORT_WILDCARD_IID, neutronModif); onDataObjectModification(portModifs, portAware); List<DataObjectModification<Router>> routerModifs = findModifiedData(NeutronRouterAware.ROUTER_WILDCARD_IID, neutronModif); onDataObjectModification(routerModifs, routerAware); List<DataObjectModification<Floatingip>> floatingIpModifs = findModifiedData(NeutronFloatingIpAware.FLOATING_IP_WILDCARD_IID, neutronModif); onDataObjectModification(floatingIpModifs, floatingIpAware); } } NeutronMapper(DataBroker dataProvider, EndpointService epService, BaseEndpointService baseEpService,
        @Nullable IpPrefix metadataIpPrefix, long metadataTcpPort); @Override void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Neutron>> changes); @Override void close(); }
NeutronMapper implements ClusteredDataTreeChangeListener<Neutron>, AutoCloseable { @Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Neutron>> changes) { for (DataTreeModification<Neutron> change : changes) { DataObjectModification<Neutron> neutronModif = change.getRootNode(); resolveAndSetNeutron(neutronModif); List<DataObjectModification<Network>> networkModifs = findModifiedData(NeutronNetworkAware.NETWORK_WILDCARD_IID, neutronModif); for (Uuid tenantFromCreatedRouterExternalNetwork : filterCreatedRouterExternalNetworksAndTransformToTenants( networkModifs)) { SecurityGroup eigSecGroup = EIG_SEC_GROUP_BUILDER.setTenantId(tenantFromCreatedRouterExternalNetwork).build(); securityGroupAware.onCreated(eigSecGroup, neutronAfter); List<SecurityRule> eigSecRules = createEigSecurityRules(tenantFromCreatedRouterExternalNetwork); for (SecurityRule eigSecRule : eigSecRules) { securityRuleAware.onCreated(eigSecRule, neutronAfter); } } onDataObjectModification(networkModifs, networkAware); List<DataObjectModification<SecurityGroup>> secGroupModifs = findModifiedData(NeutronSecurityGroupAware.SECURITY_GROUP_WILDCARD_IID, neutronModif); onDataObjectModification(secGroupModifs, securityGroupAware); List<DataObjectModification<SecurityRule>> secRuleModifs = findModifiedData(NeutronSecurityRuleAware.SECURITY_RULE_WILDCARD_IID, neutronModif); onDataObjectModification(secRuleModifs, securityRuleAware); List<DataObjectModification<Subnet>> subnetModifs = findModifiedData(NeutronSubnetAware.SUBNET_WILDCARD_IID, neutronModif); onDataObjectModification(subnetModifs, subnetAware); List<DataObjectModification<Port>> portModifs = findModifiedData(NeutronPortAware.PORT_WILDCARD_IID, neutronModif); onDataObjectModification(portModifs, portAware); List<DataObjectModification<Router>> routerModifs = findModifiedData(NeutronRouterAware.ROUTER_WILDCARD_IID, neutronModif); onDataObjectModification(routerModifs, routerAware); List<DataObjectModification<Floatingip>> floatingIpModifs = findModifiedData(NeutronFloatingIpAware.FLOATING_IP_WILDCARD_IID, neutronModif); onDataObjectModification(floatingIpModifs, floatingIpAware); } } NeutronMapper(DataBroker dataProvider, EndpointService epService, BaseEndpointService baseEpService,
        @Nullable IpPrefix metadataIpPrefix, long metadataTcpPort); @Override void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Neutron>> changes); @Override void close();  }