EndpointRpc provider in groupbasedpolicy 47/29747/6
authorMatej Perina <matej.perina@pantheon.sk>
Tue, 24 Nov 2015 10:22:05 +0000 (11:22 +0100)
committerMartin Sunal <msunal@cisco.com>
Thu, 26 Nov 2015 08:33:59 +0000 (08:33 +0000)
EndpointRpcService is changed to be created by groupbasedpolicy modul
and renderers only register their EpRendererAugmentation implementation

Change-Id: I223346b6d89b82e05fe83935b0e90bfe1b9cb0e8
Signed-off-by: Matej Perina <matej.perina@pantheon.sk>
groupbasedpolicy/src/main/config/default-config.xml
groupbasedpolicy/src/main/java/org/opendaylight/controller/config/yang/config/groupbasedpolicy/impl/GroupbasedpolicyModule.java
groupbasedpolicy/src/main/java/org/opendaylight/groupbasedpolicy/endpoint/EndpointRpcRegistry.java
groupbasedpolicy/src/main/yang/groupbasedpolicy-impl.yang
groupbasedpolicy/src/test/java/org/opendaylight/groupbasedpolicy/endpoint/EndPointRpcRegistryTest.java
renderers/ofoverlay/src/main/java/org/opendaylight/groupbasedpolicy/renderer/ofoverlay/OFOverlayRenderer.java
renderers/ofoverlay/src/main/java/org/opendaylight/groupbasedpolicy/renderer/ofoverlay/endpoint/OfOverlayAug.java
renderers/ofoverlay/src/main/java/org/opendaylight/groupbasedpolicy/renderer/ofoverlay/endpoint/OfOverlayL3NatAug.java

index 3f684ca40cc5e98492c7ac138c7f1266f5c5440d..aae50e1758e53e1694f1b60eddb2be51505e4760 100755 (executable)
                         <name>binding-data-broker</name>
                     </data-broker>
 
+                    <rpc-registry>
+                        <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
+                        <name>binding-rpc-broker</name>
+                    </rpc-registry>
+
                 </module>
             </modules>
         </data>
index 087c8e5998671155feaadf86d3f1a3d0f937a0a5..fa99d569d89540d69aebf2568cd9f46ea07de909 100755 (executable)
@@ -8,13 +8,18 @@
 
 package org.opendaylight.controller.config.yang.config.groupbasedpolicy.impl;
 
-import com.google.common.base.Preconditions;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
+import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
+import org.opendaylight.groupbasedpolicy.endpoint.EndpointRpcRegistry;
 import org.opendaylight.groupbasedpolicy.sf.SubjectFeatureDefinitionProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.base.Preconditions;
