@Test public void testRemoveConnectionTemplate() throws Exception { assertEquals(0, domain.getConnectionTemplates().size()); assertTrue(domain.addConnectionTemplate(getTemplate("1.1.1.1/32", null))); assertEquals(1, domain.getConnectionTemplates().size()); assertNull(domain.removeConnectionTemplate(IpPrefixBuilder.getDefaultInstance("0.0.0.0/32"))); assertEquals(1, domain.getConnectionTemplates().size()); assertNotNull(domain.removeConnectionTemplate(IpPrefixBuilder.getDefaultInstance("1.1.1.1/32"))); assertEquals(0, domain.getConnectionTemplates().size()); verify(sxpNode, never()).updateMD5keys(); assertTrue(domain.addConnectionTemplate(getTemplate("1.1.1.1/32", "password"))); assertEquals(1, domain.getConnectionTemplates().size()); assertNull(domain.removeConnectionTemplate(IpPrefixBuilder.getDefaultInstance("0.0.0.0/32"))); assertEquals(1, domain.getConnectionTemplates().size()); assertNotNull(domain.removeConnectionTemplate(IpPrefixBuilder.getDefaultInstance("1.1.1.1/32"))); assertEquals(0, domain.getConnectionTemplates().size()); verify(sxpNode, times(2)).updateMD5keys(); }
public SxpConnectionTemplateFields removeConnectionTemplate(IpPrefix templatePrefix) { SxpConnectionTemplateFields template; synchronized (templates) { template = templates.remove(templatePrefix); } if (template != null && template.getTemplatePassword() != null && !template.getTemplatePassword().isEmpty()) { node.updateMD5keys(); } return template; }
SxpDomain implements AutoCloseable { public SxpConnectionTemplateFields removeConnectionTemplate(IpPrefix templatePrefix) { SxpConnectionTemplateFields template; synchronized (templates) { template = templates.remove(templatePrefix); } if (template != null && template.getTemplatePassword() != null && !template.getTemplatePassword().isEmpty()) { node.updateMD5keys(); } return template; } }
SxpDomain implements AutoCloseable { public SxpConnectionTemplateFields removeConnectionTemplate(IpPrefix templatePrefix) { SxpConnectionTemplateFields template; synchronized (templates) { template = templates.remove(templatePrefix); } if (template != null && template.getTemplatePassword() != null && !template.getTemplatePassword().isEmpty()) { node.updateMD5keys(); } return template; } private  SxpDomain(SxpNode owner, String name, SxpDatabaseInf sxpDatabase, MasterDatabaseInf masterDatabase); }
SxpDomain implements AutoCloseable { public SxpConnectionTemplateFields removeConnectionTemplate(IpPrefix templatePrefix) { SxpConnectionTemplateFields template; synchronized (templates) { template = templates.remove(templatePrefix); } if (template != null && template.getTemplatePassword() != null && !template.getTemplatePassword().isEmpty()) { node.updateMD5keys(); } return template; } private  SxpDomain(SxpNode owner, String name, SxpDatabaseInf sxpDatabase, MasterDatabaseInf masterDatabase); static SxpDomain createInstance(SxpNode owner, String name, SxpDatabaseInf sxpDatabase,
            MasterDatabaseInf masterDatabase); static SxpDomain createInstance(SxpNode owner,
                                           org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.network.topology.topology.node.sxp.domains.SxpDomain domain,
                                           MasterDatabaseInf masterDB,
                                           SxpDatabaseInf sxpDB); static SxpDomain createInstance(SxpNode owner,
            org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.network.topology.topology.node.sxp.domains.SxpDomain domain); Map<String, SxpBindingFilter<?, ? extends SxpDomainFilterFields>> getFilters(); boolean addFilter(SxpBindingFilter<?, ? extends SxpDomainFilterFields> filter); SxpBindingFilter<?, ? extends SxpDomainFilterFields> removeFilter(FilterSpecific specific, String name); boolean updateFilter(SxpBindingFilter<?, ? extends SxpDomainFilterFields> newFilter); void pushToSharedMasterDatabases(final List<T> removed, final List<T> added); void pushToSharedSxpDatabases(NodeId nodeIdRemote, SxpBindingFilter<?, ? extends SxpFilterFields> sxpFilter,
            List<SxpDatabaseBinding> removed, List<SxpDatabaseBinding> added); MasterDatabaseInf getMasterDatabase(); SxpDatabaseInf getSxpDatabase(); String getName(); List<SxpConnection> getConnections(); SxpConnection getConnection(InetSocketAddress address); boolean addConnectionTemplate(T template); SxpConnectionTemplateFields removeConnectionTemplate(IpPrefix templatePrefix); SxpConnectionTemplateFields getTemplate(InetSocketAddress address); Collection<SxpConnectionTemplateFields> getConnectionTemplates(); boolean hasConnection(InetSocketAddress address); SxpConnection putConnection(SxpConnection connection); SxpConnection removeConnection(InetSocketAddress address); @Override void close(); }
SxpDomain implements AutoCloseable { public SxpConnectionTemplateFields removeConnectionTemplate(IpPrefix templatePrefix) { SxpConnectionTemplateFields template; synchronized (templates) { template = templates.remove(templatePrefix); } if (template != null && template.getTemplatePassword() != null && !template.getTemplatePassword().isEmpty()) { node.updateMD5keys(); } return template; } private  SxpDomain(SxpNode owner, String name, SxpDatabaseInf sxpDatabase, MasterDatabaseInf masterDatabase); static SxpDomain createInstance(SxpNode owner, String name, SxpDatabaseInf sxpDatabase,
            MasterDatabaseInf masterDatabase); static SxpDomain createInstance(SxpNode owner,
                                           org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.network.topology.topology.node.sxp.domains.SxpDomain domain,
                                           MasterDatabaseInf masterDB,
                                           SxpDatabaseInf sxpDB); static SxpDomain createInstance(SxpNode owner,
            org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.network.topology.topology.node.sxp.domains.SxpDomain domain); Map<String, SxpBindingFilter<?, ? extends SxpDomainFilterFields>> getFilters(); boolean addFilter(SxpBindingFilter<?, ? extends SxpDomainFilterFields> filter); SxpBindingFilter<?, ? extends SxpDomainFilterFields> removeFilter(FilterSpecific specific, String name); boolean updateFilter(SxpBindingFilter<?, ? extends SxpDomainFilterFields> newFilter); void pushToSharedMasterDatabases(final List<T> removed, final List<T> added); void pushToSharedSxpDatabases(NodeId nodeIdRemote, SxpBindingFilter<?, ? extends SxpFilterFields> sxpFilter,
            List<SxpDatabaseBinding> removed, List<SxpDatabaseBinding> added); MasterDatabaseInf getMasterDatabase(); SxpDatabaseInf getSxpDatabase(); String getName(); List<SxpConnection> getConnections(); SxpConnection getConnection(InetSocketAddress address); boolean addConnectionTemplate(T template); SxpConnectionTemplateFields removeConnectionTemplate(IpPrefix templatePrefix); SxpConnectionTemplateFields getTemplate(InetSocketAddress address); Collection<SxpConnectionTemplateFields> getConnectionTemplates(); boolean hasConnection(InetSocketAddress address); SxpConnection putConnection(SxpConnection connection); SxpConnection removeConnection(InetSocketAddress address); @Override void close();  }