+
+
+
 public class GroupbasedpolicyModule extends
         org.opendaylight.controller.config.yang.config.groupbasedpolicy.impl.AbstractGroupbasedpolicyModule {
 
@@ -46,12 +51,24 @@ public class GroupbasedpolicyModule extends
      */
     @Override
     public java.lang.AutoCloseable createInstance() {
-        DataBroker dataProvider = Preconditions.checkNotNull(getDataBrokerDependency());
+        final DataBroker dataProvider = Preconditions.checkNotNull(getDataBrokerDependency());
+        final RpcProviderRegistry rpcRegistry = Preconditions.checkNotNull(getRpcRegistryDependency());
 
         try {
-            return new SubjectFeatureDefinitionProvider(dataProvider);
+            return new AutoCloseable() {
+
+                SubjectFeatureDefinitionProvider sfdp = new SubjectFeatureDefinitionProvider(dataProvider);
+                EndpointRpcRegistry epRpcRegistry = new EndpointRpcRegistry(dataProvider, rpcRegistry);
+
+                @Override
+                public void close() throws Exception {
+                    sfdp.close();
+                    epRpcRegistry.close();
+                }
+            };
         } catch (TransactionCommitFailedException e) {
-            LOG.error("Error creating instance of SubjectFeatureDefinitionProvider; Subject Feature Definitions were not put to Datastore");
+            LOG.error(
+                    "Error creating instance of SubjectFeatureDefinitionProvider; Subject Feature Definitions were not put to Datastore");
             throw new RuntimeException(e);
         }
     }
index 8136c6edc8ea67bbc46e435b81e8ecce41c878e7..b77f4635e4cb1f41a91065b9b4e21baf3d3111d2 100644 (file)
@@ -11,9 +11,7 @@ package org.opendaylight.groupbasedpolicy.endpoint;
 import java.util.Map.Entry;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
-import java.util.concurrent.ScheduledExecutorService;
 
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
@@ -63,56 +61,30 @@ import com.google.common.util.concurrent.ListenableFuture;
  * Endpoint registry provides a scalable store for accessing and updating
  * information about endpoints.
  */
-public class EndpointRpcRegistry implements EndpointService {
+public class EndpointRpcRegistry implements EndpointService, AutoCloseable {
     private static final Logger LOG =
             LoggerFactory.getLogger(EndpointRpcRegistry.class);
 
     private final DataBroker dataProvider;
-    private final ScheduledExecutorService executor;
     private final RpcProviderRegistry rpcRegistry;
-    private static EndpointRpcRegistry endpointRpcRegistry;
 
-    final BindingAwareBroker.RpcRegistration<EndpointService> rpcRegistration;
+    private final BindingAwareBroker.RpcRegistration<EndpointService> rpcRegistration;
 
-    private final static ConcurrentMap<String, EpRendererAugmentation> registeredRenderers = new ConcurrentHashMap<String, EpRendererAugmentation>();
+    final static ConcurrentMap<String, EpRendererAugmentation> registeredRenderers = new ConcurrentHashMap<String, EpRendererAugmentation>();
 
     /**
      * This method registers a renderer for endpoint RPC API. This method
      * ensures single RPC registration for all renderers since a single RPC
      * registration is only allowed.
      *
-     * @param dataProvider
-     *            - the dataProvider
-     * @param rpcRegistry
-     *            - the rpcRegistry
      * @param epRendererAugmentation
      *            - specific implementation RPC augmentation, if any. Otherwise
      *            NULL
      */
-    public static void register(DataBroker dataProvider,
-            RpcProviderRegistry rpcRegistry,
-            EpRendererAugmentation epRendererAugmentation) {
-        if (dataProvider == null || rpcRegistry == null) {
-            if (epRendererAugmentation != null) {
-                LOG.warn("Couldn't register class {} for endpoint RPC because of missing required info", epRendererAugmentation);
-            }
-            return;
-        }
-        if (endpointRpcRegistry == null) {
-            synchronized (EndpointRpcRegistry.class) {
-                if (endpointRpcRegistry == null) {
-                    ScheduledExecutorService executor = Executors
-                            .newScheduledThreadPool(Math
-                                    .max(Runtime.getRuntime()
-                                            .availableProcessors() * 3, 10));
-                    endpointRpcRegistry = new EndpointRpcRegistry(dataProvider,
-                            rpcRegistry, executor);
-                }
-            }
-        }
+    public static void register(EpRendererAugmentation epRendererAugmentation) {
         if (epRendererAugmentation != null) {
-            registeredRenderers.putIfAbsent(epRendererAugmentation.getClass()
-                    .getName(), epRendererAugmentation);
+            registeredRenderers.putIfAbsent(epRendererAugmentation.getClass().getName(), epRendererAugmentation);
+            LOG.info("Registered {}", epRendererAugmentation.getClass().getName());
         }
     }
 
@@ -121,25 +93,12 @@ public class EndpointRpcRegistry implements EndpointService {
      * @param regImp the endpoint augmentation
      * @throws Exception
      */
-    public static void unregister(EpRendererAugmentation regImp)
-            throws Exception {
-        if (regImp == null
-                || !registeredRenderers
-                        .containsKey(regImp.getClass().getName())) {
+    public static void unregister(EpRendererAugmentation regImp) throws Exception {
+        if (regImp == null || !registeredRenderers.containsKey(regImp.getClass().getName())) {
             return;
         }
         registeredRenderers.remove(regImp.getClass().getName());
         LOG.info("Unregistered {}", regImp.getClass().getName());
-        if (registeredRenderers.isEmpty() && endpointRpcRegistry != null) {
-            synchronized (EndpointRpcRegistry.class) {
-                if (registeredRenderers.isEmpty() && endpointRpcRegistry != null
-                        && endpointRpcRegistry.rpcRegistration != null) {
-                    endpointRpcRegistry.rpcRegistration.close();
-                    endpointRpcRegistry.executor.shutdown();
-                    endpointRpcRegistry = null;
-                }
-            }
-        }
     }
 
     public static Class<?> getAugmentationContextType(
@@ -169,15 +128,10 @@ public class EndpointRpcRegistry implements EndpointService {
      *
      * @param dataProvider the {@link DataBroker}
      * @param rpcRegistry  the {@link RpcProviderRegistry}
-     * @param executor     the {@link ScheduledExecutorService}
      */
-    private EndpointRpcRegistry(DataBroker dataProvider,
-            RpcProviderRegistry rpcRegistry,
-            ScheduledExecutorService executor) {
+    public EndpointRpcRegistry(DataBroker dataProvider, RpcProviderRegistry rpcRegistry) {
         this.dataProvider = dataProvider;
-        this.executor = executor;
         this.rpcRegistry = rpcRegistry;
-
         if (this.rpcRegistry != null) {
             rpcRegistration =
                     this.rpcRegistry.addRpcImplementation(EndpointService.class, this);
@@ -209,6 +163,13 @@ public class EndpointRpcRegistry implements EndpointService {
         // endpoint group/condition mappings with no conditions
     }
 
+    @Override
+    public void close() throws Exception {
+        if (rpcRegistration != null) {
+            rpcRegistration.close();
+        }
+    }
+
     /**
      * Construct an endpoint with the appropriate augmentations from the
      * endpoint input. Each concrete implementation can provides its specifics
@@ -327,7 +288,7 @@ public class EndpointRpcRegistry implements EndpointService {
             }
         }
         ListenableFuture<Void> r = t.submit();
-        return Futures.transform(r, futureTrans, executor);
+        return Futures.transform(r, futureTrans);
     }
 
     @Override
@@ -364,7 +325,7 @@ public class EndpointRpcRegistry implements EndpointService {
         t.put(LogicalDatastoreType.OPERATIONAL, iid_l3prefix, epL3Prefix);
 
         ListenableFuture<Void> r = t.submit();
-        return Futures.transform(r, futureTrans, executor);
+        return Futures.transform(r, futureTrans);
     }
 
     @Override
@@ -397,7 +358,7 @@ public class EndpointRpcRegistry implements EndpointService {
         // TODO: Implement L3Prefix
 
         ListenableFuture<Void> r = t.submit();
-        return Futures.transform(r, futureTrans, executor);
+        return Futures.transform(r, futureTrans);
     }
 
     @Override
@@ -420,7 +381,7 @@ public class EndpointRpcRegistry implements EndpointService {
         }
 
         ListenableFuture<Void> r = t.submit();
-        return Futures.transform(r, futureTrans, executor);
+        return Futures.transform(r, futureTrans);
     }
 
     @Override
@@ -444,7 +405,7 @@ public class EndpointRpcRegistry implements EndpointService {
         }
 
         ListenableFuture<Void> r = t.submit();
-        return Futures.transform(r, futureTrans, executor);
+        return Futures.transform(r, futureTrans);
     }
 
     Function<Void, RpcResult<Void>> futureTrans =
@@ -454,5 +415,4 @@ public class EndpointRpcRegistry implements EndpointService {
                     return RpcResultBuilder.<Void> success().build();
                 }
             };
-
 }
index b03f020c23098332b2b5d56b46c0de707b6071ee..807b677c1f37f0f3253397e2d88335819f6735cf 100755 (executable)
@@ -43,6 +43,15 @@ module groupbasedpolicy-impl {
                     }
                 }
             }
+            //RPC Registry
+            container rpc-registry {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity mdsal:binding-rpc-registry;
+                    }
+                }
+            }
         }
     }
 }
index 4914894d984a2b6a698ccbc7b38820b6dcfc52ef..5193802537dd8c1f539f89057745746b9eb198f0 100644 (file)
@@ -1,6 +1,18 @@
 package org.opendaylight.groupbasedpolicy.endpoint;
 
-import com.google.common.util.concurrent.CheckedFuture;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.atLeast;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
@@ -15,7 +27,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.L2BridgeDomainId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.L3ContextId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.TenantId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.*;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.EndpointService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.Endpoints;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.RegisterEndpointInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.RegisterEndpointInputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.RegisterL3PrefixEndpointInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.RegisterL3PrefixEndpointInputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.SetEndpointGroupConditionsInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.UnregisterEndpointInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.UnsetEndpointGroupConditionsInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoint.fields.L3Address;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.has.endpoint.group.conditions.EndpointGroupCondition;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.unregister.endpoint.input.L2;
@@ -24,13 +44,7 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 
-import java.lang.reflect.Constructor;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.ScheduledExecutorService;
-
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.*;
+import com.google.common.util.concurrent.CheckedFuture;
 
 public class EndPointRpcRegistryTest {
 
@@ -56,41 +70,31 @@ public class EndPointRpcRegistryTest {
 
         rpcRegistration = mock(RpcRegistration.class);
         when(rpcRegistry.addRpcImplementation(any(Class.class), any(RpcService.class))).thenReturn(rpcRegistration);
+
+        endpointRpcRegistry = new EndpointRpcRegistry(dataProvider, rpcRegistry);
     }
 
     @SuppressWarnings("unchecked")
     @Test
     public void registerTest() throws Exception {
-        EndpointRpcRegistry.register(dataProvider, rpcRegistry, epRendererAugmentation);
         verify(rpcRegistry).addRpcImplementation(any(Class.class), any(RpcService.class));
         verify(t).put(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), any(Endpoints.class));
+        EndpointRpcRegistry.register(epRendererAugmentation);
+        Assert.assertEquals(1, EndpointRpcRegistry.registeredRenderers.size());
 
         EndpointRpcRegistry.unregister(epRendererAugmentation);
-        verify(rpcRegistration).close();
+        Assert.assertEquals(0, EndpointRpcRegistry.registeredRenderers.size());
     }
 
     @Test
     public void registerTestSafelyFail() {
-        EndpointRpcRegistry.register(null, rpcRegistry, epRendererAugmentation);
-        EndpointRpcRegistry.register(dataProvider, null, epRendererAugmentation);
-        EndpointRpcRegistry.register(null, rpcRegistry, null);
-        EndpointRpcRegistry.register(dataProvider, null, null);
-        EndpointRpcRegistry.register(dataProvider, rpcRegistry, null);
-    }
-
-    @Test
-    public void unregisterTestFail() throws Exception {
-        EndpointRpcRegistry.unregister(null);
-        verify(rpcRegistration, never()).close();
-
-        EpRendererAugmentation epRendererAugmentation = mock(EpRendererAugmentation.class);
-        EndpointRpcRegistry.unregister(epRendererAugmentation);
-        verify(rpcRegistration, never()).close();
+        EndpointRpcRegistry.register(epRendererAugmentation);
+        EndpointRpcRegistry.register(null);
+        Assert.assertEquals(1, EndpointRpcRegistry.registeredRenderers.size());
     }
 
     @Test
     public void registerEndpointTest()throws Exception{
-        setPrivateInstanceByReflexion();
         endpointRpcRegistry.registerEndpoint(setRegisterEndpointVariablesForTest());
         verify(t, times(1)).put(eq(LogicalDatastoreType.OPERATIONAL), any(InstanceIdentifier.class), any(DataObject.class), eq(true));
 
@@ -116,16 +120,8 @@ public class EndPointRpcRegistryTest {
         return registerEndpointInputBuilder.build();
     }
 
-    private void setPrivateInstanceByReflexion() throws Exception{
-        ScheduledExecutorService scheduledExecutorServiceMock = mock(ScheduledExecutorService.class);
-        Constructor[] cons = EndpointRpcRegistry.class.getDeclaredConstructors();
-        cons[0].setAccessible(true);
-        endpointRpcRegistry = (EndpointRpcRegistry)cons[0].newInstance(dataProvider, rpcRegistry, scheduledExecutorServiceMock);
-    }
-
     @Test
     public void registerL3PrefixEndpointTest()throws Exception{
-        setPrivateInstanceByReflexion();
         endpointRpcRegistry.registerL3PrefixEndpoint(setL3PrefixTestVariables());
         verify(t, atLeast(1)).put(eq(LogicalDatastoreType.OPERATIONAL), any(InstanceIdentifier.class), any(DataObject.class));
     }
@@ -143,7 +139,6 @@ public class EndPointRpcRegistryTest {
 
     @Test
     public void unregisterEndpointTest() throws Exception{
-        setPrivateInstanceByReflexion();
         L2 l2Mock = mock(L2.class);
         List<L2> l2List = new ArrayList<>();
         l2List.add(l2Mock);
@@ -159,7 +154,6 @@ public class EndPointRpcRegistryTest {
 
     @Test
     public void setEndpointGroupConditionsTest()throws Exception{
-        setPrivateInstanceByReflexion();
         EndpointGroupId endpointGroupIdMock = mock(EndpointGroupId.class);
 
         EndpointGroupCondition endpointGroupConditionMock = mock(EndpointGroupCondition.class);
@@ -174,8 +168,6 @@ public class EndPointRpcRegistryTest {
 
     @Test
     public void unsetEndpointGroupConditionsTest()throws Exception{
-        setPrivateInstanceByReflexion();
-
         UnsetEndpointGroupConditionsInput unsetEndpointGroupConditionsInputMock = mock(UnsetEndpointGroupConditionsInput.class);
         EndpointGroupCondition endpointGroupConditionMock = mock(EndpointGroupCondition.class);
         List<EndpointGroupCondition> endpointGroupConditionList = new ArrayList();
index f81eed100de2bc13b632720df8f8fe03edf63845..4fc7ceb97ca9ee71e7bd565712981e91a93e366f 100644 (file)
@@ -91,8 +91,8 @@ public class OFOverlayRenderer implements AutoCloseable, DataChangeListener {
                                           rpcRegistry,
                                           executor,
                                           tableOffset);
-        ofOverlayAug = new OfOverlayAug(dataProvider, rpcRegistry);
-        ofOverlayL3NatAug = new OfOverlayL3NatAug(dataProvider, rpcRegistry);
+        ofOverlayAug = new OfOverlayAug(dataProvider);
+        ofOverlayL3NatAug = new OfOverlayL3NatAug();
             Optional<OfOverlayConfig> config = readConfig();
             OfOverlayConfigBuilder configBuilder = new OfOverlayConfigBuilder();
             if (config.isPresent()) {
index 5b68b720b287ddaecd48ab25b5f95d2f64c5f228..3864e876b87a49812dbc8eee809d319c1586be16 100644 (file)
@@ -13,7 +13,6 @@ import java.util.concurrent.ExecutionException;
 
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.groupbasedpolicy.endpoint.EndpointRpcRegistry;
 import org.opendaylight.groupbasedpolicy.endpoint.EpRendererAugmentation;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
@@ -43,10 +42,10 @@ public class OfOverlayAug implements EpRendererAugmentation, AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(OfOverlayAug.class);
     private final DataBroker dataProvider;
 
-    public OfOverlayAug(DataBroker dataProvider, RpcProviderRegistry rpcRegistry) {
+    public OfOverlayAug(DataBroker dataProvider) {
         this.dataProvider = dataProvider;
 
-        EndpointRpcRegistry.register(this.dataProvider, rpcRegistry, this);
+        EndpointRpcRegistry.register(this);
     }
 
     @Override
index 1b9b38ea74d4b17873f3e7de45e5d3b2d283a53b..f28513ac93c1637e2f9d8454d5778d931bf3b107 100644 (file)
@@ -8,8 +8,6 @@
 
 package org.opendaylight.groupbasedpolicy.renderer.ofoverlay.endpoint;
 
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.groupbasedpolicy.endpoint.EndpointRpcRegistry;
 import org.opendaylight.groupbasedpolicy.endpoint.EpRendererAugmentation;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.RegisterEndpointInput;
@@ -23,8 +21,8 @@ import org.opendaylight.yangtools.yang.binding.Augmentation;
 
 public class OfOverlayL3NatAug implements EpRendererAugmentation, AutoCloseable {
 
-    public OfOverlayL3NatAug(DataBroker dataProvider, RpcProviderRegistry rpcRegistry) {
-        EndpointRpcRegistry.register(dataProvider, rpcRegistry, this);
+    public OfOverlayL3NatAug() {
+        EndpointRpcRegistry.register(this);
     }
 
     @Override