Updated BgpManager for Be 72/32472/3
authorSikhivahan Gundu <gundu.sikhivahan@ericsson.com>
Wed, 13 Jan 2016 06:37:36 +0000 (12:07 +0530)
committerSikhivahan Gundu <gundu.sikhivahan@ericsson.com>
Thu, 14 Jan 2016 11:47:11 +0000 (17:17 +0530)
Change-Id: I72897c060bda94d6aff484098194e62b5813a2ab
Signed-off-by: Sikhivahan Gundu <gundu.sikhivahan@ericsson.com>
52 files changed:
bgpmanager/bgpmanager-api/src/main/java/org.opendaylight.bgpmanager.api/IBgpManager.java
bgpmanager/bgpmanager-impl/pom.xml
bgpmanager/bgpmanager-impl/src/main/config/default-config.xml
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/AbstractDataChangeListener.java
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/BgpConfigurationManager.java
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/BgpManager.java
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/BgpUtil.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/ConfigureBgpCli.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/DisplayBgpConfigCli.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/FibDSWriter.java
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/VtyshCli.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Cache.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/ClearBgpCli.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Commands.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Connect.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Misc.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Neighbor.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Network.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Router.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Vrf.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/globals/BgpConfiguration.java [deleted file]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpAlarmBroadcaster.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpAlarmBroadcasterMBean.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpAlarmErrorCodes.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpConstants.java [moved from bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/globals/BgpConstants.java with 51% similarity]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpCounters.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpCountersBroadcaster.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpCountersBroadcasterMBean.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/api-files/qbgp.thrift [deleted file]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/BgpRouter.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/BgpRouterException.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/BgpSyncHandle.java [moved from bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/implementation/BgpSyncHandle.java with 93% similarity]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/globals/Route.java [deleted file]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/implementation/BgpRouter.java [deleted file]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/common/Constants.java [deleted file]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/exceptions/BgpRouterException.java [deleted file]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/BgpConfigurator.java
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/BgpUpdater.java
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/Routes.java
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/Update.java
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/af_afi.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/af_safi.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/qbgpConstants.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/idl/qbgp.thrift [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/server/BgpThriftService.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/server/implementation/BgpThriftService.java [deleted file]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/server/implementation/BgpUpdateHandler.java [deleted file]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/bgpmanager/impl/rev150326/BgpManagerImplModule.java
bgpmanager/bgpmanager-impl/src/main/resources/OSGI-INF/blueprint/commands.xml [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/yang/bgpmanager-impl.yang
bgpmanager/bgpmanager-impl/src/test/java/org/opendaylight/vpnservice/bgpmanager/test/MockFibManager.java
model-bgp/src/main/yang/ebgp.yang [new file with mode: 0644]

index a95c198ed42e69cf15650b57787f0a87b83cbec4..3ffa33f2f29dfce9b467c20ed9876282a35e1e3c 100644 (file)
@@ -42,4 +42,13 @@ public interface IBgpManager {
      */
     public void deletePrefix(String rd, String prefix) throws Exception;
 
-}
\ No newline at end of file
+    /**
+     *
+     * @param fileName
+     * @param logLevel
+     */
+    public void setQbgpLog(String fileName, String logLevel) throws Exception;
+
+    public String getDCGwIP();
+
+}
index 6f637d619102ef1be300a7ae64c948645e3254b0..45dcfca41363c8a5eadbde8dda9b2299f153a15c 100644 (file)
@@ -20,6 +20,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <artifactId>bgpmanager-impl</artifactId>
   <version>${vpnservices.version}</version>
   <packaging>bundle</packaging>
+  <properties>
+   <codahale.metrics.version>3.0.1</codahale.metrics.version>
+   </properties>
   <dependencies>
 
     <dependency>
@@ -44,6 +47,17 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <version>0.9.1</version>
     </dependency>
 
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>vpnmanager-api</artifactId>
+      <version>${vpnservices.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>itm-api</artifactId>
+      <version>${vpnservices.version}</version>
+    </dependency>
+
     <!--Dependencies for Unit Test -->
     <dependency>
       <groupId>junit</groupId>
@@ -69,7 +83,30 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <scope>test</scope>
       <type>test-jar</type>
     </dependency>
-
+       
+       <dependency>
+      <groupId>org.apache.karaf.shell</groupId>
+      <artifactId>org.apache.karaf.shell.console</artifactId>
+         <version>3.0.3</version>
+         <exclusions>
+       <exclusion>
+       <groupId>org.slf4j</groupId>
+       <artifactId>log4j</artifactId>
+       </exclusion>
+       </exclusions>
+   </dependency>
+ <dependency>
+        <groupId>com.codahale.metrics</groupId>
+        <artifactId>metrics-core</artifactId>
+               <version>3.0.1</version>
+        
+    </dependency>
+       <dependency>
+        <groupId>com.codahale.metrics</groupId>
+        <artifactId>metrics-graphite</artifactId>
+               <version>3.0.1</version>
+        
+    </dependency>
 
   </dependencies>
 
index d1a5ce52796718936f0cad8fc10895e3d428bf01..91883d483c7db8018a573987acadc63b6c62d1ab 100644 (file)
@@ -24,6 +24,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
             <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
             <name>binding-osgi-broker</name>
           </broker>
+          <itm>
+            <type xmlns:itm="urn:opendaylight:params:xml:ns:yang:itm">itm:itm</type>
+            <name>itm</name>
+          </itm>
         </module>
       </modules>
       <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
index e22c43d38961ea1766e2fe61fee3cff53e2057df..4fab26fb41d6c912be8cd890635cfe558e24a149 100644 (file)
@@ -5,6 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
+
 package org.opendaylight.bgpmanager;
 
 import com.google.common.base.Optional;
index ebd49642ceaf58c54f6657bfeb57fb1108b27a35..e18320f823061a3296c2901102e4151b94c43a7e 100644 (file)
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
+
 package org.opendaylight.bgpmanager;
 
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
+import com.google.common.base.Optional;
+
+import java.util.*;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStreamReader;
+import java.lang.reflect.*;
+import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 
-import org.apache.thrift.TException;
-import org.opendaylight.bgpmanager.globals.BgpConfiguration;
+import org.opendaylight.bgpmanager.commands.ClearBgpCli;
+import org.opendaylight.bgpmanager.thrift.gen.*;
+import org.opendaylight.bgpmanager.thrift.client.*;
+import org.opendaylight.bgpmanager.thrift.server.*;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
+//import org.opendaylight.vpnservice.itm.api.IITMProvider;
+import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.*;
+import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.*;
+import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.*;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.*;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.fibmanager.rev150330.FibEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.fibmanager.rev150330.fibentries.VrfTables;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.fibmanager.rev150330.vrfentries.VrfEntry;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.bgp.rev130715.BgpRouter;
-import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.bgp.rev130715.BgpNeighbors;
-import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.bgp.rev130715.bgp.neighbors.BgpNeighbor;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.List;
+public class BgpConfigurationManager {
+    private static final Logger LOG =
+    LoggerFactory.getLogger(BgpConfigurationManager.class);
+    private static DataBroker broker;
+    private static FibDSWriter fib;
+    private boolean restarting = false;
+    private static Bgp config;
+    private static BgpRouter bgpRouter;
+    private static BgpThriftService updateServer;
 
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
+    private static final String DEF_LOGFILE = "/var/log/bgp_debug.log";
+    private static final String DEF_LOGLEVEL = "errors";
+    private static final String UPDATE_PORT = "bgp.thrift.service.port";
+    private static final String CONFIG_HOST = "vpnservice.bgpspeaker.host.name";
+    private static final String CONFIG_PORT = "vpnservice.bgpspeaker.thrift.port";
+    private static final String DEF_UPORT = "6644";
+    private static final String DEF_CHOST = "127.0.0.1";
+    private static final String DEF_CPORT = "7644";
+    private static final String SDNC_BGP_MIP = "sdnc_bgp_mip";
+    private static final String CLUSTER_CONF_FILE = "/cluster/etc/cluster.conf";
+    private static final Timer ipActivationCheckTimer = new Timer();
 
-public class BgpConfigurationManager {
-    private static final Logger LOG = LoggerFactory.getLogger(BgpConfigurationManager.class);
-    private ListenerRegistration<DataChangeListener> listenerRegistration;
-    private BgpConfiguration bgpConfiguration;
-    private BgpManager bgpManager;
-    private final DataBroker broker;
-    private static final int MAX_RETRIES_BGP_COMMUNICATION = 1;
-    private enum BgpOp {
-        START_BGP, ADD_NGHBR, DEL_NGHBR
-    }
-
-    public BgpConfigurationManager(final DataBroker db, BgpConfiguration bgpCfg, BgpManager bgpMgr) {
-        broker = db;
-        bgpConfiguration = bgpCfg;
+    // to have stale FIB map (RD, Prefix)
+    //  number of seconds wait for route sync-up between ODL and BGP.
+    private static final int BGP_RESTART_ROUTE_SYNC_SEC = 360;
+
+    static String odlThriftIp = "127.0.0.1";
+    private static String cHostStartup; 
+    private static String cPortStartup; 
+    private static CountDownLatch initer = new CountDownLatch(1);
+    //static IITMProvider itmProvider;
+    public static BgpManager bgpManager;
+    //map<rd, map<prefix/len, nexthop/label>>
+    private static Map<String, Map<String, String>> staledFibEntriesMap = new ConcurrentHashMap<>();
+
+    private static final Class[] reactors =  
+    {
+        ConfigServerReactor.class, AsIdReactor.class,
+        GracefulRestartReactor.class, LoggingReactor.class,
+        NeighborsReactor.class, UpdateSourceReactor.class,
+        EbgpMultihopReactor.class, AddressFamiliesReactor.class,
+        NetworksReactor.class, VrfsReactor.class, BgpReactor.class
+    };
+    
+    private ListenerRegistration<DataChangeListener>[] registrations;
+
+    private Object createListener(Class<?> cls) {
+        Constructor<?> ctor;
+        Object obj = null;
+
+        try {
+            ctor= cls.getConstructor(BgpConfigurationManager.class);
+            obj =  ctor.newInstance(this);
+        } catch (Exception e) {
+            LOG.error("Failed to create listener object", e);
+        }
+        return obj;
+    }
+
+    private void registerCallbacks() {
+        String emsg = "Failed to register listener";
+        registrations = (ListenerRegistration<DataChangeListener>[])
+        new ListenerRegistration[reactors.length];
+        InstanceIdentifier<?> iid = InstanceIdentifier.create(Bgp.class);
+        for (int i = 0; i < reactors.length; i++) {
+            DataChangeListener dcl = 
+            (DataChangeListener) createListener(reactors[i]);
+            String dclName = dcl.getClass().getName();
+            try {
+                registrations[i] =  broker.registerDataChangeListener(
+                                      LogicalDatastoreType.CONFIGURATION,
+                                      iid, dcl, DataChangeScope.SUBTREE);
+            } catch (Exception e) {
+                LOG.error(emsg, e);
+                throw new IllegalStateException(emsg+" "+dclName, e);
+            }
+        }
+    }
+
+    public void close() {
+        if (updateServer != null) {
+            updateServer.stop();
+        } 
+    }
+
+    private boolean configExists() {
+        InstanceIdentifier.InstanceIdentifierBuilder<Bgp> iib =
+        InstanceIdentifier.builder(Bgp.class);
+        InstanceIdentifier<Bgp> iid = iib.build();
+        Optional<Bgp> b = BgpUtil.read(broker, 
+        LogicalDatastoreType.CONFIGURATION, iid);
+        return b.isPresent();
+    }
+
+    private String getProperty(String var, String def) {
+        Bundle b = FrameworkUtil.getBundle(BgpManager.class);
+        if (b == null) {
+            return def;
+        }
+        BundleContext context = b.getBundleContext();
+        if (context == null) {
+            return def;
+        }
+        String s = context.getProperty(var);
+        return (s == null ? def : s);
+    }
+
+    public BgpConfigurationManager(BgpManager bgpMgr) {
+        broker = bgpMgr.getBroker();
+        fib = bgpMgr.getFibWriter();
+        //itmProvider = bgpMgr.getItmProvider();
+        // there must be a good way to detect that we're restarting.
+        // but for now infer it from the existance of config
+        restarting = configExists();
         bgpManager = bgpMgr;
-        BgpRtrCfgManager rtrCfgManager = new BgpRtrCfgManager(broker);
-        BgpNghbrCfgManager nghbrCfgManager = new BgpNghbrCfgManager(broker);
+        bgpRouter = BgpRouter.getInstance();
+        String uPort = getProperty(UPDATE_PORT, DEF_UPORT); 
+        cHostStartup = getProperty(CONFIG_HOST, DEF_CHOST);
+        cPortStartup = getProperty(CONFIG_PORT, DEF_CPORT);
+        VtyshCli.setHostAddr(cHostStartup);
+        ClearBgpCli.setHostAddr(cHostStartup);
+        LOG.info("UpdateServer at localhost:"+uPort+" ConfigServer at "
+                 +cHostStartup+":"+cPortStartup);
+        updateServer = new BgpThriftService(Integer.parseInt(uPort), bgpMgr);
+        updateServer.start();
+        readOdlThriftIpForBgpCommunication();
+        registerCallbacks();
+
+        // this shouldn't be done. config client must connect in 
+        // response to config; but connecting at startup to a default
+        // host is legacy behavior. 
+        if (!restarting) {
+            bgpRouter.connect(cHostStartup, Integer.parseInt(cPortStartup)); 
+        }
+        LOG.info("BGP Configuration manager initialized");
+        initer.countDown();
+    }
+
+    public Bgp get() {
+        return config;
     }
 
-    public class BgpRtrCfgManager extends AbstractDataChangeListener<BgpRouter> implements AutoCloseable {
+    private static final String addWarn = 
+              "Config store updated; undo with Delete if needed.";
+    private static final String delWarn = 
+              "Config store updated; undo with Add if needed.";
+    private static final String updWarn =
+              "Update operation not supported; Config store updated;"
+               +" restore with another Update if needed.";
 
-        public BgpRtrCfgManager(final DataBroker db) {
-            super(BgpRouter.class);
-            registerListener(db);
+    public class ConfigServerReactor 
+    extends AbstractDataChangeListener<ConfigServer> 
+    implements AutoCloseable {
+        private static final String yangObj = "config-server ";
+        public ConfigServerReactor() {
+            super(ConfigServer.class);
         }
 
-        private void registerListener(final DataBroker db) {
+        protected synchronized void 
+        add(InstanceIdentifier<ConfigServer> iid, ConfigServer val) {
+            LOG.debug("received bgp connect config host {}", val.getHost().getValue());
             try {
-                listenerRegistration = db.registerDataChangeListener(LogicalDatastoreType.CONFIGURATION,
-                    getWildCardPath(), BgpRtrCfgManager.this, DataChangeScope.SUBTREE);
-            } catch (final Exception e) {
-                LOG.error("BGP Configuration DataChange listener registration fail!", e);
-                throw new IllegalStateException("BGP Configuration registration Listener failed.", e);
+                initer.await();
+            } catch (Exception e) {
+            }
+            LOG.debug("issueing bgp router connect to host {}", val.getHost().getValue());
+            synchronized(BgpConfigurationManager.this) {
+                boolean res = bgpRouter.connect(val.getHost().getValue(), 
+                                                val.getPort().intValue());
+                if (!res) {
+                    LOG.error(yangObj + "Add failed; "+addWarn);
+                }
             }
         }
 
-        private synchronized void removeBgpRouter(BgpRouter del)
-        {
-            bgpManager.disconnect();
+        protected synchronized void 
+        remove(InstanceIdentifier<ConfigServer> iid, ConfigServer val) {
+            LOG.debug("received bgp disconnect");
+            synchronized(BgpConfigurationManager.this) {
+                bgpRouter.disconnect();
+            }
+        }
+                          
+        protected void update(InstanceIdentifier<ConfigServer> iid,
+                              ConfigServer oldval, ConfigServer newval) {
+            LOG.error(yangObj + updWarn);
+        }
 
-            bgpConfiguration.setRouterId("");
-            bgpConfiguration.setAsNum(0);
+        public void close() {
+            int i;
+            for (i=0 ; i < reactors.length ; i++) {
+                if (reactors[i] == ConfigServerReactor.class) {
+                    break;
+                }
+            }
+            registrations[i].close();
+        }
+    }
 
+    private BgpRouter getClient(String yangObj) {
+        if (bgpRouter == null) {
+            LOG.warn(yangObj+": configuration received when BGP is inactive");
         }
+        return bgpRouter;
+    } 
 
-        @Override
-        protected void remove(InstanceIdentifier<BgpRouter> identifier,
-                              BgpRouter del) {
+    public class AsIdReactor 
+    extends AbstractDataChangeListener<AsId> 
+    implements AutoCloseable {
 
-            LOG.debug("Bgp Router deleted in DS - key: {} value={} ", identifier, del);
+        private static final String yangObj = "as-id ";
 
-            removeBgpRouter(del);
+        public AsIdReactor() {
+            super(AsId.class);
+        }
+
+        protected synchronized void 
+        add(InstanceIdentifier<AsId> iid, AsId val) {
+            LOG.debug("received add router config asNum {}", val.getLocalAs().intValue());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                int asNum = val.getLocalAs().intValue();
+                Ipv4Address routerId = val.getRouterId();
+                Long spt = val.getStalepathTime();
+                Boolean afb = val.isAnnounceFbit();
+                String rid = (routerId == null) ? "" : routerId.getValue();
+                int stalepathTime = (spt == null) ? 90 : spt.intValue(); 
+                boolean announceFbit = (afb == null) ? false : afb.booleanValue();
+                try {
+                    br.startBgp(asNum, rid, stalepathTime, announceFbit); 
+                    if (bgpManager.getBgpCounters() == null) {
+                        bgpManager.startBgpCountersTask();
+                    }
+                } catch (BgpRouterException bre) {
+                    if (bre.getErrorCode() == BgpRouterException.BGP_ERR_ACTIVE) {
+                        LOG.error(yangObj+"Add requested when BGP is already active");
+                    } else {
+                        LOG.error(yangObj+"Add received exception: \"" 
+                                  +bre+"\"; "+addWarn);
+                    }
+                } catch (Exception e) {
+                    LOG.error(yangObj+"Add received exception: \""+e+"\"; "+addWarn);
+                }
+            }
+        } 
 
+        protected synchronized void 
+        remove(InstanceIdentifier<AsId> iid, AsId val) {
+            LOG.debug("received delete router config asNum {}", val.getLocalAs().intValue());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                int asNum = val.getLocalAs().intValue(); 
+                try {
+                    br.stopBgp(asNum);
+                } catch (Exception e) {
+                    LOG.error(yangObj+" Delete received exception:  \""+e+"\"; "+delWarn);
+                }
+                if (bgpManager.getBgpCounters() != null) {
+                    bgpManager.stopBgpCountersTask();
+                }
+            }
+        }
+                          
+        protected void update(InstanceIdentifier<AsId> iid,
+                              AsId oldval, AsId newval) {
+            LOG.error(yangObj + updWarn);
         }
 
-        private synchronized void updateBgpRouter(BgpRouter original, BgpRouter update)
-        {
-            if(bgpConfiguration.getAsNum() != update.getLocalAsNumber()) {
-                bgpConfiguration.setAsNum(update.getLocalAsNumber());
-                bgpConfiguration.setConfigUpdated();
+        public void close() {
+            int i;
+            for (i=0 ; i < reactors.length ; i++) {
+                if (reactors[i] == AsIdReactor.class) {
+                    break;
+                }
             }
-            if(bgpConfiguration.getRouterId() != update.getLocalAsIdentifier().getIpv4Address().getValue()) {
-                bgpConfiguration.setRouterId(update.getLocalAsIdentifier().getIpv4Address().getValue());
-                bgpConfiguration.setConfigUpdated();
+            registrations[i].close();
+        }
+    }
+
+    public class GracefulRestartReactor 
+    extends AbstractDataChangeListener<GracefulRestart> 
+    implements AutoCloseable {
+
+        private static final String yangObj = "graceful-restart ";
+
+        public GracefulRestartReactor() {
+            super(GracefulRestart.class);
+        }
+
+        protected synchronized void
+        add(InstanceIdentifier<GracefulRestart> iid, GracefulRestart val) {
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                try {
+                    br.addGracefulRestart(val.getStalepathTime().intValue());
+                } catch (Exception e) {
+                    LOG.error(yangObj+"Add received exception: \""+e+"\"; "+addWarn);
+                }
             }
+        }
 
-            if(bgpConfiguration.isConfigUpdated()) {
-                configureBgpServer(BgpOp.START_BGP);
-                bgpConfiguration.unsetConfigUpdated();
+        protected synchronized void 
+        remove(InstanceIdentifier<GracefulRestart> iid, GracefulRestart val) {
+            LOG.debug("received delete GracefulRestart config val {}", val.getStalepathTime().intValue());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                try {
+                    br.delGracefulRestart();
+                } catch (Exception e) {
+                    LOG.error(yangObj+" Delete received exception:  \""+e+"\"; "
+                              +delWarn);
+                }
             }
+        }
+                          
+        protected void update(InstanceIdentifier<GracefulRestart> iid,
+                              GracefulRestart oldval, GracefulRestart newval) {
+               LOG.debug("received update GracefulRestart config val {}", newval.getStalepathTime().intValue());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                try {
+                    br.addGracefulRestart(newval.getStalepathTime().intValue());
+                } catch (Exception e) {
+                    LOG.error(yangObj+"update received exception: \""+e+"\"; "+addWarn);
+                }
+            }
+        }
 
+        public void close() {
+            int i;
+            for (i=0 ; i < reactors.length ; i++) {
+                if (reactors[i] == GracefulRestartReactor.class) {
+                    break;
+                }
+            }
+            registrations[i].close();
         }
+    }
 
-        @Override
-        protected void update(InstanceIdentifier<BgpRouter> identifier,
-                              BgpRouter original, BgpRouter update) {
+    public class LoggingReactor 
+    extends AbstractDataChangeListener<Logging> 
+    implements AutoCloseable {
 
-            LOG.debug("Bgp Router Updated in DS - key: {}, original={}, update={} ", identifier, original, update);
+        private static final String yangObj = "logging ";
 
-            updateBgpRouter(original, update);
+        public LoggingReactor() {
+            super(Logging.class);
         }
 
-        private synchronized void addBgpRouter(BgpRouter value){
-            if(value.getLocalAsNumber() != null) {
-                bgpConfiguration.setAsNum(value.getLocalAsNumber());
+        protected synchronized void
+        add(InstanceIdentifier<Logging> iid, Logging val) {
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                try {
+                    br.setLogging(val.getFile(),val.getLevel());
+                } catch (Exception e) {
+                    LOG.error(yangObj+"Add received exception: \""+e+"\"; "
+                              +addWarn);
+                }
             }
-            if(value.getLocalAsIdentifier() != null) {
-                bgpConfiguration.setRouterId(value.getLocalAsIdentifier().getIpv4Address().getValue());
+        }
+
+        protected synchronized void 
+        remove(InstanceIdentifier<Logging> iid, Logging val) {
+            LOG.debug("received remove Logging config val {}", val.getLevel());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                try {
+                    br.setLogging(DEF_LOGFILE, DEF_LOGLEVEL);
+                } catch (Exception e) {
+                    LOG.error(yangObj+" Delete received exception:  \""+e+"\"; "
+                              +delWarn);
+                }
+            }
+        }
+                          
+        protected void update(InstanceIdentifier<Logging> iid,
+                              Logging oldval, Logging newval) {
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                try {
+                    br.setLogging(newval.getFile(),newval.getLevel());
+                } catch (Exception e) {
+                    LOG.error(yangObj+"newval received exception: \""+e+"\"; "
+                              +addWarn);
+                }
             }
+        }
 
-            if(value.getLocalAsNumber() == null || value.getLocalAsIdentifier() == null)
-                return;
+        public void close() {
+            int i;
+            for (i=0 ; i < reactors.length ; i++) {
+                if (reactors[i] == LoggingReactor.class) {
+                    break;
+                }
+            }
+            registrations[i].close();
+        }
+    }
+
+    public class NeighborsReactor 
+    extends AbstractDataChangeListener<Neighbors> 
+    implements AutoCloseable {
+
+        private static final String yangObj = "neighbors ";
+
+        public NeighborsReactor() {
+            super(Neighbors.class);
+        }
+
+        protected synchronized void 
+        add(InstanceIdentifier<Neighbors> iid, Neighbors val) {
+            LOG.debug("received add Neighbors config val {}", val.getAddress().getValue());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                String peerIp = val.getAddress().getValue();
+                int as = val.getRemoteAs().intValue();
+                try {
+                    //itmProvider.buildTunnelsToDCGW(new IpAddress(peerIp.toCharArray()));
+                    br.addNeighbor(peerIp, as);
+            
+                } catch (Exception e) {
+                    LOG.error(yangObj+"Add received exception: \""+e+"\"; "
+                              +addWarn);
+                }
+            }
+        }
 
-            configureBgpServer(BgpOp.START_BGP);
+        protected synchronized void 
+        remove(InstanceIdentifier<Neighbors> iid, Neighbors val) {
+            LOG.debug("received remove Neighbors config val {}", val.getAddress().getValue());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                String peerIp = val.getAddress().getValue();
+                try {
+                    //itmProvider.deleteTunnelsToDCGW(new IpAddress(val.getAddress().getValue().toCharArray()));
+                    br.delNeighbor(peerIp);
+                } catch (Exception e) {
+                    LOG.error(yangObj+" Delete received exception:  \""+e+"\"; "
+                              +delWarn);
+                }
+            }
+        }
+                          
+        protected void update(InstanceIdentifier<Neighbors> iid,
+                              Neighbors oldval, Neighbors newval) {
+            //purposefully nothing to do.
         }
 
-        @Override
-        protected void add(InstanceIdentifier<BgpRouter> identifier,
-                           BgpRouter value) {
-            LOG.debug("Bgp Router added in DS - key: {}, value={} ",identifier, value);
+        public void close() {
+            int i;
+            for (i=0 ; i < reactors.length ; i++) {
+                if (reactors[i] == NeighborsReactor.class) {
+                    break;
+                }
+            }
+            registrations[i].close();
+        }
+    }
+
+    public class EbgpMultihopReactor 
+    extends AbstractDataChangeListener<EbgpMultihop> 
+    implements AutoCloseable {
 
-            addBgpRouter(value);
+        private static final String yangObj = "ebgp-multihop ";
+
+        public EbgpMultihopReactor() {
+            super(EbgpMultihop.class);
         }
 
-        private InstanceIdentifier<BgpRouter> getWildCardPath() {
-            return InstanceIdentifier.create(BgpRouter.class);
+        protected synchronized void 
+        add(InstanceIdentifier<EbgpMultihop> iid, EbgpMultihop val) {
+            LOG.debug("received add EbgpMultihop config val {}", val.getPeerIp().getValue());  
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                String peerIp = val.getPeerIp().getValue();
+                try {
+                    br.addEbgpMultihop(peerIp, val.getNhops().intValue()); 
+                } catch (Exception e) {
+                    LOG.error(yangObj+"Add received exception: \""+e+"\"; "
+                              +addWarn);
+                }
+            }
         }
 
-        @Override
-        public void close() throws Exception {
-            if (listenerRegistration != null) {
+        protected synchronized void 
+        remove(InstanceIdentifier<EbgpMultihop> iid, EbgpMultihop val) {
+            LOG.debug("received remove EbgpMultihop config val {}", val.getPeerIp().getValue());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                String peerIp = val.getPeerIp().getValue();
                 try {
-                    listenerRegistration.close();
-                } catch (final Exception e) {
-                    LOG.error("Error when cleaning up DataChangeListener.", e);
+                    br.delEbgpMultihop(peerIp);
+                } catch (Exception e) {
+                    LOG.error(yangObj+" Delete received exception:  \""+e+"\"; "
+                              +delWarn);
                 }
-                listenerRegistration = null;
             }
-            LOG.info("Bgp Router Manager Closed");
+        }
+                          
+        protected void update(InstanceIdentifier<EbgpMultihop> iid,
+                              EbgpMultihop oldval, EbgpMultihop newval) {
+            LOG.error(yangObj + updWarn);
         }
 
+        public void close() {
+            int i;
+            for (i=0 ; i < reactors.length ; i++) {
+                if (reactors[i] == EbgpMultihopReactor.class) {
+                    break;
+                }
+            }
+            registrations[i].close();
+        }
     }
-    public class BgpNghbrCfgManager extends AbstractDataChangeListener<BgpNeighbors> implements AutoCloseable {
 
-        public BgpNghbrCfgManager(final DataBroker db) {
-            super(BgpNeighbors.class);
-            registerListener(db);
+    public class UpdateSourceReactor 
+    extends AbstractDataChangeListener<UpdateSource> 
+    implements AutoCloseable {
+
+        private static final String yangObj = "update-source ";
+
+        public UpdateSourceReactor() {
+            super(UpdateSource.class);
         }
 
-        private void registerListener(final DataBroker db) {
-            try {
-                listenerRegistration = db.registerDataChangeListener(LogicalDatastoreType.CONFIGURATION,
-                    getWildCardPath(), BgpNghbrCfgManager.this, DataChangeScope.SUBTREE);
-            } catch (final Exception e) {
-                LOG.error("BGP Neighbor DataChange listener registration fail!", e);
-                throw new IllegalStateException("BGP Neighbor registration Listener failed.", e);
+        protected synchronized void 
+        add(InstanceIdentifier<UpdateSource> iid, UpdateSource val) {
+            LOG.debug("received add UpdateSource config val {}", val.getSourceIp().getValue());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                String peerIp = val.getPeerIp().getValue();
+                try {
+                    br.addUpdateSource(peerIp, val.getSourceIp().getValue()); 
+                } catch (Exception e) {
+                    LOG.error(yangObj+"Add received exception: \""+e+"\"; "
+                              +addWarn);
+                }
             }
         }
 
-        private synchronized void removeBgpNeighbors(BgpNeighbors del) {
-            List<BgpNeighbor> bgpNeighborList = del.getBgpNeighbor();
-            BgpNeighbor gateway = bgpNeighborList.get(0);
+        protected synchronized void 
+        remove(InstanceIdentifier<UpdateSource> iid, UpdateSource val) {
+            LOG.debug("received remove UpdateSource config val {}", val.getSourceIp().getValue());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                String peerIp = val.getPeerIp().getValue();
+                try {
+                    br.delUpdateSource(peerIp);
+                } catch (Exception e) {
+                    LOG.error(yangObj+" Delete received exception:  \""+e+"\"; "
+                              +delWarn);
+                }
+            }
+        }
+                          
+        protected void update(InstanceIdentifier<UpdateSource> iid,
+                              UpdateSource oldval, UpdateSource newval) {
+            LOG.error(yangObj + updWarn);
+        }
+
+        public void close() {
+            int i;
+            for (i=0 ; i < reactors.length ; i++) {
+                if (reactors[i] == UpdateSourceReactor.class) {
+                    break;
+                }
+            }
+            registrations[i].close();
+        }
+    }
 
-            if(gateway != null) {
-                if ((gateway.getPeerAddressType() != null) && (gateway.getPeerAddressType() instanceof org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.bgp.rev130715.bgp.neighbors.bgp.neighbor.peer.address.type.IpAddress)) {
-                    IpAddress neighborIPAddr = ((org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.bgp.rev130715.bgp.neighbors.bgp.neighbor.peer.address.type.IpAddress) gateway.getPeerAddressType()).getIpAddress();
-                    LOG.debug("Bgp Neighbor IP Address {} ", neighborIPAddr.getIpv4Address().getValue());
+    public class AddressFamiliesReactor 
+    extends AbstractDataChangeListener<AddressFamilies> 
+    implements AutoCloseable {
 
-                    configureBgpServer(BgpOp.DEL_NGHBR);
+        private static final String yangObj = "address-families ";
 
-                    bgpConfiguration.setNeighbourIp("");
-                    bgpConfiguration.setNeighbourAsNum(0);
+        public AddressFamiliesReactor() {
+            super(AddressFamilies.class);
+        }
 
+        protected synchronized void 
+        add(InstanceIdentifier<AddressFamilies> iid, AddressFamilies val) {
+            LOG.debug("received add AddressFamilies config val {}", val.getPeerIp().getValue());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                String peerIp = val.getPeerIp().getValue();
+                af_afi afi = af_afi.findByValue(val.getAfi().intValue());
+                af_safi safi = af_safi.findByValue(val.getSafi().intValue());
+                try {
+                    br.addAddressFamily(peerIp, afi, safi); 
+                } catch (Exception e) {
+                    LOG.error(yangObj+"Add received exception: \""+e+"\"; "
+                              +addWarn);
                 }
             }
+        }
 
+        protected synchronized void 
+        remove(InstanceIdentifier<AddressFamilies> iid, AddressFamilies val) {
+            LOG.debug("received remove AddressFamilies config val {}", val.getPeerIp().getValue());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                String peerIp = val.getPeerIp().getValue();
+                af_afi afi = af_afi.findByValue(val.getAfi().intValue());
+                af_safi safi = af_safi.findByValue(val.getSafi().intValue());
+                try {
+                    br.delAddressFamily(peerIp, afi, safi);
+                } catch (Exception e) {
+                    LOG.error(yangObj+" Delete received exception:  \""+e+"\"; "
+                              +delWarn);
+                }
+            }
+        }
+                          
+        protected void update(InstanceIdentifier<AddressFamilies> iid,
+                              AddressFamilies oldval, AddressFamilies newval) {
+            LOG.error(yangObj + updWarn);
         }
 
-        @Override
-        protected void remove(InstanceIdentifier<BgpNeighbors> identifier,
-                              BgpNeighbors del) {
+        public void close() {
+            int i;
+            for (i=0 ; i < reactors.length ; i++) {
+                if (reactors[i] == AddressFamiliesReactor.class) {
+                    break;
+                }
+            }
+            registrations[i].close();
+        }
+    }
+
+    public class NetworksReactor 
+    extends AbstractDataChangeListener<Networks> 
+    implements AutoCloseable {
 
-            LOG.debug("Bgp Neighbors deleted in DS - key: {}, value={} ", identifier, del);
-            removeBgpNeighbors(del);
+        private static final String yangObj = "networks ";
+
+        public NetworksReactor() {
+            super(Networks.class);
         }
 
-        private synchronized void updateBgpNeighbors(BgpNeighbors original, BgpNeighbors update) {
+        protected synchronized void 
+        add(InstanceIdentifier<Networks> iid, Networks val) {
+            LOG.debug("received add Networks config val {}", val.getPrefixLen());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                String rd = val.getRd();
+                String pfxlen = val.getPrefixLen();
+                String nh = val.getNexthop().getValue();
+                Long label = val.getLabel();
+                int lbl = (label == null) ? qbgpConstants.LBL_NO_LABEL 
+                                            : label.intValue();
+                try {
+                    br.addPrefix(rd, pfxlen, nh, lbl); 
+                } catch (Exception e) {
+                    LOG.error(yangObj+"Add received exception: \""+e+"\"; "+addWarn);
+                }
+            }
+        }
 
-            List<BgpNeighbor> bgpNeighborList = update.getBgpNeighbor();
+        protected synchronized void 
+        remove(InstanceIdentifier<Networks> iid, Networks val) {
+            LOG.debug("received remove Networks config val {}", val.getPrefixLen());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                String rd = val.getRd();
+                String pfxlen = val.getPrefixLen();
+                Long label = val.getLabel();
+                int lbl = (label == null) ? 0 : label.intValue();
+                if (rd == null && lbl > 0) {
+                    //LU prefix is being deleted. 
+                    rd = Integer.toString(lbl);
+                }
+                try {
+                    br.delPrefix(rd, pfxlen);
+                } catch (Exception e) {
+                    LOG.error(yangObj+" Delete received exception:  \""+e+"\"; "
+                              +delWarn);
+                }
+            }
+        }
+                          
+        protected void update(InstanceIdentifier<Networks> iid,
+                              Networks oldval, Networks newval) {
+            LOG.error(yangObj + updWarn);
+        }
 
-            //handle the case where there are no neighbors configured - single neighbor entry has been deleted
-            if(bgpNeighborList.isEmpty()) {
-                configureBgpServer(BgpOp.DEL_NGHBR);
-                return;
+        public void close() {
+            int i;
+            for (i=0 ; i < reactors.length ; i++) {
+                if (reactors[i] == NetworksReactor.class) {
+                    break;
+                }
             }
+            registrations[i].close();
+        }
+    }
+
+    public class VrfsReactor 
+    extends AbstractDataChangeListener<Vrfs> 
+    implements AutoCloseable {
 
-            //We will always consider the first element of this list, since there can be just one DC Gateway
-            BgpNeighbor gateway = bgpNeighborList.get(0);
+        private static final String yangObj = "vrfs ";
 
-            if(gateway != null) {
-                if(gateway.getAsNumber() != null ||
-                    ((gateway.getPeerAddressType() != null) && (gateway.getPeerAddressType() instanceof org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.bgp.rev130715.bgp.neighbors.bgp.neighbor.peer.address.type.IpAddress))) {
-                    //there is an updated neighbor, so we need to delete the old neighbor
-                    configureBgpServer(BgpOp.DEL_NGHBR);
+        public VrfsReactor() {
+            super(Vrfs.class);
+        }
+
+        protected synchronized void 
+        add(InstanceIdentifier<Vrfs> iid, Vrfs val) {
+            LOG.debug("received add Vrfs config val {}", val.getRd());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
                 }
-                if(gateway.getAsNumber() != null) {
-                    LOG.debug("Bgp Neighbor AS number {} ", gateway.getAsNumber());
-                    if(bgpConfiguration.getNeighbourAsNum() != gateway.getAsNumber()) {
-                        bgpConfiguration.setNeighbourAsNum(gateway.getAsNumber());
-                        bgpConfiguration.setConfigUpdated();
-                    }
+                try {
+                    br.addVrf(val.getRd(), val.getImportRts(), 
+                              val.getExportRts()); 
+                } catch (Exception e) {
+                    LOG.error(yangObj+"Add received exception: \""+e+"\"; "
+                              +addWarn);
                 }
-                if((gateway.getPeerAddressType() != null) && (gateway.getPeerAddressType() instanceof org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.bgp.rev130715.bgp.neighbors.bgp.neighbor.peer.address.type.IpAddress)) {
-                    IpAddress neighborIPAddr = ((org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.bgp.rev130715.bgp.neighbors.bgp.neighbor.peer.address.type.IpAddress)gateway.getPeerAddressType()).getIpAddress();
-                    LOG.debug("Bgp Neighbor IP Address {}", neighborIPAddr.getIpv4Address().getValue());
-                    if(bgpConfiguration.getNeighbourIp() != neighborIPAddr.getIpv4Address().getValue()) {
-                        bgpConfiguration.setNeighbourIp(neighborIPAddr.getIpv4Address().getValue());
-                        bgpConfiguration.setConfigUpdated();
-                    }
+            }
+        }
 
+        protected synchronized void 
+        remove(InstanceIdentifier<Vrfs> iid, Vrfs val) {
+            LOG.debug("received remove Vrfs config val {}", val.getRd());
+            synchronized(BgpConfigurationManager.this) {
+                BgpRouter br = getClient(yangObj);
+                if (br == null) {
+                    return;
+                }
+                try {
+                    br.delVrf(val.getRd());
+                } catch (Exception e) {
+                    LOG.error(yangObj+" Delete received exception:  \""+e+"\"; "
+                              +delWarn);
                 }
             }
-            if(bgpConfiguration.isConfigUpdated()) {
-                //add the newly configured neighbor
-                configureBgpServer(BgpOp.ADD_NGHBR);
+        }
+                          
+        protected void update(InstanceIdentifier<Vrfs> iid,
+                              Vrfs oldval, Vrfs newval) {
+            LOG.error(yangObj + updWarn);
+        }
+
+        public void close() {
+            int i;
+            for (i=0 ; i < reactors.length ; i++) {
+                if (reactors[i] == VrfsReactor.class) {
+                    break;
+                }
             }
+            registrations[i].close();
         }
+    }
+
+    Future lastCleanupJob;
+    AtomicReference<Future> lastCleanupJobReference = new AtomicReference<>();
 
-        @Override
-        protected void update(InstanceIdentifier<BgpNeighbors> identifier,
-                              BgpNeighbors original, BgpNeighbors update) {
+    AtomicBoolean started = new AtomicBoolean(false);
+    public class BgpReactor 
+    extends AbstractDataChangeListener<Bgp> 
+    implements AutoCloseable {
+        private static final String yangObj = "Bgp ";
 
-            LOG.debug("Bgp Neighbors Updated in DS - key: {}, original={}, update={} ", identifier,  original, update);
+        public BgpReactor() {
+            super(Bgp.class);
+        }
 
-            updateBgpNeighbors(original, update);
+        protected synchronized void 
+        add(InstanceIdentifier<Bgp> iid, Bgp val) {
+            LOG.debug("received add Bgp config replaying the config");
+            try {
+                initer.await();
+            } catch (Exception e) {
+            }
+            synchronized(BgpConfigurationManager.this) {
+                config = val;
+                if (restarting) {
+                    if (isIpAvailable(odlThriftIp)) {
+                        bgpRestarted();
+                    } else {
+                        ipActivationCheckTimer.scheduleAtFixedRate(new TimerTask() {
+                            public void run() {
+                                if (isIpAvailable(odlThriftIp)) {
+                                    bgpRestarted();
+                                    ipActivationCheckTimer.cancel();
+                                }
+                            }
+                        }, 10000L, 10000L);
+                    }
+                }
+            }
+        }
+
+        protected synchronized void 
+        remove(InstanceIdentifier<Bgp> iid, Bgp val) {
+            LOG.debug("received remove Bgp config");
+            synchronized(BgpConfigurationManager.this) {
+                config = null;
+            }
+        }
+                          
+        protected void update(InstanceIdentifier<Bgp> iid,
+                              Bgp oldval, Bgp newval) {
+            synchronized(BgpConfigurationManager.this) {
+                config = newval;
+            }
+        }
+
+        public void close() {
+            int i;
+            for (i=0 ; i < reactors.length ; i++) {
+                if (reactors[i] == BgpReactor.class) {
+                    break;
+                }
+            }
+            registrations[i].close();
+        }
+    }
+    
+    public void readOdlThriftIpForBgpCommunication() {
+        File f = new File(CLUSTER_CONF_FILE);
+        if (!f.exists()) {
+            odlThriftIp = "127.0.0.1";
+            return;
+        }
+        BufferedReader br = null;
+        try {
+            br = new BufferedReader(new InputStreamReader(
+                    new FileInputStream(f)));
+            String line = br.readLine();
+            while (line != null) {
+                if (line.contains(SDNC_BGP_MIP)) {
+                    line = line.trim();
+                    odlThriftIp = line.substring(line.lastIndexOf(" ")+1);
+                    break;
+                }
+                line = br.readLine();
+            }
+        } catch (Exception e) {
+        } finally {
+            try {br.close();} catch (Exception ignore){}
+        }
+    }
+    
+    public boolean isIpAvailable(String odlip) {
+        
+        try {
+            if (odlip != null) {
+                if ("127.0.0.1".equals(odlip)) {
+                    return true;
+                }
+                Enumeration e = NetworkInterface.getNetworkInterfaces();
+                while(e.hasMoreElements())
+                {
+                    NetworkInterface n = (NetworkInterface) e.nextElement();
+                    Enumeration ee = n.getInetAddresses();
+                    while (ee.hasMoreElements())
+                    {
+                        InetAddress i = (InetAddress) ee.nextElement();
+                        if (odlip.equals(i.getHostAddress())) {
+                            return true;
+                        };
+                    }
+                }
+            }
+        } catch (Exception e) {
+        }
+        return false;
+    }
 
+    public void bgpRestarted() {
+        /*
+         * If there a thread which in the process of stale cleanup, cancel it
+         * and start a new thread (to avoid processing same again).
+         */
+        if (lastCleanupJobReference.get() != null) {
+            lastCleanupJobReference.get().cancel(true);
+            lastCleanupJobReference.set(null);
         }
+        Runnable task = new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    long startTime = System.currentTimeMillis();
+                    LOG.error("started creating stale fib  map ");
+                    createStaleFibMap();
+                    long endTime = System.currentTimeMillis();
+                    LOG.error("took {} msecs for stale fib map creation ", endTime - startTime);
+                    LOG.error("started bgp config replay ");
+                    startTime = endTime;
+                    replay();
+                    endTime = System.currentTimeMillis();
+                    LOG.error("took {} msecs for bgp replay ", endTime - startTime);
+                    long route_sync_time = BGP_RESTART_ROUTE_SYNC_SEC;
+                    try {
+                        route_sync_time = bgpManager.getConfig().getGracefulRestart().getStalepathTime();
+                    } catch (Exception e) {
+                        LOG.error("BGP config/Stale-path time is not set");
+                    }
+                    Thread.sleep(route_sync_time * 1000L);
+                    new RouteCleanup().call();
 
-        private synchronized void addBgpNeighbors(BgpNeighbors value) {
-            List<BgpNeighbor> bgpNeighborList = value.getBgpNeighbor();
+                } catch (Exception eCancel) {
+                    LOG.error("Stale Cleanup Task Cancelled", eCancel);
+                }
+            }
+        };
+        lastCleanupJob = executor.submit(task);
+        lastCleanupJobReference.set(lastCleanupJob);
+    }
 
-            //We will always consider the first element of this list, since there can be just one DC Gateway
-            BgpNeighbor gateway = bgpNeighborList.get(0);
+    private static void doRouteSync() {
+        BgpSyncHandle bsh = BgpSyncHandle.getInstance();
+        LOG.debug("Starting BGP route sync");
+        try {
+            bgpRouter.initRibSync(bsh); 
+        } catch (Exception e) {
+            LOG.error("Route sync aborted, exception when initialzing: "+e);
+            return;
+        }
+        while (bsh.getState() != bsh.DONE) {
+            Routes routes = null;
+            try {
+                routes = bgpRouter.doRibSync(bsh);
+            } catch (Exception e) {
+                LOG.error("Route sync aborted, exception when syncing: "+e);
+                return;
+            }
+            Iterator<Update> updates = routes.getUpdatesIterator();
+            while (updates.hasNext()) {
+                Update u = updates.next();
+                Map<String, Map<String, String>> stale_fib_rd_map = BgpConfigurationManager.getStaledFibEntriesMap();
+                String rd = u.getRd();
+                String nexthop = u.getNexthop();
+                int label = u.getLabel();
+                String prefix = u.getPrefix();
+                int plen = u.getPrefixlen();
+                onUpdatePushRoute(rd, prefix, plen, nexthop, label);
+            }
+        }
+        try {
+            LOG.debug("Ending BGP route-sync");
+            bgpRouter.endRibSync(bsh);
+        } catch (Exception e) {
+        }
+    }
 
-            if(gateway != null) {
-                if(gateway.getAsNumber() != null) {
-                    LOG.debug("Bgp Neighbor AS number {} ", gateway.getAsNumber());
-                    bgpConfiguration.setNeighbourAsNum(gateway.getAsNumber());
+    /* onUpdatePushRoute
+     * Get Stale fib map, and compare current route/fib entry.
+     *  - Entry compare shall include NextHop, Label.
+     *  - If entry matches: delete from STALE Map. NO Change to FIB Config DS.
+     *  - If entry nor found, add to FIB Config DS.
+     *  - If entry found, but either Label/NextHop doesnt match.
+     *      - Update FIB Config DS with modified values.
+     *      - delete from Stale Map.
+     */
+    public static void onUpdatePushRoute(String rd, String prefix, int plen,
+                                  String nexthop, int label) {
+        Map<String, Map<String, String>> stale_fib_rd_map = BgpConfigurationManager.getStaledFibEntriesMap();
+        boolean addroute = false;
+        if (!stale_fib_rd_map.isEmpty()) {
+            // restart Scenario, as MAP is not empty.
+            Map<String, String> map = stale_fib_rd_map.get(rd);
+            if (map !=null) {
+                String nexthoplabel = map.get(prefix + "/" + plen);
+                if (null == nexthoplabel) {
+                    // New Entry, which happend to be added during restart.
+                    addroute = true;
+                } else {
+                    map.remove(prefix + "/" + plen);
+                    if (isRouteModified(nexthop, label, nexthoplabel)) {
+                        LOG.debug("Route add ** {} ** {}/{} ** {} ** {} ", rd, prefix,
+                                plen, nexthop, label);
+                        // Existing entry, where in Nexthop/Label got modified during restart
+                        addroute = true;
+                    }
                 }
-                if((gateway.getPeerAddressType() != null) && (gateway.getPeerAddressType() instanceof org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.bgp.rev130715.bgp.neighbors.bgp.neighbor.peer.address.type.IpAddress)) {
-                    IpAddress neighborIPAddr = ((org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.bgp.rev130715.bgp.neighbors.bgp.neighbor.peer.address.type.IpAddress)gateway.getPeerAddressType()).getIpAddress();
-                    LOG.debug("Bgp Neighbor IP Address {} ", neighborIPAddr.getIpv4Address().getValue());
-                    bgpConfiguration.setNeighbourIp(neighborIPAddr.getIpv4Address().getValue());
+            }
+        } else {
+            LOG.debug("Route add ** {} ** {}/{} ** {} ** {} ", rd, prefix,
+                    plen, nexthop, label);
+            addroute = true;
+        }
+        if (addroute) {
+            fib.addFibEntryToDS(rd, prefix + "/" + plen,
+                    nexthop, label);
+        }
+    }
 
+    private static boolean isRouteModified(String nexthop, int label, String nexthoplabel) {
+        return !nexthoplabel.isEmpty() && !nexthoplabel.equals(nexthop+"/"+label);
+    }
+
+    static private void replayNbrConfig(List<Neighbors> n, BgpRouter br) { 
+        for (Neighbors nbr : n) {
+            try {
+                br.addNeighbor(nbr.getAddress().getValue(),
+                               nbr.getRemoteAs().intValue());
+                //itmProvider.buildTunnelsToDCGW(new IpAddress(nbr.getAddress().getValue().toCharArray()));
+            } catch (Exception e) {
+                LOG.error("Replay:addNbr() received exception: \""+e+"\"");
+                continue;
+            }
+            EbgpMultihop en = nbr.getEbgpMultihop();
+            if (en != null) {
+                try {
+                    br.addEbgpMultihop(en.getPeerIp().getValue(), 
+                                       en.getNhops().intValue()); 
+                } catch (Exception e) {
+                    LOG.error("Replay:addEBgp() received exception: \""+e+"\"");
                 }
-                if(bgpConfiguration.getNeighbourAsNum() != 0  && bgpConfiguration.getNeighbourIp() != null) {
-                    configureBgpServer(BgpOp.ADD_NGHBR);
+            }
+            UpdateSource us = nbr.getUpdateSource();
+            if (us != null) {
+                try {
+                    br.addUpdateSource(us.getPeerIp().getValue(),
+                                       us.getSourceIp().getValue());
+                } catch (Exception e) {
+                    LOG.error("Replay:addUS() received exception: \""+e+"\"");
+                }
+            }
+            List<AddressFamilies> afs = nbr.getAddressFamilies();
+            if (afs != null) {
+                for (AddressFamilies af : afs) {
+                    af_afi afi = af_afi.findByValue(af.getAfi().intValue());
+                    af_safi safi = af_safi.findByValue(af.getSafi().intValue());
+                    try {
+                        br.addAddressFamily(af.getPeerIp().getValue(), afi, safi);
+                    } catch (Exception e) {
+                        LOG.error("Replay:addAf() received exception: \""+e+"\"");
+                    }
                 }
             }
+        }
+    }
 
+    public static String getConfigHost() {
+        if (config == null) {
+            return cHostStartup;
         }
+        ConfigServer ts = config.getConfigServer();
+        return (ts == null ? cHostStartup : ts.getHost().getValue());
+    }
 
-        @Override
-        protected void add(InstanceIdentifier<BgpNeighbors> identifier,
-                           BgpNeighbors value) {
-            LOG.debug("Bgp Neighbor added in DS - key: {}, value={} ", identifier, value);
+    public static int getConfigPort() {
+        if (config == null) {
+            return Integer.parseInt(cPortStartup);
+        }
+        ConfigServer ts = config.getConfigServer();
+        return (ts == null ? Integer.parseInt(cPortStartup) :
+                             ts.getPort().intValue());
+    }
 
-            addBgpNeighbors(value);
+    public static synchronized void replay() {
+        String host = getConfigHost();
+        int port = getConfigPort();
+        boolean res = bgpRouter.connect(host, port);
+        if (!res) {
+            String msg = "Cannot connect to BGP config server at "+host+":"+port;
+            if (config != null) {
+                msg += "; Configuration Replay aborted";
+            }
+            LOG.error(msg);
+            return;
+        }
+        if (config == null) {
+            return;
+        }
+        BgpRouter br = bgpRouter; 
+        AsId a = config.getAsId();
+        if (a == null) {
+            return;
+        }
+        int asNum = a.getLocalAs().intValue();
+        Ipv4Address routerId = a.getRouterId();
+        Long spt = a.getStalepathTime();
+        Boolean afb = a.isAnnounceFbit();
+        String rid = (routerId == null) ? "" : routerId.getValue();
+        int stalepathTime = (spt == null) ? 90 : spt.intValue(); 
+        boolean announceFbit = (afb == null) ? false : afb.booleanValue();
+        try {
+            br.startBgp(asNum, rid, stalepathTime, announceFbit); 
+        } catch (BgpRouterException bre) {
+            if (bre.getErrorCode() == BgpRouterException.BGP_ERR_ACTIVE) {
+                doRouteSync();
+            } else {
+                LOG.error("Replay: startBgp() received exception: \""
+                          +bre+"\"; "+addWarn);
+            }
+        } catch (Exception e) {
+            //not unusual. We may have restarted & BGP is already on
+            LOG.error("Replay:startBgp() received exception: \""+e+"\"");
         }
 
-        private InstanceIdentifier<?> getWildCardPath() {
-            return InstanceIdentifier.create(BgpNeighbors.class);
+        if (bgpManager.getBgpCounters() == null) {
+            bgpManager.startBgpCountersTask();
+        }
+      
+        Logging l = config.getLogging();
+        if (l != null) {
+            try {
+                br.setLogging(l.getFile(), l.getLevel());
+            } catch (Exception e) {
+                LOG.error("Replay:setLogging() received exception: \""+e+"\"");
+            }
         }
 
+        GracefulRestart g = config.getGracefulRestart();
+        if (g != null) {
+            try {
+                br.addGracefulRestart(g.getStalepathTime().intValue()); 
+            } catch (Exception e) {
+                LOG.error("Replay:addGr() received exception: \""+e+"\"");
+            }
+        }
 
-        @Override
-        public void close() throws Exception {
-            if (listenerRegistration != null) {
+        List<Neighbors> n = config.getNeighbors();
+        if (n != null) {
+            replayNbrConfig(n, br);
+        }
+
+        List<Vrfs> v = config.getVrfs();
+        if (v != null) {
+            for (Vrfs vrf : v)  {
+                try {
+                    br.addVrf(vrf.getRd(), vrf.getImportRts(), 
+                    vrf.getExportRts());
+                } catch (Exception e) {
+                    LOG.error("Replay:addVrf() received exception: \""+e+"\"");
+                }
+            }
+        }
+
+        List<Networks> ln = config.getNetworks();
+        if (ln != null) {
+            for (Networks net : ln) {
+                String rd = net.getRd();
+                String pfxlen = net.getPrefixLen();
+                String nh = net.getNexthop().getValue();
+                Long label = net.getLabel();
+                int lbl = (label == null) ? 0 : label.intValue();
+                if (rd == null && lbl > 0) {
+                    //LU prefix is being deleted. 
+                    rd = Integer.toString(lbl);
+                }
                 try {
-                    listenerRegistration.close();
-                } catch (final Exception e) {
-                    LOG.error("Error when cleaning up DataChangeListener.", e);
+                    br.addPrefix(rd, pfxlen, nh, lbl); 
+                } catch (Exception e) {
+                    LOG.error("Replay:addPfx() received exception: \""+e+"\"");
                 }
-                listenerRegistration = null;
             }
-            LOG.info("Bgp Neighbor Manager Closed");
         }
+    }
+
+    private <T extends DataObject> void update(InstanceIdentifier<T> iid, T dto) {
+        BgpUtil.update(broker, LogicalDatastoreType.CONFIGURATION, iid, dto);
+    }
+
+    private <T extends DataObject> void asyncWrite(InstanceIdentifier<T> iid, T dto) {
+        BgpUtil.write(broker,LogicalDatastoreType.CONFIGURATION,iid,dto);
+    }
+
+    private <T extends DataObject> void delete(InstanceIdentifier<T> iid) {
+        BgpUtil.delete(broker, LogicalDatastoreType.CONFIGURATION, iid);
+    } 
+
+    public synchronized void
+    startConfig(String bgpHost, int thriftPort) {
+        InstanceIdentifier.InstanceIdentifierBuilder<ConfigServer> iib =
+            InstanceIdentifier.builder(Bgp.class).child(ConfigServer.class);
+        InstanceIdentifier<ConfigServer> iid = iib.build();
+        Ipv4Address ipAddr = new Ipv4Address(bgpHost);
+        ConfigServer dto  = new ConfigServerBuilder().setHost(ipAddr)
+                                            .setPort((long) thriftPort).build();
+        update(iid, dto);
+    }
 
+    public synchronized void
+    startBgp(int as, String routerId, int spt, boolean fbit) {
+        Long localAs = (long) as;
+        Ipv4Address rid = (routerId == null) ? 
+                           null : new Ipv4Address(routerId);
+        Long staleTime = (long) spt;
+        InstanceIdentifier.InstanceIdentifierBuilder<AsId> iib =
+            InstanceIdentifier.builder(Bgp.class).child(AsId.class);
+        InstanceIdentifier<AsId> iid = iib.build();
+        AsId dto = new AsIdBuilder().setLocalAs(localAs)
+                                    .setRouterId(rid)
+                                    .setStalepathTime(staleTime)
+                                    .setAnnounceFbit(fbit).build();
+        update(iid, dto);
     }
 
-    private void configureBgpServer(BgpOp bgpOp) {
-        int retryCount = 0;
-        boolean retry = false;
-        do {
+    public synchronized void
+    addLogging(String fileName, String logLevel) {
+        InstanceIdentifier.InstanceIdentifierBuilder<Logging> iib =
+            InstanceIdentifier.builder(Bgp.class).child(Logging.class);
+        InstanceIdentifier<Logging> iid = iib.build();
+        Logging dto = new LoggingBuilder().setFile(fileName)
+                                          .setLevel(logLevel).build();
+        update(iid, dto);
+    }
+
+    public synchronized void
+    addGracefulRestart(int staleTime) {
+        InstanceIdentifier.InstanceIdentifierBuilder<GracefulRestart> iib = 
+            InstanceIdentifier.builder(Bgp.class).child(GracefulRestart.class);
+        InstanceIdentifier<GracefulRestart> iid = iib.build();
+        GracefulRestart dto = new GracefulRestartBuilder()
+                                     .setStalepathTime((long)staleTime).build();
+        update(iid, dto);
+    }
+
+    public synchronized void
+    addNeighbor(String nbrIp, int remoteAs) {
+        Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
+        Long rAs = (long) remoteAs;
+        InstanceIdentifier.InstanceIdentifierBuilder<Neighbors> iib = 
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(Neighbors.class, new NeighborsKey(nbrAddr));
+        InstanceIdentifier<Neighbors> iid = iib.build();
+        Neighbors dto = new NeighborsBuilder().setAddress(nbrAddr)
+                                              .setRemoteAs(rAs).build();
+        update(iid, dto);
+    }
+
+    public synchronized void
+    addUpdateSource(String nbrIp, String srcIp) {
+        Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
+        Ipv4Address srcAddr = new Ipv4Address(srcIp);
+        InstanceIdentifier.InstanceIdentifierBuilder<UpdateSource> iib = 
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(Neighbors.class, new NeighborsKey(nbrAddr))
+                              .child(UpdateSource.class);
+        InstanceIdentifier<UpdateSource> iid = iib.build();
+        UpdateSource dto = new UpdateSourceBuilder().setPeerIp(nbrAddr)
+                                                  .setSourceIp(srcAddr).build();
+        update(iid, dto);
+    }
+
+    public synchronized void
+    addEbgpMultihop(String nbrIp, int nHops) {
+        Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
+        InstanceIdentifier.InstanceIdentifierBuilder<EbgpMultihop> iib = 
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(Neighbors.class, new NeighborsKey(nbrAddr))
+                              .child(EbgpMultihop.class);
+        InstanceIdentifier<EbgpMultihop> iid = iib.build();
+        EbgpMultihop dto = new EbgpMultihopBuilder().setPeerIp(nbrAddr)
+                                                 .setNhops((long)nHops).build();
+        update(iid, dto);
+    }
+
+    public synchronized void
+    addAddressFamily(String nbrIp, int afi, int safi) {
+        Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
+        Long a = (long) afi;
+        Long sa = (long) safi;
+        InstanceIdentifier.InstanceIdentifierBuilder<AddressFamilies> iib = 
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(Neighbors.class, new NeighborsKey(nbrAddr))
+                   .child(AddressFamilies.class, new AddressFamiliesKey(a, sa));
+        InstanceIdentifier<AddressFamilies> iid = iib.build();
+        AddressFamilies dto = new AddressFamiliesBuilder().setPeerIp(nbrAddr)
+                                                 .setAfi(a).setSafi(sa).build();
+        update(iid, dto);
+    }
+
+    public synchronized void
+    addPrefix(String rd, String pfx, String nh, int lbl) {
+        Ipv4Address nexthop = new Ipv4Address(nh);
+        Long label = (long) lbl;
+        InstanceIdentifier.InstanceIdentifierBuilder<Networks> iib = 
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(Networks.class, new NetworksKey(pfx, rd));
+        InstanceIdentifier<Networks> iid = iib.build();
+        Networks dto = new NetworksBuilder().setRd(rd)
+                                            .setPrefixLen(pfx)
+                                            .setNexthop(nexthop)
+                                            .setLabel(label).build();
+        update(iid, dto);
+    }
+
+    public synchronized void
+    addVrf(String rd, List<String> irts, List<String> erts) {
+        InstanceIdentifier.InstanceIdentifierBuilder<Vrfs> iib =
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(Vrfs.class, new VrfsKey(rd));
+        InstanceIdentifier<Vrfs> iid = iib.build();
+        Vrfs dto = new VrfsBuilder().setRd(rd)
+                                    .setImportRts(irts)
+                                    .setExportRts(erts).build();
+
+        asyncWrite(iid, dto);
+    }
+
+    public synchronized void stopConfig() {
+        InstanceIdentifier.InstanceIdentifierBuilder<ConfigServer> iib =
+            InstanceIdentifier.builder(Bgp.class).child(ConfigServer.class);
+        InstanceIdentifier<ConfigServer> iid = iib.build();
+        delete(iid);
+    }
+
+    public synchronized void stopBgp() {
+        InstanceIdentifier.InstanceIdentifierBuilder<AsId> iib =
+            InstanceIdentifier.builder(Bgp.class).child(AsId.class);
+        InstanceIdentifier<AsId> iid = iib.build();
+        delete(iid);
+    }
+
+    public synchronized void delLogging() {
+        InstanceIdentifier.InstanceIdentifierBuilder<Logging> iib =
+            InstanceIdentifier.builder(Bgp.class).child(Logging.class);
+        InstanceIdentifier<Logging> iid = iib.build();
+        delete(iid);
+    }
+
+    public synchronized void delGracefulRestart() {
+        InstanceIdentifier.InstanceIdentifierBuilder<GracefulRestart> iib = 
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(GracefulRestart.class);
+        InstanceIdentifier<GracefulRestart> iid = iib.build();
+        delete(iid);
+    }
+
+    public synchronized void delNeighbor(String nbrIp) {
+        Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
+        InstanceIdentifier.InstanceIdentifierBuilder<Neighbors> iib = 
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(Neighbors.class, new NeighborsKey(nbrAddr));
+        InstanceIdentifier<Neighbors> iid = iib.build();
+        delete(iid);
+    }
+
+    public synchronized void delUpdateSource(String nbrIp) {
+        Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
+        InstanceIdentifier.InstanceIdentifierBuilder<UpdateSource> iib = 
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(Neighbors.class, new NeighborsKey(nbrAddr))
+                              .child(UpdateSource.class);
+        InstanceIdentifier<UpdateSource> iid = iib.build();
+        delete(iid);
+    }
+
+    public synchronized void delEbgpMultihop(String nbrIp) {
+        Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
+        InstanceIdentifier.InstanceIdentifierBuilder<EbgpMultihop> iib = 
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(Neighbors.class, new NeighborsKey(nbrAddr))
+                              .child(EbgpMultihop.class);
+        InstanceIdentifier<EbgpMultihop> iid = iib.build();
+        delete(iid);
+    }
+
+    public synchronized void 
+    delAddressFamily(String nbrIp, int afi, int safi) {
+        Ipv4Address nbrAddr = new Ipv4Address(nbrIp);
+        Long a = (long) afi;
+        Long sa = (long) safi;
+        InstanceIdentifier.InstanceIdentifierBuilder<AddressFamilies> iib = 
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(Neighbors.class, new NeighborsKey(nbrAddr))
+                   .child(AddressFamilies.class, new AddressFamiliesKey(a, sa));
+        InstanceIdentifier<AddressFamilies> iid = iib.build();
+        delete(iid);
+    }
+
+    public synchronized void delPrefix(String rd, String pfx) {
+        InstanceIdentifier.InstanceIdentifierBuilder<Networks> iib = 
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(Networks.class, new NetworksKey(pfx, rd));
+        InstanceIdentifier<Networks> iid = iib.build();
+        delete(iid);
+    }
+
+    public synchronized void delVrf(String rd) {
+        InstanceIdentifier.InstanceIdentifierBuilder<Vrfs> iib = 
+            InstanceIdentifier.builder(Bgp.class)
+                              .child(Vrfs.class, new VrfsKey(rd));
+        InstanceIdentifier<Vrfs> iid = iib.build();
+        delete(iid);
+    }
+
+    static ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
+    /*
+    * Remove Stale Marked Routes after timer expiry.
+    */
+    class RouteCleanup implements Callable<Integer> {
+
+        public Integer call () {
+            int totalCleared = 0;
             try {
-                switch(bgpOp) {
-                    case START_BGP:
-                        bgpManager.startBgpService();
-                        break;
-                    case ADD_NGHBR:
-                        bgpManager.addNeighbor(bgpConfiguration.getNeighbourIp(), bgpConfiguration.getNeighbourAsNum());
-                        break;
-                    case DEL_NGHBR:
-                        bgpManager.deleteNeighbor(bgpConfiguration.getNeighbourIp());
-                        break;
-                    default:
-                        LOG.error("Invalid configuration option {}", bgpOp);
-                }
-
-                retry = false;
-            } catch (TException t) {
-                retry = true;
-                retryCount++;
-            }
-        } while(retry && retryCount <= MAX_RETRIES_BGP_COMMUNICATION);
+            if (staledFibEntriesMap.isEmpty()) {
+                LOG.info("BGP: RouteCleanup timertask tirggered but STALED FIB MAP is EMPTY");
+            } else {
+                for (String rd : staledFibEntriesMap.keySet()) {
+                    if (Thread.interrupted()) {
+                        return 0;
+                    }
+                    Map<String, String> map = staledFibEntriesMap.get(rd);
+                    if (map != null) {
+                        for (String prefix : map.keySet()) {
+                            if (Thread.interrupted()) {
+                                return 0;
+                            }
+                            try {
+                                totalCleared++;
+                                bgpManager.deletePrefix(rd, prefix);
+                            } catch (Exception e) {
+                                LOG.error("BGP: RouteCleanup deletePrefix failed rd:{}, prefix{}" + rd.toString() + prefix);
+                            }
+                        }
+                    }
+                }
+            }
+            } catch(Exception e) {
+                LOG.error("Cleanup Thread Got interrupted, Failed to cleanup stale routes ", e);
+            } finally {
+                staledFibEntriesMap.clear();
+            }
+            LOG.error("cleared {} stale routes after bgp restart", totalCleared);
+            return 0;
+        }
+    }
+
+    /*
+     * BGP restart scenario, ODL-BGP manager was/is running.
+     * On re-sync notification, Get a copy of FIB database.
+     */
+    public static void createStaleFibMap() {
+        int totalStaledCount = 0;
+        try {
+            staledFibEntriesMap.clear();
+            InstanceIdentifier<FibEntries> id = InstanceIdentifier.create(FibEntries.class);
+            DataBroker db = BgpUtil.getBroker();
+            if (db == null) {
+                LOG.error("Couldn't find BgpUtil broker while creating createStaleFibMap");
+                return;
+            }
+    
+            Optional<FibEntries> fibEntries = BgpUtil.read(BgpUtil.getBroker(),
+                    LogicalDatastoreType.CONFIGURATION, id);
+            if (fibEntries.isPresent()) {
+                List<VrfTables> stale_vrfTables = fibEntries.get().getVrfTables();
+                for (VrfTables vrfTable : stale_vrfTables) {
+                    Map<String, String> stale_fib_ent_map = new HashMap<>();
+                    for (VrfEntry vrfEntry : vrfTable.getVrfEntry()) {
+                        if (Thread.interrupted()) {
+                            break;
+                        }
+                        totalStaledCount++;
+                        //Create MAP from stale_vrfTables.
+                        stale_fib_ent_map.put(vrfEntry.getDestPrefix(), vrfEntry.getNextHopAddress() + "/" + vrfEntry.getLabel());
+                    }
+                staledFibEntriesMap.put(vrfTable.getRouteDistinguisher(), stale_fib_ent_map);
+                }
+            } else {
+                    LOG.error("createStaleFibMap:: FIBentries.class is not present");
+            }
+        } catch (Exception e) {
+            LOG.error("createStaleFibMap:: erorr ", e);
+        }
+        LOG.error("created {} staled entries ", totalStaledCount);
+    }
+
+    //map<rd, map<prefix/len, nexthop/label>>
+    public static Map<String, Map<String, String>> getStaledFibEntriesMap() {
+        return staledFibEntriesMap;
     }
+
+
 }
index 55085413eecf3c775373a8bc1af0a1c43d79a338..909b82a89d28cd5168c082042ebf369cad240039 100644 (file)
@@ -5,28 +5,25 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.bgpmanager;
 
+package org.opendaylight.bgpmanager;
 
-import java.net.SocketTimeoutException;
+import java.lang.management.ManagementFactory;
 import java.util.*;
-import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CountDownLatch;
-
+import javax.management.*;
 import org.apache.thrift.TException;
-import org.opendaylight.bgpmanager.thrift.client.globals.Route;
-import org.opendaylight.bgpmanager.thrift.client.implementation.BgpRouter;
-import org.opendaylight.bgpmanager.thrift.server.implementation.BgpThriftService;
-import org.opendaylight.bgpmanager.thrift.exceptions.BgpRouterException;
 import org.opendaylight.bgpmanager.api.IBgpManager;
-import org.opendaylight.bgpmanager.globals.BgpConfiguration;
-import org.opendaylight.bgpmanager.globals.BgpConstants;
-
+import org.opendaylight.bgpmanager.commands.Commands;
+import org.opendaylight.bgpmanager.oam.*;
+import org.opendaylight.bgpmanager.thrift.gen.af_afi;
+import org.opendaylight.bgpmanager.thrift.gen.af_safi;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
-
+//import org.opendaylight.vpnservice.itm.api.IITMProvider;
+import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.Bgp;
+import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.Neighbors;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.FrameworkUtil;
@@ -36,337 +33,233 @@ import org.slf4j.LoggerFactory;
 public class BgpManager implements BindingAwareProvider, AutoCloseable, IBgpManager {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(BgpManager.class);
-    private BgpConfigurationManager bgpConfigurationMgr;
+    private BgpConfigurationManager bcm;
     private FibDSWriter fibDSWriter;
-    private BgpConfiguration   bgpConfiguration = new BgpConfiguration();
-    private BgpRouter           bgpThriftClient;
-    private BgpThriftService    bgpThriftService;
-    private boolean             isBgpInitialized = false;
-    private boolean             hasBgpServiceStarted = false;
-    private String                             bgpHost;
-    private int                                        bgpPort;
-
-
-    private String getCustomConfig(String var, String def) {
-        Bundle b = FrameworkUtil.getBundle(this.getClass());
-        BundleContext context = null;
-        if (b != null) {
-            context = b.getBundleContext();
-        }
-        if (context != null)
-            return context.getProperty(var);
-        else
-            return def;
-
-    }
-
-    private void initializeBGPCommunication() {
-        //start our side of thrift server
-        bgpThriftService = new BgpThriftService(this, fibDSWriter);
-        bgpThriftService.start();
-
-        //start bgp thrift client connection
-        bgpThriftClient = new BgpRouter();
-
-        bgpHost = getCustomConfig(BgpConstants.BGP_SPEAKER_HOST_NAME, BgpConstants.DEFAULT_BGP_HOST_NAME);
-        bgpPort = BgpConstants.DEFAULT_BGP_THRIFT_PORT;
-
-        configureBgpServer(bgpHost, bgpPort);
-        try {
-            connectToServer(bgpHost, bgpPort);
-        } catch (Exception e) {
-            return;
-        }
-
-        isBgpInitialized = true;
-        //notify();       //notify all threads waiting for bgp init
-
-    }
-
-    public synchronized void waitForBgpInit() {
-        if(!isBgpInitialized) {
-            try {
-                wait();
-            } catch (InterruptedException e) {
-                LOGGER.error("InterruptedException while waiting for Bgp connection to initialize");
-                return;
-            }
-        }
-    }
-
-    public void startBgpService() throws TException {
-        if(bgpThriftClient == null) {
-            LOGGER.error("Start Bgp Service - bgpThriftClient is null. Unable to start BGP service.");
-            return;
-        }
-
-        // Now try start bgp - if bgp is already Active, it will tell us, nothing to do then
-        try {
-            bgpThriftClient.startBgp((int)bgpConfiguration.getAsNum(), bgpConfiguration.getRouterId());
-            LOGGER.debug("Started BGP with AS number " + (int)bgpConfiguration.getAsNum() + " and router id " + bgpConfiguration.getRouterId());
-        } catch (BgpRouterException be) {
-            if(be.getErrorCode() == BgpRouterException.BGP_ERR_ACTIVE) {
-                LOGGER.info("bgp server already active");
-                return;
-            }
-            else if(be.getErrorCode() == BgpRouterException.BGP_ERR_NOT_INITED) {
-                LOGGER.error("bgp server connection not initialized.");
-                reInitConn();
-                return;
-            }
-            else {
-                LOGGER.error("application error while starting bgp server " + be.getErrorCode());
-                return;
-            }
-
-        }  catch (TException t) {
-            LOGGER.error("Could not set up thrift connection with bgp server");
-            LOGGER.debug("Transport error while starting bgp server ", t);
-            reInitConn();
-            throw t;
-        } catch (Exception e) {
-            LOGGER.error("Error while starting bgp server");
-            LOGGER.debug("Bgp Service not started due to exception", e);
-            return;
-        }
+    //private IITMProvider        itmProvider;
+    private DataBroker dataBroker;
+    private BgpAlarmBroadcaster     qbgpAlarmProducer = null;
+    private MBeanServer qbgpAlarmServer = null;
+    private NotificationFilter  qbgpAlarmFilter = null;
+    final static int DEFAULT_STALEPATH_TIME = 210;
+    final static boolean DEFAULT_FBIT = true;
 
-        hasBgpServiceStarted = true;
-
-    }
+    public BgpCounters bgpCounters;
+    public Timer bgpCountersTimer;
 
     @Override
     public void onSessionInitiated(ProviderContext session) {
-        LOGGER.info("BgpManager Session Initiated");
         try {
-            final DataBroker dataBroker = session.getSALService(DataBroker.class);
-            bgpConfigurationMgr = new BgpConfigurationManager(dataBroker, bgpConfiguration, this);
+            dataBroker = session.getSALService(DataBroker.class);
             fibDSWriter = new FibDSWriter(dataBroker);
+            BgpUtil.setBroker(dataBroker);
+            bcm = new BgpConfigurationManager(this);
+            Commands commands = new Commands(this);
+            ConfigureBgpCli.setBgpManager(this);
+            LOGGER.info("BgpManager started");
         } catch (Exception e) {
-            LOGGER.error("Error initializing services", e);
+            LOGGER.error("Failed to start BgpManager: "+e);
         }
 
-        initializeBGPCommunication();
+        // Set up the Infra for Posting BGP Alarms as JMX notifications.
+        try {
+            qbgpAlarmProducer = new BgpAlarmBroadcaster();
+            MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
+            ObjectName alarmObj = new ObjectName("SDNC.FM:name=BgpAlarmObj");
+            mbs.registerMBean(qbgpAlarmProducer, alarmObj);
+        } catch (JMException e) {
+            LOGGER.error("Adding a NotificationBroadcaster failed." + e.toString());
+            e.printStackTrace();
+        }
     }
 
-
    @Override
     public void close() throws Exception {
+        bcm.close(); 
         LOGGER.info("BgpManager Closed");
-
-       //close the client and server ends of the thrift communication
-       if(bgpThriftClient != null)
-           bgpThriftClient.disconnect();
-       bgpThriftService.stop();
-
-
    }
 
-    private void setBgpServerDetails() {
-        if(bgpThriftClient != null)
-            bgpThriftClient.setBgpServer(bgpHost, bgpPort);
+    /*public void setITMProvider(IITMProvider itmProvider) {
+        this.itmProvider = itmProvider;
     }
 
-    private void configureBgpServer(String bgpServer, int bgpPort) {
-        bgpConfiguration.setBgpServer(bgpServer);
-        bgpConfiguration.setBgpPort(bgpPort);
-        setBgpServerDetails();
+    public IITMProvider getItmProvider() { return this.itmProvider; } */
+
+    public Bgp getConfig() {
+      return bcm.get();
     }
 
-    protected void addNeighbor(String ipAddress, long asNum) throws TException {
-        if(bgpThriftClient == null) {
-            LOGGER.error("Add BGP Neighbor - bgpThriftClient is null. Unable to add BGP Neighbor.");
-            return;
-        }
+    public void configureGR(int stalepathTime) throws TException {
+      bcm.addGracefulRestart(stalepathTime);
+    }
 
-        try {
-            bgpThriftClient.addNeighbor(ipAddress, (int) asNum);
-        } catch (BgpRouterException b) {
-            LOGGER.error("Failed to add BGP neighbor " + ipAddress + " due to BgpRouter Exception number " + b.getErrorCode());
-            LOGGER.debug("BgpRouterException trace ", b);
-        } catch (TException t) {
-            LOGGER.error(String.format("Failed adding neighbor %s due to Transport error", ipAddress));
-            reInitConn();
-            throw t;
-        } catch (Exception e) {
-            LOGGER.error(String.format("Failed adding neighbor %s", ipAddress));
-        }
+    public void delGracefulRestart() throws Exception {
+      bcm.delGracefulRestart();
     }
 
+    public void addNeighbor(String ipAddress, long asNum) throws TException {
+      bcm.addNeighbor(ipAddress, (int) asNum);
+    }
 
-    protected void deleteNeighbor(String ipAddress) throws TException {
-        if(bgpThriftClient == null) {
-            LOGGER.error("Delete BGP Neighbor - bgpThriftClient is null. Unable to delete BGP Neighbor.");
-            return;
-        }
+    public void addEbgpMultihop(String ipAddress, int nhops) throws TException {
+      bcm.addEbgpMultihop(ipAddress, nhops);
+    }
+    
+    public void addUpdateSource(String ipAddress, String srcIp) throws TException {
+      bcm.addUpdateSource(ipAddress, srcIp);
+    }
 
-        try {
-            bgpThriftClient.delNeighbor(ipAddress);
-        } catch (BgpRouterException b) {
-            LOGGER.error("Failed to delete BGP neighbor " + ipAddress + "due to BgpRouter Exception number " + b.getErrorCode());
-            LOGGER.debug("BgpRouterException trace ", b);
-        }catch (TException t) {
-            LOGGER.error(String.format("Failed deleting neighbor %s due to Transport error", ipAddress));
-            reInitConn();
-            throw t;
-        } catch (Exception e) {
-            LOGGER.error(String.format("Failed deleting neighbor %s", ipAddress));
-        }
+    public void addAddressFamily(String ipAddress, af_afi afi, af_safi safi) throws TException {
+      bcm.addAddressFamily(ipAddress, afi.getValue(), safi.getValue());
     }
 
+    public void deleteNeighbor(String ipAddress) throws TException {
+      bcm.delNeighbor(ipAddress);
+    }
 
     @Override
     public void addVrf(String rd, Collection<String> importRts, Collection<String> exportRts) throws Exception {
-        if(bgpThriftClient == null) {
-            LOGGER.error("Add BGP vrf - bgpThriftClient is null. Unable to add BGP vrf.");
-            return;
-        }
-        try {
-            bgpThriftClient.addVrf(rd, new ArrayList<>(importRts), new ArrayList<>(exportRts));
-        } catch (BgpRouterException b) {
-            LOGGER.error("Failed to add BGP vrf " + rd + "due to BgpRouter Exception number " + b.getErrorCode());
-            LOGGER.debug("BgpRouterException trace ", b);
-            throw b;
-        } catch (TException t) {
-            LOGGER.error(String.format("Failed adding vrf %s due to Transport error", rd));
-            reInitConn();
-            throw t;
-        } catch (Exception e) {
-            LOGGER.error(String.format("Failed adding vrf %s", rd));
-            throw e;
-        }
+        bcm.addVrf(rd, new ArrayList<String>(importRts), 
+                       new ArrayList<String>(exportRts)); 
     }
 
     @Override
     public void deleteVrf(String rd) throws Exception {
-        if(bgpThriftClient == null || !hasBgpServiceStarted) {
-            LOGGER.debug("Delete BGP vrf - Unable to delete BGP vrf in BGP Server. Removing Vrf from local DS");
-            fibDSWriter.removeVrfFromDS(rd);
-            return;
-        }
-
-        try {
-            bgpThriftClient.delVrf(rd);
-            fibDSWriter.removeVrfFromDS(rd);
-        } catch (BgpRouterException b) {
-            LOGGER.error("Failed to delete BGP vrf " + rd + "due to BgpRouter Exception number " + b.getErrorCode());
-            LOGGER.debug("BgpRouterException trace ", b);
-            throw b;
-        } catch (TException t) {
-            LOGGER.error(String.format("Failed deleting vrf %s due to Transport error", rd));
-            reInitConn();
-            throw t;
-        } catch (Exception e) {
-            LOGGER.error(String.format("Failed deleting vrf %s", rd));
-            throw e;
-        }
+      bcm.delVrf(rd);
     }
 
     @Override
     public void addPrefix(String rd, String prefix, String nextHop, int vpnLabel) throws Exception {
+      fibDSWriter.addFibEntryToDS(rd, prefix, nextHop, vpnLabel);
+      bcm.addPrefix(rd, prefix, nextHop, vpnLabel);
+    }
 
-        if(bgpThriftClient == null || !hasBgpServiceStarted) {
-            fibDSWriter.addFibEntryToDS(rd, prefix, nextHop, vpnLabel);
-            return;
-        }
+    @Override
+    public void deletePrefix(String rd, String prefix) throws Exception {
+      fibDSWriter.removeFibEntryFromDS(rd, prefix);
+      bcm.delPrefix(rd, prefix);
+    }
 
-        try {
-            bgpThriftClient.addPrefix(rd, prefix, nextHop, vpnLabel);
-        } catch (BgpRouterException b) {
-            LOGGER.error("Failed to add BGP prefix " + prefix + "due to BgpRouter Exception number " + b.getErrorCode());
-            LOGGER.debug("BgpRouterException trace ", b);
-            throw b;
-        } catch (TException t) {
-            LOGGER.error(String.format("Failed adding prefix entry <vrf:prefix:nexthop:vpnlabel> %s:%s:%s:%d due to Transport error",
-                rd, prefix, nextHop, vpnLabel));
-            reInitConn();
-            throw t;
-        } catch (Exception e) {
-            LOGGER.error(String.format("Failed adding prefix entry <vrf:prefix:nexthop:vpnlabel> %s:%s:%s:%d",
-                rd, prefix, nextHop, vpnLabel));
-            throw e;
-        }
+    public void setQbgpLog(String fileName, String debugLevel) throws Exception {
+      bcm.addLogging(fileName, debugLevel);
+    }
+
+    public void delLogging() throws Exception {
+      bcm.delLogging();
     }
 
+    public void startBgp(int asn, String routerId, int spt, boolean fbit) {
+      bcm.startBgp(asn, routerId, spt, fbit);
+    }
+
+    public void stopBgp() {
+      bcm.stopBgp();
+    }
+
+    public void startConfig(String host, int port) {
+      bcm.startConfig(host, port);
+    }
+
+    public void stopConfig() {
+      bcm.stopConfig();
+    }
 
     @Override
-    public void deletePrefix(String rd, String prefix) throws Exception {
-        if(bgpThriftClient == null || !hasBgpServiceStarted) {
-            fibDSWriter.removeFibEntryFromDS(rd, prefix);
-            return;
+    public String getDCGwIP() {
+        Bgp conf = getConfig();
+        if (conf == null) {
+          return null;
         }
-
-        try {
-            bgpThriftClient.delPrefix(rd, prefix);
-        } catch (BgpRouterException b) {
-            LOGGER.error("Failed to delete BGP prefix " + prefix + "due to BgpRouter Exception number " + b.getErrorCode());
-            LOGGER.debug("BgpRouterException trace ", b);
-            throw b;
-        } catch (TException t) {
-            LOGGER.error(String.format("Failed deleting prefix entry <vrf:prefix> %s:%s due to Transport error",
-                rd, prefix));
-            reInitConn();
-            throw t;
-        } catch (Exception e) {
-            LOGGER.error(String.format("Failed deleting prefix entry <vrf:prefix> %s:%s",
-                rd, prefix));
-            throw e;
+        List<Neighbors> nbrs = conf.getNeighbors();
+        if (nbrs == null) {
+          return null;
         }
+        return nbrs.get(0).getAddress().getValue();
     }
 
-    private void connectToServer(String host, int port) throws Exception {
-
-        bgpHost = host;
-        bgpPort = port;
+    public MBeanServer getBgpAlarmServer() {
+        return qbgpAlarmServer;
+    }
 
-        if(bgpThriftClient == null) {
-            LOGGER.error("Failed to connect to BGP server since Bgp Thrift Client is not initialized yet.");
+    public synchronized void sendNotificationEvent(String pfx, int code, int subcode) {
+        BgpAlarmErrorCodes errorSubCode;
+        if (code != BgpConstants.BGP_NOTIFY_CEASE_CODE) {
+            // CEASE Notifications alone have to be reported to the CBA.
+            // Silently return here. No need to log because tons
+            // of non-alarm notifications will be sent to the SDNc.
             return;
         }
-        try {
-            bgpThriftClient.connect(host, port);
-            LOGGER.debug("Connected to BGP server {} on port {} ", host, port);
-        } catch (BgpRouterException b) {
-            LOGGER.error("Failed to connect to BGP server " + host + " on port " + port + " due to BgpRouter Exception number " + b.getErrorCode());
-            LOGGER.debug("BgpRouterException trace ", b);
-            throw b;
-        } catch (TException t) {
-            LOGGER.error("Failed to initialize BGP Connection due to Transport error ");
-            throw t;
-        }
-        catch (Exception e) {
-            LOGGER.error("Failed to initialize BGP Connection ");
-            throw e;
+        errorSubCode = BgpAlarmErrorCodes.checkErrorSubcode(subcode);
+        if (errorSubCode == BgpAlarmErrorCodes.ERROR_IGNORE) {
+            // Need to report only those subcodes, defined in
+            // BgpAlarmErrorCodes enum class.
+            return;
         }
+        String alarmString = "";
+        alarmString = "Alarm (" + code + "," + subcode + ") from neighbor " + pfx;
+        qbgpAlarmProducer.sendBgpAlarmInfo(pfx, code, subcode);
     }
 
-    public void configureBgp(long asNum, String routerId) {
-        try {
-            bgpConfiguration.setAsNum(asNum);
-            bgpConfiguration.setRouterId(routerId);
-        } catch(Exception e) {
-            LOGGER.error("failed configuring bgp ",e);
-        }
+    public Timer getBgpCountersTimer() {
+        return bgpCountersTimer;
     }
 
-    public synchronized void reInitConn() {
+    public BgpCounters getBgpCounters() {
+        return bgpCounters;
+    }
 
-        try {
-            bgpThriftClient.reInit();
-            LOGGER.debug("Reinitialized connection to BGP Server {}", bgpHost);
-        } catch (BgpRouterException b) {
-            LOGGER.error("Failed to reinitialize connection to BGP server {} on port {} due to BgpRouter Exception number {}", bgpHost, bgpPort, b.getErrorCode());
-            LOGGER.debug("BgpRouterException trace ", b);
-        } catch (TException t) {
-            LOGGER.error("Failed to reinitialize BGP Connection due to Transport error.");
+    public  void setBgpCountersTimer (Timer t) {
+        bgpCountersTimer = t;
+    }
+
+    public void startBgpCountersTask() {
+        if (getBgpCounters() == null) {
+
+            try {
+                bgpCounters = new BgpCounters();
+                setBgpCountersTimer(new Timer(true));
+                getBgpCountersTimer().scheduleAtFixedRate(bgpCounters, 0, 120 * 1000);
+
+
+                LOGGER.info("Bgp Counters task scheduled for every two minutes.");
+            } catch (Exception e) {
+                System.out.println("Could not start the timertask for Bgp Counters.");
+                e.printStackTrace();
+            }
+
+            try {
+                setQbgpLog(BgpConstants.BGP_DEF_LOG_FILE, BgpConstants.BGP_DEF_LOG_LEVEL);
+            } catch (Exception e) {
+                System.out.println("Could not set the default options for logging");
+            }
         }
-        catch (Exception e) {
-            LOGGER.error("Failed to reinitialize BGP Connection.", e);
+    }
+
+    public void stopBgpCountersTask() {
+        Timer t = getBgpCountersTimer();
+        if (getBgpCounters() != null) {
+            t.cancel();
+            setBgpCountersTimer(null);
+            bgpCounters = null;
         }
     }
 
-    public void disconnect() {
-        bgpThriftClient.disconnect();
+    public FibDSWriter getFibWriter() {
+        return fibDSWriter;
+    } 
+
+    public DataBroker getBroker() {
+        return dataBroker;
+    } 
+
+    public String getConfigHost() {
+        return bcm.getConfigHost();
     }
 
+    public int getConfigPort() {
+        return bcm.getConfigPort();
+    }
 
+    public void bgpRestarted() {
+        bcm.bgpRestarted();
+    }
 }
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/BgpUtil.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/BgpUtil.java
new file mode 100644 (file)
index 0000000..9aacdb8
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager;
+
+import com.google.common.base.Optional;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
+import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Created by emhamla on 8/31/2015.
+ */
+public class BgpUtil {
+
+    private static final Logger LOG = LoggerFactory.getLogger(BgpUtil.class);
+    private static DataBroker  dataBroker;
+
+    static <T extends DataObject> void update(DataBroker broker, LogicalDatastoreType datastoreType,
+                                              InstanceIdentifier<T> path, T data) {
+        WriteTransaction tx = broker.newWriteOnlyTransaction();
+        tx.merge(datastoreType, path, data, true);
+        tx.submit();
+    }
+
+    public static <T extends DataObject> void write(DataBroker broker, LogicalDatastoreType datastoreType,
+                                              InstanceIdentifier<T> path, T data) {
+        WriteTransaction tx = broker.newWriteOnlyTransaction();
+        tx.put(datastoreType, path, data, true);
+        tx.submit();
+    }
+
+    static <T extends DataObject> void delete(DataBroker broker, LogicalDatastoreType datastoreType, InstanceIdentifier<T> path) {
+        WriteTransaction tx = broker.newWriteOnlyTransaction();
+        tx.delete(datastoreType, path);
+        tx.submit();
+    }
+
+    public static <T extends DataObject> Optional<T> read(DataBroker broker, LogicalDatastoreType datastoreType,
+                                                   InstanceIdentifier<T> path) {
+
+        ReadOnlyTransaction tx = broker.newReadOnlyTransaction();
+
+        Optional<T> result = Optional.absent();
+        try {
+            result = tx.read(datastoreType, path).get();
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+
+        return result;
+    }
+
+    public static void setBroker(DataBroker broker) {
+        BgpUtil.dataBroker = broker;
+    }
+
+    public static DataBroker getBroker() {
+        return dataBroker;
+    }
+
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/ConfigureBgpCli.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/ConfigureBgpCli.java
new file mode 100644 (file)
index 0000000..71d9786
--- /dev/null
@@ -0,0 +1,398 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Future;
+
+import org.apache.karaf.shell.commands.*;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.bgpmanager.thrift.gen.af_afi;
+import org.opendaylight.bgpmanager.thrift.gen.af_safi;
+import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.*;
+import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.*;
+import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.*;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.*;
+
+import com.google.common.base.Optional;
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
+
+@Command(scope = "odl", name = "configure-bgp", description = "")
+public class ConfigureBgpCli extends OsgiCommandSupport {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(ConfigureBgpCli.class);
+
+    private static BgpManager bgpManager;
+
+    public static void setBgpManager(BgpManager mgr) {
+        bgpManager = mgr;
+    }
+
+    @Option(name = "-op", aliases = {"--operation","--op"}, description = "[start-bgp-server, stop-bgp-server, add-neighbor, delete-neighbor, graceful-restart, enable-log ]",
+            required = false, multiValued = false)
+    String op;
+
+    //exec configure-bgp  add-neighbor --ip <neighbor-ip> --as-num <as-num> --address-family <af> --use-source-ip <sip> --ebgp-multihops <em> --next-hop <nh>
+
+    @Option(name = "--as-num", description = "as number of the bgp neighbor", required = false, multiValued = false)
+    String asNumber = null;
+
+    @Option(name = "--ip", description = "ip of the bgp neighbor", required = false, multiValued = false)
+    String ip = null;
+
+    @Option(name = "--address-family", description = "address family of the bgp neighbor SAFI_IPV4_LABELED_UNICAST|SAFI_MPLS_VPN", 
+            required = false, multiValued = false)
+    String addressFamily = null;
+
+    @Option(name = "--use-source-ip", description = "source ip to be used for neighborship connection establishment", 
+            required = false, multiValued = false)
+    String sourceIp = null;
+
+    @Option(name = "--ebgp-multihops", description = "ebgp multihops of the bgp neighbor", 
+            required = false, multiValued = false)
+    String ebgpMultihops = null;
+
+    @Option(name = "--router-id", description = "router id of the bgp instance", 
+            required = false, multiValued = false)
+    String routerId = null;
+
+    @Option(name = "--stalepath-time", description = "the time delay after bgp restart stalepaths are cleaned", 
+            required = false, multiValued = false)
+    String stalePathTime = null;
+
+    @Option(name = "--log-file-path", description = "bgp log file path", 
+            required = false, multiValued = false)
+    String logFile = null;
+
+    @Option(name = "--log-level", description = "log level emergencies,alerts,critical,errors,warnings,notifications,informational,debugging",
+            required = false, multiValued = false)
+    String logLevel = null;
+
+    enum LogLevels {
+        emergencies,alerts,critical,errors,warnings,notifications,informational,debugging;
+    }
+
+    @Override
+    protected Object doExecute() throws Exception {
+        try {
+            if (op == null) {
+                System.out.println("Please provide valid operation");
+                usage();
+                System.out.println("exec configure-bgp -op [start-bgp-server | stop-bgp-server | add-neighbor | delete-neighbor| graceful-restart| enable-log ]");
+            }
+            switch(op) {
+            case "start-bgp-server":
+                startBgp();
+                break;
+            case "stop-bgp-server":
+                stopBgp();
+                break;
+            case "add-neighbor":
+                addNeighbor();
+                break;
+            case "delete-neighbor":
+                deleteNeighbor();
+                break;
+            case "graceful-restart":
+                configureGR();
+                break;
+            case "enable-log" :
+                enableBgpLogLevel();
+                break;
+            default :
+                System.out.println("invalid operation");
+                usage();
+                System.out.println("exec configure-bgp -op [start-bgp-server | stop-bgp-server | add-neighbor | delete-neighbor| graceful-restart| enable-log ]");
+            }
+        } catch (Exception e) {
+            log.error("failed to handle the command",e);
+        }
+        return null;
+    }
+
+    public boolean validateStalepathTime() {
+        try {
+            int time = Integer.parseInt(stalePathTime);
+            if (time < 30 || time > 3600) {
+                System.out.println("invalid stale path time valid range [30-3600]");
+                printGracefulRestartHelp();
+                return false;
+            }
+        } catch (Exception e) {
+            System.out.println("invalid stale path time");
+            printGracefulRestartHelp();
+            return false;
+        }
+        return true;
+    }
+
+    private void configureGR() throws Exception {
+        boolean validStalepathTime = validateStalepathTime();
+        if (!validStalepathTime) {
+            return;
+        }
+        bgpManager.configureGR(Integer.parseInt(stalePathTime));
+    }
+
+    private void deleteNeighbor() throws Exception {
+        if (ip == null || !validateIp(ip)) {
+            System.out.println("invalid neighbor ip");
+            printDeleteNeighborHelp();
+            return;
+        }
+        long asNo = getAsNumber(ip);
+        if (asNo < 0) {
+            System.out.println("neighbor does not exist");
+            printDeleteNeighborHelp();
+            return;
+        }
+        bgpManager.deleteNeighbor(ip);
+    }
+
+    public long getAsNumber(String nbrIp) {
+        Bgp conf = bgpManager.getConfig();
+        if (conf == null) {
+          return -1;
+        }
+        List<Neighbors> nbrs = conf.getNeighbors();
+        if (nbrs == null) {
+          return -1;
+        }
+        for (Neighbors nbr : nbrs) {
+          if (nbrIp.equals(nbr.getAddress().getValue())) {
+             return nbr.getRemoteAs().longValue();
+          }
+        }
+        return -1;
+    }
+
+    private void stopBgp() throws Exception {
+        Bgp conf = bgpManager.getConfig();
+        if (conf == null) {
+            return;
+        }
+        List<Neighbors> nbrs = conf.getNeighbors();
+        if (nbrs != null && nbrs.size() > 0) {
+            System.err.println("error: all BGP congiguration must be deleted before stopping the router instance");
+            return;
+        }
+        bgpManager.stopBgp();
+    }
+
+    void usage() {
+        System.out.println("usage:");
+    }
+
+    void printStartBgpHelp() {
+        usage();
+        System.out.println("exec configure-bgp -op start-bgp-server --as-num <asnum> --router-id <routerid> [--stalepath-time <time>]");
+    }
+
+    void printAddNeighborHelp() {
+        usage();
+        System.out.println("exec configure-bgp -op add-neighbor --ip <neighbor-ip> --as-num <as-num> [--address-family <af>]  [--use-source-ip <sip>] [--ebgp-multihops <em> ]");
+    }
+
+    void printDeleteNeighborHelp() {
+        usage();
+        System.out.println("exec configure-bgp -op delete-neighbor --ip <neighbor-ip>");
+    }
+
+    void printEnableLogHelp() {
+        usage();
+        System.out.println("exec configure-bgp -op enable-logging --filename <filename> --log-level [emergencies|alerts|critical|errors|warnings|notifications|informational|debugging]");
+    }
+
+    void printGracefulRestartHelp() {
+        usage();
+        System.out.println("exec configure-bgp -op graceful-restart --stalepath-time <30-3600>");
+    }
+
+    private void startBgp() throws Exception {
+        boolean validRouterId = false;
+
+        if (bgpManager.getConfig() != null &&
+               bgpManager.getConfig().getAsId() != null) {
+            System.out.println("bgp is already started please use stop-bgp-server and start again");
+            return;
+        }
+        try {
+            long asno = Long.valueOf(asNumber);
+            switch((int)asno) {
+            case 0:
+            case 65535:
+            case 23456:
+                System.out.println("reserved as number supplied ");
+                printStartBgpHelp();
+                return;
+            }
+            if (asno <= 0 || asno > Integer.MAX_VALUE) {
+                System.out.println("invalid as number , supported range [1,"+Integer.MAX_VALUE+"]");
+                printStartBgpHelp();
+                return;
+            }
+        } catch (Exception e) {
+            System.out.println("invalid as number ");
+            printStartBgpHelp();
+            return;
+        }
+        validRouterId = validateIp(routerId);
+        if (!validRouterId) {
+            System.out.println("invalid router id please supply valid ip address");
+            printStartBgpHelp();
+            return;
+        }
+
+        if (stalePathTime != null) {
+            boolean validStalepathTime = validateStalepathTime();
+            if (!validStalepathTime) {
+                return;
+            }
+        }
+        bgpManager.startBgp(Integer.parseInt(asNumber), routerId, 
+          stalePathTime == null? 0 : Integer.parseInt(stalePathTime), false);
+    }
+
+    protected void addNeighbor() throws Exception {
+        try {
+            long asno = Long.valueOf(asNumber);
+            switch((int)asno) {
+            case 0:
+            case 65535:
+            case 23456:
+                System.out.println("reserved as number supplied ");
+                printStartBgpHelp();
+                return;
+            }
+            if (asno <= 0 || asno > Integer.MAX_VALUE) {
+                System.out.println("invalid as number , supported range [1,"+Integer.MAX_VALUE+"]");
+                printAddNeighborHelp();
+                return;
+            }
+        } catch (Exception e) {
+            System.out.println("invalid as number");
+            printAddNeighborHelp();
+            return;
+        }
+        boolean validIp = validateIp(ip);
+        if (!validIp) {
+            System.out.println("invalid neighbor ip");
+            printAddNeighborHelp();
+            return;
+        }
+
+        if (sourceIp != null) {
+            validIp = validateIp(sourceIp);
+            if (!validIp) {
+                System.out.println("invalid source ip");
+                printAddNeighborHelp();
+                return;
+            }
+        }
+
+        if (ebgpMultihops != null) {
+            try {
+                long val = Long.valueOf(ebgpMultihops);
+                if (val < 1 || val > 255) {
+                    System.out.println("invalid ebgpMultihops number , valid range [1,255] ");
+                    printAddNeighborHelp();
+                    return;
+                }
+            } catch (Exception e) {
+                System.out.println("invalid ebgpMultihops number, valid range [1-255]");
+                printAddNeighborHelp();
+                return;
+            }
+        }
+        if (addressFamily != null) {
+            try {
+                af_safi.valueOf(addressFamily);
+            } catch (Exception e) {
+                System.out.println("invalid addressFamily valid values SAFI_IPV4_LABELED_UNICAST | SAFI_MPLS_VPN");
+                printAddNeighborHelp();
+                return;
+            }
+        }
+        if (getAsNumber(ip) != -1) {
+            System.out.println("neighbor with ip "+ip+" already exists");
+            return;
+        }
+        bgpManager.addNeighbor(ip, Long.valueOf(asNumber));
+        if (addressFamily != null) {
+            bgpManager.addAddressFamily(ip, af_afi.AFI_IP, 
+                                 af_safi.valueOf(addressFamily));
+        }
+        if (ebgpMultihops != null) {
+            bgpManager.addEbgpMultihop(ip, Integer.parseInt(ebgpMultihops));
+        }
+        if (sourceIp != null) {
+            bgpManager.addUpdateSource(ip, sourceIp);
+        }
+    }
+
+    private boolean validateIp(String inputIp) {
+        boolean validIp = false;
+        try {
+            if (inputIp != null) {
+                InetAddress addr = InetAddress.getByName(inputIp);
+                if (addr.isMulticastAddress()) {
+                    System.out.println("ip cannot be multicast address");
+                    return false;
+                }
+                if (addr.isLoopbackAddress()) {
+                    System.out.println("ip cannot be loopback address");
+                    return false;
+                }
+                byte addrBytes[] = addr.getAddress();
+                int lastPart = addrBytes[3] & 0xFF;
+                int firstPart = addrBytes[0] & 0xFF;
+                if (firstPart == 0) {
+                       return false;//cannot start with 0 "0.1.2.3"
+                }
+                if (lastPart == 0 || lastPart == 255) {
+                    return false;
+                }
+                validIp = true;
+            }
+        } catch (Exception e) {
+        }
+        return validIp;
+    }
+
+    private void enableBgpLogLevel() throws Exception {
+        if (logFile == null) {
+            System.out.println("Please provide log file name ");
+            usage();
+            System.out.println("exec configure-bgp -op enable-log --log-file-path <logfile> --log-level <level>");
+            return;
+        }
+        boolean validLoglevel = false;
+        try {
+            LogLevels.valueOf(logLevel);
+            validLoglevel = true;
+        } catch (Exception e) {
+        }
+        if (!validLoglevel) {
+            System.out.println("Please provide valid log level emergencies|alerts|critical|errors|warnings|notifications|informational|debugging");
+            usage();
+            System.out.println("exec configure-bgp -op enable-log --log-file-path <logfile> --log-level <level>");
+            return;
+        }
+        bgpManager.setQbgpLog(logFile, logLevel);
+    }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/DisplayBgpConfigCli.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/DisplayBgpConfigCli.java
new file mode 100644 (file)
index 0000000..88d2b04
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager;
+import java.util.concurrent.Future;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.bgpmanager.commands.Cache;
+
+@Command(scope = "odl", name = "display-bgp-config", description="")
+public class DisplayBgpConfigCli extends OsgiCommandSupport {
+
+    protected Object doExecute() throws Exception {
+        Cache cache = new Cache();
+        return cache.show();
+    } 
+}
index 053e88e1ec9610e6bf5ec1aa339aee1d204e9674..b916e3dd5a1528e61076e2a29cf3a1b21360c8b1 100644 (file)
@@ -8,16 +8,11 @@
 
 package org.opendaylight.bgpmanager;
 
-import com.google.common.util.concurrent.Futures;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdentifierBuilder;
-import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
-import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.fibmanager.rev150330.VrfEntries;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.fibmanager.rev150330.vrfentries.VrfEntry;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.fibmanager.rev150330.vrfentries.VrfEntryBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.fibmanager.rev150330.fibentries.VrfTables;
@@ -29,12 +24,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.fibmanager.rev15
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Iterator;
+import java.util.*;
 
-import com.google.common.util.concurrent.FutureCallback;
-import com.google.common.base.Optional;
 
 /**
  * Created by emhamla on 4/14/2015.
@@ -49,33 +40,38 @@ public class FibDSWriter {
 
     public synchronized void addFibEntryToDS(String rd, String prefix,
                                        String nexthop, int label) {
+        if (rd == null || rd.isEmpty()) {
+            logger.error("Prefix {} not associated with vpn", prefix);
+            return;
+        }
 
         VrfEntry vrfEntry = new VrfEntryBuilder().setDestPrefix(prefix).
             setNextHopAddress(nexthop).setLabel((long)label).build();
-        logger.debug("Created vrfEntry for {} nexthop {} label {}", prefix, nexthop, label);
-
-        List<VrfEntry> vrfEntryList = new ArrayList<VrfEntry>();
-        vrfEntryList.add(vrfEntry);
-
-        InstanceIdentifierBuilder<VrfTables> idBuilder =
-            InstanceIdentifier.builder(FibEntries.class).child(VrfTables.class, new VrfTablesKey(rd));
-        InstanceIdentifier<VrfTables> vrfTableId = idBuilder.build();
 
-        VrfTables vrfTableNew = new VrfTablesBuilder().setRouteDistinguisher(rd).
-            setVrfEntry(vrfEntryList).build();
+        logger.debug("Created vrfEntry for {} nexthop {} label {}", prefix, nexthop, label);
 
-        write(LogicalDatastoreType.OPERATIONAL, vrfTableId, vrfTableNew);
+        InstanceIdentifier.InstanceIdentifierBuilder<VrfEntry> idBuilder =
+            InstanceIdentifier.builder(FibEntries.class)
+                    .child(VrfTables.class, new VrfTablesKey(rd))
+                    .child(VrfEntry.class, new VrfEntryKey(vrfEntry.getDestPrefix()));
+        InstanceIdentifier<VrfEntry> vrfEntryId= idBuilder.build();
 
+        BgpUtil.write(broker, LogicalDatastoreType.CONFIGURATION,
+                vrfEntryId, vrfEntry);
     }
 
     public synchronized void removeFibEntryFromDS(String rd, String prefix) {
 
+        if (rd == null || rd.isEmpty()) {
+            logger.error("Prefix {} not associated with vpn", prefix);
+            return;
+        }
         logger.debug("Removing fib entry with destination prefix {} from vrf table for rd {}", prefix, rd);
 
         InstanceIdentifierBuilder<VrfEntry> idBuilder =
             InstanceIdentifier.builder(FibEntries.class).child(VrfTables.class, new VrfTablesKey(rd)).child(VrfEntry.class, new VrfEntryKey(prefix));
         InstanceIdentifier<VrfEntry> vrfEntryId = idBuilder.build();
-        delete(LogicalDatastoreType.OPERATIONAL, vrfEntryId);
+        BgpUtil.delete(broker, LogicalDatastoreType.CONFIGURATION, vrfEntryId);
 
     }
 
@@ -86,36 +82,10 @@ public class FibDSWriter {
                 InstanceIdentifier.builder(FibEntries.class).child(VrfTables.class, new VrfTablesKey(rd));
         InstanceIdentifier<VrfTables> vrfTableId = idBuilder.build();
 
-        delete(LogicalDatastoreType.OPERATIONAL, vrfTableId);
+        BgpUtil.delete(broker, LogicalDatastoreType.CONFIGURATION, vrfTableId);
 
     }
 
 
-    private <T extends DataObject> Optional<T> read(LogicalDatastoreType datastoreType,
-                                                    InstanceIdentifier<T> path) {
 
-        ReadOnlyTransaction tx = broker.newReadOnlyTransaction();
-
-        Optional<T> result = Optional.absent();
-        try {
-            result = tx.read(datastoreType, path).get();
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-
-        return result;
-    }
-
-    private <T extends DataObject> void write(LogicalDatastoreType datastoreType,
-                                                   InstanceIdentifier<T> path, T data) {
-        WriteTransaction tx = broker.newWriteOnlyTransaction();
-        tx.merge(datastoreType, path, data, true);
-        tx.submit();
-    }
-
-    private <T extends DataObject> void delete(LogicalDatastoreType datastoreType, InstanceIdentifier<T> path) {
-        WriteTransaction tx = broker.newWriteOnlyTransaction();
-        tx.delete(datastoreType, path);
-        tx.submit();
-    }
 }
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/VtyshCli.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/VtyshCli.java
new file mode 100644 (file)
index 0000000..faef7b4
--- /dev/null
@@ -0,0 +1,286 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.net.Socket;
+import java.net.SocketTimeoutException;
+import java.net.UnknownHostException;
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Command(scope = "odl", name = "show-bgp", description = "")
+public class VtyshCli extends OsgiCommandSupport {
+    // public class DisplayBgpConfigCli {
+
+    @Option(name = "--cmd", description = "command to run", required = true, multiValued = false)
+    String cmd = null;
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(VtyshCli.class);
+
+    private static int serverPort = 2605;
+    private static String serverName = "localhost";
+    private static int handlerModule = 0;
+    private static final int BGPd = 1;
+    public static String passwordCheckStr = "Password:";
+    public static String vtyPassword = "sdncbgpc";
+    public static String noPaginationCmd = "terminal length 0";
+    public static int sockTimeout = 5;
+
+    String[] validCommands = new String[]{
+            "display routing ip bgp vpnv4 all",
+            "display routing ip bgp vpnv4 rd <rd>",
+            "display routing ip bgp vpnv4 all neighbors",
+            "display routing ip bgp vpnv4 all neighbors  <ip> routes",
+            "display routing ip bgp vpnv4 all  <ip/mask>",
+            "display routing ip bgp vpnv4 all summary",
+            "display routing ip bgp vpnv4 all tags",
+            "display routing ip bgp vpnv4 rd <rd>  tags",
+            "display routing ip bgp vpnv4 rd <rd>  <ip>",
+            "display routing ip bgp vpnv4 rd <rd>  <ip/mask>",
+            "display routing ip bgp neighbors",
+            "display routing ip bgp summary",
+            "display routing ip bgp ipv4 unicast",
+            "display routing ip bgp ipv4 unicast <ip/mask>",
+            "display routing bgp neighbors",
+            "display routing bgp neighbors <ip>",
+            "display routing bgp ipv4 unicast <ip>",
+            "display routing bgp ipv4 unicast <ip/mask>"
+    };
+    private static final Logger logger = LoggerFactory.getLogger(VtyshCli.class);
+
+    // @Override
+    protected Object doExecute() throws Exception {
+        String sArg;
+        cmd = cmd.trim();
+        if (cmd.equals("") || cmd.equals("help") ||
+            cmd.equals("-help") || cmd.equals("--help")) {
+            for (String help : validCommands) {
+                System.out.println(help);
+            }
+            return null;
+        }
+        String args[] = cmd.split(" ");
+        if (args.length == 0) {
+            return null;
+        }
+        sArg = args[0];
+        if (sArg == null || sArg.trim().equals("")) {
+            System.out.println("Please provide a valid input.");
+            return null;
+        }
+        switch (sArg) {
+        case "ip":
+        case "bgp":
+            handlerModule = BGPd;
+            break;
+        default:
+            System.out.println("Unknown command");
+            return null;
+        }
+
+        switch (handlerModule) {
+        case BGPd:
+            try {
+                handleCommand(sArg, cmd);
+            } catch (IOException ioe) {
+                System.out.println("IOException thrown.");
+            }
+            break;
+        default:
+            break;
+        }
+        return null;
+    }
+
+    public static void setHostAddr(String hostAddr) {
+        serverName = hostAddr;
+    }
+
+    public String getHostAddr() {
+        return serverName;
+    }
+
+    public static void handleCommand(String arg, String cmd) throws IOException {
+
+        StringBuilder inputBgpCmd = new StringBuilder();
+
+        String str, prompt, replacedStr, inputCmd = null;
+        char cbuf[] = new char[10];
+        char op_buf[];
+        Socket socket = null;
+        PrintWriter out_to_socket = null;
+        BufferedReader in_from_socket = null;
+        StringBuilder sb = new StringBuilder();
+        int ip = 0, ret;
+        StringBuilder temp, temp2;
+        char ch, gt = '>';
+
+        inputBgpCmd.append("show " + cmd);
+
+        inputCmd = inputBgpCmd.toString();
+
+        try {
+            socket = new Socket(serverName, serverPort);
+
+        } catch (UnknownHostException ioe) {
+            System.out.println("No host exists: " + ioe.getMessage());
+            return;
+        } catch (IOException ioe) {
+            System.out.println("I/O error occured " + ioe.getMessage());
+            return;
+        }
+        try {
+            socket.setSoTimeout(sockTimeout * 1000);
+            out_to_socket = new PrintWriter(socket.getOutputStream(), true);
+            in_from_socket = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+
+        } catch (IOException ioe) {
+            System.out.println("IOException thrown.");
+            socket.close();
+            return;
+        }
+        while (true) {
+            try {
+                ret = in_from_socket.read(cbuf);
+
+            } catch (SocketTimeoutException ste) {
+                System.out.println("Read from Socket timed Out while asking for password.");
+                socket.close();
+                return;
+            }
+            if (ret == -1) {
+                System.out.println("Connection closed by BGPd.");
+                socket.close();
+                return;
+            } else {
+                sb.append(cbuf);
+
+                if (sb.toString().contains(passwordCheckStr)) {
+
+                    break;
+                }
+            }
+        }
+
+        sb.setLength(0);
+        out_to_socket.println(vtyPassword);
+
+        while (true) {
+            try {
+                ip = in_from_socket.read();
+            } catch (SocketTimeoutException ste) {
+                System.out.println(sb.toString());
+                System.out.println("Read from Socket timed Out while verifying the password.");
+                socket.close();
+                return;
+            }
+            if (ip == (int) gt) {
+                sb.append(gt);
+                break;
+            } else if (ip == -1) {
+                System.out.println(sb.toString());
+                System.out.println("Connection closed by BGPd.");
+                socket.close();
+                return;
+            } else {
+                ch = (char) ip;
+                sb.append(ch);
+
+            }
+        }
+
+        String promptStr = sb.toString();
+        prompt = promptStr.trim();
+        sb.setLength(0);
+        out_to_socket.println(noPaginationCmd);
+        while (true) {
+            try {
+                ip = in_from_socket.read();
+            } catch (SocketTimeoutException ste) {
+                System.out.println(sb.toString());
+                System.out.println("Read from Socket timed Out while sending the term len command..");
+                socket.close();
+                return;
+            }
+            if (ip == (int) gt) {
+                break;
+            } else if (ip == -1) {
+                System.out.println(sb.toString());
+                System.out.println("Connection closed by BGPd.");
+                socket.close();
+                return;
+            } else {
+                ch = (char) ip;
+                sb.append(ch);
+
+            }
+        }
+        sb.setLength(0);
+
+        out_to_socket.println(inputCmd);
+        StringBuffer output = new StringBuffer();
+        String errorMsg = "";
+        while (true) {
+            op_buf = new char[100];
+            temp = new StringBuilder();
+            temp2 = new StringBuilder();
+            try {
+                ret = in_from_socket.read(op_buf);
+
+            } catch (SocketTimeoutException ste) {
+                errorMsg = "Read from Socket timed Out while getting the data.";
+                break;
+            }
+            if (ret == -1) {
+                errorMsg = "Connection closed by BGPd";
+                break;
+            }
+            temp2.append(op_buf);
+
+            if (temp2.toString().contains(inputCmd)) {
+
+                replacedStr = temp2.toString().replaceAll(inputCmd, "");
+                temp.append(replacedStr);
+                temp2.setLength(0);
+
+            } else {
+                temp.append(op_buf);
+                temp2.setLength(0);
+
+            }
+
+            String outputStr = temp.toString();
+            outputStr.replaceAll("^\\s+|\\s+$", "");
+            output.append(outputStr);
+            if (output.toString().trim().endsWith(prompt)) {
+                int index = output.toString().lastIndexOf(prompt);
+                String newString = output.toString().substring(0, index);
+                output.setLength(0);
+                output.append(newString);
+                break;
+            }
+            temp.setLength(0);
+        }
+        System.out.println(output.toString().trim());
+        if (errorMsg.length() > 0) {
+            System.out.println(errorMsg);
+        }
+        socket.close();
+        return;
+
+    }
+
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Cache.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Cache.java
new file mode 100644 (file)
index 0000000..6a8b828
--- /dev/null
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.commands;
+
+import org.apache.karaf.shell.commands.*;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.bgpmanager.BgpManager;
+import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.*;
+import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.*;
+import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.neighbors.*;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.*;
+import java.util.*;
+import java.io.*;
+
+@Command(scope = "odl", name = "bgp-cache", 
+         description = "Text dump of BGP config cache")
+public class Cache extends OsgiCommandSupport {
+    private static final String LST = "--list";
+    private static final String OFL = "--out-file";
+
+    @Argument(name="dummy", description="Argument not needed", 
+              required=false, multiValued = false)
+    private String action = null;
+
+    @Option(name=LST, aliases={"-l"}, 
+            description="list vrfs and/or networks", 
+            required=false, multiValued=true)
+    private List<String> list = null;
+
+    @Option(name=OFL, aliases={"-o"}, 
+            description="output file", 
+            required=false, multiValued=false)
+    private String ofile = null;
+
+    private static final String HTSTR = "Host";
+    private static final String PTSTR = "Port";
+    private static final String ASSTR = "AS-Number";
+    private static final String RISTR = "Router-ID";
+    private static final String SPSTR = "Stale-Path-Time";
+    private static final String FBSTR = "F-bit";
+    private static final String LFSTR = "Log-File";
+    private static final String LLSTR = "Log-Level";
+    private static final String USSTR = "Update-Source";
+    private static final String EBSTR = "EBGP-Multihops";
+    private static final String AFSTR = "Address-Families";
+    private static final String ERSTR = "Export-RTs";
+    private static final String IRSTR = "Import-RTs";
+    private static final String NHSTR = "Nexthop";
+    private static final String LBSTR = "Label";
+    private static final String RDSTR = "RD";
+
+    private Object usage() {
+        System.err.println
+            ("usage: bgp-cache ["+LST+" vrfs | networks] ["+OFL+" file-name]");
+        return null;
+    }
+
+    public Cache() {
+    }
+
+    public Object show() throws Exception {
+        return doExecute();
+    } 
+
+    @Override
+    protected Object doExecute() throws Exception {
+        if (!Commands.bgpRunning()) {
+            return null;
+        }
+        Bgp config = Commands.getBgpManager().getConfig();
+        boolean list_vrfs = false;
+        boolean list_nets = false;
+        PrintStream ps = System.out;
+
+        if (action != null) {
+            return usage();
+        }
+        if (ofile != null) {
+            try {
+                ps = new PrintStream(ofile);
+            } catch (Exception e) {
+                System.err.println("error: cannot create file "+ofile +"; exception: "+e);
+                return null;
+            }
+        }
+        if (list != null) {
+            for (String item : list) {
+                switch (item) {
+                    case "vrfs" : 
+                        list_vrfs = true;
+                        break;
+                    case "networks" : 
+                        list_nets = true;
+                        break;
+                    default: 
+                        System.err.println("error: unknown value for "+LST+": "+item);
+                    return null;
+                }
+            }
+        }
+        // we'd normally read this directly from 'config' but
+        // legacy behaviour forces to check for a connection
+        // that's initiated by default at startup without
+        // writing to config. 
+        String cHost = Commands.getBgpManager().getConfigHost();
+        int cPort = Commands.getBgpManager().getConfigPort();
+        ps.printf("\nConfiguration Server\n\t%s  %s\n\t%s  %d\n",
+                  HTSTR, cHost, PTSTR, cPort); 
+        if (config == null) {
+            return null;
+        }
+        AsId a = config.getAsId();
+        if (a != null) {
+            int asNum = a.getLocalAs().intValue();
+            Ipv4Address routerId = a.getRouterId();
+            Long spt = a.getStalepathTime();
+            Boolean afb = a.isAnnounceFbit();
+            String rid = (routerId == null) ? "<n/a>" : routerId.getValue();
+            int s = (spt == null) ? 0 : spt.intValue();
+            String bit = (afb == null) ? "OFF" : (afb.booleanValue() ? "ON" : "OFF");
+
+            GracefulRestart g = config.getGracefulRestart();
+            if (g != null) {
+                s = g.getStalepathTime().intValue();
+            }
+            ps.printf("\nBGP Router\n");
+            ps.printf("\t%-15s  %d\n\t%-15s  %s\n\t%-15s  %d\n\t%-15s  %s\n",
+                      ASSTR, asNum, RISTR, rid, SPSTR, s, FBSTR, bit);
+        }
+
+        Logging l = config.getLogging();
+        if (l != null) {
+            ps.printf("\t%-15s  %s\n\t%-15s  %s\n", LFSTR, l.getFile(), 
+            LLSTR, l.getLevel());
+        }
+                                                                                
+        List<Neighbors> n = config.getNeighbors();
+        if (n != null)  {
+            ps.printf("\nNeighbors\n");
+            for (Neighbors nbr : n) {
+                ps.printf("\t%s\n\t\t%-16s  %d\n", nbr.getAddress().getValue(),
+                          ASSTR, nbr.getRemoteAs().intValue());
+                EbgpMultihop en = nbr.getEbgpMultihop();
+                if (en != null) {
+                    ps.printf("\t\t%-16s  %d\n", EBSTR, en.getNhops().intValue());
+                }
+                UpdateSource us = nbr.getUpdateSource();
+                if (us != null) {
+                    ps.printf("\t\t%-16s  %s\n", USSTR, us.getSourceIp().getValue());
+                }
+                ps.printf("\t\t%-16s  IPv4-Labeled-VPN", AFSTR);
+                List<AddressFamilies> afs = nbr.getAddressFamilies();
+                if (afs != null) {
+                    for (AddressFamilies af : afs) {
+                        ps.printf(" %s", af.getSafi().intValue() == 4 ? 
+                                            "IPv4-Labeled-Unicast" : "Unknown");
+                    }
+                }
+                ps.printf("\n");
+            }
+        }
+
+        if (list_vrfs) {
+            List<Vrfs> v = config.getVrfs();
+            if (v != null) {
+                ps.printf("\nVRFs\n"); 
+                for (Vrfs vrf : v)  {
+                    ps.printf("\t%s\n",vrf.getRd());
+                    ps.printf("\t\t%s  ", IRSTR);
+                    for (String rt : vrf.getImportRts()) 
+                    ps.printf("%s ", rt);
+                    ps.printf("\n\t\t%s  ", ERSTR);
+                    for (String rt : vrf.getExportRts()) 
+                    ps.printf("%s ", rt);
+                    ps.printf("\n");
+                }
+            }
+        }
+     
+        if (list_nets) {
+            List<Networks> ln = config.getNetworks();
+            if (ln != null) {
+                ps.printf("\nNetworks\n");
+                for (Networks net : ln) {
+                    String rd = net.getRd();
+                    String pfxlen = net.getPrefixLen();
+                    String nh = net.getNexthop().getValue();
+                    int label = net.getLabel().intValue();
+                    ps.printf("\t%s\n\t\t%-7s  %s\n\t\t%-7s  %s\n\t\t%-7s  %d\n",
+                              pfxlen, RDSTR, rd, NHSTR, nh, LBSTR, label);
+                }
+            }
+        }
+        if (ofile != null) {
+            ps.close();
+        }
+        return null;
+    }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/ClearBgpCli.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/ClearBgpCli.java
new file mode 100644 (file)
index 0000000..22d57a1
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.commands;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.net.SocketException;
+
+import org.apache.karaf.shell.commands.Argument;
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Command(scope = "odl", name = "clear-bgp-neighbor", description = "")
+public class ClearBgpCli extends OsgiCommandSupport {
+
+    private static int serverPort = 2605;
+    private static String serverName = "localhost";
+    public static String passwordCheckStr = "Password:";
+    public static String vtyPassword = "sdncbgpc";
+    public static String enableCmd = "enable";
+    public static int sockTimeout = 5;
+    static char HASH_PROMPT = '#';
+    static char GT = '>';
+    
+    static final Logger LOGGER = LoggerFactory.getLogger(ClearBgpCli.class);
+
+    @Argument(name="neighbor-ip", description = "neighbor ip to be cleared", required = false, multiValued = false)
+    String nbr = "";
+
+    Socket socket = null;
+    PrintWriter out = null;
+    BufferedReader in = null;
+
+    public static void setHostAddr(String hostAddr) {
+        serverName = hostAddr;
+    }
+
+    protected Object doExecute() throws Exception {
+        if (nbr.isEmpty()) {
+            System.out.println("enter neighbor ip to be cleared");
+            System.out.println("Usage:");
+            System.out.println("odl:clear-bgp-neighbor <neighbor|all>");
+            return null;
+        } else if ("all".equals(nbr)) {
+            nbr = "*";
+        } else {
+            try {
+                InetAddress.getByName(nbr);
+            } catch (Exception e) {
+                System.out.println("Invalid neighbor ip");
+                return null;
+            }
+        }
+        clearBgp("clear ip bgp "+nbr);
+        return null;
+    }
+    
+    public static void main(String args[]) throws IOException{
+        ClearBgpCli test = new ClearBgpCli();
+        test.clearBgp("clear ip bgp");
+    }
+
+    public void clearBgp(String clearCommand) throws IOException {
+        try {
+            socket = new Socket(serverName, serverPort);
+        } catch (Exception ioe) {
+            System.out.println("failed to connect to bgpd " + ioe.getMessage());
+            return;
+        }
+        intializeSocketOptions();
+        try {
+            readPassword(in);
+            
+            out.println(vtyPassword);
+            out.println("enable");
+            LOGGER.trace("reading until HASH sign");
+            readUntilPrompt(in, HASH_PROMPT);
+            
+            out.println(clearCommand);
+            readUntilPrompt(in, HASH_PROMPT);
+        } catch (Exception e) {
+            System.out.println(e.getMessage());
+        } finally {
+            socket.close();
+        }
+        return;
+
+    }
+
+    private void intializeSocketOptions() throws SocketException, IOException {
+        socket.setSoTimeout(sockTimeout * 1000);
+        out = new PrintWriter(socket.getOutputStream(), true);
+        in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+    }
+
+    private static boolean readPassword(BufferedReader in)
+            throws IOException {
+        return readUntilPrompt(in, GT, passwordCheckStr);
+    }
+
+    private static boolean readUntilPrompt(BufferedReader in, char promptChar)
+            throws IOException {
+        return readUntilPrompt(in, promptChar, null);
+    }
+    
+    private static boolean readUntilPrompt(
+            BufferedReader in, char promptChar, String passwordCheckStr)
+            throws IOException {
+        StringBuilder sb = new StringBuilder();
+        int ret = 0;
+        while (true) {
+            ret = in.read();
+            if (ret == -1) {
+                throw new IOException("connection closed by bgpd");
+            } else if (ret == promptChar) {
+                return true;
+            }
+            
+            sb.append((char)ret);
+            if (passwordCheckStr != null) {
+                if (sb.toString().contains(passwordCheckStr)) {
+                    break;
+                }
+            }
+        }
+        sb.setLength(0);
+        return true;
+    }
+
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Commands.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Commands.java
new file mode 100644 (file)
index 0000000..b1b4371
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.commands;
+
+import org.opendaylight.bgpmanager.BgpManager;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.*;
+
+public class Commands {
+    private static BgpManager bm;
+    public static final int IPADDR = 1;
+    public static final int INT = 2;
+
+    public Commands(BgpManager bgpm) {
+        bm = bgpm;
+    }
+
+    public static BgpManager getBgpManager() {
+        return bm;
+    }
+
+    public static boolean isValid(String val, int type, String name) {
+        switch (type) {
+            case INT : 
+                try {
+                    int i = Integer.parseInt(val);
+                } catch (NumberFormatException nme) {
+                    System.err.println("error: value of "+name+" is not an integer");
+                    return false;
+                }
+                break;
+            case IPADDR:
+                try {
+                    Ipv4Address addr = new Ipv4Address(val);
+                } catch (Exception e) {
+                    System.err.println("error: value of "+name+" is not an IP address");
+                    return false;
+                }
+                break;
+            default:
+                return false;
+        }
+        return true;
+    }
+
+    public static boolean bgpRunning() {
+        if (getBgpManager() == null) {
+            System.err.println("error: cannot run command, BgpManager not started");
+            return false;
+        }
+        return true;
+    }
+}
+
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Connect.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Connect.java
new file mode 100644 (file)
index 0000000..47bec2a
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.commands;
+
+import org.apache.karaf.shell.commands.*;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.bgpmanager.BgpManager;
+
+@Command(scope = "odl", name = "bgp-connect", 
+         description = "Add or delete client connection to BGP Config Server")
+public class Connect extends OsgiCommandSupport {
+    private static final String HOST = "--host";
+    private static final String PORT = "--port";
+
+    @Argument(name="add|del", description="The desired operation", 
+              required=true, multiValued = false)
+    String action = null;
+
+    @Option(name=HOST, aliases={"-h"}, 
+            description="IP address of the server", 
+            required=false, multiValued=false)
+    String host = null;
+
+    @Option(name=PORT, aliases={"-p"},
+            description="Thrift port", required=false, 
+            multiValued=false)
+    String port = null;
+
+    private Object usage() {
+        System.err.println(
+            "usage: bgp-connect ["+HOST+" h] ["+PORT+" p] <add | del>");
+        return null;
+    }       
+
+    @Override
+    protected Object doExecute() throws Exception {
+        if (!Commands.bgpRunning()) {
+            return null;
+        }
+        BgpManager bm = Commands.getBgpManager();
+        switch (action) {
+            case "add" : 
+                if (host == null || port == null) {
+                    System.err.println("error: "+HOST+" and "+PORT+" needed");
+                    return null;
+                }
+                if (!Commands.isValid(host, Commands.IPADDR, HOST) 
+                    || !Commands.isValid(port, Commands.INT, PORT)) {
+                    return null;
+                }
+                // check: already connected?
+                bm.startConfig(host, Integer.valueOf(port));
+                break;
+            case "del" : 
+                if (host != null || port != null) {
+                    System.err.println("note: option(s) not needed; ignored");
+                }
+                // check: nothing to stop?
+                bm.stopConfig();
+                break;
+            default : 
+                return usage();
+        }
+        return null;
+    }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Misc.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Misc.java
new file mode 100644 (file)
index 0000000..9c44117
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.commands;
+
+import org.apache.karaf.shell.commands.*;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.bgpmanager.BgpManager;
+
+@Command(scope = "odl", name = "bgp-misc", 
+         description = "Add or delete miscellaneous BGP config options")
+public class Misc extends OsgiCommandSupport {
+    private static final String LF = "--log-file";
+    private static final String LL = "--log-level";
+    private static final String SP = "--stalepath-time";
+
+    @Argument(name="add|del", description="The desired operation", 
+              required=true, multiValued = false)
+    private String action = null;
+
+    @Option(name=LF, aliases={"-f"}, 
+            description="Log file name", 
+            required=false, multiValued=false)
+    private String file = null;
+
+    @Option(name=LL, aliases={"-l"},
+            description="Log level", required=false, 
+            multiValued=false)
+    private String level = null;
+
+    @Option(name=SP, aliases={"-s"},
+            description="Stale-path time", required=false, 
+            multiValued=false)
+    private String spt = null;
+
+    private Object usage() {
+        System.err.println(
+        "usage: bgp-misc [<"+LF+" name> <"+LL+" level>] ["
+        +SP+" stale-path-time] <add | del>");
+        return null;
+    } 
+
+    private boolean isValidLevel(String level) {
+        switch (level) {
+            case "emergencies":
+            case "alerts":
+            case "critical":
+            case "errors":
+            case "warnings":
+            case "notifications":
+            case "informational":
+            case "debugging": 
+                return true;
+            default: 
+                break;
+        }
+        return false;
+    }
+
+    @Override
+    protected Object doExecute() throws Exception {
+        if (!Commands.bgpRunning()) {
+            return null;
+        }
+        if (spt == null && file == null && level == null) {
+            return usage();
+        }
+        if (file != null ^ level != null) {
+            return usage();
+        }
+        if (level != null && !isValidLevel(level)) { 
+            System.err.println("error: invalid value for "+LL);
+            return null;
+        }
+        BgpManager bm = Commands.getBgpManager();
+        switch (action) {
+            case "add" : 
+                if (spt != null && Commands.isValid(spt, Commands.INT, SP)) {
+                    int s = Integer.valueOf(spt);
+                    bm.configureGR(s);
+                }
+                if (file != null && level != null) 
+                bm.setQbgpLog(file, level);
+                break;
+            case "del" :  
+                if (spt != null) {
+                    bm.delGracefulRestart();
+                }
+                if (file != null && level != null) {
+                    bm.delLogging();
+                }
+                break;
+            default : 
+                return usage();
+        }
+        return null;
+    }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Neighbor.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Neighbor.java
new file mode 100644 (file)
index 0000000..40b8b0d
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.commands;
+
+import org.apache.karaf.shell.commands.*;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.bgpmanager.BgpManager;
+import org.opendaylight.bgpmanager.thrift.gen.af_afi;
+import org.opendaylight.bgpmanager.thrift.gen.af_safi;
+
+@Command(scope = "odl", name = "bgp-nbr", 
+         description = "Add or delete BGP neighbor")
+public class Neighbor extends OsgiCommandSupport {
+    private static final String IP = "--ip-address";
+    private static final String AS = "--as-number";
+    private static final String MH = "--ebgp-multihop";
+    private static final String US = "--update-source";
+    private static final String AF = "--address-family";
+   
+    @Argument(index=0, name="add|del", description="The desired operation", 
+              required=true, multiValued = false)
+    String action = null;
+
+    @Option(name=IP, aliases = {"-i"}, 
+            description="Neighbor's IP address", 
+            required=false, multiValued=false)
+    String nbrIp = null; 
+
+    @Option(name=AS, aliases = {"-a"},  
+            description="AS number", 
+            required=false, multiValued=false)
+    String asNum = null;
+
+    @Option(name=MH, aliases = {"-e"},  
+            description="EBGP-multihop hops", 
+            required=false, multiValued=false)
+    String nHops = null;
+
+    @Option(name=US, aliases = {"-u"},  
+            description="Update source address", 
+            required=false, multiValued=false)
+    String srcIp = null;
+
+    @Option(name=AF, aliases = {"-f"},  
+            description="Address family", 
+            required=false, multiValued=false)
+    String addrFamily = null;
+
+    private Object usage() {
+        System.err.println(
+            "usage: bgp-nbr ["+IP+" nbr-ip-address] ["+AS+" asnum] ["
+            +MH+" hops] ["+US+" source] ["+AF+" lu] <add|del>");
+        return null;
+    }       
+
+    @Override
+    protected Object doExecute() throws Exception {
+        if (!Commands.bgpRunning()) {
+            return null;
+        }
+        BgpManager bm = Commands.getBgpManager();
+        switch (action) {
+            case "add" :  
+                if (nbrIp == null) {
+                    System.err.println("error: "+IP+" needed");
+                    return null;
+                }
+                int asn = bm.getConfig().getAsId().getLocalAs().intValue(); 
+                int hops = 0;
+                if (!Commands.isValid(nbrIp, Commands.IPADDR, IP)) {
+                    return null;
+                }
+                if (asNum != null) {
+                    if (!Commands.isValid(asNum, Commands.INT, AS)) {
+                        return null;
+                    } else {
+                        asn = Integer.valueOf(asNum);
+                    }
+                }
+                bm.addNeighbor(nbrIp, asn);
+                if (nHops != null) {
+                    if (!Commands.isValid(nHops, Commands.INT, MH)) {
+                        return null;
+                    } else {
+                        hops = Integer.valueOf(nHops);
+                    }
+                    bm.addEbgpMultihop(nbrIp, hops);
+                }
+                if (srcIp != null) { 
+                    if (!Commands.isValid(srcIp, Commands.IPADDR, US)) {
+                        return null;
+                    }
+                    bm.addUpdateSource(nbrIp, srcIp);
+                }
+                if (addrFamily != null) {
+                    if (!addrFamily.equals("lu"))  {
+                        System.err.println("error: "+AF+" must be lu");
+                        return null;
+                    }
+                    af_afi afi = af_afi.findByValue(1);
+                    af_safi safi = af_safi.findByValue(4);
+                    bm.addAddressFamily(nbrIp, afi, safi); 
+                }
+                break;
+            case "del" :  
+                if (nbrIp == null) {
+                    System.err.println("error: "+IP+" needed");
+                    return null;
+                }
+                if (!Commands.isValid(nbrIp, Commands.IPADDR, IP)) {
+                    return null;
+                }
+                if (asNum != null || nHops != null || srcIp != null
+                || addrFamily != null) {
+                    System.err.println("note: some option(s) not needed; ignored");
+                }
+                bm.deleteNeighbor(nbrIp);
+                break;
+            default :  
+                return usage();
+        }
+        return null;
+    }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Network.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Network.java
new file mode 100644 (file)
index 0000000..bb10e50
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.commands;
+
+import org.apache.karaf.shell.commands.*;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.bgpmanager.BgpManager;
+import org.opendaylight.bgpmanager.thrift.gen.qbgpConstants;
+
+@Command(scope = "odl", name = "bgp-network", 
+         description = "Add or delete BGP static routes")
+public class Network extends OsgiCommandSupport {
+    private static final String RD = "--rd";
+    private static final String PFX = "--prefix";
+    private static final String NH = "--nexthop";
+    private static final String LB = "--label";
+
+    @Argument(name="add|del", description="The desired operation", 
+              required=true, multiValued = false)
+    private String action = null;
+
+    @Option(name=RD, aliases={"-r"}, 
+            description="Route distinguisher", 
+            required=false, multiValued=false)
+    private String rd = null;
+
+    @Option(name=PFX, aliases={"-p"},
+            description="prefix/length", 
+            required=false, multiValued=false)
+    private String pfx = null;
+
+    @Option(name=NH, aliases={"-n"},
+            description="Nexthop", 
+            required=false, multiValued=false)
+    private String nh = null;
+
+    @Option(name=LB, aliases={"-l"},
+            description="Label", 
+            required=false, multiValued=false)
+    private String lbl = null;
+
+    private Object usage() {
+        System.err.println(
+            "usage: bgp-network ["+RD+" rd] ["+PFX+" prefix/len] ["
+            +NH+" nexthop] ["+LB+" label] <add|del>");
+        return null;
+    }       
+
+    @Override
+    protected Object doExecute() throws Exception {
+        if (!Commands.bgpRunning()) {
+            return null;
+        }
+        BgpManager bm = Commands.getBgpManager();
+        switch (action) {
+            case "add" : 
+                int label = qbgpConstants.LBL_EXPLICIT_NULL;
+                if (pfx == null ) {
+                    System.err.println("error: "+PFX+" is needed");
+                    return null;
+                }
+                if (nh == null) {
+                    System.err.println("error: "+NH+" is needed");
+                    return null;
+                }
+                //todo: syntactic validation of prefix
+                if (!Commands.isValid(nh, Commands.IPADDR, NH)) {
+                    return null;
+                }
+                if (lbl != null) {
+                    if (!Commands.isValid(lbl, Commands.INT, LB)) {
+                        return null;
+                    } else {
+                        label = Integer.valueOf(lbl);
+                    } 
+                } else if (rd == null) {
+                    System.err.println("error: "+RD+" is needed");
+                    return null;
+                }
+                bm.addPrefix(rd, pfx, nh, label); 
+                break;
+            case "del" :  
+                if (pfx == null) {
+                    System.err.println("error: "+PFX+" is needed");
+                    return null;
+                }
+                if (nh != null || lbl != null) {
+                    System.err.println("note: some option(s) not needed; ignored");
+                }
+                bm.deletePrefix(rd, pfx);
+                break;
+            default :  
+                return usage();
+        }
+        return null;
+    }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Router.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Router.java
new file mode 100644 (file)
index 0000000..3e2b1fa
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.commands;
+
+import org.apache.karaf.shell.commands.*;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.bgpmanager.BgpManager;
+
+@Command(scope = "odl", name = "bgp-rtr", 
+         description = "Add or delete BGP router instance")
+public class Router extends OsgiCommandSupport {
+    private static final String AS = "--as-number";
+    private static final String RID = "--router-id";
+    private static final String SP = "--stale-path-time";
+    private static final String FB = "--f-bit";
+
+    @Argument(name="add|del", description="The desired operation", 
+              required=true, multiValued = false)
+    private String action = null;
+
+    @Option(name=AS, aliases={"-a"}, 
+            description="AS number", 
+            required=false, multiValued=false)
+    private String asNum = null;
+
+    @Option(name=RID, aliases={"-r"},
+            description="Router ID", 
+            required=false, multiValued=false)
+    private String rid = null;
+
+    @Option(name=SP, aliases={"-s"},
+            description="Stale-path time", 
+            required=false, multiValued=false)
+    private String spt = null;
+
+    @Option(name=FB, aliases={"-f"},
+            description="F-bit", 
+            required=false, multiValued=false)
+    private String fbit = null;
+
+    private Object usage() {
+        System.err.println(
+            "usage: bgp-rtr ["+AS+" as-number] ["+RID+" router-id] ["
+            +SP+" stale-path-time] ["+FB+" on|off] <add | del>");
+        return null;
+    }       
+
+    @Override
+    protected Object doExecute() throws Exception {
+        if (!Commands.bgpRunning()) {
+            return null;
+        }
+        BgpManager bm = Commands.getBgpManager();
+        switch (action) {
+            case "add" : 
+                // check: rtr already running?
+                int asn = 0;
+                int s = 0;
+                boolean fb = false; 
+                if (asNum == null) {
+                    System.err.println("error: "+AS+" is needed");
+                    return null;
+                }
+                if (!Commands.isValid(asNum, Commands.INT, AS)) {
+                    return null;
+                }
+                asn = Integer.valueOf(asNum);
+                if (rid != null && 
+                !Commands.isValid(rid, Commands.IPADDR, RID)) {
+                    return null;
+                }
+                if (spt != null) {
+                    if (!Commands.isValid(spt, Commands.INT, SP)) {
+                        return null;
+                    } else {
+                        s = Integer.valueOf(spt);
+                    }
+                }
+                if (fbit != null) {
+                    switch (fbit) {
+                        case "on": 
+                            fb = true;
+                            break;
+                        case "off": 
+                            fb = false;
+                            break;
+                        default: 
+                            System.err.println("error: "+FB+" must be on or off");
+                            return null;
+                    }
+                } 
+                bm.startBgp(asn, rid, s, fb);
+                break;
+            case "del" : 
+                // check: nothing to stop?
+                if (asNum != null || rid != null || spt != null ||
+                fbit != null) {
+                    System.err.println("note: option(s) not needed; ignored");
+                }
+                bm.stopBgp();
+                break;
+            default :  
+                return usage();
+        }
+        return null;
+    }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Vrf.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/commands/Vrf.java
new file mode 100644 (file)
index 0000000..d5f9c15
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.commands;
+
+import org.apache.karaf.shell.commands.*;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.bgpmanager.BgpManager;
+import java.util.*;
+
+@Command(scope = "odl", name = "bgp-vrf", 
+         description = "Add or delete BGP VRFs")
+public class Vrf extends OsgiCommandSupport {
+    private static final String RD = "--rd";
+    private static final String IR = "--import-rts";
+    private static final String ER = "--export-rts";
+
+    @Argument(name="add|del", description="The desired operation", 
+              required=true, multiValued = false)
+    private String action = null;
+
+    @Option(name=RD, aliases={"-r"}, 
+            description="Route distinguisher", 
+            required=false, multiValued=false)
+    private String rd = null;
+
+    @Option(name=IR, aliases={"-i"},
+            description="Import route-targets", 
+            required=false, multiValued=true)
+    private List<String> irts = null;
+
+    @Option(name=ER, aliases={"-e"},
+            description="Export route-targets", 
+            required=false, multiValued=true)
+    private List<String> erts = null;
+
+    private Object usage() {
+        System.err.println(
+            "usage: bgp-vrf ["+RD+" rd] [<"+IR+" | "+ER+"> rt1] .. [<"+ 
+            IR+" | "+ER+"> rtN] <add|del>");
+        return null;
+    }       
+
+    @Override
+    protected Object doExecute() throws Exception {
+        if (!Commands.bgpRunning()) {
+            return null;
+        }
+        BgpManager bm = Commands.getBgpManager();
+        switch (action) {
+            case "add" : 
+                if (rd == null || irts == null || erts == null) {
+                    System.err.println("error: all options needed");
+                    return null;
+                }
+                // check: rd exists? rd & rt's in format?
+                bm.addVrf(rd, irts, erts);
+                break;
+            case "del" :  
+                if (rd == null) {
+                    System.err.println("error: "+RD+" needed");
+                    return null;
+                }
+                if (irts != null || erts != null) {
+                    System.err.println("error: some option(s) not needed; ignored");
+                }
+                // check: rd exists? in format?
+                bm.deleteVrf(rd);
+                break; 
+            default : 
+                return usage();
+        }
+        return null;
+    }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/globals/BgpConfiguration.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/globals/BgpConfiguration.java
deleted file mode 100644 (file)
index 65d4f0a..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpmanager.globals;
-
-
-public class BgpConfiguration {
-
-    long asNum = 0;
-    String bgpServer = "";
-    int bgpPort;
-    String routerId = "";
-    String neighbourIp = "";
-    long neighbourAsNum = 0;
-    boolean configUpdated = false;
-
-    public BgpConfiguration() {
-    }
-
-    public String getBgpServer() {
-        return bgpServer;
-    }
-
-    public void setBgpServer(String bgpServer) {
-        this.bgpServer = bgpServer;
-    }
-
-    public int getBgpPort() {
-        return bgpPort;
-    }
-
-    public void setBgpPort(int bgpPort) {
-        this.bgpPort = bgpPort;
-    }
-
-    public long getAsNum() {
-        return asNum;
-    }
-
-    public void setAsNum(long asNum) {
-        this.asNum = asNum;
-    }
-
-    public String getRouterId() {
-        return routerId;
-    }
-
-    public void setRouterId(String routerId) {
-        this.routerId = routerId;
-    }
-
-    public String getNeighbourIp() {
-        return neighbourIp;
-    }
-
-    public void setNeighbourIp(String neighbourIp) {
-        this.neighbourIp = neighbourIp;
-    }
-
-    public long getNeighbourAsNum() {
-        return neighbourAsNum;
-    }
-
-    public void setNeighbourAsNum(long neighbourAsNum) {
-        this.neighbourAsNum = neighbourAsNum;
-    }
-
-    public void setConfigUpdated() { this.configUpdated = true; }
-
-    public void unsetConfigUpdated() { this.configUpdated = false; }
-
-    public boolean isConfigUpdated() { return this.configUpdated; }
-
-    @Override
-    public String toString() {
-        return "BgpConfiguration{" +
-            "asNum=" + asNum +
-            ", bgpServer='" + bgpServer + '\'' +
-            ", bgpPort=" + bgpPort +
-            ", routerId='" + routerId + '\'' +
-            ", neighbourIp='" + neighbourIp + '\'' +
-            ", neighbourAsNum=" + neighbourAsNum +
-            '}';
-    }
-
-}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpAlarmBroadcaster.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpAlarmBroadcaster.java
new file mode 100644 (file)
index 0000000..61a5a2a
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.oam;
+
+/**
+ * Created by echiapt on 7/27/2015.
+ */
+
+ import javax.management.*;
+
+ import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;
+
+ import java.util.ArrayList;
+
+public class BgpAlarmBroadcaster extends NotificationBroadcasterSupport implements BgpAlarmBroadcasterMBean {
+    private static final Logger LOGGER = LoggerFactory.getLogger(BgpAlarmBroadcaster.class);
+    private long sequenceNumber;
+    public BgpAlarmBroadcaster () {
+        this.sequenceNumber = 1;
+    }
+
+    public void sendBgpAlarmInfo(String pfx, int code , int subcode) {
+        Notification n;
+        String alarmAddText, alarmSrc = "BGP";
+        BgpAlarmErrorCodes userAlarm;
+        ArrayList<String> arrayList = new ArrayList<String>();
+
+        userAlarm = BgpAlarmErrorCodes.checkErrorSubcode(subcode);
+        alarmAddText = "Peer=" + pfx;
+        arrayList.clear();
+        arrayList.add(userAlarm.getAlarmType());
+        arrayList.add(alarmAddText);
+        arrayList.add(alarmSrc);
+        n = new AttributeChangeNotification(this, sequenceNumber++, System.currentTimeMillis(),
+                                            "raise Alarm Object notified", "raiseAlarmObject",
+                                            "ArrayList", "", arrayList);
+        sendNotification(n);
+        LOGGER.info("BGP: Alarm :"+ userAlarm.getAlarmType() + " has been posted.");
+        return;
+    }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpAlarmBroadcasterMBean.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpAlarmBroadcasterMBean.java
new file mode 100644 (file)
index 0000000..5599889
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.oam;
+
+/**
+ * Created by ECHIAPT on 8/3/2015.
+ * Interface to publish methods for Alarms Notifications implemented by AlarmBroadcaster.
+ */
+public interface BgpAlarmBroadcasterMBean {
+
+    public void sendBgpAlarmInfo(String pfx, int code , int subcode);
+
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpAlarmErrorCodes.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpAlarmErrorCodes.java
new file mode 100644 (file)
index 0000000..be33495
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.oam;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by echiapt on 7/27/2015.
+ */
+public enum BgpAlarmErrorCodes {
+    CEASE_MAX_PREFIX            (1, "BgpMaxPrefixesFailure"),
+    CEASE_PEER_UNCONFIG         (3, "BgpPeerUnconfigFailure") ,
+    CEASE_CONNECT_REJECT        (5, "BgpConnRejectFailure"),
+    CEASE_COLLISION_RESOLUTION  (7, "BgpCollisionResolutionFailure"),
+    CEASE_OUT_OF_RESOURCE       (8, "BgpOutOfResourcesFailure"),
+    ERROR_IGNORE                (-1,"UnknownErr");
+
+    private final int error;
+    private final String alarmType;
+
+    BgpAlarmErrorCodes(int error, String alarmType) {
+        this.error = error;
+        this.alarmType = alarmType;
+    }
+
+    private static final Map<Integer, BgpAlarmErrorCodes> intToTypeMap = new HashMap<Integer, BgpAlarmErrorCodes>();
+    static {
+        for (BgpAlarmErrorCodes type : BgpAlarmErrorCodes.values()) {
+            intToTypeMap.put(type.error, type);
+        }
+
+    }
+
+    public String getAlarmType() {
+        return this.alarmType;
+    }
+
+    public static BgpAlarmErrorCodes checkErrorSubcode(int i) {
+        BgpAlarmErrorCodes type = intToTypeMap.get(Integer.valueOf(i));
+        if (type == null)
+            return BgpAlarmErrorCodes.ERROR_IGNORE;
+        return type;
+    }
+}
similarity index 51%
rename from bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/globals/BgpConstants.java
rename to bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpConstants.java
index 84fc680df57c227fdff14df2cae3b1cf061bbea6..7beb2eb78d4265225573829a0923c119398d9f50 100644 (file)
@@ -6,7 +6,7 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
-package org.opendaylight.bgpmanager.globals;
+package org.opendaylight.bgpmanager.oam;
 
 
 public class BgpConstants {
@@ -15,6 +15,12 @@ public class BgpConstants {
     public static final String BGP_SPEAKER_THRIFT_PORT = "vpnservice.bgpspeaker.thrift.port";
     public static final String DEFAULT_BGP_HOST_NAME = "localhost";
     public static final int DEFAULT_BGP_THRIFT_PORT = 7644;
-
-
-}
\ No newline at end of file
+    public static final int BGP_NOTIFY_CEASE_CODE = 6;
+    public static final String QBGP_VTY_PASSWORD = "sdncbgpc";
+    public static final String BGP_COUNTER_NBR_PKTS_RX = "BgpNeighborPacketsReceived";
+    public static final String BGP_COUNTER_NBR_PKTS_TX = "BgpNeighborPacketsSent";
+    public static final String BGP_COUNTER_RD_ROUTE_COUNT = "BgpRdRouteCount";
+    public static final String BGP_COUNTER_TOTAL_PFX = "BgpTotalPrefixes";
+    public static final String BGP_DEF_LOG_LEVEL = "errors";
+    public static final String BGP_DEF_LOG_FILE = "/var/log/bgp_debug.log";
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpCounters.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpCounters.java
new file mode 100644 (file)
index 0000000..b14c8fc
--- /dev/null
@@ -0,0 +1,514 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.oam;
+
+import javax.management.Attribute;
+import javax.management.JMException;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import java.io.*;
+import java.lang.management.ManagementFactory;
+import java.net.*;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+//import org.opendaylight.bgpmanager.globals.BgpConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Created by ECHIAPT on 8/4/2015.
+ */
+public class BgpCounters extends TimerTask {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(BgpCounters.class);
+    public static BgpCountersBroadcaster bgpStatsBroadcaster = null;
+    public MBeanServer bgpStatsServer = null;
+    public  Map <String, String> countersMap = new HashMap<String, String>();
+
+    @Override
+    public void run () {
+        try {
+            if (LOGGER.isDebugEnabled()) {
+                LOGGER.debug("Fetching counters from BGP at " + new Date());
+            }
+            resetCounters();
+            fetchCmdOutputs("cmd_ip_bgp_summary.txt","show ip bgp summary");
+            fetchCmdOutputs("cmd_bgp_ipv4_unicast_statistics.txt", "show bgp ipv4 unicast statistics");
+            fetchCmdOutputs("cmd_ip_bgp_vpnv4_all.txt", "show ip bgp vpnv4 all");
+            parse_ip_bgp_summary();
+            parse_bgp_ipv4_unicast_statistics();
+            parse_ip_bgp_vpnv4_all();
+            if (LOGGER.isDebugEnabled()) {
+                dumpCounters();
+            }
+            if (bgpStatsBroadcaster == null) {
+                //First time execution
+                try {
+                    bgpStatsBroadcaster = new BgpCountersBroadcaster();
+                    bgpStatsServer = ManagementFactory.getPlatformMBeanServer();
+                    ObjectName bgpStatsObj = new ObjectName("SDNC.PM:type=BgpCountersBroadcaster");
+                    bgpStatsServer.registerMBean(bgpStatsBroadcaster, bgpStatsObj);
+                    LOGGER.info("BGP Counters MBean Registered :::");
+                } catch (JMException e) {
+                    LOGGER.error("Adding a NotificationBroadcaster failed." , e);
+                    return;
+                }
+            }
+            bgpStatsBroadcaster.setBgpCountersMap(countersMap);
+            if (LOGGER.isDebugEnabled()) {
+                LOGGER.debug("Finished updating the counters from BGP at " + new Date());
+            }
+        } catch (Exception e) {
+            LOGGER.error("Failed to publish bgp counters ", e);
+        }
+    }
+
+    public void dumpCounters () {
+        Iterator<Map.Entry<String, String>> entries = countersMap.entrySet().iterator();
+        while (entries.hasNext()) {
+            Map.Entry<String, String> entry = entries.next();
+            LOGGER.debug(entry.getKey() + ", Value = " + entry.getValue());
+        }
+    }
+
+    public static void fetchCmdOutputs (String filename, String cmdName) throws  IOException  {
+        Socket socket;
+        int serverPort = 2605;
+        String serverName = BgpConstants.DEFAULT_BGP_HOST_NAME;
+        int sockTimeout = 2;
+        PrintWriter out_to_socket;
+        BufferedReader in_from_socket;
+        char cbuf[] = new char[10];
+        char op_buf[];
+        StringBuilder sb = new StringBuilder();
+        int ip, ret;
+        StringBuilder temp;
+        char ch, gt = '>', hash = '#';
+        String vtyPassword = BgpConstants.QBGP_VTY_PASSWORD;
+        String passwordCheckStr = "Password:";
+        String enableString = "en";
+        String prompt, replacedStr;
+
+        try
+        {
+            socket = new Socket(serverName, serverPort);
+
+        }
+        catch (UnknownHostException ioe) {
+            LOGGER.error("No host exists: " + ioe.getMessage());
+            return;
+        }
+        catch (IOException ioe) {
+            LOGGER.error("I/O error occured " + ioe.getMessage());
+            return;
+        }
+        try {
+            socket.setSoTimeout(sockTimeout*1000);
+            out_to_socket = new PrintWriter(socket.getOutputStream(), true);
+            in_from_socket = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+
+        } catch (IOException ioe) {
+            LOGGER.error("IOException thrown.");
+            socket.close();
+            return;
+        }
+        while (true) {
+            try {
+                ret = in_from_socket.read(cbuf);
+            }
+            catch (SocketTimeoutException ste) {
+                LOGGER.error("Read from Socket timed Out while asking for password.");
+                socket.close();
+                return;
+            }
+            catch (IOException ioe) {
+                LOGGER.error("Caught IOException");
+                socket.close();
+                return;
+            }
+            if (ret == -1) {
+                LOGGER.error("Connection closed by BGPd.");
+                socket.close();
+                return;
+            } else {
+                sb.append(cbuf);
+                if (sb.toString().contains(passwordCheckStr)) {
+                    break;
+                }
+            }
+        }
+
+        sb.setLength(0);
+        out_to_socket.println(vtyPassword);
+
+        while (true) {
+            try {
+                ip = in_from_socket.read();
+            }
+            catch (SocketTimeoutException ste) {
+                LOGGER.error(sb.toString());
+                LOGGER.error("Read from Socket timed Out while verifying the password.");
+                socket.close();
+                return;
+            }
+            if (ip == (int)gt) {
+                break;
+            } else if (ip == -1) {
+                LOGGER.error(sb.toString());
+                LOGGER.error("Connection closed by BGPd.");
+                socket.close();
+                return;
+            } else {
+                ch = (char)ip;
+                sb.append(ch);
+
+            }
+        }
+
+        prompt = sb.toString();
+        prompt = prompt.trim();
+        sb.setLength(0);
+        out_to_socket.println(enableString);
+
+        while (true) {
+            try {
+                ip = in_from_socket.read();
+            }
+            catch (SocketTimeoutException ste) {
+                LOGGER.error(sb.toString());
+                LOGGER.error("Read from Socket timed Out while keying the en keyword.");
+                socket.close();
+                return;
+            }
+            if (ip == (int)hash) {
+                break;
+            } else if (ip == -1) {
+                LOGGER.error(sb.toString());
+                LOGGER.error("Connection closed by BGPd.");
+                socket.close();
+                return;
+            } else {
+                ch = (char)ip;
+                sb.append(ch);
+
+            }
+        }
+        sb.setLength(0);
+        temp = new StringBuilder();
+        File file;
+        FileWriter fileWritter;
+        BufferedWriter bufferWritter;
+
+        try {
+            file = new File(filename);
+            if (!file.exists()) {
+                file.createNewFile();
+            }
+            fileWritter = new FileWriter(file.getName(), true);
+            bufferWritter = new BufferedWriter(fileWritter);
+        } catch (IOException e) {
+            return;
+        }
+        out_to_socket.println(cmdName);
+        temp.setLength(0);
+        while (true) {
+            try {
+                op_buf = new char[100];
+                ret = in_from_socket.read(op_buf);
+
+            } catch (SocketTimeoutException ste) {
+                break;
+            } catch (SocketException soc) {
+                break;
+            } catch (IOException ioe) {
+                ioe.printStackTrace();
+                break;
+            }
+
+            if (ret == -1) {
+                break;
+            }
+            temp.append(op_buf);
+        }
+        String outputStr = temp.toString();
+        StringBuffer output = new StringBuffer();
+
+        outputStr.replaceAll("^\\s+|\\s+$", "");
+        output.append(outputStr);
+        if (output.toString().trim().contains(prompt)) {
+            int index = output.toString().lastIndexOf(prompt);
+            String newString = output.toString().substring(0, index);
+            output.setLength(0);
+            output.append(newString);
+        }
+        try {
+            bufferWritter.write(output.toString().trim());
+            temp.setLength(0);
+        } catch (IOException e) {
+            e.printStackTrace();
+            return;
+        }
+        try {
+            bufferWritter.close();
+            fileWritter.close();
+            socket.close();
+
+        } catch (IOException e) {
+            e.printStackTrace();
+            return;
+        }
+    }
+
+    public boolean validate(final String ip){
+        if (ip == null || ip.equals("")) {
+            return false;
+        }
+        final String PATTERN =
+                "^(([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d\\d?|2[0-4]\\d|25[0-5])$";
+        Pattern pattern = Pattern.compile(PATTERN);
+        Matcher matcher = pattern.matcher(ip);
+        return matcher.matches();
+    }
+
+
+    /*
+     * The below function parses the output of "show ip bgp summary" saved in a file.
+     * Below is the snippet for the same :-
+        <output>
+        BGP router identifier 10.183.254.53, local AS number 101
+        .....
+        Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
+        10.183.254.76   4   100       3       4        0    0    0 00:01:27        0
+        .........
+        Total number of neighbors 1
+        </output>
+     */
+
+    public void parse_ip_bgp_summary() {
+        File file = new File("cmd_ip_bgp_summary.txt");
+        Scanner scanner;
+        String lineFromFile;
+        List<String> inputStrs = new ArrayList<String>();
+        int i = 0;
+        String as,rx, tx;
+        boolean startEntries = false;
+        String[] result;
+        String StrIP;
+
+        try {
+            scanner = new Scanner(file);
+        } catch (IOException e) {
+            LOGGER.error("Could not process the file " + file.getAbsolutePath());
+            return ;
+        }
+        while (scanner.hasNextLine()) {
+
+            lineFromFile = scanner.nextLine();
+            inputStrs.add(lineFromFile);
+        }
+        String str;
+        StringBuilder NbrInfoKey = new StringBuilder();
+
+        while (i < inputStrs.size()) {
+            str = inputStrs.get(i);
+            if (str.contains("State/PfxRcd")) {
+                startEntries = true;
+            } else if (startEntries == true) {
+                result = str.split("\\s+");
+               try {
+                    StrIP = result[0].trim();
+                    if (!validate(StrIP)) {
+                        return;
+                    }
+                    as = result[2];
+                    rx = result[3];
+                    tx = result[4];
+
+                    NbrInfoKey.setLength(0);
+                    NbrInfoKey.append(BgpConstants.BGP_COUNTER_NBR_PKTS_RX).append(":").
+                           append("BGP_Nbr_IP_").append(StrIP).append("_AS_").append(as).append("_PktsReceived");
+                    countersMap.put(NbrInfoKey.toString(), rx);
+
+
+                    NbrInfoKey.setLength(0);
+                    NbrInfoKey.append(BgpConstants.BGP_COUNTER_NBR_PKTS_TX).append(":").
+                           append("BGP_Nbr_IP_").append(StrIP).append("_AS_").append(as).append("_PktsSent");
+                    countersMap.put(NbrInfoKey.toString(), tx);
+                } catch (Exception e) {
+                    return;
+                }
+            }
+            i++;
+        }
+ }
+    /*
+     * The below function parses the output of "show bgp ipv4 unicast statistics" saved in a file.
+     * Below is the sample output for the same :-
+        <output>
+        BGP IPv4 Unicast RIB statistics
+        ...
+        Total Prefixes                :            8
+        ......
+        </output>
+     */
+
+    public void parse_bgp_ipv4_unicast_statistics() {
+       File file = new File("cmd_bgp_ipv4_unicast_statistics.txt");
+       Scanner scanner;
+       String lineFromFile;
+       StringBuilder key = new StringBuilder();
+       String totPfx = "";
+       List<String> inputStrs = new ArrayList<String>();
+       try {
+           scanner = new Scanner(file);
+       } catch (IOException e) {
+           System.err.println("Could not process the file " + file.getAbsolutePath());
+           return ;
+       }
+       while (scanner.hasNextLine()) {
+
+           lineFromFile = scanner.nextLine();
+           inputStrs.add(lineFromFile);
+       }
+
+       int i = 0;
+       String instr;
+       while (i < inputStrs.size()) {
+           instr = inputStrs.get(i);
+           if (instr.contains("Total Prefixes")) {
+               String[] result = instr.split(":");
+               try {
+                   totPfx = result[1].trim();
+               } catch (Exception e) {
+                   totPfx = "0";
+               }
+               break;
+           }
+           i++;
+       }
+        key.setLength(0);
+        key.append(BgpConstants.BGP_COUNTER_TOTAL_PFX).append(":").
+                append("Bgp_Total_Prefixes");
+        countersMap.put(key.toString(), totPfx);
+    }
+
+    /*
+     *  The below function parses the output of "show ip bgp vpnv4 all" saved in a file.
+     *  Below is the sample output for the same :-
+     *  show ip bgp vpnv4 all
+        <output>
+        BGP table version is 0, local router ID is 10.183.181.21
+        ......
+        Route Distinguisher: 100:1
+        *>i15.15.15.15/32   10.183.181.25            0    100      0 ?
+        *>i17.18.17.17/32   10.183.181.25            0    100      0 ?
+        *>i17.18.17.17/32   10.183.181.25            0    100      0 ?
+        *>i17.18.17.17/32   10.183.181.25            0    100      0 ?
+        Route Distinguisher: 100:2
+        *>i16.16.16.16/32   10.183.181.25            0    100      0 ?
+        *>i18.18.18.18/32   10.183.181.25            0    100      0 ?
+        *>i17.18.17.17/32   10.183.181.25            0    100      0 ?
+        </output>
+     */
+    public void parse_ip_bgp_vpnv4_all() {
+        File file = new File("cmd_ip_bgp_vpnv4_all.txt");
+        Scanner scanner;
+        String lineFromFile;
+        List<String> inputStrs = new ArrayList<String>();
+
+        try {
+            scanner = new Scanner(file);
+        } catch (IOException e) {
+            System.err.println("Could not process the file " + file.getAbsolutePath());
+            return ;
+        }
+        while (scanner.hasNextLine()) {
+            lineFromFile = scanner.nextLine();
+            inputStrs.add(lineFromFile);
+        }
+        int i = 0;
+        String instr, rd;
+        while (i < inputStrs.size()) {
+            instr = inputStrs.get(i);
+            if (instr.contains("Route Distinguisher")) {
+                String[] result = instr.split(":");
+                rd = result[1].trim() + "_" + result[2].trim();
+                i = processRouteCount(rd, i + 1,  inputStrs);
+
+            }
+            i++;
+        }
+
+    }
+
+    public int processRouteCount(String rd, int startIndex, List<String> inputStrs) {
+        int num = startIndex, route_count = 0;
+        String str;
+        StringBuilder key = new StringBuilder();
+        str = inputStrs.get(num);
+
+        while (str != null && !str.trim().equals("") &&
+                num <inputStrs.size()) {
+            if (str.contains("Route Distinguisher")) {
+                key.setLength(0);
+                key.append(BgpConstants.BGP_COUNTER_RD_ROUTE_COUNT).append(":").
+                        append("BGP_RD_").append(rd).append("_route_count");
+                countersMap.put(key.toString(), Integer.toString(route_count));
+                return num - 1;
+            }
+            route_count++;
+            num++;
+            if (num == inputStrs.size()) {
+                break;
+            }
+            str = inputStrs.get(num);
+        }
+        if (route_count == 0) {
+            // Erroneous condition, should never happen.
+            // Implies that the file contains marker for RD  without routes.
+            // will form an infinite loop if not broken
+            // by sending a big number back.
+            return ~0;
+        }
+        key.setLength(0);
+        key.append(BgpConstants.BGP_COUNTER_RD_ROUTE_COUNT).append(":").
+                append("BGP_RD_").append(rd).append("_route_count");
+        countersMap.put(key.toString(), Integer.toString(route_count));
+        return num - 1;
+    }
+
+    public void resetCounters() {
+        countersMap.clear();
+        resetFile("cmd_ip_bgp_summary.txt");
+        resetFile("cmd_bgp_ipv4_unicast_statistics.txt");
+        resetFile("cmd_ip_bgp_vpnv4_all.txt");
+    }
+
+    public void resetFile(String fileName) {
+        File fileHndl = (new File(fileName));
+        PrintWriter writer;
+        boolean success;
+
+        System.gc();
+        success = fileHndl.delete();
+        if (!success) {
+            try {
+                writer = new PrintWriter(fileHndl);
+                writer.print("");
+                writer.close();
+            } catch (Exception e) {
+                return;
+            }
+        }
+
+    }
+
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpCountersBroadcaster.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpCountersBroadcaster.java
new file mode 100644 (file)
index 0000000..1286ef4
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.oam;
+
+import com.google.common.collect.ImmutableBiMap;
+import com.google.common.collect.ImmutableMap;
+
+import javax.management.MBeanNotificationInfo;
+import javax.management.Notification;
+import javax.management.NotificationBroadcasterSupport;
+import java.util.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Created by ECHIAPT on 9/25/2015.
+ */
+public class BgpCountersBroadcaster extends NotificationBroadcasterSupport implements BgpCountersBroadcasterMBean  {
+    public Map<String, String> bgpCountersMap = new HashMap<String, String>();
+    private static final Logger LOGGER = LoggerFactory.getLogger(BgpCountersBroadcaster.class);
+
+    public Map<String, String> retrieveCounterMap() {
+        LOGGER.trace("Polled retrieveCounterMap");
+        Map<String, String> countersVal = new HashMap<String, String>(bgpCountersMap);
+        Iterator<Map.Entry<String, String>> entries = countersVal.entrySet().iterator();
+        while (entries.hasNext()) {
+            Map.Entry<String, String> entry = entries.next();
+            LOGGER.trace(entry.getKey() + ", Value from MBean= " + entry.getValue());
+        }
+        return countersVal;
+    }
+
+    public void setBgpCountersMap(Map fetchedCountersMap) {
+        LOGGER.trace("putAll");
+        bgpCountersMap.clear();
+        bgpCountersMap.putAll(fetchedCountersMap);
+    }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpCountersBroadcasterMBean.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/oam/BgpCountersBroadcasterMBean.java
new file mode 100644 (file)
index 0000000..c4e5774
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.oam;
+
+        import java.util.ArrayList;
+        import java.util.Map;
+
+/**
+ * Created by echiapt on 9/28/2015.
+ */
+public interface BgpCountersBroadcasterMBean {
+    public Map retrieveCounterMap();
+}
+
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/api-files/qbgp.thrift b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/api-files/qbgp.thrift
deleted file mode 100644 (file)
index d6f75f8..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-
-struct Update {
-    1: i32 type,
-    2: i32 reserved,
-    3: i32 prefixlen,
-    4: i32 label,
-    5: string rd,
-    6: string prefix,
-    7: string nexthop
-}
-
-struct Routes {
-    1: i32 errcode,
-    2: optional list<Update> updates,
-    4: optional i32 more
-}
-
-service BgpConfigurator {
-    i32 startBgpServer(1:i32 asNumber, 2:string routerId, 3: i32 port, 
-                       4:i32 holdTime, 5:i32 keepAliveTime),
-    i32 stopBgpServer(),
-    i32 createPeer(1:string ipAddress, 2:i32 asNumber),
-    i32 deletePeer(1:string ipAddress)
-    i32 addVrf(1:string rd, 2:list<string> irts, 3:list<string> erts),
-    i32 delVrf(1:string rd),
-    i32 pushRoute(1:string prefix, 2:string nexthop, 3:string rd, 4:i32 label),
-    i32 withdrawRoute(1:string prefix, 2:string rd),
-    Routes getRoutes(1:i32 optype, 2:i32 winSize)
-}
-
-service BgpUpdater {
-    oneway void onUpdatePushRoute(1:string rd, 2:string prefix, 
-                                  3:i32 prefixlen, 4:string nexthop, 
-                                  5:i32 label),
-    oneway void onUpdateWithdrawRoute(1:string rd, 2:string prefix, 
-                                      3:i32 prefixlen), 
-    oneway void onStartConfigResyncNotification()
-}
-    
-
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/BgpRouter.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/BgpRouter.java
new file mode 100644 (file)
index 0000000..720ebf9
--- /dev/null
@@ -0,0 +1,392 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.thrift.client;
+
+import java.util.*;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.TException;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransportException;
+import org.opendaylight.bgpmanager.thrift.gen.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class BgpRouter {
+    private static TTransport transport;
+    private static TProtocol protocol;
+    private static BgpConfigurator.Client bgpClient=null;
+    private static final Logger LOGGER = LoggerFactory.getLogger(BgpRouter.class);
+
+    private enum Optype {
+        START, STOP, NBR, VRF, PFX, SRC, MHOP, LOG, AF, GR
+    };
+
+    private final static int GET_RTS_INIT = 0;
+    private final static int GET_RTS_NEXT = 1;
+    private final static int CONNECTION_TIMEOUT = 2000;
+
+
+    private class BgpOp {
+        public Optype type;
+        public boolean add;
+        public String[] strs;
+        public int[] ints;
+        public List<String> irts;
+        public List<String> erts;
+        public static final int ignore = 0;
+        public BgpOp() {
+            strs = new String[3];
+            ints = new int[2];
+        }
+    }
+
+    private static BgpOp bop;
+
+    public synchronized void disconnect() {
+        bgpClient = null;
+        if (transport != null) {
+            transport.close();
+        }
+    }
+
+    public synchronized boolean connect(String bgpHost, int bgpPort) {
+        String msgPiece = "BGP config server at "+bgpHost+":"+bgpPort;
+
+        disconnect();
+        try {
+            TSocket ts = new TSocket(bgpHost, bgpPort, CONNECTION_TIMEOUT);
+            transport = ts; 
+            transport.open();
+            ts.setTimeout(0);
+        } catch (TTransportException tte) {
+            LOGGER.error("Failed connecting to "+msgPiece+
+                         "; Exception: "+tte);
+            return false;
+        }
+        protocol = new TBinaryProtocol(transport);
+        bgpClient = new BgpConfigurator.Client(protocol);
+        LOGGER.info("Connected to "+msgPiece);
+        return true;
+    }
+
+    private BgpRouter() {
+        bop = new BgpOp();
+    }
+
+    private static BgpRouter br = null;
+
+    public static synchronized BgpRouter getInstance() {
+        return (br == null ? br = new BgpRouter() : br);
+    }
+
+    private void dispatch(BgpOp op)
+        throws TException, BgpRouterException {
+        int result = 1;
+
+        if (bgpClient == null) {
+            throw new BgpRouterException(BgpRouterException.BGP_ERR_NOT_INITED);
+        }
+
+        switch (op.type) {
+            case START:
+                result = bgpClient.startBgp(op.ints[0], op.strs[0],
+                    op.ignore, op.ignore, op.ignore, op.ints[1], op.add);
+                break;
+            case STOP:
+                result = bgpClient.stopBgp(op.ints[0]);
+                break;
+            case NBR:
+                result = bop.add ? 
+                           bgpClient.createPeer(op.strs[0], op.ints[0]) 
+                           : bgpClient.deletePeer(op.strs[0]); 
+                break;
+            case VRF:
+                result = bop.add ? 
+                           bgpClient.addVrf(op.strs[0], op.irts, op.erts)
+                           : bgpClient.delVrf(op.strs[0]);
+                break;
+            case PFX:
+                // order of args is different in addPrefix(), hence the
+                // seeming out-of-order-ness of string indices
+                result = bop.add ? 
+                           bgpClient.pushRoute(op.strs[1], op.strs[2], 
+                                                op.strs[0], op.ints[0])
+                      : bgpClient.withdrawRoute(op.strs[1], op.strs[0]);
+                break;
+            case LOG:
+                result = bgpClient.setLogConfig(op.strs[0], op.strs[1]);
+                break;
+            case MHOP: 
+                result = bop.add ? 
+                      bgpClient.setEbgpMultihop(op.strs[0], op.ints[0])
+                      : bgpClient.unsetEbgpMultihop(op.strs[0]);
+                break;
+            case SRC: 
+                result = bop.add ?
+                      bgpClient.setUpdateSource(op.strs[0], op.strs[1])
+                      : bgpClient.unsetUpdateSource(op.strs[0]);
+                break;
+            default: break;
+            case AF: 
+                af_afi afi = af_afi.findByValue(op.ints[0]);
+                af_safi safi = af_safi.findByValue(op.ints[1]);
+                result = bop.add ?
+                  bgpClient.enableAddressFamily(op.strs[0], afi, safi)
+                  : bgpClient.disableAddressFamily(op.strs[0], afi, safi);
+                break;
+            case GR: 
+                result = bop.add ?
+                           bgpClient.enableGracefulRestart(op.ints[0])
+                           : bgpClient.disableGracefulRestart();
+                break;
+        }
+        if (result != 0) {
+            throw new BgpRouterException(result);
+        }
+    }
+
+    public synchronized void startBgp(int asNum, String rtrId, int stalepathTime,
+                         boolean announceFbit)
+        throws TException, BgpRouterException {
+        bop.type = Optype.START;
+        bop.add = announceFbit;
+        bop.ints[0] = asNum;
+        bop.ints[1] = stalepathTime;
+        bop.strs[0] = rtrId;
+        LOGGER.debug("Starting BGP with as number {} and router ID {} ", asNum, rtrId);
+        dispatch(bop);
+    }
+
+    public synchronized void stopBgp(int asNum)
+        throws TException, BgpRouterException {
+        bop.type = Optype.STOP;
+        bop.ints[0] = asNum;
+        LOGGER.debug("Stopping BGP with as number {}", asNum);
+        dispatch(bop);
+    }
+
+    public synchronized void addNeighbor(String nbrIp, int nbrAsNum)
+        throws TException, BgpRouterException {
+        bop.type = Optype.NBR;
+        bop.add = true;
+        bop.strs[0] = nbrIp;
+        bop.ints[0] = nbrAsNum;
+        LOGGER.debug("Adding BGP Neighbor {} with as number {} ", nbrIp, nbrAsNum);
+        dispatch(bop);
+    }
+
+    public synchronized void delNeighbor(String nbrIp)
+        throws TException, BgpRouterException {
+        bop.type = Optype.NBR;
+        bop.add = false;
+        bop.strs[0] = nbrIp;
+        LOGGER.debug("Deleting BGP Neighbor {} ", nbrIp);
+        dispatch(bop);
+    }
+
+    public synchronized void addVrf(String rd, List<String> irts, List<String> erts)
+        throws TException, BgpRouterException {
+        bop.type = Optype.VRF;
+        bop.add = true;
+        bop.strs[0] = rd;
+        bop.irts = irts;
+        bop.erts = erts;
+        LOGGER.debug("Adding BGP VRF rd: {} ", rd);
+        dispatch(bop);
+    }
+
+    public synchronized void delVrf(String rd)
+        throws TException, BgpRouterException {
+        bop.type = Optype.VRF;
+        bop.add = false;
+        bop.strs[0] = rd;
+        LOGGER.debug("Deleting BGP VRF rd: {} " + rd);
+        dispatch(bop);
+    }
+
+    // bit of a mess-up: the order of arguments is different in
+    // the Thrift RPC: prefix-nexthop-rd-label. 
+
+    public synchronized void addPrefix(String rd, String prefix, String nexthop, int label)
+        throws TException, BgpRouterException {
+        bop.type = Optype.PFX;
+        bop.add = true;
+        bop.strs[0] = rd;
+        bop.strs[1] = prefix;
+        bop.strs[2] = nexthop;
+        bop.ints[0] = label;
+        LOGGER.debug("Adding BGP route - rd:{} prefix:{} nexthop:{} label:{} ", rd ,prefix, nexthop, label);
+        dispatch(bop);
+    }
+
+    public synchronized void delPrefix(String rd, String prefix)
+        throws TException, BgpRouterException {
+        bop.type = Optype.PFX;
+        bop.add = false;
+        bop.strs[0] = rd;
+        bop.strs[1] = prefix;
+        LOGGER.debug("Deleting BGP route - rd:{} prefix:{} ", rd, prefix);
+        dispatch(bop);
+    }
+
+    public int initRibSync(BgpSyncHandle handle)
+        throws TException, BgpRouterException {
+        if (bgpClient == null) {
+            throw new BgpRouterException(BgpRouterException.BGP_ERR_NOT_INITED);
+        }
+        if (handle.getState() == BgpSyncHandle.ITERATING) {
+            return BgpRouterException.BGP_ERR_IN_ITER;
+        }
+        handle.setState(BgpSyncHandle.INITED);
+        handle.setMore(1);
+        return 0;
+    }
+
+    public int endRibSync(BgpSyncHandle handle)
+        throws TException, BgpRouterException {
+        if (bgpClient == null) {
+            throw new BgpRouterException(BgpRouterException.BGP_ERR_NOT_INITED);
+        }
+        int state = handle.getState();
+        switch (state) {
+            case BgpSyncHandle.INITED:
+            case BgpSyncHandle.ITERATING:
+                handle.setState(BgpSyncHandle.ABORTED);
+                break;
+            case BgpSyncHandle.DONE:
+                break;
+            case BgpSyncHandle.NEVER_DONE:
+                return BgpRouterException.BGP_ERR_NOT_ITER;
+            default:
+                break;
+        }
+        return 0;
+    }
+
+    public Routes doRibSync(BgpSyncHandle handle)
+        throws TException, BgpRouterException {
+        if (bgpClient == null) {
+            throw new BgpRouterException(BgpRouterException.BGP_ERR_NOT_INITED);
+        }
+        int state = handle.getState();
+        if (state != BgpSyncHandle.INITED && state != BgpSyncHandle.ITERATING) {
+            Routes r = new Routes();
+            r.setErrcode(BgpRouterException.BGP_ERR_NOT_ITER);
+            return r;
+        }
+        int op = (state == BgpSyncHandle.INITED) ?
+            GET_RTS_INIT : GET_RTS_NEXT;
+        handle.setState(BgpSyncHandle.ITERATING);
+        int winSize = handle.getMaxCount()*handle.getRouteSize();
+        Routes outRoutes = bgpClient.getRoutes(op, winSize);
+       if (outRoutes.errcode != 0) {
+           return outRoutes;
+       }
+        handle.setMore(outRoutes.more);
+        if (outRoutes.more == 0) {
+            handle.setState(BgpSyncHandle.DONE);
+        }
+        return outRoutes;
+    }
+
+    public synchronized void setLogging(String fileName, String debugLevel)
+            throws TException, BgpRouterException {
+        bop.type = Optype.LOG;
+        bop.strs[0] = fileName;
+        bop.strs[1] = debugLevel;
+        LOGGER.debug("Setting Log file to BGP VRF rd: {} ", fileName, debugLevel);
+        dispatch(bop);
+    }
+
+    public synchronized void addEbgpMultihop(String nbrIp, int nhops)
+        throws TException, BgpRouterException {
+        bop.type = Optype.MHOP;
+        bop.add = true;
+        bop.strs[0] = nbrIp;
+        bop.ints[0] = nhops;
+        LOGGER.debug("ebgp-multihop set for peer {}, num hops = {}",
+                      nbrIp, nhops);
+        dispatch(bop);
+    }
+
+    public synchronized void delEbgpMultihop(String nbrIp)
+        throws TException, BgpRouterException {
+        bop.type = Optype.MHOP;
+        bop.add = false;
+        bop.strs[0] = nbrIp;
+        LOGGER.debug("ebgp-multihop deleted for peer {}", nbrIp);
+        dispatch(bop);
+    }
+
+    public synchronized void addUpdateSource(String nbrIp, String srcIp)
+        throws TException, BgpRouterException {
+        bop.type = Optype.SRC;
+        bop.add = true;
+        bop.strs[0] = nbrIp;
+        bop.strs[1] = srcIp;
+        LOGGER.debug("update-source added for peer {}, src-ip = {}", 
+                      nbrIp, srcIp);
+        dispatch(bop);
+    }
+
+    public synchronized void delUpdateSource(String nbrIp)
+        throws TException, BgpRouterException {
+        bop.type = Optype.SRC;
+        bop.add = false;
+        bop.strs[0] = nbrIp;
+        LOGGER.debug("update-source deleted for peer {}", nbrIp);
+        dispatch(bop);
+    }
+
+    public synchronized void addAddressFamily(String nbrIp, 
+                                  af_afi afi, af_safi safi)
+        throws TException, BgpRouterException {
+        bop.type = Optype.AF;
+        bop.add = true;
+        bop.strs[0] = nbrIp;
+        bop.ints[0] = afi.getValue();
+        bop.ints[1] = safi.getValue();
+        LOGGER.debug("addr family added for peer {}, afi = {}, safi = {}",
+                     nbrIp, bop.ints[0], bop.ints[1]);
+        dispatch(bop);
+    }
+
+    public synchronized void delAddressFamily(String nbrIp,
+                                  af_afi afi, af_safi safi)
+        throws TException, BgpRouterException {
+        bop.type = Optype.AF;
+        bop.add = false;
+        bop.strs[0] = nbrIp;
+        bop.ints[0] = afi.getValue();
+        bop.ints[1] = safi.getValue();
+        LOGGER.debug("addr family deleted for peer {}, afi = {}, safi = {}",
+                     nbrIp, bop.ints[0], bop.ints[1]);
+        dispatch(bop);
+    }
+
+    public synchronized void addGracefulRestart(int stalepathTime)
+        throws TException, BgpRouterException {
+        bop.type = Optype.GR;
+        bop.add = true;
+        bop.ints[0] = stalepathTime;
+        LOGGER.debug("graceful restart added, stale-path-time = {}",
+                      stalepathTime);
+        dispatch(bop);
+    }
+
+    public synchronized void delGracefulRestart()
+        throws TException, BgpRouterException {
+        bop.type = Optype.GR;
+        bop.add = false;
+        LOGGER.debug("graceful restart deleted");
+        dispatch(bop);
+    }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/BgpRouterException.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/BgpRouterException.java
new file mode 100644 (file)
index 0000000..45ebb9e
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.thrift.client;
+
+import org.opendaylight.bgpmanager.thrift.gen.qbgpConstants;
+
+public class BgpRouterException extends Exception {
+    public final static int BGP_ERR_INITED = 101;
+    public final static int BGP_ERR_NOT_INITED = 102;
+    public final static int BGP_ERR_IN_ITER =  103;
+
+    // the following consts are server-dictated. do not modify
+    public final static int BGP_ERR_FAILED = qbgpConstants. BGP_ERR_FAILED;
+    public final static int BGP_ERR_ACTIVE = qbgpConstants.BGP_ERR_ACTIVE;
+    public final static int BGP_ERR_INACTIVE = qbgpConstants.BGP_ERR_INACTIVE; 
+    public final static int BGP_ERR_NOT_ITER =  qbgpConstants.BGP_ERR_NOT_ITER;
+    public final static int BGP_ERR_PARAM = qbgpConstants.BGP_ERR_PARAM;
+
+    private int errcode;
+
+    public BgpRouterException(int cause) {
+        errcode = cause;
+    }
+
+    public int getErrorCode() {
+        return errcode;
+    }
+
+    public String toString() {
+      String s = "("+errcode+") ";
+
+      switch (errcode) {
+        case BGP_ERR_INITED :
+            s += "Attempt to reinitialize BgpRouter thrift client";
+            break;
+        case BGP_ERR_NOT_INITED :
+            s += "BgpRouter thrift client was not initialized";
+            break;
+        case BGP_ERR_FAILED :
+            s += "Error reported by BGP, check qbgp.log";
+            break;
+        case BGP_ERR_ACTIVE : 
+            s += "Attempt to start router instance when already active";
+            break;
+        case BGP_ERR_INACTIVE : 
+            s += "Router instance is not active";
+            break;
+        case BGP_ERR_IN_ITER :
+            s += "Attempt to start route iteration when already "+
+                 "in the middle of one";
+            break;
+        case BGP_ERR_NOT_ITER :
+            s += "Route iteration not initialized";
+            break;
+        case BGP_ERR_PARAM :
+            s += "Parameter validation or Unknown error";
+            break;
+        default : 
+            s += "Unknown error";
+            break;
+     }
+     return s;
+   }
+}
similarity index 93%
rename from bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/implementation/BgpSyncHandle.java
rename to bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/BgpSyncHandle.java
index da642576ae9fbe756fb284ef2dbd5bf8a4884429..306608d42a55160656dbecd6effe17d1ed6984eb 100644 (file)
@@ -6,7 +6,7 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
-package org.opendaylight.bgpmanager.thrift.client.implementation;
+package org.opendaylight.bgpmanager.thrift.client;
 
 import java.io.IOException;
 import java.net.Socket;
@@ -29,7 +29,7 @@ public class BgpSyncHandle {
     public static final int DEFAULT_TCP_SOCK_SZ = 87380;    //default receive buffer size on linux > 2.4
 
     private BgpSyncHandle() {
-        more = 1;
+        more = 1; 
         state = NEVER_DONE;
     }
 
@@ -65,8 +65,8 @@ public class BgpSyncHandle {
        //size of one update structure on the wire. ideally
        //this should be computed; or thrift sure has a nice
        //way to tell this to the applciation, but for the
-       //moment, we just use 8 bytes more than the size of
-       //the C struct.
+       //moment, we just use 8 bytes more than the size of 
+       //the C struct. 
 
        return 96;
     }
@@ -84,5 +84,5 @@ public class BgpSyncHandle {
     }
 }
 
-
-
+        
+  
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/globals/Route.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/globals/Route.java
deleted file mode 100644 (file)
index 4251f46..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.bgpmanager.thrift.client.globals;
-
-
-public class Route {
-
-    private int prefixlen;
-    private int label;
-    private String rd;
-    private String prefix;
-    private String nexthop;
-
-    public Route(String rd, String prefix, int prefixlen, String nexthop, int label) {
-        this.rd = rd;
-        this.prefix = prefix;
-        this.prefixlen = prefixlen;
-        this.nexthop = nexthop;
-        this.label = label;
-    }
-
-    public String getRd() {
-        return this.rd;
-    }
-
-    public String getPrefix() {
-        return new StringBuilder().append(this.prefix).append("/").append(this.prefixlen).toString();
-    }
-
-    public String getNexthop() {
-        return this.nexthop;
-    }
-
-    public int getLabel() {
-        return this.label;
-    }
-
-    public void setRd(String rd) {
-        this.rd = rd;
-    }
-
-    public void setPrefix(String prefix) {
-        String[] splitStr = prefix.split("/");
-        this.prefix = splitStr[0];
-        this.prefixlen = Integer.parseInt(splitStr[1]);
-    }
-
-    public void setNexthop(String nextHop) {
-        this.nexthop = nextHop;
-    }
-
-    public void setLabel(int label) {
-        this.label = label;
-    }
-}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/implementation/BgpRouter.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/implementation/BgpRouter.java
deleted file mode 100644 (file)
index 208570d..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.bgpmanager.thrift.client.implementation;
-
-import org.apache.thrift.TException;
-import org.apache.thrift.transport.TTransport;
-import org.apache.thrift.transport.TSocket;
-import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.protocol.TProtocol;
-import java.util.*;
-
-import org.opendaylight.bgpmanager.thrift.client.globals.Route;
-import org.opendaylight.bgpmanager.thrift.common.Constants;
-import org.opendaylight.bgpmanager.thrift.gen.*;
-import org.opendaylight.bgpmanager.thrift.exceptions.BgpRouterException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class BgpRouter {
-    private TTransport transport;
-    private TProtocol protocol;
-    private static BgpConfigurator.Client bgpClient=null;
-    private static final Logger LOGGER = LoggerFactory.getLogger(BgpRouter.class);
-
-
-    private final static int ADD_NBR = 1;
-    private final static int DEL_NBR = 2;
-    private final static int ADD_VRF = 3;
-    private final static int DEL_VRF = 4;
-    private final static int ADD_PFX = 5;
-    private final static int DEL_PFX = 6;
-    private final static int START_BGP = 7;
-
-    private final static int GET_RTS_INIT = 0;
-    private final static int GET_RTS_NEXT = 1;
-
-
-    private class BgpOp {
-        public int type;
-        public String nbrIp;
-        public int nbrAsNum;
-        public String rd;
-        public List<String> irts;
-        public List<String> erts;
-        public String pfx;
-        public String nh;
-        public int lbl;
-        public int asNum;
-        public String rtrId;
-        public static final int ignore = 0;
-        public BgpOp() {}
-    }
-
-    static BgpOp bop = null;
-
-    private String bgpHost;
-    private int bgpPort;
-
-    public BgpRouter() {
-    }
-
-
-    public void setBgpServer(String host, int port) {
-        this.bgpHost = host;
-        this.bgpPort = port;
-    }
-
-    public void connect(String bgpHost, int bgpPort)
-        throws TException, BgpRouterException {
-        this.bgpHost = bgpHost;
-        this.bgpPort = bgpPort;
-        bop = new BgpOp();
-        try {
-            LOGGER.debug("Connecting to BGP Server " + bgpHost + " on port " + bgpPort);
-            reInit();
-        } catch (Exception e) {
-            LOGGER.error("Failed connecting to BGP server ");
-            throw e;
-        }
-    }
-
-    public void disconnect() {
-        if(transport != null) {
-            transport.close();
-        }
-    }
-
-    public void reInit()
-        throws TException, BgpRouterException {
-        if(transport != null) {
-            transport.close();
-        }
-        transport = new TSocket(bgpHost, bgpPort);
-        ((TSocket)transport).setTimeout(Constants.CL_SKT_TIMEO_MS);
-        transport.open();
-        protocol = new TBinaryProtocol(transport);
-        bgpClient = new BgpConfigurator.Client(protocol);
-        if(bop == null) {
-            bop = new BgpOp();
-        }
-    }
-
-    private void dispatch(BgpOp op)
-        throws TException, BgpRouterException {
-        int result = 1;
-
-        if (bgpClient == null) {
-            throw new BgpRouterException(BgpRouterException.BGP_ERR_NOT_INITED);
-        }
-
-        switch (op.type) {
-            case START_BGP:
-                result = bgpClient.startBgpServer(op.asNum, op.rtrId,
-                    op.ignore, op.ignore, op.ignore);
-                break;
-            case ADD_NBR:
-                result = bgpClient.createPeer(op.nbrIp, op.nbrAsNum);
-                break;
-            case DEL_NBR:
-                result = bgpClient.deletePeer(op.nbrIp);
-                break;
-            case ADD_VRF:
-                result = bgpClient.addVrf(op.rd, op.irts, op.erts);
-                break;
-            case DEL_VRF:
-                result = bgpClient.delVrf(op.rd);
-                break;
-            case ADD_PFX:
-                result = bgpClient.pushRoute(op.pfx, op.nh, op.rd, op.lbl);
-                break;
-            case DEL_PFX:
-                result = bgpClient.withdrawRoute(op.pfx, op.rd);
-                break;
-            default: break;
-        }
-        if (result != 0) {
-            throw new BgpRouterException(result);
-        }
-    }
-
-    public void startBgp(int asNum, String rtrId)
-        throws TException, BgpRouterException {
-        bop.type = START_BGP;
-        bop.asNum = asNum;
-        bop.rtrId = rtrId;
-        LOGGER.debug("Starting BGP Server with as number {} and router ID {} ", asNum, rtrId);
-        dispatch(bop);
-    }
-
-    public synchronized void addNeighbor(String nbrIp, int nbrAsNum)
-        throws TException, BgpRouterException {
-        bop.type = ADD_NBR;
-        bop.nbrIp = nbrIp;
-        bop.nbrAsNum = nbrAsNum;
-        LOGGER.debug("Adding BGP Neighbor {} with as number {} ", nbrIp, nbrAsNum);
-        dispatch(bop);
-    }
-
-    public synchronized void delNeighbor(String nbrIp)
-        throws TException, BgpRouterException {
-        bop.type = DEL_NBR;
-        bop.nbrIp = nbrIp;
-        LOGGER.debug("Deleting BGP Neighbor {} ", nbrIp);
-        dispatch(bop);
-    }
-
-    public synchronized void addVrf(String rd, List<String> irts, List<String> erts)
-        throws TException, BgpRouterException {
-        bop.type = ADD_VRF;
-        bop.rd = rd;
-        bop.irts = irts;
-        bop.erts = erts;
-        LOGGER.debug("Adding BGP VRF rd: {} ", rd);
-        dispatch(bop);
-    }
-
-    public synchronized void delVrf(String rd)
-        throws TException, BgpRouterException {
-        bop.type = DEL_VRF;
-        bop.rd = rd;
-        LOGGER.debug("Deleting BGP VRF rd: {} " + rd);
-        dispatch(bop);
-    }
-
-    public synchronized void addPrefix(String rd, String prefix, String nexthop, int label)
-        throws TException, BgpRouterException {
-        bop.type = ADD_PFX;
-        bop.rd = rd;
-        bop.pfx = prefix;
-        bop.nh = nexthop;
-        bop.lbl = label;
-        LOGGER.debug("Adding BGP route - rd:{} prefix:{} nexthop:{} label:{} ", rd ,prefix, nexthop, label);
-        dispatch(bop);
-    }
-
-    public synchronized void delPrefix(String rd, String prefix)
-        throws TException, BgpRouterException {
-        bop.type = DEL_PFX;
-        bop.rd = rd;
-        bop.pfx = prefix;
-        LOGGER.debug("Deleting BGP route - rd:{} prefix:{} ", rd, prefix);
-        dispatch(bop);
-    }
-
-    public int initRibSync(BgpSyncHandle handle)
-        throws TException, BgpRouterException {
-        if (bgpClient == null) {
-            throw new BgpRouterException(BgpRouterException.BGP_ERR_NOT_INITED);
-        }
-        if (handle.getState() == BgpSyncHandle.ITERATING) {
-            return BgpRouterException.BGP_ERR_IN_ITER;
-        }
-        handle.setState(BgpSyncHandle.INITED);
-        handle.setMore(1);
-        return 0;
-    }
-
-    public int endRibSync(BgpSyncHandle handle)
-        throws TException, BgpRouterException {
-        if (bgpClient == null) {
-            throw new BgpRouterException(BgpRouterException.BGP_ERR_NOT_INITED);
-        }
-        int state = handle.getState();
-        switch (state) {
-            case BgpSyncHandle.INITED:
-            case BgpSyncHandle.ITERATING:
-                handle.setState(BgpSyncHandle.ABORTED);
-                break;
-            case BgpSyncHandle.DONE:
-                break;
-            case BgpSyncHandle.NEVER_DONE:
-                return BgpRouterException.BGP_ERR_NOT_ITER;
-            default:
-                break;
-        }
-        return 0;
-    }
-
-    public Routes doRibSync(BgpSyncHandle handle)
-        throws TException, BgpRouterException {
-        if (bgpClient == null) {
-            throw new BgpRouterException(BgpRouterException.BGP_ERR_NOT_INITED);
-        }
-        int state = handle.getState();
-        if (state != BgpSyncHandle.INITED && state != BgpSyncHandle.ITERATING) {
-            Routes r = new Routes();
-            r.setErrcode(BgpRouterException.BGP_ERR_NOT_ITER);
-            return r;
-        }
-        int op = (state == BgpSyncHandle.INITED) ?
-            GET_RTS_INIT : GET_RTS_NEXT;
-        handle.setState(BgpSyncHandle.ITERATING);
-        int winSize = handle.getMaxCount()*handle.getRouteSize();
-        Routes outRoutes = bgpClient.getRoutes(op, winSize);
-       if (outRoutes.errcode != 0) {
-           return outRoutes;
-       }
-        handle.setMore(outRoutes.more);
-        if (outRoutes.more == 0) {
-            handle.setState(BgpSyncHandle.DONE);
-        }
-        return outRoutes;
-    }
-
-    //We would support this only when we support controller restarts
-    public void doRouteSync()
-        throws TException, BgpRouterException {
-        BgpSyncHandle bsh = BgpSyncHandle.getInstance();
-
-        try {
-            LOGGER.debug("Starting BGP Route sync.. ");
-            initRibSync(bsh);
-            while (bsh.getState() != bsh.DONE) {
-                Routes r = doRibSync(bsh);
-                if(r.getErrcode() == BgpRouterException.BGP_ERR_INACTIVE) {
-                    //BGP server is inactive; log and return
-                    LOGGER.error("BGP Server is inactive. Failed BGP Route sync");
-                    return;
-                }
-                Iterator<Update> iter = r.getUpdatesIterator();
-                while (iter.hasNext()) {
-                    Update u = iter.next();
-                    Route route = new Route(u.rd, u.prefix, u.prefixlen, u.nexthop, u.label);
-                    //Add to FIB??
-                    /*
-                    if(bgpRouteCb != null) {
-                        bgpRouteCb.setRoute(route);
-                    }*/
-                }
-            }
-            endRibSync(bsh);
-            LOGGER.debug("Completed BGP Route sync.");
-        }  catch (Exception e) {
-            throw e;
-        }
-    };
-
-
-
-}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/common/Constants.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/common/Constants.java
deleted file mode 100644 (file)
index 86b49fe..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.bgpmanager.thrift.common;
-
-
-public class Constants {
-
-
-        public static final String PROP_MAX_WORKER_THREADS = "bgpthrift.maxWorkerThreads";
-        public static final String PROP_MIN_WORKER_THREADS = "bgpthrift.minWorkerThreads";
-
-        //  Configurable parameters
-        public static final String PROP_BGP_THRIFT_PORT = "bgp.thrift.service.port";
-
-        // Default configurations
-
-        public static final int BGP_SERVICE_PORT = 6644;
-        public static final int DEFAULT_MIN_WORKER_THREADS = 1; //1 client only- quagga server - so 1 thread to service it
-        public static final int DEFAULT_MAX_WORKER_THREADS = 1;
-
-        public static final int CL_SKT_TIMEO_MS = 30000;
-
-}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/exceptions/BgpRouterException.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/exceptions/BgpRouterException.java
deleted file mode 100644 (file)
index ee91b11..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.bgpmanager.thrift.exceptions;
-
-public class BgpRouterException extends Exception {
-    public final static int BGP_ERR_INITED = 101;
-    public final static int BGP_ERR_NOT_INITED = 102;
-
-    // the following consts are server-dictated. do not modify
-    public final static int BGP_ERR_ACTIVE = 10;
-    public final static int BGP_ERR_INACTIVE = 11;
-    public final static int BGP_ERR_COMM = 12;
-    public final static int BGP_ERR_LOCAL = 13;
-    public final static int BGP_ERR_IN_ITER =  14;
-    public final static int BGP_ERR_NOT_ITER = 15;
-    public final static int BGP_ERR_UNKNOWN = 100;
-
-
-    public BgpRouterException(int cause) {
-        errcode = cause;
-    }
-
-    public int getErrorCode() {
-        return errcode;
-    }
-
-    private int errcode;
-}
index 6339516ea44fe4a427769d22a38dbf7d34ed5505..163a33f4bb3d4de9c1a5d1cafec436cd6feb60d5 100644 (file)
@@ -4,6 +4,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
+
 package org.opendaylight.bgpmanager.thrift.gen;
 
 import org.apache.thrift.scheme.IScheme;
@@ -36,9 +37,9 @@ public class BgpConfigurator {
 
   public interface Iface {
 
-    public int startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime) throws org.apache.thrift.TException;
+    public int startBgp(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit) throws org.apache.thrift.TException;
 
-    public int stopBgpServer() throws org.apache.thrift.TException;
+    public int stopBgp(int asNumber) throws org.apache.thrift.TException;
 
     public int createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException;
 
@@ -52,15 +53,33 @@ public class BgpConfigurator {
 
     public int withdrawRoute(String prefix, String rd) throws org.apache.thrift.TException;
 
+    public int setEbgpMultihop(String peerIp, int nHops) throws org.apache.thrift.TException;
+
+    public int unsetEbgpMultihop(String peerIp) throws org.apache.thrift.TException;
+
+    public int setUpdateSource(String peerIp, String srcIp) throws org.apache.thrift.TException;
+
+    public int unsetUpdateSource(String peerIp) throws org.apache.thrift.TException;
+
+    public int enableAddressFamily(String peerIp, af_afi afi, af_safi safi) throws org.apache.thrift.TException;
+
+    public int disableAddressFamily(String peerIp, af_afi afi, af_safi safi) throws org.apache.thrift.TException;
+
+    public int setLogConfig(String logFileName, String logLevel) throws org.apache.thrift.TException;
+
+    public int enableGracefulRestart(int stalepathTime) throws org.apache.thrift.TException;
+
+    public int disableGracefulRestart() throws org.apache.thrift.TException;
+
     public Routes getRoutes(int optype, int winSize) throws org.apache.thrift.TException;
 
   }
 
   public interface AsyncIface {
 
-    public void startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void startBgp(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void stopBgpServer(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void stopBgp(int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void createPeer(String ipAddress, int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -74,6 +93,24 @@ public class BgpConfigurator {
 
     public void withdrawRoute(String prefix, String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void setEbgpMultihop(String peerIp, int nHops, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void unsetEbgpMultihop(String peerIp, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void setUpdateSource(String peerIp, String srcIp, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void unsetUpdateSource(String peerIp, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void enableAddressFamily(String peerIp, af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void disableAddressFamily(String peerIp, af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void setLogConfig(String logFileName, String logLevel, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void enableGracefulRestart(int stalepathTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void disableGracefulRestart(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void getRoutes(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
   }
@@ -98,53 +135,56 @@ public class BgpConfigurator {
       super(iprot, oprot);
     }
 
-    public int startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime) throws org.apache.thrift.TException
+    public int startBgp(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit) throws org.apache.thrift.TException
     {
-      send_startBgpServer(asNumber, routerId, port, holdTime, keepAliveTime);
-      return recv_startBgpServer();
+      send_startBgp(asNumber, routerId, port, holdTime, keepAliveTime, stalepathTime, announceFbit);
+      return recv_startBgp();
     }
 
-    public void send_startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime) throws org.apache.thrift.TException
+    public void send_startBgp(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit) throws org.apache.thrift.TException
     {
-      startBgpServer_args args = new startBgpServer_args();
+      startBgp_args args = new startBgp_args();
       args.setAsNumber(asNumber);
       args.setRouterId(routerId);
       args.setPort(port);
       args.setHoldTime(holdTime);
       args.setKeepAliveTime(keepAliveTime);
-      sendBase("startBgpServer", args);
+      args.setStalepathTime(stalepathTime);
+      args.setAnnounceFbit(announceFbit);
+      sendBase("startBgp", args);
     }
 
-    public int recv_startBgpServer() throws org.apache.thrift.TException
+    public int recv_startBgp() throws org.apache.thrift.TException
     {
-      startBgpServer_result result = new startBgpServer_result();
-      receiveBase(result, "startBgpServer");
+      startBgp_result result = new startBgp_result();
+      receiveBase(result, "startBgp");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startBgpServer failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startBgp failed: unknown result");
     }
 
-    public int stopBgpServer() throws org.apache.thrift.TException
+    public int stopBgp(int asNumber) throws org.apache.thrift.TException
     {
-      send_stopBgpServer();
-      return recv_stopBgpServer();
+      send_stopBgp(asNumber);
+      return recv_stopBgp();
     }
 
-    public void send_stopBgpServer() throws org.apache.thrift.TException
+    public void send_stopBgp(int asNumber) throws org.apache.thrift.TException
     {
-      stopBgpServer_args args = new stopBgpServer_args();
-      sendBase("stopBgpServer", args);
+      stopBgp_args args = new stopBgp_args();
+      args.setAsNumber(asNumber);
+      sendBase("stopBgp", args);
     }
 
-    public int recv_stopBgpServer() throws org.apache.thrift.TException
+    public int recv_stopBgp() throws org.apache.thrift.TException
     {
-      stopBgpServer_result result = new stopBgpServer_result();
-      receiveBase(result, "stopBgpServer");
+      stopBgp_result result = new stopBgp_result();
+      receiveBase(result, "stopBgp");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "stopBgpServer failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "stopBgp failed: unknown result");
     }
 
     public int createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException
@@ -292,6 +332,219 @@ public class BgpConfigurator {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "withdrawRoute failed: unknown result");
     }
 
+    public int setEbgpMultihop(String peerIp, int nHops) throws org.apache.thrift.TException
+    {
+      send_setEbgpMultihop(peerIp, nHops);
+      return recv_setEbgpMultihop();
+    }
+
+    public void send_setEbgpMultihop(String peerIp, int nHops) throws org.apache.thrift.TException
+    {
+      setEbgpMultihop_args args = new setEbgpMultihop_args();
+      args.setPeerIp(peerIp);
+      args.setNHops(nHops);
+      sendBase("setEbgpMultihop", args);
+    }
+
+    public int recv_setEbgpMultihop() throws org.apache.thrift.TException
+    {
+      setEbgpMultihop_result result = new setEbgpMultihop_result();
+      receiveBase(result, "setEbgpMultihop");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setEbgpMultihop failed: unknown result");
+    }
+
+    public int unsetEbgpMultihop(String peerIp) throws org.apache.thrift.TException
+    {
+      send_unsetEbgpMultihop(peerIp);
+      return recv_unsetEbgpMultihop();
+    }
+
+    public void send_unsetEbgpMultihop(String peerIp) throws org.apache.thrift.TException
+    {
+      unsetEbgpMultihop_args args = new unsetEbgpMultihop_args();
+      args.setPeerIp(peerIp);
+      sendBase("unsetEbgpMultihop", args);
+    }
+
+    public int recv_unsetEbgpMultihop() throws org.apache.thrift.TException
+    {
+      unsetEbgpMultihop_result result = new unsetEbgpMultihop_result();
+      receiveBase(result, "unsetEbgpMultihop");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "unsetEbgpMultihop failed: unknown result");
+    }
+
+    public int setUpdateSource(String peerIp, String srcIp) throws org.apache.thrift.TException
+    {
+      send_setUpdateSource(peerIp, srcIp);
+      return recv_setUpdateSource();
+    }
+
+    public void send_setUpdateSource(String peerIp, String srcIp) throws org.apache.thrift.TException
+    {
+      setUpdateSource_args args = new setUpdateSource_args();
+      args.setPeerIp(peerIp);
+      args.setSrcIp(srcIp);
+      sendBase("setUpdateSource", args);
+    }
+
+    public int recv_setUpdateSource() throws org.apache.thrift.TException
+    {
+      setUpdateSource_result result = new setUpdateSource_result();
+      receiveBase(result, "setUpdateSource");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setUpdateSource failed: unknown result");
+    }
+
+    public int unsetUpdateSource(String peerIp) throws org.apache.thrift.TException
+    {
+      send_unsetUpdateSource(peerIp);
+      return recv_unsetUpdateSource();
+    }
+
+    public void send_unsetUpdateSource(String peerIp) throws org.apache.thrift.TException
+    {
+      unsetUpdateSource_args args = new unsetUpdateSource_args();
+      args.setPeerIp(peerIp);
+      sendBase("unsetUpdateSource", args);
+    }
+
+    public int recv_unsetUpdateSource() throws org.apache.thrift.TException
+    {
+      unsetUpdateSource_result result = new unsetUpdateSource_result();
+      receiveBase(result, "unsetUpdateSource");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "unsetUpdateSource failed: unknown result");
+    }
+
+    public int enableAddressFamily(String peerIp, af_afi afi, af_safi safi) throws org.apache.thrift.TException
+    {
+      send_enableAddressFamily(peerIp, afi, safi);
+      return recv_enableAddressFamily();
+    }
+
+    public void send_enableAddressFamily(String peerIp, af_afi afi, af_safi safi) throws org.apache.thrift.TException
+    {
+      enableAddressFamily_args args = new enableAddressFamily_args();
+      args.setPeerIp(peerIp);
+      args.setAfi(afi);
+      args.setSafi(safi);
+      sendBase("enableAddressFamily", args);
+    }
+
+    public int recv_enableAddressFamily() throws org.apache.thrift.TException
+    {
+      enableAddressFamily_result result = new enableAddressFamily_result();
+      receiveBase(result, "enableAddressFamily");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "enableAddressFamily failed: unknown result");
+    }
+
+    public int disableAddressFamily(String peerIp, af_afi afi, af_safi safi) throws org.apache.thrift.TException
+    {
+      send_disableAddressFamily(peerIp, afi, safi);
+      return recv_disableAddressFamily();
+    }
+
+    public void send_disableAddressFamily(String peerIp, af_afi afi, af_safi safi) throws org.apache.thrift.TException
+    {
+      disableAddressFamily_args args = new disableAddressFamily_args();
+      args.setPeerIp(peerIp);
+      args.setAfi(afi);
+      args.setSafi(safi);
+      sendBase("disableAddressFamily", args);
+    }
+
+    public int recv_disableAddressFamily() throws org.apache.thrift.TException
+    {
+      disableAddressFamily_result result = new disableAddressFamily_result();
+      receiveBase(result, "disableAddressFamily");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "disableAddressFamily failed: unknown result");
+    }
+
+    public int setLogConfig(String logFileName, String logLevel) throws org.apache.thrift.TException
+    {
+      send_setLogConfig(logFileName, logLevel);
+      return recv_setLogConfig();
+    }
+
+    public void send_setLogConfig(String logFileName, String logLevel) throws org.apache.thrift.TException
+    {
+      setLogConfig_args args = new setLogConfig_args();
+      args.setLogFileName(logFileName);
+      args.setLogLevel(logLevel);
+      sendBase("setLogConfig", args);
+    }
+
+    public int recv_setLogConfig() throws org.apache.thrift.TException
+    {
+      setLogConfig_result result = new setLogConfig_result();
+      receiveBase(result, "setLogConfig");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setLogConfig failed: unknown result");
+    }
+
+    public int enableGracefulRestart(int stalepathTime) throws org.apache.thrift.TException
+    {
+      send_enableGracefulRestart(stalepathTime);
+      return recv_enableGracefulRestart();
+    }
+
+    public void send_enableGracefulRestart(int stalepathTime) throws org.apache.thrift.TException
+    {
+      enableGracefulRestart_args args = new enableGracefulRestart_args();
+      args.setStalepathTime(stalepathTime);
+      sendBase("enableGracefulRestart", args);
+    }
+
+    public int recv_enableGracefulRestart() throws org.apache.thrift.TException
+    {
+      enableGracefulRestart_result result = new enableGracefulRestart_result();
+      receiveBase(result, "enableGracefulRestart");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "enableGracefulRestart failed: unknown result");
+    }
+
+    public int disableGracefulRestart() throws org.apache.thrift.TException
+    {
+      send_disableGracefulRestart();
+      return recv_disableGracefulRestart();
+    }
+
+    public void send_disableGracefulRestart() throws org.apache.thrift.TException
+    {
+      disableGracefulRestart_args args = new disableGracefulRestart_args();
+      sendBase("disableGracefulRestart", args);
+    }
+
+    public int recv_disableGracefulRestart() throws org.apache.thrift.TException
+    {
+      disableGracefulRestart_result result = new disableGracefulRestart_result();
+      receiveBase(result, "disableGracefulRestart");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "disableGracefulRestart failed: unknown result");
+    }
+
     public Routes getRoutes(int optype, int winSize) throws org.apache.thrift.TException
     {
       send_getRoutes(optype, winSize);
@@ -334,36 +587,42 @@ public class BgpConfigurator {
       super(protocolFactory, clientManager, transport);
     }
 
-    public void startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void startBgp(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      startBgpServer_call method_call = new startBgpServer_call(asNumber, routerId, port, holdTime, keepAliveTime, resultHandler, this, ___protocolFactory, ___transport);
+      startBgp_call method_call = new startBgp_call(asNumber, routerId, port, holdTime, keepAliveTime, stalepathTime, announceFbit, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class startBgpServer_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class startBgp_call extends org.apache.thrift.async.TAsyncMethodCall {
       private int asNumber;
       private String routerId;
       private int port;
       private int holdTime;
       private int keepAliveTime;
-      public startBgpServer_call(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private int stalepathTime;
+      private boolean announceFbit;
+      public startBgp_call(int asNumber, String routerId, int port, int holdTime, int keepAliveTime, int stalepathTime, boolean announceFbit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.asNumber = asNumber;
         this.routerId = routerId;
         this.port = port;
         this.holdTime = holdTime;
         this.keepAliveTime = keepAliveTime;
+        this.stalepathTime = stalepathTime;
+        this.announceFbit = announceFbit;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startBgpServer", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        startBgpServer_args args = new startBgpServer_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startBgp", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        startBgp_args args = new startBgp_args();
         args.setAsNumber(asNumber);
         args.setRouterId(routerId);
         args.setPort(port);
         args.setHoldTime(holdTime);
         args.setKeepAliveTime(keepAliveTime);
+        args.setStalepathTime(stalepathTime);
+        args.setAnnounceFbit(announceFbit);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -374,25 +633,28 @@ public class BgpConfigurator {
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_startBgpServer();
+        return (new Client(prot)).recv_startBgp();
       }
     }
 
-    public void stopBgpServer(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void stopBgp(int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      stopBgpServer_call method_call = new stopBgpServer_call(resultHandler, this, ___protocolFactory, ___transport);
+      stopBgp_call method_call = new stopBgp_call(asNumber, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class stopBgpServer_call extends org.apache.thrift.async.TAsyncMethodCall {
-      public stopBgpServer_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class stopBgp_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private int asNumber;
+      public stopBgp_call(int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
+        this.asNumber = asNumber;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("stopBgpServer", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        stopBgpServer_args args = new stopBgpServer_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("stopBgp", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        stopBgp_args args = new stopBgp_args();
+        args.setAsNumber(asNumber);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -403,7 +665,7 @@ public class BgpConfigurator {
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_stopBgpServer();
+        return (new Client(prot)).recv_stopBgp();
       }
     }
 
@@ -620,145 +882,460 @@ public class BgpConfigurator {
       }
     }
 
-    public void getRoutes(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void setEbgpMultihop(String peerIp, int nHops, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getRoutes_call method_call = new getRoutes_call(optype, winSize, resultHandler, this, ___protocolFactory, ___transport);
+      setEbgpMultihop_call method_call = new setEbgpMultihop_call(peerIp, nHops, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class getRoutes_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private int optype;
-      private int winSize;
-      public getRoutes_call(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class setEbgpMultihop_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String peerIp;
+      private int nHops;
+      public setEbgpMultihop_call(String peerIp, int nHops, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
-        this.optype = optype;
-        this.winSize = winSize;
+        this.peerIp = peerIp;
+        this.nHops = nHops;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRoutes", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        getRoutes_args args = new getRoutes_args();
-        args.setOptype(optype);
-        args.setWinSize(winSize);
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setEbgpMultihop", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        setEbgpMultihop_args args = new setEbgpMultihop_args();
+        args.setPeerIp(peerIp);
+        args.setNHops(nHops);
         args.write(prot);
         prot.writeMessageEnd();
       }
 
-      public Routes getResult() throws org.apache.thrift.TException {
+      public int getResult() throws org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_getRoutes();
+        return (new Client(prot)).recv_setEbgpMultihop();
       }
     }
 
-  }
-
-  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
-    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
-    public Processor(I iface) {
-      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
-    }
-
-    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
-      super(iface, getProcessMap(processMap));
-    }
-
-    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
-      processMap.put("startBgpServer", new startBgpServer());
-      processMap.put("stopBgpServer", new stopBgpServer());
-      processMap.put("createPeer", new createPeer());
-      processMap.put("deletePeer", new deletePeer());
-      processMap.put("addVrf", new addVrf());
-      processMap.put("delVrf", new delVrf());
-      processMap.put("pushRoute", new pushRoute());
-      processMap.put("withdrawRoute", new withdrawRoute());
-      processMap.put("getRoutes", new getRoutes());
-      return processMap;
+    public void unsetEbgpMultihop(String peerIp, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      unsetEbgpMultihop_call method_call = new unsetEbgpMultihop_call(peerIp, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
-    public static class startBgpServer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startBgpServer_args> {
-      public startBgpServer() {
-        super("startBgpServer");
+    public static class unsetEbgpMultihop_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String peerIp;
+      public unsetEbgpMultihop_call(String peerIp, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.peerIp = peerIp;
       }
 
-      public startBgpServer_args getEmptyArgsInstance() {
-        return new startBgpServer_args();
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unsetEbgpMultihop", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        unsetEbgpMultihop_args args = new unsetEbgpMultihop_args();
+        args.setPeerIp(peerIp);
+        args.write(prot);
+        prot.writeMessageEnd();
       }
 
-      protected boolean isOneway() {
-        return false;
+      public int getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_unsetEbgpMultihop();
       }
+    }
 
-      public startBgpServer_result getResult(I iface, startBgpServer_args args) throws org.apache.thrift.TException {
-        startBgpServer_result result = new startBgpServer_result();
-        result.success = iface.startBgpServer(args.asNumber, args.routerId, args.port, args.holdTime, args.keepAliveTime);
-        result.setSuccessIsSet(true);
-        return result;
-      }
+    public void setUpdateSource(String peerIp, String srcIp, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      setUpdateSource_call method_call = new setUpdateSource_call(peerIp, srcIp, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
-    public static class stopBgpServer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, stopBgpServer_args> {
-      public stopBgpServer() {
-        super("stopBgpServer");
+    public static class setUpdateSource_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String peerIp;
+      private String srcIp;
+      public setUpdateSource_call(String peerIp, String srcIp, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.peerIp = peerIp;
+        this.srcIp = srcIp;
       }
 
-      public stopBgpServer_args getEmptyArgsInstance() {
-        return new stopBgpServer_args();
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUpdateSource", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        setUpdateSource_args args = new setUpdateSource_args();
+        args.setPeerIp(peerIp);
+        args.setSrcIp(srcIp);
+        args.write(prot);
+        prot.writeMessageEnd();
       }
 
-      protected boolean isOneway() {
-        return false;
+      public int getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_setUpdateSource();
       }
+    }
 
-      public stopBgpServer_result getResult(I iface, stopBgpServer_args args) throws org.apache.thrift.TException {
-        stopBgpServer_result result = new stopBgpServer_result();
-        result.success = iface.stopBgpServer();
-        result.setSuccessIsSet(true);
-        return result;
-      }
+    public void unsetUpdateSource(String peerIp, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      unsetUpdateSource_call method_call = new unsetUpdateSource_call(peerIp, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
-    public static class createPeer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPeer_args> {
-      public createPeer() {
-        super("createPeer");
+    public static class unsetUpdateSource_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String peerIp;
+      public unsetUpdateSource_call(String peerIp, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.peerIp = peerIp;
       }
 
-      public createPeer_args getEmptyArgsInstance() {
-        return new createPeer_args();
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unsetUpdateSource", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        unsetUpdateSource_args args = new unsetUpdateSource_args();
+        args.setPeerIp(peerIp);
+        args.write(prot);
+        prot.writeMessageEnd();
       }
 
-      protected boolean isOneway() {
-        return false;
+      public int getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_unsetUpdateSource();
       }
+    }
 
-      public createPeer_result getResult(I iface, createPeer_args args) throws org.apache.thrift.TException {
-        createPeer_result result = new createPeer_result();
-        result.success = iface.createPeer(args.ipAddress, args.asNumber);
-        result.setSuccessIsSet(true);
-        return result;
-      }
+    public void enableAddressFamily(String peerIp, af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      enableAddressFamily_call method_call = new enableAddressFamily_call(peerIp, afi, safi, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
-    public static class deletePeer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deletePeer_args> {
-      public deletePeer() {
-        super("deletePeer");
+    public static class enableAddressFamily_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String peerIp;
+      private af_afi afi;
+      private af_safi safi;
+      public enableAddressFamily_call(String peerIp, af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.peerIp = peerIp;
+        this.afi = afi;
+        this.safi = safi;
       }
 
-      public deletePeer_args getEmptyArgsInstance() {
-        return new deletePeer_args();
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("enableAddressFamily", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        enableAddressFamily_args args = new enableAddressFamily_args();
+        args.setPeerIp(peerIp);
+        args.setAfi(afi);
+        args.setSafi(safi);
+        args.write(prot);
+        prot.writeMessageEnd();
       }
 
-      protected boolean isOneway() {
-        return false;
+      public int getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_enableAddressFamily();
       }
+    }
 
-      public deletePeer_result getResult(I iface, deletePeer_args args) throws org.apache.thrift.TException {
-        deletePeer_result result = new deletePeer_result();
-        result.success = iface.deletePeer(args.ipAddress);
+    public void disableAddressFamily(String peerIp, af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      disableAddressFamily_call method_call = new disableAddressFamily_call(peerIp, afi, safi, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class disableAddressFamily_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String peerIp;
+      private af_afi afi;
+      private af_safi safi;
+      public disableAddressFamily_call(String peerIp, af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.peerIp = peerIp;
+        this.afi = afi;
+        this.safi = safi;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("disableAddressFamily", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        disableAddressFamily_args args = new disableAddressFamily_args();
+        args.setPeerIp(peerIp);
+        args.setAfi(afi);
+        args.setSafi(safi);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public int getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_disableAddressFamily();
+      }
+    }
+
+    public void setLogConfig(String logFileName, String logLevel, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      setLogConfig_call method_call = new setLogConfig_call(logFileName, logLevel, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class setLogConfig_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String logFileName;
+      private String logLevel;
+      public setLogConfig_call(String logFileName, String logLevel, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.logFileName = logFileName;
+        this.logLevel = logLevel;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setLogConfig", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        setLogConfig_args args = new setLogConfig_args();
+        args.setLogFileName(logFileName);
+        args.setLogLevel(logLevel);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public int getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_setLogConfig();
+      }
+    }
+
+    public void enableGracefulRestart(int stalepathTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      enableGracefulRestart_call method_call = new enableGracefulRestart_call(stalepathTime, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class enableGracefulRestart_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private int stalepathTime;
+      public enableGracefulRestart_call(int stalepathTime, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.stalepathTime = stalepathTime;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("enableGracefulRestart", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        enableGracefulRestart_args args = new enableGracefulRestart_args();
+        args.setStalepathTime(stalepathTime);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public int getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_enableGracefulRestart();
+      }
+    }
+
+    public void disableGracefulRestart(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      disableGracefulRestart_call method_call = new disableGracefulRestart_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class disableGracefulRestart_call extends org.apache.thrift.async.TAsyncMethodCall {
+      public disableGracefulRestart_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("disableGracefulRestart", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        disableGracefulRestart_args args = new disableGracefulRestart_args();
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public int getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_disableGracefulRestart();
+      }
+    }
+
+    public void getRoutes(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getRoutes_call method_call = new getRoutes_call(optype, winSize, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getRoutes_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private int optype;
+      private int winSize;
+      public getRoutes_call(int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.optype = optype;
+        this.winSize = winSize;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRoutes", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getRoutes_args args = new getRoutes_args();
+        args.setOptype(optype);
+        args.setWinSize(winSize);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public Routes getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getRoutes();
+      }
+    }
+
+  }
+
+  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
+    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+    public Processor(I iface) {
+      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+    }
+
+    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+      super(iface, getProcessMap(processMap));
+    }
+
+    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+      processMap.put("startBgp", new startBgp());
+      processMap.put("stopBgp", new stopBgp());
+      processMap.put("createPeer", new createPeer());
+      processMap.put("deletePeer", new deletePeer());
+      processMap.put("addVrf", new addVrf());
+      processMap.put("delVrf", new delVrf());
+      processMap.put("pushRoute", new pushRoute());
+      processMap.put("withdrawRoute", new withdrawRoute());
+      processMap.put("setEbgpMultihop", new setEbgpMultihop());
+      processMap.put("unsetEbgpMultihop", new unsetEbgpMultihop());
+      processMap.put("setUpdateSource", new setUpdateSource());
+      processMap.put("unsetUpdateSource", new unsetUpdateSource());
+      processMap.put("enableAddressFamily", new enableAddressFamily());
+      processMap.put("disableAddressFamily", new disableAddressFamily());
+      processMap.put("setLogConfig", new setLogConfig());
+      processMap.put("enableGracefulRestart", new enableGracefulRestart());
+      processMap.put("disableGracefulRestart", new disableGracefulRestart());
+      processMap.put("getRoutes", new getRoutes());
+      return processMap;
+    }
+
+    public static class startBgp<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startBgp_args> {
+      public startBgp() {
+        super("startBgp");
+      }
+
+      public startBgp_args getEmptyArgsInstance() {
+        return new startBgp_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public startBgp_result getResult(I iface, startBgp_args args) throws org.apache.thrift.TException {
+        startBgp_result result = new startBgp_result();
+        result.success = iface.startBgp(args.asNumber, args.routerId, args.port, args.holdTime, args.keepAliveTime, args.stalepathTime, args.announceFbit);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class stopBgp<I extends Iface> extends org.apache.thrift.ProcessFunction<I, stopBgp_args> {
+      public stopBgp() {
+        super("stopBgp");
+      }
+
+      public stopBgp_args getEmptyArgsInstance() {
+        return new stopBgp_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public stopBgp_result getResult(I iface, stopBgp_args args) throws org.apache.thrift.TException {
+        stopBgp_result result = new stopBgp_result();
+        result.success = iface.stopBgp(args.asNumber);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class createPeer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPeer_args> {
+      public createPeer() {
+        super("createPeer");
+      }
+
+      public createPeer_args getEmptyArgsInstance() {
+        return new createPeer_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public createPeer_result getResult(I iface, createPeer_args args) throws org.apache.thrift.TException {
+        createPeer_result result = new createPeer_result();
+        result.success = iface.createPeer(args.ipAddress, args.asNumber);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class deletePeer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deletePeer_args> {
+      public deletePeer() {
+        super("deletePeer");
+      }
+
+      public deletePeer_args getEmptyArgsInstance() {
+        return new deletePeer_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public deletePeer_result getResult(I iface, deletePeer_args args) throws org.apache.thrift.TException {
+        deletePeer_result result = new deletePeer_result();
+        result.success = iface.deletePeer(args.ipAddress);
         result.setSuccessIsSet(true);
         return result;
       }
@@ -848,65 +1425,263 @@ public class BgpConfigurator {
       }
     }
 
-    public static class getRoutes<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRoutes_args> {
-      public getRoutes() {
-        super("getRoutes");
+    public static class setEbgpMultihop<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setEbgpMultihop_args> {
+      public setEbgpMultihop() {
+        super("setEbgpMultihop");
       }
 
-      public getRoutes_args getEmptyArgsInstance() {
-        return new getRoutes_args();
+      public setEbgpMultihop_args getEmptyArgsInstance() {
+        return new setEbgpMultihop_args();
       }
 
       protected boolean isOneway() {
         return false;
       }
 
-      public getRoutes_result getResult(I iface, getRoutes_args args) throws org.apache.thrift.TException {
-        getRoutes_result result = new getRoutes_result();
-        result.success = iface.getRoutes(args.optype, args.winSize);
+      public setEbgpMultihop_result getResult(I iface, setEbgpMultihop_args args) throws org.apache.thrift.TException {
+        setEbgpMultihop_result result = new setEbgpMultihop_result();
+        result.success = iface.setEbgpMultihop(args.peerIp, args.nHops);
+        result.setSuccessIsSet(true);
         return result;
       }
     }
 
-  }
+    public static class unsetEbgpMultihop<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unsetEbgpMultihop_args> {
+      public unsetEbgpMultihop() {
+        super("unsetEbgpMultihop");
+      }
 
-  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
-    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
-    public AsyncProcessor(I iface) {
-      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
-    }
+      public unsetEbgpMultihop_args getEmptyArgsInstance() {
+        return new unsetEbgpMultihop_args();
+      }
 
-    protected AsyncProcessor(I iface, Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
-      super(iface, getProcessMap(processMap));
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public unsetEbgpMultihop_result getResult(I iface, unsetEbgpMultihop_args args) throws org.apache.thrift.TException {
+        unsetEbgpMultihop_result result = new unsetEbgpMultihop_result();
+        result.success = iface.unsetEbgpMultihop(args.peerIp);
+        result.setSuccessIsSet(true);
+        return result;
+      }
     }
 
-    private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
-      processMap.put("startBgpServer", new startBgpServer());
-      processMap.put("stopBgpServer", new stopBgpServer());
-      processMap.put("createPeer", new createPeer());
-      processMap.put("deletePeer", new deletePeer());
-      processMap.put("addVrf", new addVrf());
-      processMap.put("delVrf", new delVrf());
-      processMap.put("pushRoute", new pushRoute());
-      processMap.put("withdrawRoute", new withdrawRoute());
-      processMap.put("getRoutes", new getRoutes());
-      return processMap;
+    public static class setUpdateSource<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setUpdateSource_args> {
+      public setUpdateSource() {
+        super("setUpdateSource");
+      }
+
+      public setUpdateSource_args getEmptyArgsInstance() {
+        return new setUpdateSource_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public setUpdateSource_result getResult(I iface, setUpdateSource_args args) throws org.apache.thrift.TException {
+        setUpdateSource_result result = new setUpdateSource_result();
+        result.success = iface.setUpdateSource(args.peerIp, args.srcIp);
+        result.setSuccessIsSet(true);
+        return result;
+      }
     }
 
-    public static class startBgpServer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startBgpServer_args, Integer> {
-      public startBgpServer() {
-        super("startBgpServer");
+    public static class unsetUpdateSource<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unsetUpdateSource_args> {
+      public unsetUpdateSource() {
+        super("unsetUpdateSource");
       }
 
-      public startBgpServer_args getEmptyArgsInstance() {
-        return new startBgpServer_args();
+      public unsetUpdateSource_args getEmptyArgsInstance() {
+        return new unsetUpdateSource_args();
       }
 
-      public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public unsetUpdateSource_result getResult(I iface, unsetUpdateSource_args args) throws org.apache.thrift.TException {
+        unsetUpdateSource_result result = new unsetUpdateSource_result();
+        result.success = iface.unsetUpdateSource(args.peerIp);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class enableAddressFamily<I extends Iface> extends org.apache.thrift.ProcessFunction<I, enableAddressFamily_args> {
+      public enableAddressFamily() {
+        super("enableAddressFamily");
+      }
+
+      public enableAddressFamily_args getEmptyArgsInstance() {
+        return new enableAddressFamily_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public enableAddressFamily_result getResult(I iface, enableAddressFamily_args args) throws org.apache.thrift.TException {
+        enableAddressFamily_result result = new enableAddressFamily_result();
+        result.success = iface.enableAddressFamily(args.peerIp, args.afi, args.safi);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class disableAddressFamily<I extends Iface> extends org.apache.thrift.ProcessFunction<I, disableAddressFamily_args> {
+      public disableAddressFamily() {
+        super("disableAddressFamily");
+      }
+
+      public disableAddressFamily_args getEmptyArgsInstance() {
+        return new disableAddressFamily_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public disableAddressFamily_result getResult(I iface, disableAddressFamily_args args) throws org.apache.thrift.TException {
+        disableAddressFamily_result result = new disableAddressFamily_result();
+        result.success = iface.disableAddressFamily(args.peerIp, args.afi, args.safi);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class setLogConfig<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setLogConfig_args> {
+      public setLogConfig() {
+        super("setLogConfig");
+      }
+
+      public setLogConfig_args getEmptyArgsInstance() {
+        return new setLogConfig_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public setLogConfig_result getResult(I iface, setLogConfig_args args) throws org.apache.thrift.TException {
+        setLogConfig_result result = new setLogConfig_result();
+        result.success = iface.setLogConfig(args.logFileName, args.logLevel);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class enableGracefulRestart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, enableGracefulRestart_args> {
+      public enableGracefulRestart() {
+        super("enableGracefulRestart");
+      }
+
+      public enableGracefulRestart_args getEmptyArgsInstance() {
+        return new enableGracefulRestart_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public enableGracefulRestart_result getResult(I iface, enableGracefulRestart_args args) throws org.apache.thrift.TException {
+        enableGracefulRestart_result result = new enableGracefulRestart_result();
+        result.success = iface.enableGracefulRestart(args.stalepathTime);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class disableGracefulRestart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, disableGracefulRestart_args> {
+      public disableGracefulRestart() {
+        super("disableGracefulRestart");
+      }
+
+      public disableGracefulRestart_args getEmptyArgsInstance() {
+        return new disableGracefulRestart_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public disableGracefulRestart_result getResult(I iface, disableGracefulRestart_args args) throws org.apache.thrift.TException {
+        disableGracefulRestart_result result = new disableGracefulRestart_result();
+        result.success = iface.disableGracefulRestart();
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class getRoutes<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRoutes_args> {
+      public getRoutes() {
+        super("getRoutes");
+      }
+
+      public getRoutes_args getEmptyArgsInstance() {
+        return new getRoutes_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getRoutes_result getResult(I iface, getRoutes_args args) throws org.apache.thrift.TException {
+        getRoutes_result result = new getRoutes_result();
+        result.success = iface.getRoutes(args.optype, args.winSize);
+        return result;
+      }
+    }
+
+  }
+
+  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
+    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+    public AsyncProcessor(I iface) {
+      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+    }
+
+    protected AsyncProcessor(I iface, Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
+      super(iface, getProcessMap(processMap));
+    }
+
+    private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
+      processMap.put("startBgp", new startBgp());
+      processMap.put("stopBgp", new stopBgp());
+      processMap.put("createPeer", new createPeer());
+      processMap.put("deletePeer", new deletePeer());
+      processMap.put("addVrf", new addVrf());
+      processMap.put("delVrf", new delVrf());
+      processMap.put("pushRoute", new pushRoute());
+      processMap.put("withdrawRoute", new withdrawRoute());
+      processMap.put("setEbgpMultihop", new setEbgpMultihop());
+      processMap.put("unsetEbgpMultihop", new unsetEbgpMultihop());
+      processMap.put("setUpdateSource", new setUpdateSource());
+      processMap.put("unsetUpdateSource", new unsetUpdateSource());
+      processMap.put("enableAddressFamily", new enableAddressFamily());
+      processMap.put("disableAddressFamily", new disableAddressFamily());
+      processMap.put("setLogConfig", new setLogConfig());
+      processMap.put("enableGracefulRestart", new enableGracefulRestart());
+      processMap.put("disableGracefulRestart", new disableGracefulRestart());
+      processMap.put("getRoutes", new getRoutes());
+      return processMap;
+    }
+
+    public static class startBgp<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startBgp_args, Integer> {
+      public startBgp() {
+        super("startBgp");
+      }
+
+      public startBgp_args getEmptyArgsInstance() {
+        return new startBgp_args();
+      }
+
+      public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Integer>() { 
           public void onComplete(Integer o) {
-            startBgpServer_result result = new startBgpServer_result();
+            startBgp_result result = new startBgp_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -920,7 +1695,7 @@ public class BgpConfigurator {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            startBgpServer_result result = new startBgpServer_result();
+            startBgp_result result = new startBgp_result();
             {
               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
               msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
@@ -940,25 +1715,25 @@ public class BgpConfigurator {
         return false;
       }
 
-      public void start(I iface, startBgpServer_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
-        iface.startBgpServer(args.asNumber, args.routerId, args.port, args.holdTime, args.keepAliveTime,resultHandler);
+      public void start(I iface, startBgp_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.startBgp(args.asNumber, args.routerId, args.port, args.holdTime, args.keepAliveTime, args.stalepathTime, args.announceFbit,resultHandler);
       }
     }
 
-    public static class stopBgpServer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, stopBgpServer_args, Integer> {
-      public stopBgpServer() {
-        super("stopBgpServer");
+    public static class stopBgp<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, stopBgp_args, Integer> {
+      public stopBgp() {
+        super("stopBgp");
       }
 
-      public stopBgpServer_args getEmptyArgsInstance() {
-        return new stopBgpServer_args();
+      public stopBgp_args getEmptyArgsInstance() {
+        return new stopBgp_args();
       }
 
       public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Integer>() { 
           public void onComplete(Integer o) {
-            stopBgpServer_result result = new stopBgpServer_result();
+            stopBgp_result result = new stopBgp_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -972,7 +1747,7 @@ public class BgpConfigurator {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            stopBgpServer_result result = new stopBgpServer_result();
+            stopBgp_result result = new stopBgp_result();
             {
               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
               msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
@@ -992,8 +1767,8 @@ public class BgpConfigurator {
         return false;
       }
 
-      public void start(I iface, stopBgpServer_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
-        iface.stopBgpServer(resultHandler);
+      public void start(I iface, stopBgp_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.stopBgp(args.asNumber,resultHandler);
       }
     }
 
@@ -1309,21 +2084,22 @@ public class BgpConfigurator {
       }
     }
 
-    public static class getRoutes<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getRoutes_args, Routes> {
-      public getRoutes() {
-        super("getRoutes");
+    public static class setEbgpMultihop<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setEbgpMultihop_args, Integer> {
+      public setEbgpMultihop() {
+        super("setEbgpMultihop");
       }
 
-      public getRoutes_args getEmptyArgsInstance() {
-        return new getRoutes_args();
+      public setEbgpMultihop_args getEmptyArgsInstance() {
+        return new setEbgpMultihop_args();
       }
 
-      public AsyncMethodCallback<Routes> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Routes>() { 
-          public void onComplete(Routes o) {
-            getRoutes_result result = new getRoutes_result();
+        return new AsyncMethodCallback<Integer>() { 
+          public void onComplete(Integer o) {
+            setEbgpMultihop_result result = new setEbgpMultihop_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -1335,7 +2111,7 @@ public class BgpConfigurator {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getRoutes_result result = new getRoutes_result();
+            setEbgpMultihop_result result = new setEbgpMultihop_result();
             {
               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
               msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
@@ -1355,335 +2131,8450 @@ public class BgpConfigurator {
         return false;
       }
 
-      public void start(I iface, getRoutes_args args, org.apache.thrift.async.AsyncMethodCallback<Routes> resultHandler) throws TException {
-        iface.getRoutes(args.optype, args.winSize,resultHandler);
+      public void start(I iface, setEbgpMultihop_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.setEbgpMultihop(args.peerIp, args.nHops,resultHandler);
       }
     }
 
-  }
-
-  public static class startBgpServer_args implements org.apache.thrift.TBase<startBgpServer_args, startBgpServer_args._Fields>, java.io.Serializable, Cloneable, Comparable<startBgpServer_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startBgpServer_args");
-
-    private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I32, (short)1);
-    private static final org.apache.thrift.protocol.TField ROUTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("routerId", org.apache.thrift.protocol.TType.STRING, (short)2);
-    private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)3);
-    private static final org.apache.thrift.protocol.TField HOLD_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("holdTime", org.apache.thrift.protocol.TType.I32, (short)4);
-    private static final org.apache.thrift.protocol.TField KEEP_ALIVE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("keepAliveTime", org.apache.thrift.protocol.TType.I32, (short)5);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new startBgpServer_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new startBgpServer_argsTupleSchemeFactory());
-    }
-
-    public int asNumber; // required
-    public String routerId; // required
-    public int port; // required
-    public int holdTime; // required
-    public int keepAliveTime; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      AS_NUMBER((short)1, "asNumber"),
-      ROUTER_ID((short)2, "routerId"),
-      PORT((short)3, "port"),
-      HOLD_TIME((short)4, "holdTime"),
-      KEEP_ALIVE_TIME((short)5, "keepAliveTime");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
+    public static class unsetEbgpMultihop<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, unsetEbgpMultihop_args, Integer> {
+      public unsetEbgpMultihop() {
+        super("unsetEbgpMultihop");
       }
 
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // AS_NUMBER
-            return AS_NUMBER;
-          case 2: // ROUTER_ID
-            return ROUTER_ID;
-          case 3: // PORT
-            return PORT;
-          case 4: // HOLD_TIME
-            return HOLD_TIME;
-          case 5: // KEEP_ALIVE_TIME
-            return KEEP_ALIVE_TIME;
-          default:
-            return null;
-        }
+      public unsetEbgpMultihop_args getEmptyArgsInstance() {
+        return new unsetEbgpMultihop_args();
       }
 
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
+      public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Integer>() { 
+          public void onComplete(Integer o) {
+            unsetEbgpMultihop_result result = new unsetEbgpMultihop_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            unsetEbgpMultihop_result result = new unsetEbgpMultihop_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
       }
 
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
+      protected boolean isOneway() {
+        return false;
       }
 
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
+      public void start(I iface, unsetEbgpMultihop_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.unsetEbgpMultihop(args.peerIp,resultHandler);
       }
+    }
 
-      public short getThriftFieldId() {
-        return _thriftId;
+    public static class setUpdateSource<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setUpdateSource_args, Integer> {
+      public setUpdateSource() {
+        super("setUpdateSource");
       }
 
-      public String getFieldName() {
-        return _fieldName;
+      public setUpdateSource_args getEmptyArgsInstance() {
+        return new setUpdateSource_args();
       }
-    }
 
-    // isset id assignments
-    private static final int __ASNUMBER_ISSET_ID = 0;
-    private static final int __PORT_ISSET_ID = 1;
-    private static final int __HOLDTIME_ISSET_ID = 2;
-    private static final int __KEEPALIVETIME_ISSET_ID = 3;
-    private byte __isset_bitfield = 0;
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Integer>() { 
+          public void onComplete(Integer o) {
+            setUpdateSource_result result = new setUpdateSource_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            setUpdateSource_result result = new setUpdateSource_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, setUpdateSource_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.setUpdateSource(args.peerIp, args.srcIp,resultHandler);
+      }
+    }
+
+    public static class unsetUpdateSource<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, unsetUpdateSource_args, Integer> {
+      public unsetUpdateSource() {
+        super("unsetUpdateSource");
+      }
+
+      public unsetUpdateSource_args getEmptyArgsInstance() {
+        return new unsetUpdateSource_args();
+      }
+
+      public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Integer>() { 
+          public void onComplete(Integer o) {
+            unsetUpdateSource_result result = new unsetUpdateSource_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            unsetUpdateSource_result result = new unsetUpdateSource_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, unsetUpdateSource_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.unsetUpdateSource(args.peerIp,resultHandler);
+      }
+    }
+
+    public static class enableAddressFamily<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, enableAddressFamily_args, Integer> {
+      public enableAddressFamily() {
+        super("enableAddressFamily");
+      }
+
+      public enableAddressFamily_args getEmptyArgsInstance() {
+        return new enableAddressFamily_args();
+      }
+
+      public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Integer>() { 
+          public void onComplete(Integer o) {
+            enableAddressFamily_result result = new enableAddressFamily_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            enableAddressFamily_result result = new enableAddressFamily_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, enableAddressFamily_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.enableAddressFamily(args.peerIp, args.afi, args.safi,resultHandler);
+      }
+    }
+
+    public static class disableAddressFamily<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, disableAddressFamily_args, Integer> {
+      public disableAddressFamily() {
+        super("disableAddressFamily");
+      }
+
+      public disableAddressFamily_args getEmptyArgsInstance() {
+        return new disableAddressFamily_args();
+      }
+
+      public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Integer>() { 
+          public void onComplete(Integer o) {
+            disableAddressFamily_result result = new disableAddressFamily_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            disableAddressFamily_result result = new disableAddressFamily_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, disableAddressFamily_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.disableAddressFamily(args.peerIp, args.afi, args.safi,resultHandler);
+      }
+    }
+
+    public static class setLogConfig<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setLogConfig_args, Integer> {
+      public setLogConfig() {
+        super("setLogConfig");
+      }
+
+      public setLogConfig_args getEmptyArgsInstance() {
+        return new setLogConfig_args();
+      }
+
+      public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Integer>() { 
+          public void onComplete(Integer o) {
+            setLogConfig_result result = new setLogConfig_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            setLogConfig_result result = new setLogConfig_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, setLogConfig_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.setLogConfig(args.logFileName, args.logLevel,resultHandler);
+      }
+    }
+
+    public static class enableGracefulRestart<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, enableGracefulRestart_args, Integer> {
+      public enableGracefulRestart() {
+        super("enableGracefulRestart");
+      }
+
+      public enableGracefulRestart_args getEmptyArgsInstance() {
+        return new enableGracefulRestart_args();
+      }
+
+      public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Integer>() { 
+          public void onComplete(Integer o) {
+            enableGracefulRestart_result result = new enableGracefulRestart_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            enableGracefulRestart_result result = new enableGracefulRestart_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, enableGracefulRestart_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.enableGracefulRestart(args.stalepathTime,resultHandler);
+      }
+    }
+
+    public static class disableGracefulRestart<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, disableGracefulRestart_args, Integer> {
+      public disableGracefulRestart() {
+        super("disableGracefulRestart");
+      }
+
+      public disableGracefulRestart_args getEmptyArgsInstance() {
+        return new disableGracefulRestart_args();
+      }
+
+      public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Integer>() { 
+          public void onComplete(Integer o) {
+            disableGracefulRestart_result result = new disableGracefulRestart_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            disableGracefulRestart_result result = new disableGracefulRestart_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, disableGracefulRestart_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.disableGracefulRestart(resultHandler);
+      }
+    }
+
+    public static class getRoutes<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getRoutes_args, Routes> {
+      public getRoutes() {
+        super("getRoutes");
+      }
+
+      public getRoutes_args getEmptyArgsInstance() {
+        return new getRoutes_args();
+      }
+
+      public AsyncMethodCallback<Routes> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Routes>() { 
+          public void onComplete(Routes o) {
+            getRoutes_result result = new getRoutes_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getRoutes_result result = new getRoutes_result();
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getRoutes_args args, org.apache.thrift.async.AsyncMethodCallback<Routes> resultHandler) throws TException {
+        iface.getRoutes(args.optype, args.winSize,resultHandler);
+      }
+    }
+
+  }
+
+  public static class startBgp_args implements org.apache.thrift.TBase<startBgp_args, startBgp_args._Fields>, java.io.Serializable, Cloneable, Comparable<startBgp_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startBgp_args");
+
+    private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I32, (short)1);
+    private static final org.apache.thrift.protocol.TField ROUTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("routerId", org.apache.thrift.protocol.TType.STRING, (short)2);
+    private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)3);
+    private static final org.apache.thrift.protocol.TField HOLD_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("holdTime", org.apache.thrift.protocol.TType.I32, (short)4);
+    private static final org.apache.thrift.protocol.TField KEEP_ALIVE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("keepAliveTime", org.apache.thrift.protocol.TType.I32, (short)5);
+    private static final org.apache.thrift.protocol.TField STALEPATH_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("stalepathTime", org.apache.thrift.protocol.TType.I32, (short)6);
+    private static final org.apache.thrift.protocol.TField ANNOUNCE_FBIT_FIELD_DESC = new org.apache.thrift.protocol.TField("announceFbit", org.apache.thrift.protocol.TType.BOOL, (short)7);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new startBgp_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new startBgp_argsTupleSchemeFactory());
+    }
+
+    public int asNumber; // required
+    public String routerId; // required
+    public int port; // required
+    public int holdTime; // required
+    public int keepAliveTime; // required
+    public int stalepathTime; // required
+    public boolean announceFbit; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      AS_NUMBER((short)1, "asNumber"),
+      ROUTER_ID((short)2, "routerId"),
+      PORT((short)3, "port"),
+      HOLD_TIME((short)4, "holdTime"),
+      KEEP_ALIVE_TIME((short)5, "keepAliveTime"),
+      STALEPATH_TIME((short)6, "stalepathTime"),
+      ANNOUNCE_FBIT((short)7, "announceFbit");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // AS_NUMBER
+            return AS_NUMBER;
+          case 2: // ROUTER_ID
+            return ROUTER_ID;
+          case 3: // PORT
+            return PORT;
+          case 4: // HOLD_TIME
+            return HOLD_TIME;
+          case 5: // KEEP_ALIVE_TIME
+            return KEEP_ALIVE_TIME;
+          case 6: // STALEPATH_TIME
+            return STALEPATH_TIME;
+          case 7: // ANNOUNCE_FBIT
+            return ANNOUNCE_FBIT;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __ASNUMBER_ISSET_ID = 0;
+    private static final int __PORT_ISSET_ID = 1;
+    private static final int __HOLDTIME_ISSET_ID = 2;
+    private static final int __KEEPALIVETIME_ISSET_ID = 3;
+    private static final int __STALEPATHTIME_ISSET_ID = 4;
+    private static final int __ANNOUNCEFBIT_ISSET_ID = 5;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       tmpMap.put(_Fields.ROUTER_ID, new org.apache.thrift.meta_data.FieldMetaData("routerId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
-      tmpMap.put(_Fields.HOLD_TIME, new org.apache.thrift.meta_data.FieldMetaData("holdTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+      tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      tmpMap.put(_Fields.HOLD_TIME, new org.apache.thrift.meta_data.FieldMetaData("holdTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      tmpMap.put(_Fields.KEEP_ALIVE_TIME, new org.apache.thrift.meta_data.FieldMetaData("keepAliveTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      tmpMap.put(_Fields.STALEPATH_TIME, new org.apache.thrift.meta_data.FieldMetaData("stalepathTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      tmpMap.put(_Fields.ANNOUNCE_FBIT, new org.apache.thrift.meta_data.FieldMetaData("announceFbit", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startBgp_args.class, metaDataMap);
+    }
+
+    public startBgp_args() {
+    }
+
+    public startBgp_args(
+      int asNumber,
+      String routerId,
+      int port,
+      int holdTime,
+      int keepAliveTime,
+      int stalepathTime,
+      boolean announceFbit)
+    {
+      this();
+      this.asNumber = asNumber;
+      setAsNumberIsSet(true);
+      this.routerId = routerId;
+      this.port = port;
+      setPortIsSet(true);
+      this.holdTime = holdTime;
+      setHoldTimeIsSet(true);
+      this.keepAliveTime = keepAliveTime;
+      setKeepAliveTimeIsSet(true);
+      this.stalepathTime = stalepathTime;
+      setStalepathTimeIsSet(true);
+      this.announceFbit = announceFbit;
+      setAnnounceFbitIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public startBgp_args(startBgp_args other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.asNumber = other.asNumber;
+      if (other.isSetRouterId()) {
+        this.routerId = other.routerId;
+      }
+      this.port = other.port;
+      this.holdTime = other.holdTime;
+      this.keepAliveTime = other.keepAliveTime;
+      this.stalepathTime = other.stalepathTime;
+      this.announceFbit = other.announceFbit;
+    }
+
+    public startBgp_args deepCopy() {
+      return new startBgp_args(this);
+    }
+
+    @Override
+    public void clear() {
+      setAsNumberIsSet(false);
+      this.asNumber = 0;
+      this.routerId = null;
+      setPortIsSet(false);
+      this.port = 0;
+      setHoldTimeIsSet(false);
+      this.holdTime = 0;
+      setKeepAliveTimeIsSet(false);
+      this.keepAliveTime = 0;
+      setStalepathTimeIsSet(false);
+      this.stalepathTime = 0;
+      setAnnounceFbitIsSet(false);
+      this.announceFbit = false;
+    }
+
+    public int getAsNumber() {
+      return this.asNumber;
+    }
+
+    public startBgp_args setAsNumber(int asNumber) {
+      this.asNumber = asNumber;
+      setAsNumberIsSet(true);
+      return this;
+    }
+
+    public void unsetAsNumber() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+    }
+
+    /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */
+    public boolean isSetAsNumber() {
+      return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+    }
+
+    public void setAsNumberIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value);
+    }
+
+    public String getRouterId() {
+      return this.routerId;
+    }
+
+    public startBgp_args setRouterId(String routerId) {
+      this.routerId = routerId;
+      return this;
+    }
+
+    public void unsetRouterId() {
+      this.routerId = null;
+    }
+
+    /** Returns true if field routerId is set (has been assigned a value) and false otherwise */
+    public boolean isSetRouterId() {
+      return this.routerId != null;
+    }
+
+    public void setRouterIdIsSet(boolean value) {
+      if (!value) {
+        this.routerId = null;
+      }
+    }
+
+    public int getPort() {
+      return this.port;
+    }
+
+    public startBgp_args setPort(int port) {
+      this.port = port;
+      setPortIsSet(true);
+      return this;
+    }
+
+    public void unsetPort() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
+    }
+
+    /** Returns true if field port is set (has been assigned a value) and false otherwise */
+    public boolean isSetPort() {
+      return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
+    }
+
+    public void setPortIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
+    }
+
+    public int getHoldTime() {
+      return this.holdTime;
+    }
+
+    public startBgp_args setHoldTime(int holdTime) {
+      this.holdTime = holdTime;
+      setHoldTimeIsSet(true);
+      return this;
+    }
+
+    public void unsetHoldTime() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
+    }
+
+    /** Returns true if field holdTime is set (has been assigned a value) and false otherwise */
+    public boolean isSetHoldTime() {
+      return EncodingUtils.testBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
+    }
+
+    public void setHoldTimeIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HOLDTIME_ISSET_ID, value);
+    }
+
+    public int getKeepAliveTime() {
+      return this.keepAliveTime;
+    }
+
+    public startBgp_args setKeepAliveTime(int keepAliveTime) {
+      this.keepAliveTime = keepAliveTime;
+      setKeepAliveTimeIsSet(true);
+      return this;
+    }
+
+    public void unsetKeepAliveTime() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID);
+    }
+
+    /** Returns true if field keepAliveTime is set (has been assigned a value) and false otherwise */
+    public boolean isSetKeepAliveTime() {
+      return EncodingUtils.testBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID);
+    }
+
+    public void setKeepAliveTimeIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID, value);
+    }
+
+    public int getStalepathTime() {
+      return this.stalepathTime;
+    }
+
+    public startBgp_args setStalepathTime(int stalepathTime) {
+      this.stalepathTime = stalepathTime;
+      setStalepathTimeIsSet(true);
+      return this;
+    }
+
+    public void unsetStalepathTime() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID);
+    }
+
+    /** Returns true if field stalepathTime is set (has been assigned a value) and false otherwise */
+    public boolean isSetStalepathTime() {
+      return EncodingUtils.testBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID);
+    }
+
+    public void setStalepathTimeIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID, value);
+    }
+
+    public boolean isAnnounceFbit() {
+      return this.announceFbit;
+    }
+
+    public startBgp_args setAnnounceFbit(boolean announceFbit) {
+      this.announceFbit = announceFbit;
+      setAnnounceFbitIsSet(true);
+      return this;
+    }
+
+    public void unsetAnnounceFbit() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ANNOUNCEFBIT_ISSET_ID);
+    }
+
+    /** Returns true if field announceFbit is set (has been assigned a value) and false otherwise */
+    public boolean isSetAnnounceFbit() {
+      return EncodingUtils.testBit(__isset_bitfield, __ANNOUNCEFBIT_ISSET_ID);
+    }
+
+    public void setAnnounceFbitIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ANNOUNCEFBIT_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case AS_NUMBER:
+        if (value == null) {
+          unsetAsNumber();
+        } else {
+          setAsNumber((Integer)value);
+        }
+        break;
+
+      case ROUTER_ID:
+        if (value == null) {
+          unsetRouterId();
+        } else {
+          setRouterId((String)value);
+        }
+        break;
+
+      case PORT:
+        if (value == null) {
+          unsetPort();
+        } else {
+          setPort((Integer)value);
+        }
+        break;
+
+      case HOLD_TIME:
+        if (value == null) {
+          unsetHoldTime();
+        } else {
+          setHoldTime((Integer)value);
+        }
+        break;
+
+      case KEEP_ALIVE_TIME:
+        if (value == null) {
+          unsetKeepAliveTime();
+        } else {
+          setKeepAliveTime((Integer)value);
+        }
+        break;
+
+      case STALEPATH_TIME:
+        if (value == null) {
+          unsetStalepathTime();
+        } else {
+          setStalepathTime((Integer)value);
+        }
+        break;
+
+      case ANNOUNCE_FBIT:
+        if (value == null) {
+          unsetAnnounceFbit();
+        } else {
+          setAnnounceFbit((Boolean)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case AS_NUMBER:
+        return Integer.valueOf(getAsNumber());
+
+      case ROUTER_ID:
+        return getRouterId();
+
+      case PORT:
+        return Integer.valueOf(getPort());
+
+      case HOLD_TIME:
+        return Integer.valueOf(getHoldTime());
+
+      case KEEP_ALIVE_TIME:
+        return Integer.valueOf(getKeepAliveTime());
+
+      case STALEPATH_TIME:
+        return Integer.valueOf(getStalepathTime());
+
+      case ANNOUNCE_FBIT:
+        return Boolean.valueOf(isAnnounceFbit());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case AS_NUMBER:
+        return isSetAsNumber();
+      case ROUTER_ID:
+        return isSetRouterId();
+      case PORT:
+        return isSetPort();
+      case HOLD_TIME:
+        return isSetHoldTime();
+      case KEEP_ALIVE_TIME:
+        return isSetKeepAliveTime();
+      case STALEPATH_TIME:
+        return isSetStalepathTime();
+      case ANNOUNCE_FBIT:
+        return isSetAnnounceFbit();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof startBgp_args)
+        return this.equals((startBgp_args)that);
+      return false;
+    }
+
+    public boolean equals(startBgp_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_asNumber = true;
+      boolean that_present_asNumber = true;
+      if (this_present_asNumber || that_present_asNumber) {
+        if (!(this_present_asNumber && that_present_asNumber))
+          return false;
+        if (this.asNumber != that.asNumber)
+          return false;
+      }
+
+      boolean this_present_routerId = true && this.isSetRouterId();
+      boolean that_present_routerId = true && that.isSetRouterId();
+      if (this_present_routerId || that_present_routerId) {
+        if (!(this_present_routerId && that_present_routerId))
+          return false;
+        if (!this.routerId.equals(that.routerId))
+          return false;
+      }
+
+      boolean this_present_port = true;
+      boolean that_present_port = true;
+      if (this_present_port || that_present_port) {
+        if (!(this_present_port && that_present_port))
+          return false;
+        if (this.port != that.port)
+          return false;
+      }
+
+      boolean this_present_holdTime = true;
+      boolean that_present_holdTime = true;
+      if (this_present_holdTime || that_present_holdTime) {
+        if (!(this_present_holdTime && that_present_holdTime))
+          return false;
+        if (this.holdTime != that.holdTime)
+          return false;
+      }
+
+      boolean this_present_keepAliveTime = true;
+      boolean that_present_keepAliveTime = true;
+      if (this_present_keepAliveTime || that_present_keepAliveTime) {
+        if (!(this_present_keepAliveTime && that_present_keepAliveTime))
+          return false;
+        if (this.keepAliveTime != that.keepAliveTime)
+          return false;
+      }
+
+      boolean this_present_stalepathTime = true;
+      boolean that_present_stalepathTime = true;
+      if (this_present_stalepathTime || that_present_stalepathTime) {
+        if (!(this_present_stalepathTime && that_present_stalepathTime))
+          return false;
+        if (this.stalepathTime != that.stalepathTime)
+          return false;
+      }
+
+      boolean this_present_announceFbit = true;
+      boolean that_present_announceFbit = true;
+      if (this_present_announceFbit || that_present_announceFbit) {
+        if (!(this_present_announceFbit && that_present_announceFbit))
+          return false;
+        if (this.announceFbit != that.announceFbit)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(startBgp_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAsNumber()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetRouterId()).compareTo(other.isSetRouterId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetRouterId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.routerId, other.routerId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetPort()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetHoldTime()).compareTo(other.isSetHoldTime());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetHoldTime()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.holdTime, other.holdTime);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetKeepAliveTime()).compareTo(other.isSetKeepAliveTime());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetKeepAliveTime()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keepAliveTime, other.keepAliveTime);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetStalepathTime()).compareTo(other.isSetStalepathTime());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetStalepathTime()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stalepathTime, other.stalepathTime);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetAnnounceFbit()).compareTo(other.isSetAnnounceFbit());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAnnounceFbit()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.announceFbit, other.announceFbit);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("startBgp_args(");
+      boolean first = true;
+
+      sb.append("asNumber:");
+      sb.append(this.asNumber);
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("routerId:");
+      if (this.routerId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.routerId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("port:");
+      sb.append(this.port);
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("holdTime:");
+      sb.append(this.holdTime);
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("keepAliveTime:");
+      sb.append(this.keepAliveTime);
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("stalepathTime:");
+      sb.append(this.stalepathTime);
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("announceFbit:");
+      sb.append(this.announceFbit);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class startBgp_argsStandardSchemeFactory implements SchemeFactory {
+      public startBgp_argsStandardScheme getScheme() {
+        return new startBgp_argsStandardScheme();
+      }
+    }
+
+    private static class startBgp_argsStandardScheme extends StandardScheme<startBgp_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, startBgp_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // AS_NUMBER
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.asNumber = iprot.readI32();
+                struct.setAsNumberIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // ROUTER_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.routerId = iprot.readString();
+                struct.setRouterIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // PORT
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.port = iprot.readI32();
+                struct.setPortIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 4: // HOLD_TIME
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.holdTime = iprot.readI32();
+                struct.setHoldTimeIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 5: // KEEP_ALIVE_TIME
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.keepAliveTime = iprot.readI32();
+                struct.setKeepAliveTimeIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 6: // STALEPATH_TIME
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.stalepathTime = iprot.readI32();
+                struct.setStalepathTimeIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 7: // ANNOUNCE_FBIT
+              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+                struct.announceFbit = iprot.readBool();
+                struct.setAnnounceFbitIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, startBgp_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC);
+        oprot.writeI32(struct.asNumber);
+        oprot.writeFieldEnd();
+        if (struct.routerId != null) {
+          oprot.writeFieldBegin(ROUTER_ID_FIELD_DESC);
+          oprot.writeString(struct.routerId);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldBegin(PORT_FIELD_DESC);
+        oprot.writeI32(struct.port);
+        oprot.writeFieldEnd();
+        oprot.writeFieldBegin(HOLD_TIME_FIELD_DESC);
+        oprot.writeI32(struct.holdTime);
+        oprot.writeFieldEnd();
+        oprot.writeFieldBegin(KEEP_ALIVE_TIME_FIELD_DESC);
+        oprot.writeI32(struct.keepAliveTime);
+        oprot.writeFieldEnd();
+        oprot.writeFieldBegin(STALEPATH_TIME_FIELD_DESC);
+        oprot.writeI32(struct.stalepathTime);
+        oprot.writeFieldEnd();
+        oprot.writeFieldBegin(ANNOUNCE_FBIT_FIELD_DESC);
+        oprot.writeBool(struct.announceFbit);
+        oprot.writeFieldEnd();
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class startBgp_argsTupleSchemeFactory implements SchemeFactory {
+      public startBgp_argsTupleScheme getScheme() {
+        return new startBgp_argsTupleScheme();
+      }
+    }
+
+    private static class startBgp_argsTupleScheme extends TupleScheme<startBgp_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, startBgp_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetAsNumber()) {
+          optionals.set(0);
+        }
+        if (struct.isSetRouterId()) {
+          optionals.set(1);
+        }
+        if (struct.isSetPort()) {
+          optionals.set(2);
+        }
+        if (struct.isSetHoldTime()) {
+          optionals.set(3);
+        }
+        if (struct.isSetKeepAliveTime()) {
+          optionals.set(4);
+        }
+        if (struct.isSetStalepathTime()) {
+          optionals.set(5);
+        }
+        if (struct.isSetAnnounceFbit()) {
+          optionals.set(6);
+        }
+        oprot.writeBitSet(optionals, 7);
+        if (struct.isSetAsNumber()) {
+          oprot.writeI32(struct.asNumber);
+        }
+        if (struct.isSetRouterId()) {
+          oprot.writeString(struct.routerId);
+        }
+        if (struct.isSetPort()) {
+          oprot.writeI32(struct.port);
+        }
+        if (struct.isSetHoldTime()) {
+          oprot.writeI32(struct.holdTime);
+        }
+        if (struct.isSetKeepAliveTime()) {
+          oprot.writeI32(struct.keepAliveTime);
+        }
+        if (struct.isSetStalepathTime()) {
+          oprot.writeI32(struct.stalepathTime);
+        }
+        if (struct.isSetAnnounceFbit()) {
+          oprot.writeBool(struct.announceFbit);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, startBgp_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(7);
+        if (incoming.get(0)) {
+          struct.asNumber = iprot.readI32();
+          struct.setAsNumberIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.routerId = iprot.readString();
+          struct.setRouterIdIsSet(true);
+        }
+        if (incoming.get(2)) {
+          struct.port = iprot.readI32();
+          struct.setPortIsSet(true);
+        }
+        if (incoming.get(3)) {
+          struct.holdTime = iprot.readI32();
+          struct.setHoldTimeIsSet(true);
+        }
+        if (incoming.get(4)) {
+          struct.keepAliveTime = iprot.readI32();
+          struct.setKeepAliveTimeIsSet(true);
+        }
+        if (incoming.get(5)) {
+          struct.stalepathTime = iprot.readI32();
+          struct.setStalepathTimeIsSet(true);
+        }
+        if (incoming.get(6)) {
+          struct.announceFbit = iprot.readBool();
+          struct.setAnnounceFbitIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class startBgp_result implements org.apache.thrift.TBase<startBgp_result, startBgp_result._Fields>, java.io.Serializable, Cloneable, Comparable<startBgp_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startBgp_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new startBgp_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new startBgp_resultTupleSchemeFactory());
+    }
+
+    public int success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startBgp_result.class, metaDataMap);
+    }
+
+    public startBgp_result() {
+    }
+
+    public startBgp_result(
+      int success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public startBgp_result(startBgp_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public startBgp_result deepCopy() {
+      return new startBgp_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = 0;
+    }
+
+    public int getSuccess() {
+      return this.success;
+    }
+
+    public startBgp_result setSuccess(int success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Integer.valueOf(getSuccess());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof startBgp_result)
+        return this.equals((startBgp_result)that);
+      return false;
+    }
+
+    public boolean equals(startBgp_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(startBgp_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("startBgp_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class startBgp_resultStandardSchemeFactory implements SchemeFactory {
+      public startBgp_resultStandardScheme getScheme() {
+        return new startBgp_resultStandardScheme();
+      }
+    }
+
+    private static class startBgp_resultStandardScheme extends StandardScheme<startBgp_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, startBgp_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.success = iprot.readI32();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, startBgp_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeI32(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class startBgp_resultTupleSchemeFactory implements SchemeFactory {
+      public startBgp_resultTupleScheme getScheme() {
+        return new startBgp_resultTupleScheme();
+      }
+    }
+
+    private static class startBgp_resultTupleScheme extends TupleScheme<startBgp_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, startBgp_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeI32(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, startBgp_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readI32();
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class stopBgp_args implements org.apache.thrift.TBase<stopBgp_args, stopBgp_args._Fields>, java.io.Serializable, Cloneable, Comparable<stopBgp_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stopBgp_args");
+
+    private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I32, (short)1);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new stopBgp_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new stopBgp_argsTupleSchemeFactory());
+    }
+
+    public int asNumber; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      AS_NUMBER((short)1, "asNumber");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // AS_NUMBER
+            return AS_NUMBER;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __ASNUMBER_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopBgp_args.class, metaDataMap);
+    }
+
+    public stopBgp_args() {
+    }
+
+    public stopBgp_args(
+      int asNumber)
+    {
+      this();
+      this.asNumber = asNumber;
+      setAsNumberIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public stopBgp_args(stopBgp_args other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.asNumber = other.asNumber;
+    }
+
+    public stopBgp_args deepCopy() {
+      return new stopBgp_args(this);
+    }
+
+    @Override
+    public void clear() {
+      setAsNumberIsSet(false);
+      this.asNumber = 0;
+    }
+
+    public int getAsNumber() {
+      return this.asNumber;
+    }
+
+    public stopBgp_args setAsNumber(int asNumber) {
+      this.asNumber = asNumber;
+      setAsNumberIsSet(true);
+      return this;
+    }
+
+    public void unsetAsNumber() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+    }
+
+    /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */
+    public boolean isSetAsNumber() {
+      return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+    }
+
+    public void setAsNumberIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case AS_NUMBER:
+        if (value == null) {
+          unsetAsNumber();
+        } else {
+          setAsNumber((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case AS_NUMBER:
+        return Integer.valueOf(getAsNumber());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case AS_NUMBER:
+        return isSetAsNumber();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof stopBgp_args)
+        return this.equals((stopBgp_args)that);
+      return false;
+    }
+
+    public boolean equals(stopBgp_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_asNumber = true;
+      boolean that_present_asNumber = true;
+      if (this_present_asNumber || that_present_asNumber) {
+        if (!(this_present_asNumber && that_present_asNumber))
+          return false;
+        if (this.asNumber != that.asNumber)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(stopBgp_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAsNumber()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("stopBgp_args(");
+      boolean first = true;
+
+      sb.append("asNumber:");
+      sb.append(this.asNumber);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class stopBgp_argsStandardSchemeFactory implements SchemeFactory {
+      public stopBgp_argsStandardScheme getScheme() {
+        return new stopBgp_argsStandardScheme();
+      }
+    }
+
+    private static class stopBgp_argsStandardScheme extends StandardScheme<stopBgp_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, stopBgp_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // AS_NUMBER
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.asNumber = iprot.readI32();
+                struct.setAsNumberIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, stopBgp_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC);
+        oprot.writeI32(struct.asNumber);
+        oprot.writeFieldEnd();
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class stopBgp_argsTupleSchemeFactory implements SchemeFactory {
+      public stopBgp_argsTupleScheme getScheme() {
+        return new stopBgp_argsTupleScheme();
+      }
+    }
+
+    private static class stopBgp_argsTupleScheme extends TupleScheme<stopBgp_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, stopBgp_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetAsNumber()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetAsNumber()) {
+          oprot.writeI32(struct.asNumber);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, stopBgp_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.asNumber = iprot.readI32();
+          struct.setAsNumberIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class stopBgp_result implements org.apache.thrift.TBase<stopBgp_result, stopBgp_result._Fields>, java.io.Serializable, Cloneable, Comparable<stopBgp_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stopBgp_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new stopBgp_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new stopBgp_resultTupleSchemeFactory());
+    }
+
+    public int success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopBgp_result.class, metaDataMap);
+    }
+
+    public stopBgp_result() {
+    }
+
+    public stopBgp_result(
+      int success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public stopBgp_result(stopBgp_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public stopBgp_result deepCopy() {
+      return new stopBgp_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = 0;
+    }
+
+    public int getSuccess() {
+      return this.success;
+    }
+
+    public stopBgp_result setSuccess(int success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Integer.valueOf(getSuccess());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof stopBgp_result)
+        return this.equals((stopBgp_result)that);
+      return false;
+    }
+
+    public boolean equals(stopBgp_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(stopBgp_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("stopBgp_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class stopBgp_resultStandardSchemeFactory implements SchemeFactory {
+      public stopBgp_resultStandardScheme getScheme() {
+        return new stopBgp_resultStandardScheme();
+      }
+    }
+
+    private static class stopBgp_resultStandardScheme extends StandardScheme<stopBgp_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, stopBgp_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.success = iprot.readI32();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, stopBgp_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeI32(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class stopBgp_resultTupleSchemeFactory implements SchemeFactory {
+      public stopBgp_resultTupleScheme getScheme() {
+        return new stopBgp_resultTupleScheme();
+      }
+    }
+
+    private static class stopBgp_resultTupleScheme extends TupleScheme<stopBgp_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, stopBgp_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeI32(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, stopBgp_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readI32();
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class createPeer_args implements org.apache.thrift.TBase<createPeer_args, createPeer_args._Fields>, java.io.Serializable, Cloneable, Comparable<createPeer_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPeer_args");
+
+    private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I32, (short)2);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new createPeer_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new createPeer_argsTupleSchemeFactory());
+    }
+
+    public String ipAddress; // required
+    public int asNumber; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      IP_ADDRESS((short)1, "ipAddress"),
+      AS_NUMBER((short)2, "asNumber");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // IP_ADDRESS
+            return IP_ADDRESS;
+          case 2: // AS_NUMBER
+            return AS_NUMBER;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __ASNUMBER_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPeer_args.class, metaDataMap);
+    }
+
+    public createPeer_args() {
+    }
+
+    public createPeer_args(
+      String ipAddress,
+      int asNumber)
+    {
+      this();
+      this.ipAddress = ipAddress;
+      this.asNumber = asNumber;
+      setAsNumberIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public createPeer_args(createPeer_args other) {
+      __isset_bitfield = other.__isset_bitfield;
+      if (other.isSetIpAddress()) {
+        this.ipAddress = other.ipAddress;
+      }
+      this.asNumber = other.asNumber;
+    }
+
+    public createPeer_args deepCopy() {
+      return new createPeer_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.ipAddress = null;
+      setAsNumberIsSet(false);
+      this.asNumber = 0;
+    }
+
+    public String getIpAddress() {
+      return this.ipAddress;
+    }
+
+    public createPeer_args setIpAddress(String ipAddress) {
+      this.ipAddress = ipAddress;
+      return this;
+    }
+
+    public void unsetIpAddress() {
+      this.ipAddress = null;
+    }
+
+    /** Returns true if field ipAddress is set (has been assigned a value) and false otherwise */
+    public boolean isSetIpAddress() {
+      return this.ipAddress != null;
+    }
+
+    public void setIpAddressIsSet(boolean value) {
+      if (!value) {
+        this.ipAddress = null;
+      }
+    }
+
+    public int getAsNumber() {
+      return this.asNumber;
+    }
+
+    public createPeer_args setAsNumber(int asNumber) {
+      this.asNumber = asNumber;
+      setAsNumberIsSet(true);
+      return this;
+    }
+
+    public void unsetAsNumber() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+    }
+
+    /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */
+    public boolean isSetAsNumber() {
+      return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+    }
+
+    public void setAsNumberIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case IP_ADDRESS:
+        if (value == null) {
+          unsetIpAddress();
+        } else {
+          setIpAddress((String)value);
+        }
+        break;
+
+      case AS_NUMBER:
+        if (value == null) {
+          unsetAsNumber();
+        } else {
+          setAsNumber((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case IP_ADDRESS:
+        return getIpAddress();
+
+      case AS_NUMBER:
+        return Integer.valueOf(getAsNumber());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case IP_ADDRESS:
+        return isSetIpAddress();
+      case AS_NUMBER:
+        return isSetAsNumber();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof createPeer_args)
+        return this.equals((createPeer_args)that);
+      return false;
+    }
+
+    public boolean equals(createPeer_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_ipAddress = true && this.isSetIpAddress();
+      boolean that_present_ipAddress = true && that.isSetIpAddress();
+      if (this_present_ipAddress || that_present_ipAddress) {
+        if (!(this_present_ipAddress && that_present_ipAddress))
+          return false;
+        if (!this.ipAddress.equals(that.ipAddress))
+          return false;
+      }
+
+      boolean this_present_asNumber = true;
+      boolean that_present_asNumber = true;
+      if (this_present_asNumber || that_present_asNumber) {
+        if (!(this_present_asNumber && that_present_asNumber))
+          return false;
+        if (this.asNumber != that.asNumber)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(createPeer_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(other.isSetIpAddress());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetIpAddress()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, other.ipAddress);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAsNumber()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("createPeer_args(");
+      boolean first = true;
+
+      sb.append("ipAddress:");
+      if (this.ipAddress == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ipAddress);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("asNumber:");
+      sb.append(this.asNumber);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class createPeer_argsStandardSchemeFactory implements SchemeFactory {
+      public createPeer_argsStandardScheme getScheme() {
+        return new createPeer_argsStandardScheme();
+      }
+    }
+
+    private static class createPeer_argsStandardScheme extends StandardScheme<createPeer_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, createPeer_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // IP_ADDRESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.ipAddress = iprot.readString();
+                struct.setIpAddressIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // AS_NUMBER
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.asNumber = iprot.readI32();
+                struct.setAsNumberIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, createPeer_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.ipAddress != null) {
+          oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC);
+          oprot.writeString(struct.ipAddress);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC);
+        oprot.writeI32(struct.asNumber);
+        oprot.writeFieldEnd();
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class createPeer_argsTupleSchemeFactory implements SchemeFactory {
+      public createPeer_argsTupleScheme getScheme() {
+        return new createPeer_argsTupleScheme();
+      }
+    }
+
+    private static class createPeer_argsTupleScheme extends TupleScheme<createPeer_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, createPeer_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetIpAddress()) {
+          optionals.set(0);
+        }
+        if (struct.isSetAsNumber()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetIpAddress()) {
+          oprot.writeString(struct.ipAddress);
+        }
+        if (struct.isSetAsNumber()) {
+          oprot.writeI32(struct.asNumber);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, createPeer_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          struct.ipAddress = iprot.readString();
+          struct.setIpAddressIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.asNumber = iprot.readI32();
+          struct.setAsNumberIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class createPeer_result implements org.apache.thrift.TBase<createPeer_result, createPeer_result._Fields>, java.io.Serializable, Cloneable, Comparable<createPeer_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPeer_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new createPeer_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new createPeer_resultTupleSchemeFactory());
+    }
+
+    public int success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPeer_result.class, metaDataMap);
+    }
+
+    public createPeer_result() {
+    }
+
+    public createPeer_result(
+      int success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public createPeer_result(createPeer_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public createPeer_result deepCopy() {
+      return new createPeer_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = 0;
+    }
+
+    public int getSuccess() {
+      return this.success;
+    }
+
+    public createPeer_result setSuccess(int success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Integer.valueOf(getSuccess());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof createPeer_result)
+        return this.equals((createPeer_result)that);
+      return false;
+    }
+
+    public boolean equals(createPeer_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(createPeer_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("createPeer_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class createPeer_resultStandardSchemeFactory implements SchemeFactory {
+      public createPeer_resultStandardScheme getScheme() {
+        return new createPeer_resultStandardScheme();
+      }
+    }
+
+    private static class createPeer_resultStandardScheme extends StandardScheme<createPeer_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, createPeer_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.success = iprot.readI32();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, createPeer_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeI32(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class createPeer_resultTupleSchemeFactory implements SchemeFactory {
+      public createPeer_resultTupleScheme getScheme() {
+        return new createPeer_resultTupleScheme();
+      }
+    }
+
+    private static class createPeer_resultTupleScheme extends TupleScheme<createPeer_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, createPeer_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeI32(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, createPeer_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readI32();
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class deletePeer_args implements org.apache.thrift.TBase<deletePeer_args, deletePeer_args._Fields>, java.io.Serializable, Cloneable, Comparable<deletePeer_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePeer_args");
+
+    private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new deletePeer_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new deletePeer_argsTupleSchemeFactory());
+    }
+
+    public String ipAddress; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      IP_ADDRESS((short)1, "ipAddress");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // IP_ADDRESS
+            return IP_ADDRESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePeer_args.class, metaDataMap);
+    }
+
+    public deletePeer_args() {
+    }
+
+    public deletePeer_args(
+      String ipAddress)
+    {
+      this();
+      this.ipAddress = ipAddress;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public deletePeer_args(deletePeer_args other) {
+      if (other.isSetIpAddress()) {
+        this.ipAddress = other.ipAddress;
+      }
+    }
+
+    public deletePeer_args deepCopy() {
+      return new deletePeer_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.ipAddress = null;
+    }
+
+    public String getIpAddress() {
+      return this.ipAddress;
+    }
+
+    public deletePeer_args setIpAddress(String ipAddress) {
+      this.ipAddress = ipAddress;
+      return this;
+    }
+
+    public void unsetIpAddress() {
+      this.ipAddress = null;
+    }
+
+    /** Returns true if field ipAddress is set (has been assigned a value) and false otherwise */
+    public boolean isSetIpAddress() {
+      return this.ipAddress != null;
+    }
+
+    public void setIpAddressIsSet(boolean value) {
+      if (!value) {
+        this.ipAddress = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case IP_ADDRESS:
+        if (value == null) {
+          unsetIpAddress();
+        } else {
+          setIpAddress((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case IP_ADDRESS:
+        return getIpAddress();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case IP_ADDRESS:
+        return isSetIpAddress();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof deletePeer_args)
+        return this.equals((deletePeer_args)that);
+      return false;
+    }
+
+    public boolean equals(deletePeer_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_ipAddress = true && this.isSetIpAddress();
+      boolean that_present_ipAddress = true && that.isSetIpAddress();
+      if (this_present_ipAddress || that_present_ipAddress) {
+        if (!(this_present_ipAddress && that_present_ipAddress))
+          return false;
+        if (!this.ipAddress.equals(that.ipAddress))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(deletePeer_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(other.isSetIpAddress());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetIpAddress()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, other.ipAddress);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("deletePeer_args(");
+      boolean first = true;
+
+      sb.append("ipAddress:");
+      if (this.ipAddress == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ipAddress);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class deletePeer_argsStandardSchemeFactory implements SchemeFactory {
+      public deletePeer_argsStandardScheme getScheme() {
+        return new deletePeer_argsStandardScheme();
+      }
+    }
+
+    private static class deletePeer_argsStandardScheme extends StandardScheme<deletePeer_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, deletePeer_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // IP_ADDRESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.ipAddress = iprot.readString();
+                struct.setIpAddressIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, deletePeer_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.ipAddress != null) {
+          oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC);
+          oprot.writeString(struct.ipAddress);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class deletePeer_argsTupleSchemeFactory implements SchemeFactory {
+      public deletePeer_argsTupleScheme getScheme() {
+        return new deletePeer_argsTupleScheme();
+      }
+    }
+
+    private static class deletePeer_argsTupleScheme extends TupleScheme<deletePeer_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, deletePeer_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetIpAddress()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetIpAddress()) {
+          oprot.writeString(struct.ipAddress);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, deletePeer_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.ipAddress = iprot.readString();
+          struct.setIpAddressIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class deletePeer_result implements org.apache.thrift.TBase<deletePeer_result, deletePeer_result._Fields>, java.io.Serializable, Cloneable, Comparable<deletePeer_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePeer_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new deletePeer_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new deletePeer_resultTupleSchemeFactory());
+    }
+
+    public int success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePeer_result.class, metaDataMap);
+    }
+
+    public deletePeer_result() {
+    }
+
+    public deletePeer_result(
+      int success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public deletePeer_result(deletePeer_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public deletePeer_result deepCopy() {
+      return new deletePeer_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = 0;
+    }
+
+    public int getSuccess() {
+      return this.success;
+    }
+
+    public deletePeer_result setSuccess(int success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Integer.valueOf(getSuccess());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof deletePeer_result)
+        return this.equals((deletePeer_result)that);
+      return false;
+    }
+
+    public boolean equals(deletePeer_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(deletePeer_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("deletePeer_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class deletePeer_resultStandardSchemeFactory implements SchemeFactory {
+      public deletePeer_resultStandardScheme getScheme() {
+        return new deletePeer_resultStandardScheme();
+      }
+    }
+
+    private static class deletePeer_resultStandardScheme extends StandardScheme<deletePeer_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, deletePeer_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.success = iprot.readI32();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, deletePeer_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeI32(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class deletePeer_resultTupleSchemeFactory implements SchemeFactory {
+      public deletePeer_resultTupleScheme getScheme() {
+        return new deletePeer_resultTupleScheme();
+      }
+    }
+
+    private static class deletePeer_resultTupleScheme extends TupleScheme<deletePeer_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, deletePeer_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeI32(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, deletePeer_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readI32();
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class addVrf_args implements org.apache.thrift.TBase<addVrf_args, addVrf_args._Fields>, java.io.Serializable, Cloneable, Comparable<addVrf_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVrf_args");
+
+    private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField IRTS_FIELD_DESC = new org.apache.thrift.protocol.TField("irts", org.apache.thrift.protocol.TType.LIST, (short)2);
+    private static final org.apache.thrift.protocol.TField ERTS_FIELD_DESC = new org.apache.thrift.protocol.TField("erts", org.apache.thrift.protocol.TType.LIST, (short)3);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new addVrf_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new addVrf_argsTupleSchemeFactory());
+    }
+
+    public String rd; // required
+    public List<String> irts; // required
+    public List<String> erts; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      RD((short)1, "rd"),
+      IRTS((short)2, "irts"),
+      ERTS((short)3, "erts");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // RD
+            return RD;
+          case 2: // IRTS
+            return IRTS;
+          case 3: // ERTS
+            return ERTS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.IRTS, new org.apache.thrift.meta_data.FieldMetaData("irts", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+      tmpMap.put(_Fields.ERTS, new org.apache.thrift.meta_data.FieldMetaData("erts", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVrf_args.class, metaDataMap);
+    }
+
+    public addVrf_args() {
+    }
+
+    public addVrf_args(
+      String rd,
+      List<String> irts,
+      List<String> erts)
+    {
+      this();
+      this.rd = rd;
+      this.irts = irts;
+      this.erts = erts;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public addVrf_args(addVrf_args other) {
+      if (other.isSetRd()) {
+        this.rd = other.rd;
+      }
+      if (other.isSetIrts()) {
+        List<String> __this__irts = new ArrayList<String>(other.irts);
+        this.irts = __this__irts;
+      }
+      if (other.isSetErts()) {
+        List<String> __this__erts = new ArrayList<String>(other.erts);
+        this.erts = __this__erts;
+      }
+    }
+
+    public addVrf_args deepCopy() {
+      return new addVrf_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.rd = null;
+      this.irts = null;
+      this.erts = null;
+    }
+
+    public String getRd() {
+      return this.rd;
+    }
+
+    public addVrf_args setRd(String rd) {
+      this.rd = rd;
+      return this;
+    }
+
+    public void unsetRd() {
+      this.rd = null;
+    }
+
+    /** Returns true if field rd is set (has been assigned a value) and false otherwise */
+    public boolean isSetRd() {
+      return this.rd != null;
+    }
+
+    public void setRdIsSet(boolean value) {
+      if (!value) {
+        this.rd = null;
+      }
+    }
+
+    public int getIrtsSize() {
+      return (this.irts == null) ? 0 : this.irts.size();
+    }
+
+    public java.util.Iterator<String> getIrtsIterator() {
+      return (this.irts == null) ? null : this.irts.iterator();
+    }
+
+    public void addToIrts(String elem) {
+      if (this.irts == null) {
+        this.irts = new ArrayList<String>();
+      }
+      this.irts.add(elem);
+    }
+
+    public List<String> getIrts() {
+      return this.irts;
+    }
+
+    public addVrf_args setIrts(List<String> irts) {
+      this.irts = irts;
+      return this;
+    }
+
+    public void unsetIrts() {
+      this.irts = null;
+    }
+
+    /** Returns true if field irts is set (has been assigned a value) and false otherwise */
+    public boolean isSetIrts() {
+      return this.irts != null;
+    }
+
+    public void setIrtsIsSet(boolean value) {
+      if (!value) {
+        this.irts = null;
+      }
+    }
+
+    public int getErtsSize() {
+      return (this.erts == null) ? 0 : this.erts.size();
+    }
+
+    public java.util.Iterator<String> getErtsIterator() {
+      return (this.erts == null) ? null : this.erts.iterator();
+    }
+
+    public void addToErts(String elem) {
+      if (this.erts == null) {
+        this.erts = new ArrayList<String>();
+      }
+      this.erts.add(elem);
+    }
+
+    public List<String> getErts() {
+      return this.erts;
+    }
+
+    public addVrf_args setErts(List<String> erts) {
+      this.erts = erts;
+      return this;
+    }
+
+    public void unsetErts() {
+      this.erts = null;
+    }
+
+    /** Returns true if field erts is set (has been assigned a value) and false otherwise */
+    public boolean isSetErts() {
+      return this.erts != null;
+    }
+
+    public void setErtsIsSet(boolean value) {
+      if (!value) {
+        this.erts = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case RD:
+        if (value == null) {
+          unsetRd();
+        } else {
+          setRd((String)value);
+        }
+        break;
+
+      case IRTS:
+        if (value == null) {
+          unsetIrts();
+        } else {
+          setIrts((List<String>)value);
+        }
+        break;
+
+      case ERTS:
+        if (value == null) {
+          unsetErts();
+        } else {
+          setErts((List<String>)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case RD:
+        return getRd();
+
+      case IRTS:
+        return getIrts();
+
+      case ERTS:
+        return getErts();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case RD:
+        return isSetRd();
+      case IRTS:
+        return isSetIrts();
+      case ERTS:
+        return isSetErts();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof addVrf_args)
+        return this.equals((addVrf_args)that);
+      return false;
+    }
+
+    public boolean equals(addVrf_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_rd = true && this.isSetRd();
+      boolean that_present_rd = true && that.isSetRd();
+      if (this_present_rd || that_present_rd) {
+        if (!(this_present_rd && that_present_rd))
+          return false;
+        if (!this.rd.equals(that.rd))
+          return false;
+      }
+
+      boolean this_present_irts = true && this.isSetIrts();
+      boolean that_present_irts = true && that.isSetIrts();
+      if (this_present_irts || that_present_irts) {
+        if (!(this_present_irts && that_present_irts))
+          return false;
+        if (!this.irts.equals(that.irts))
+          return false;
+      }
+
+      boolean this_present_erts = true && this.isSetErts();
+      boolean that_present_erts = true && that.isSetErts();
+      if (this_present_erts || that_present_erts) {
+        if (!(this_present_erts && that_present_erts))
+          return false;
+        if (!this.erts.equals(that.erts))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(addVrf_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetRd()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetIrts()).compareTo(other.isSetIrts());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetIrts()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.irts, other.irts);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetErts()).compareTo(other.isSetErts());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetErts()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.erts, other.erts);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("addVrf_args(");
+      boolean first = true;
+
+      sb.append("rd:");
+      if (this.rd == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.rd);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("irts:");
+      if (this.irts == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.irts);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("erts:");
+      if (this.erts == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.erts);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class addVrf_argsStandardSchemeFactory implements SchemeFactory {
+      public addVrf_argsStandardScheme getScheme() {
+        return new addVrf_argsStandardScheme();
+      }
+    }
+
+    private static class addVrf_argsStandardScheme extends StandardScheme<addVrf_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, addVrf_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // RD
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.rd = iprot.readString();
+                struct.setRdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // IRTS
+              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+                {
+                  org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
+                  struct.irts = new ArrayList<String>(_list8.size);
+                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+                  {
+                    String _elem10;
+                    _elem10 = iprot.readString();
+                    struct.irts.add(_elem10);
+                  }
+                  iprot.readListEnd();
+                }
+                struct.setIrtsIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // ERTS
+              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+                {
+                  org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();
+                  struct.erts = new ArrayList<String>(_list11.size);
+                  for (int _i12 = 0; _i12 < _list11.size; ++_i12)
+                  {
+                    String _elem13;
+                    _elem13 = iprot.readString();
+                    struct.erts.add(_elem13);
+                  }
+                  iprot.readListEnd();
+                }
+                struct.setErtsIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, addVrf_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.rd != null) {
+          oprot.writeFieldBegin(RD_FIELD_DESC);
+          oprot.writeString(struct.rd);
+          oprot.writeFieldEnd();
+        }
+        if (struct.irts != null) {
+          oprot.writeFieldBegin(IRTS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.irts.size()));
+            for (String _iter14 : struct.irts)
+            {
+              oprot.writeString(_iter14);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        if (struct.erts != null) {
+          oprot.writeFieldBegin(ERTS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.erts.size()));
+            for (String _iter15 : struct.erts)
+            {
+              oprot.writeString(_iter15);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class addVrf_argsTupleSchemeFactory implements SchemeFactory {
+      public addVrf_argsTupleScheme getScheme() {
+        return new addVrf_argsTupleScheme();
+      }
+    }
+
+    private static class addVrf_argsTupleScheme extends TupleScheme<addVrf_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, addVrf_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetRd()) {
+          optionals.set(0);
+        }
+        if (struct.isSetIrts()) {
+          optionals.set(1);
+        }
+        if (struct.isSetErts()) {
+          optionals.set(2);
+        }
+        oprot.writeBitSet(optionals, 3);
+        if (struct.isSetRd()) {
+          oprot.writeString(struct.rd);
+        }
+        if (struct.isSetIrts()) {
+          {
+            oprot.writeI32(struct.irts.size());
+            for (String _iter16 : struct.irts)
+            {
+              oprot.writeString(_iter16);
+            }
+          }
+        }
+        if (struct.isSetErts()) {
+          {
+            oprot.writeI32(struct.erts.size());
+            for (String _iter17 : struct.erts)
+            {
+              oprot.writeString(_iter17);
+            }
+          }
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, addVrf_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(3);
+        if (incoming.get(0)) {
+          struct.rd = iprot.readString();
+          struct.setRdIsSet(true);
+        }
+        if (incoming.get(1)) {
+          {
+            org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+            struct.irts = new ArrayList<String>(_list18.size);
+            for (int _i19 = 0; _i19 < _list18.size; ++_i19)
+            {
+              String _elem20;
+              _elem20 = iprot.readString();
+              struct.irts.add(_elem20);
+            }
+          }
+          struct.setIrtsIsSet(true);
+        }
+        if (incoming.get(2)) {
+          {
+            org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+            struct.erts = new ArrayList<String>(_list21.size);
+            for (int _i22 = 0; _i22 < _list21.size; ++_i22)
+            {
+              String _elem23;
+              _elem23 = iprot.readString();
+              struct.erts.add(_elem23);
+            }
+          }
+          struct.setErtsIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class addVrf_result implements org.apache.thrift.TBase<addVrf_result, addVrf_result._Fields>, java.io.Serializable, Cloneable, Comparable<addVrf_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVrf_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new addVrf_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new addVrf_resultTupleSchemeFactory());
+    }
+
+    public int success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVrf_result.class, metaDataMap);
+    }
+
+    public addVrf_result() {
+    }
+
+    public addVrf_result(
+      int success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public addVrf_result(addVrf_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public addVrf_result deepCopy() {
+      return new addVrf_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = 0;
+    }
+
+    public int getSuccess() {
+      return this.success;
+    }
+
+    public addVrf_result setSuccess(int success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Integer.valueOf(getSuccess());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof addVrf_result)
+        return this.equals((addVrf_result)that);
+      return false;
+    }
+
+    public boolean equals(addVrf_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(addVrf_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("addVrf_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class addVrf_resultStandardSchemeFactory implements SchemeFactory {
+      public addVrf_resultStandardScheme getScheme() {
+        return new addVrf_resultStandardScheme();
+      }
+    }
+
+    private static class addVrf_resultStandardScheme extends StandardScheme<addVrf_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, addVrf_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.success = iprot.readI32();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, addVrf_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeI32(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class addVrf_resultTupleSchemeFactory implements SchemeFactory {
+      public addVrf_resultTupleScheme getScheme() {
+        return new addVrf_resultTupleScheme();
+      }
+    }
+
+    private static class addVrf_resultTupleScheme extends TupleScheme<addVrf_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, addVrf_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeI32(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, addVrf_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readI32();
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class delVrf_args implements org.apache.thrift.TBase<delVrf_args, delVrf_args._Fields>, java.io.Serializable, Cloneable, Comparable<delVrf_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delVrf_args");
+
+    private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new delVrf_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new delVrf_argsTupleSchemeFactory());
+    }
+
+    public String rd; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      RD((short)1, "rd");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // RD
+            return RD;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delVrf_args.class, metaDataMap);
+    }
+
+    public delVrf_args() {
+    }
+
+    public delVrf_args(
+      String rd)
+    {
+      this();
+      this.rd = rd;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public delVrf_args(delVrf_args other) {
+      if (other.isSetRd()) {
+        this.rd = other.rd;
+      }
+    }
+
+    public delVrf_args deepCopy() {
+      return new delVrf_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.rd = null;
+    }
+
+    public String getRd() {
+      return this.rd;
+    }
+
+    public delVrf_args setRd(String rd) {
+      this.rd = rd;
+      return this;
+    }
+
+    public void unsetRd() {
+      this.rd = null;
+    }
+
+    /** Returns true if field rd is set (has been assigned a value) and false otherwise */
+    public boolean isSetRd() {
+      return this.rd != null;
+    }
+
+    public void setRdIsSet(boolean value) {
+      if (!value) {
+        this.rd = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case RD:
+        if (value == null) {
+          unsetRd();
+        } else {
+          setRd((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case RD:
+        return getRd();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case RD:
+        return isSetRd();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof delVrf_args)
+        return this.equals((delVrf_args)that);
+      return false;
+    }
+
+    public boolean equals(delVrf_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_rd = true && this.isSetRd();
+      boolean that_present_rd = true && that.isSetRd();
+      if (this_present_rd || that_present_rd) {
+        if (!(this_present_rd && that_present_rd))
+          return false;
+        if (!this.rd.equals(that.rd))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(delVrf_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetRd()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("delVrf_args(");
+      boolean first = true;
+
+      sb.append("rd:");
+      if (this.rd == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.rd);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class delVrf_argsStandardSchemeFactory implements SchemeFactory {
+      public delVrf_argsStandardScheme getScheme() {
+        return new delVrf_argsStandardScheme();
+      }
+    }
+
+    private static class delVrf_argsStandardScheme extends StandardScheme<delVrf_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, delVrf_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // RD
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.rd = iprot.readString();
+                struct.setRdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, delVrf_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.rd != null) {
+          oprot.writeFieldBegin(RD_FIELD_DESC);
+          oprot.writeString(struct.rd);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class delVrf_argsTupleSchemeFactory implements SchemeFactory {
+      public delVrf_argsTupleScheme getScheme() {
+        return new delVrf_argsTupleScheme();
+      }
+    }
+
+    private static class delVrf_argsTupleScheme extends TupleScheme<delVrf_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, delVrf_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetRd()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetRd()) {
+          oprot.writeString(struct.rd);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, delVrf_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.rd = iprot.readString();
+          struct.setRdIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class delVrf_result implements org.apache.thrift.TBase<delVrf_result, delVrf_result._Fields>, java.io.Serializable, Cloneable, Comparable<delVrf_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delVrf_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new delVrf_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new delVrf_resultTupleSchemeFactory());
+    }
+
+    public int success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delVrf_result.class, metaDataMap);
+    }
+
+    public delVrf_result() {
+    }
+
+    public delVrf_result(
+      int success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public delVrf_result(delVrf_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public delVrf_result deepCopy() {
+      return new delVrf_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = 0;
+    }
+
+    public int getSuccess() {
+      return this.success;
+    }
+
+    public delVrf_result setSuccess(int success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Integer.valueOf(getSuccess());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof delVrf_result)
+        return this.equals((delVrf_result)that);
+      return false;
+    }
+
+    public boolean equals(delVrf_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(delVrf_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("delVrf_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class delVrf_resultStandardSchemeFactory implements SchemeFactory {
+      public delVrf_resultStandardScheme getScheme() {
+        return new delVrf_resultStandardScheme();
+      }
+    }
+
+    private static class delVrf_resultStandardScheme extends StandardScheme<delVrf_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, delVrf_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.success = iprot.readI32();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, delVrf_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeI32(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class delVrf_resultTupleSchemeFactory implements SchemeFactory {
+      public delVrf_resultTupleScheme getScheme() {
+        return new delVrf_resultTupleScheme();
+      }
+    }
+
+    private static class delVrf_resultTupleScheme extends TupleScheme<delVrf_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, delVrf_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeI32(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, delVrf_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readI32();
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class pushRoute_args implements org.apache.thrift.TBase<pushRoute_args, pushRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<pushRoute_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushRoute_args");
+
+    private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField NEXTHOP_FIELD_DESC = new org.apache.thrift.protocol.TField("nexthop", org.apache.thrift.protocol.TType.STRING, (short)2);
+    private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)3);
+    private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.I32, (short)4);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new pushRoute_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new pushRoute_argsTupleSchemeFactory());
+    }
+
+    public String prefix; // required
+    public String nexthop; // required
+    public String rd; // required
+    public int label; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      PREFIX((short)1, "prefix"),
+      NEXTHOP((short)2, "nexthop"),
+      RD((short)3, "rd"),
+      LABEL((short)4, "label");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // PREFIX
+            return PREFIX;
+          case 2: // NEXTHOP
+            return NEXTHOP;
+          case 3: // RD
+            return RD;
+          case 4: // LABEL
+            return LABEL;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __LABEL_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.NEXTHOP, new org.apache.thrift.meta_data.FieldMetaData("nexthop", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushRoute_args.class, metaDataMap);
+    }
+
+    public pushRoute_args() {
+    }
+
+    public pushRoute_args(
+      String prefix,
+      String nexthop,
+      String rd,
+      int label)
+    {
+      this();
+      this.prefix = prefix;
+      this.nexthop = nexthop;
+      this.rd = rd;
+      this.label = label;
+      setLabelIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public pushRoute_args(pushRoute_args other) {
+      __isset_bitfield = other.__isset_bitfield;
+      if (other.isSetPrefix()) {
+        this.prefix = other.prefix;
+      }
+      if (other.isSetNexthop()) {
+        this.nexthop = other.nexthop;
+      }
+      if (other.isSetRd()) {
+        this.rd = other.rd;
+      }
+      this.label = other.label;
+    }
+
+    public pushRoute_args deepCopy() {
+      return new pushRoute_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.prefix = null;
+      this.nexthop = null;
+      this.rd = null;
+      setLabelIsSet(false);
+      this.label = 0;
+    }
+
+    public String getPrefix() {
+      return this.prefix;
+    }
+
+    public pushRoute_args setPrefix(String prefix) {
+      this.prefix = prefix;
+      return this;
+    }
+
+    public void unsetPrefix() {
+      this.prefix = null;
+    }
+
+    /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
+    public boolean isSetPrefix() {
+      return this.prefix != null;
+    }
+
+    public void setPrefixIsSet(boolean value) {
+      if (!value) {
+        this.prefix = null;
+      }
+    }
+
+    public String getNexthop() {
+      return this.nexthop;
+    }
+
+    public pushRoute_args setNexthop(String nexthop) {
+      this.nexthop = nexthop;
+      return this;
+    }
+
+    public void unsetNexthop() {
+      this.nexthop = null;
+    }
+
+    /** Returns true if field nexthop is set (has been assigned a value) and false otherwise */
+    public boolean isSetNexthop() {
+      return this.nexthop != null;
+    }
+
+    public void setNexthopIsSet(boolean value) {
+      if (!value) {
+        this.nexthop = null;
+      }
+    }
+
+    public String getRd() {
+      return this.rd;
+    }
+
+    public pushRoute_args setRd(String rd) {
+      this.rd = rd;
+      return this;
+    }
+
+    public void unsetRd() {
+      this.rd = null;
+    }
+
+    /** Returns true if field rd is set (has been assigned a value) and false otherwise */
+    public boolean isSetRd() {
+      return this.rd != null;
+    }
+
+    public void setRdIsSet(boolean value) {
+      if (!value) {
+        this.rd = null;
+      }
+    }
+
+    public int getLabel() {
+      return this.label;
+    }
+
+    public pushRoute_args setLabel(int label) {
+      this.label = label;
+      setLabelIsSet(true);
+      return this;
+    }
+
+    public void unsetLabel() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LABEL_ISSET_ID);
+    }
+
+    /** Returns true if field label is set (has been assigned a value) and false otherwise */
+    public boolean isSetLabel() {
+      return EncodingUtils.testBit(__isset_bitfield, __LABEL_ISSET_ID);
+    }
+
+    public void setLabelIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LABEL_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case PREFIX:
+        if (value == null) {
+          unsetPrefix();
+        } else {
+          setPrefix((String)value);
+        }
+        break;
+
+      case NEXTHOP:
+        if (value == null) {
+          unsetNexthop();
+        } else {
+          setNexthop((String)value);
+        }
+        break;
+
+      case RD:
+        if (value == null) {
+          unsetRd();
+        } else {
+          setRd((String)value);
+        }
+        break;
+
+      case LABEL:
+        if (value == null) {
+          unsetLabel();
+        } else {
+          setLabel((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case PREFIX:
+        return getPrefix();
+
+      case NEXTHOP:
+        return getNexthop();
+
+      case RD:
+        return getRd();
+
+      case LABEL:
+        return Integer.valueOf(getLabel());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case PREFIX:
+        return isSetPrefix();
+      case NEXTHOP:
+        return isSetNexthop();
+      case RD:
+        return isSetRd();
+      case LABEL:
+        return isSetLabel();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof pushRoute_args)
+        return this.equals((pushRoute_args)that);
+      return false;
+    }
+
+    public boolean equals(pushRoute_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_prefix = true && this.isSetPrefix();
+      boolean that_present_prefix = true && that.isSetPrefix();
+      if (this_present_prefix || that_present_prefix) {
+        if (!(this_present_prefix && that_present_prefix))
+          return false;
+        if (!this.prefix.equals(that.prefix))
+          return false;
+      }
+
+      boolean this_present_nexthop = true && this.isSetNexthop();
+      boolean that_present_nexthop = true && that.isSetNexthop();
+      if (this_present_nexthop || that_present_nexthop) {
+        if (!(this_present_nexthop && that_present_nexthop))
+          return false;
+        if (!this.nexthop.equals(that.nexthop))
+          return false;
+      }
+
+      boolean this_present_rd = true && this.isSetRd();
+      boolean that_present_rd = true && that.isSetRd();
+      if (this_present_rd || that_present_rd) {
+        if (!(this_present_rd && that_present_rd))
+          return false;
+        if (!this.rd.equals(that.rd))
+          return false;
+      }
+
+      boolean this_present_label = true;
+      boolean that_present_label = true;
+      if (this_present_label || that_present_label) {
+        if (!(this_present_label && that_present_label))
+          return false;
+        if (this.label != that.label)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(pushRoute_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetPrefix()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetNexthop()).compareTo(other.isSetNexthop());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetNexthop()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nexthop, other.nexthop);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetRd()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetLabel()).compareTo(other.isSetLabel());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetLabel()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("pushRoute_args(");
+      boolean first = true;
+
+      sb.append("prefix:");
+      if (this.prefix == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.prefix);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("nexthop:");
+      if (this.nexthop == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.nexthop);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("rd:");
+      if (this.rd == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.rd);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("label:");
+      sb.append(this.label);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class pushRoute_argsStandardSchemeFactory implements SchemeFactory {
+      public pushRoute_argsStandardScheme getScheme() {
+        return new pushRoute_argsStandardScheme();
+      }
+    }
+
+    private static class pushRoute_argsStandardScheme extends StandardScheme<pushRoute_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, pushRoute_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // PREFIX
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.prefix = iprot.readString();
+                struct.setPrefixIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // NEXTHOP
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.nexthop = iprot.readString();
+                struct.setNexthopIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // RD
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.rd = iprot.readString();
+                struct.setRdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 4: // LABEL
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.label = iprot.readI32();
+                struct.setLabelIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, pushRoute_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.prefix != null) {
+          oprot.writeFieldBegin(PREFIX_FIELD_DESC);
+          oprot.writeString(struct.prefix);
+          oprot.writeFieldEnd();
+        }
+        if (struct.nexthop != null) {
+          oprot.writeFieldBegin(NEXTHOP_FIELD_DESC);
+          oprot.writeString(struct.nexthop);
+          oprot.writeFieldEnd();
+        }
+        if (struct.rd != null) {
+          oprot.writeFieldBegin(RD_FIELD_DESC);
+          oprot.writeString(struct.rd);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldBegin(LABEL_FIELD_DESC);
+        oprot.writeI32(struct.label);
+        oprot.writeFieldEnd();
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class pushRoute_argsTupleSchemeFactory implements SchemeFactory {
+      public pushRoute_argsTupleScheme getScheme() {
+        return new pushRoute_argsTupleScheme();
+      }
+    }
+
+    private static class pushRoute_argsTupleScheme extends TupleScheme<pushRoute_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, pushRoute_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetPrefix()) {
+          optionals.set(0);
+        }
+        if (struct.isSetNexthop()) {
+          optionals.set(1);
+        }
+        if (struct.isSetRd()) {
+          optionals.set(2);
+        }
+        if (struct.isSetLabel()) {
+          optionals.set(3);
+        }
+        oprot.writeBitSet(optionals, 4);
+        if (struct.isSetPrefix()) {
+          oprot.writeString(struct.prefix);
+        }
+        if (struct.isSetNexthop()) {
+          oprot.writeString(struct.nexthop);
+        }
+        if (struct.isSetRd()) {
+          oprot.writeString(struct.rd);
+        }
+        if (struct.isSetLabel()) {
+          oprot.writeI32(struct.label);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, pushRoute_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(4);
+        if (incoming.get(0)) {
+          struct.prefix = iprot.readString();
+          struct.setPrefixIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.nexthop = iprot.readString();
+          struct.setNexthopIsSet(true);
+        }
+        if (incoming.get(2)) {
+          struct.rd = iprot.readString();
+          struct.setRdIsSet(true);
+        }
+        if (incoming.get(3)) {
+          struct.label = iprot.readI32();
+          struct.setLabelIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class pushRoute_result implements org.apache.thrift.TBase<pushRoute_result, pushRoute_result._Fields>, java.io.Serializable, Cloneable, Comparable<pushRoute_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushRoute_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new pushRoute_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new pushRoute_resultTupleSchemeFactory());
+    }
+
+    public int success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushRoute_result.class, metaDataMap);
+    }
+
+    public pushRoute_result() {
+    }
+
+    public pushRoute_result(
+      int success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public pushRoute_result(pushRoute_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public pushRoute_result deepCopy() {
+      return new pushRoute_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = 0;
+    }
+
+    public int getSuccess() {
+      return this.success;
+    }
+
+    public pushRoute_result setSuccess(int success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Integer.valueOf(getSuccess());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof pushRoute_result)
+        return this.equals((pushRoute_result)that);
+      return false;
+    }
+
+    public boolean equals(pushRoute_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(pushRoute_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("pushRoute_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class pushRoute_resultStandardSchemeFactory implements SchemeFactory {
+      public pushRoute_resultStandardScheme getScheme() {
+        return new pushRoute_resultStandardScheme();
+      }
+    }
+
+    private static class pushRoute_resultStandardScheme extends StandardScheme<pushRoute_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, pushRoute_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.success = iprot.readI32();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, pushRoute_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeI32(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class pushRoute_resultTupleSchemeFactory implements SchemeFactory {
+      public pushRoute_resultTupleScheme getScheme() {
+        return new pushRoute_resultTupleScheme();
+      }
+    }
+
+    private static class pushRoute_resultTupleScheme extends TupleScheme<pushRoute_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, pushRoute_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeI32(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, pushRoute_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readI32();
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class withdrawRoute_args implements org.apache.thrift.TBase<withdrawRoute_args, withdrawRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<withdrawRoute_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("withdrawRoute_args");
+
+    private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new withdrawRoute_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new withdrawRoute_argsTupleSchemeFactory());
+    }
+
+    public String prefix; // required
+    public String rd; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      PREFIX((short)1, "prefix"),
+      RD((short)2, "rd");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // PREFIX
+            return PREFIX;
+          case 2: // RD
+            return RD;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(withdrawRoute_args.class, metaDataMap);
+    }
+
+    public withdrawRoute_args() {
+    }
+
+    public withdrawRoute_args(
+      String prefix,
+      String rd)
+    {
+      this();
+      this.prefix = prefix;
+      this.rd = rd;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public withdrawRoute_args(withdrawRoute_args other) {
+      if (other.isSetPrefix()) {
+        this.prefix = other.prefix;
+      }
+      if (other.isSetRd()) {
+        this.rd = other.rd;
+      }
+    }
+
+    public withdrawRoute_args deepCopy() {
+      return new withdrawRoute_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.prefix = null;
+      this.rd = null;
+    }
+
+    public String getPrefix() {
+      return this.prefix;
+    }
+
+    public withdrawRoute_args setPrefix(String prefix) {
+      this.prefix = prefix;
+      return this;
+    }
+
+    public void unsetPrefix() {
+      this.prefix = null;
+    }
+
+    /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
+    public boolean isSetPrefix() {
+      return this.prefix != null;
+    }
+
+    public void setPrefixIsSet(boolean value) {
+      if (!value) {
+        this.prefix = null;
+      }
+    }
+
+    public String getRd() {
+      return this.rd;
+    }
+
+    public withdrawRoute_args setRd(String rd) {
+      this.rd = rd;
+      return this;
+    }
+
+    public void unsetRd() {
+      this.rd = null;
+    }
+
+    /** Returns true if field rd is set (has been assigned a value) and false otherwise */
+    public boolean isSetRd() {
+      return this.rd != null;
+    }
+
+    public void setRdIsSet(boolean value) {
+      if (!value) {
+        this.rd = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case PREFIX:
+        if (value == null) {
+          unsetPrefix();
+        } else {
+          setPrefix((String)value);
+        }
+        break;
+
+      case RD:
+        if (value == null) {
+          unsetRd();
+        } else {
+          setRd((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case PREFIX:
+        return getPrefix();
+
+      case RD:
+        return getRd();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case PREFIX:
+        return isSetPrefix();
+      case RD:
+        return isSetRd();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof withdrawRoute_args)
+        return this.equals((withdrawRoute_args)that);
+      return false;
+    }
+
+    public boolean equals(withdrawRoute_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_prefix = true && this.isSetPrefix();
+      boolean that_present_prefix = true && that.isSetPrefix();
+      if (this_present_prefix || that_present_prefix) {
+        if (!(this_present_prefix && that_present_prefix))
+          return false;
+        if (!this.prefix.equals(that.prefix))
+          return false;
+      }
+
+      boolean this_present_rd = true && this.isSetRd();
+      boolean that_present_rd = true && that.isSetRd();
+      if (this_present_rd || that_present_rd) {
+        if (!(this_present_rd && that_present_rd))
+          return false;
+        if (!this.rd.equals(that.rd))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(withdrawRoute_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetPrefix()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetRd()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("withdrawRoute_args(");
+      boolean first = true;
+
+      sb.append("prefix:");
+      if (this.prefix == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.prefix);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("rd:");
+      if (this.rd == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.rd);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class withdrawRoute_argsStandardSchemeFactory implements SchemeFactory {
+      public withdrawRoute_argsStandardScheme getScheme() {
+        return new withdrawRoute_argsStandardScheme();
+      }
+    }
+
+    private static class withdrawRoute_argsStandardScheme extends StandardScheme<withdrawRoute_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, withdrawRoute_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // PREFIX
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.prefix = iprot.readString();
+                struct.setPrefixIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // RD
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.rd = iprot.readString();
+                struct.setRdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, withdrawRoute_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.prefix != null) {
+          oprot.writeFieldBegin(PREFIX_FIELD_DESC);
+          oprot.writeString(struct.prefix);
+          oprot.writeFieldEnd();
+        }
+        if (struct.rd != null) {
+          oprot.writeFieldBegin(RD_FIELD_DESC);
+          oprot.writeString(struct.rd);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class withdrawRoute_argsTupleSchemeFactory implements SchemeFactory {
+      public withdrawRoute_argsTupleScheme getScheme() {
+        return new withdrawRoute_argsTupleScheme();
+      }
+    }
+
+    private static class withdrawRoute_argsTupleScheme extends TupleScheme<withdrawRoute_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetPrefix()) {
+          optionals.set(0);
+        }
+        if (struct.isSetRd()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetPrefix()) {
+          oprot.writeString(struct.prefix);
+        }
+        if (struct.isSetRd()) {
+          oprot.writeString(struct.rd);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          struct.prefix = iprot.readString();
+          struct.setPrefixIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.rd = iprot.readString();
+          struct.setRdIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class withdrawRoute_result implements org.apache.thrift.TBase<withdrawRoute_result, withdrawRoute_result._Fields>, java.io.Serializable, Cloneable, Comparable<withdrawRoute_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("withdrawRoute_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new withdrawRoute_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new withdrawRoute_resultTupleSchemeFactory());
+    }
+
+    public int success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(withdrawRoute_result.class, metaDataMap);
+    }
+
+    public withdrawRoute_result() {
+    }
+
+    public withdrawRoute_result(
+      int success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public withdrawRoute_result(withdrawRoute_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public withdrawRoute_result deepCopy() {
+      return new withdrawRoute_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = 0;
+    }
+
+    public int getSuccess() {
+      return this.success;
+    }
+
+    public withdrawRoute_result setSuccess(int success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Integer.valueOf(getSuccess());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof withdrawRoute_result)
+        return this.equals((withdrawRoute_result)that);
+      return false;
+    }
+
+    public boolean equals(withdrawRoute_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(withdrawRoute_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("withdrawRoute_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class withdrawRoute_resultStandardSchemeFactory implements SchemeFactory {
+      public withdrawRoute_resultStandardScheme getScheme() {
+        return new withdrawRoute_resultStandardScheme();
+      }
+    }
+
+    private static class withdrawRoute_resultStandardScheme extends StandardScheme<withdrawRoute_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, withdrawRoute_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.success = iprot.readI32();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, withdrawRoute_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeI32(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class withdrawRoute_resultTupleSchemeFactory implements SchemeFactory {
+      public withdrawRoute_resultTupleScheme getScheme() {
+        return new withdrawRoute_resultTupleScheme();
+      }
+    }
+
+    private static class withdrawRoute_resultTupleScheme extends TupleScheme<withdrawRoute_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeI32(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readI32();
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class setEbgpMultihop_args implements org.apache.thrift.TBase<setEbgpMultihop_args, setEbgpMultihop_args._Fields>, java.io.Serializable, Cloneable, Comparable<setEbgpMultihop_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setEbgpMultihop_args");
+
+    private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField N_HOPS_FIELD_DESC = new org.apache.thrift.protocol.TField("nHops", org.apache.thrift.protocol.TType.I32, (short)2);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new setEbgpMultihop_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new setEbgpMultihop_argsTupleSchemeFactory());
+    }
+
+    public String peerIp; // required
+    public int nHops; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      PEER_IP((short)1, "peerIp"),
+      N_HOPS((short)2, "nHops");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // PEER_IP
+            return PEER_IP;
+          case 2: // N_HOPS
+            return N_HOPS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __NHOPS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.N_HOPS, new org.apache.thrift.meta_data.FieldMetaData("nHops", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
-      tmpMap.put(_Fields.KEEP_ALIVE_TIME, new org.apache.thrift.meta_data.FieldMetaData("keepAliveTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setEbgpMultihop_args.class, metaDataMap);
+    }
+
+    public setEbgpMultihop_args() {
+    }
+
+    public setEbgpMultihop_args(
+      String peerIp,
+      int nHops)
+    {
+      this();
+      this.peerIp = peerIp;
+      this.nHops = nHops;
+      setNHopsIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public setEbgpMultihop_args(setEbgpMultihop_args other) {
+      __isset_bitfield = other.__isset_bitfield;
+      if (other.isSetPeerIp()) {
+        this.peerIp = other.peerIp;
+      }
+      this.nHops = other.nHops;
+    }
+
+    public setEbgpMultihop_args deepCopy() {
+      return new setEbgpMultihop_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.peerIp = null;
+      setNHopsIsSet(false);
+      this.nHops = 0;
+    }
+
+    public String getPeerIp() {
+      return this.peerIp;
+    }
+
+    public setEbgpMultihop_args setPeerIp(String peerIp) {
+      this.peerIp = peerIp;
+      return this;
+    }
+
+    public void unsetPeerIp() {
+      this.peerIp = null;
+    }
+
+    /** Returns true if field peerIp is set (has been assigned a value) and false otherwise */
+    public boolean isSetPeerIp() {
+      return this.peerIp != null;
+    }
+
+    public void setPeerIpIsSet(boolean value) {
+      if (!value) {
+        this.peerIp = null;
+      }
+    }
+
+    public int getNHops() {
+      return this.nHops;
+    }
+
+    public setEbgpMultihop_args setNHops(int nHops) {
+      this.nHops = nHops;
+      setNHopsIsSet(true);
+      return this;
+    }
+
+    public void unsetNHops() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NHOPS_ISSET_ID);
+    }
+
+    /** Returns true if field nHops is set (has been assigned a value) and false otherwise */
+    public boolean isSetNHops() {
+      return EncodingUtils.testBit(__isset_bitfield, __NHOPS_ISSET_ID);
+    }
+
+    public void setNHopsIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NHOPS_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case PEER_IP:
+        if (value == null) {
+          unsetPeerIp();
+        } else {
+          setPeerIp((String)value);
+        }
+        break;
+
+      case N_HOPS:
+        if (value == null) {
+          unsetNHops();
+        } else {
+          setNHops((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case PEER_IP:
+        return getPeerIp();
+
+      case N_HOPS:
+        return Integer.valueOf(getNHops());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case PEER_IP:
+        return isSetPeerIp();
+      case N_HOPS:
+        return isSetNHops();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof setEbgpMultihop_args)
+        return this.equals((setEbgpMultihop_args)that);
+      return false;
+    }
+
+    public boolean equals(setEbgpMultihop_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_peerIp = true && this.isSetPeerIp();
+      boolean that_present_peerIp = true && that.isSetPeerIp();
+      if (this_present_peerIp || that_present_peerIp) {
+        if (!(this_present_peerIp && that_present_peerIp))
+          return false;
+        if (!this.peerIp.equals(that.peerIp))
+          return false;
+      }
+
+      boolean this_present_nHops = true;
+      boolean that_present_nHops = true;
+      if (this_present_nHops || that_present_nHops) {
+        if (!(this_present_nHops && that_present_nHops))
+          return false;
+        if (this.nHops != that.nHops)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(setEbgpMultihop_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetPeerIp()).compareTo(other.isSetPeerIp());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetPeerIp()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerIp, other.peerIp);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetNHops()).compareTo(other.isSetNHops());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetNHops()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nHops, other.nHops);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("setEbgpMultihop_args(");
+      boolean first = true;
+
+      sb.append("peerIp:");
+      if (this.peerIp == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.peerIp);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("nHops:");
+      sb.append(this.nHops);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class setEbgpMultihop_argsStandardSchemeFactory implements SchemeFactory {
+      public setEbgpMultihop_argsStandardScheme getScheme() {
+        return new setEbgpMultihop_argsStandardScheme();
+      }
+    }
+
+    private static class setEbgpMultihop_argsStandardScheme extends StandardScheme<setEbgpMultihop_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, setEbgpMultihop_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // PEER_IP
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.peerIp = iprot.readString();
+                struct.setPeerIpIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // N_HOPS
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.nHops = iprot.readI32();
+                struct.setNHopsIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, setEbgpMultihop_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.peerIp != null) {
+          oprot.writeFieldBegin(PEER_IP_FIELD_DESC);
+          oprot.writeString(struct.peerIp);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldBegin(N_HOPS_FIELD_DESC);
+        oprot.writeI32(struct.nHops);
+        oprot.writeFieldEnd();
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class setEbgpMultihop_argsTupleSchemeFactory implements SchemeFactory {
+      public setEbgpMultihop_argsTupleScheme getScheme() {
+        return new setEbgpMultihop_argsTupleScheme();
+      }
+    }
+
+    private static class setEbgpMultihop_argsTupleScheme extends TupleScheme<setEbgpMultihop_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, setEbgpMultihop_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetPeerIp()) {
+          optionals.set(0);
+        }
+        if (struct.isSetNHops()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetPeerIp()) {
+          oprot.writeString(struct.peerIp);
+        }
+        if (struct.isSetNHops()) {
+          oprot.writeI32(struct.nHops);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, setEbgpMultihop_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          struct.peerIp = iprot.readString();
+          struct.setPeerIpIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.nHops = iprot.readI32();
+          struct.setNHopsIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class setEbgpMultihop_result implements org.apache.thrift.TBase<setEbgpMultihop_result, setEbgpMultihop_result._Fields>, java.io.Serializable, Cloneable, Comparable<setEbgpMultihop_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setEbgpMultihop_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new setEbgpMultihop_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new setEbgpMultihop_resultTupleSchemeFactory());
+    }
+
+    public int success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startBgpServer_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setEbgpMultihop_result.class, metaDataMap);
+    }
+
+    public setEbgpMultihop_result() {
+    }
+
+    public setEbgpMultihop_result(
+      int success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public setEbgpMultihop_result(setEbgpMultihop_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public setEbgpMultihop_result deepCopy() {
+      return new setEbgpMultihop_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = 0;
+    }
+
+    public int getSuccess() {
+      return this.success;
+    }
+
+    public setEbgpMultihop_result setSuccess(int success) {
+      this.success = success;
+      setSuccessIsSet(true);
+      return this;
+    }
+
+    public void unsetSuccess() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return Integer.valueOf(getSuccess());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      }
+      throw new IllegalStateException();
     }
 
-    public startBgpServer_args() {
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof setEbgpMultihop_result)
+        return this.equals((setEbgpMultihop_result)that);
+      return false;
     }
 
-    public startBgpServer_args(
-      int asNumber,
-      String routerId,
-      int port,
-      int holdTime,
-      int keepAliveTime)
-    {
-      this();
-      this.asNumber = asNumber;
-      setAsNumberIsSet(true);
-      this.routerId = routerId;
-      this.port = port;
-      setPortIsSet(true);
-      this.holdTime = holdTime;
-      setHoldTimeIsSet(true);
-      this.keepAliveTime = keepAliveTime;
-      setKeepAliveTimeIsSet(true);
-    }
+    public boolean equals(setEbgpMultihop_result that) {
+      if (that == null)
+        return false;
 
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public startBgpServer_args(startBgpServer_args other) {
-      __isset_bitfield = other.__isset_bitfield;
-      this.asNumber = other.asNumber;
-      if (other.isSetRouterId()) {
-        this.routerId = other.routerId;
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
       }
-      this.port = other.port;
-      this.holdTime = other.holdTime;
-      this.keepAliveTime = other.keepAliveTime;
-    }
 
-    public startBgpServer_args deepCopy() {
-      return new startBgpServer_args(this);
+      return true;
     }
 
     @Override
-    public void clear() {
-      setAsNumberIsSet(false);
-      this.asNumber = 0;
-      this.routerId = null;
-      setPortIsSet(false);
-      this.port = 0;
-      setHoldTimeIsSet(false);
-      this.holdTime = 0;
-      setKeepAliveTimeIsSet(false);
-      this.keepAliveTime = 0;
+    public int hashCode() {
+      return 0;
     }
 
-    public int getAsNumber() {
-      return this.asNumber;
-    }
+    @Override
+    public int compareTo(setEbgpMultihop_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
 
-    public startBgpServer_args setAsNumber(int asNumber) {
-      this.asNumber = asNumber;
-      setAsNumberIsSet(true);
-      return this;
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
     }
 
-    public void unsetAsNumber() {
-      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
     }
 
-    /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */
-    public boolean isSetAsNumber() {
-      return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
-    public void setAsNumberIsSet(boolean value) {
-      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value);
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("setEbgpMultihop_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      sb.append(this.success);
+      first = false;
+      sb.append(")");
+      return sb.toString();
     }
 
-    public String getRouterId() {
-      return this.routerId;
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
     }
 
-    public startBgpServer_args setRouterId(String routerId) {
-      this.routerId = routerId;
-      return this;
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
     }
 
-    public void unsetRouterId() {
-      this.routerId = null;
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
     }
 
-    /** Returns true if field routerId is set (has been assigned a value) and false otherwise */
-    public boolean isSetRouterId() {
-      return this.routerId != null;
+    private static class setEbgpMultihop_resultStandardSchemeFactory implements SchemeFactory {
+      public setEbgpMultihop_resultStandardScheme getScheme() {
+        return new setEbgpMultihop_resultStandardScheme();
+      }
     }
 
-    public void setRouterIdIsSet(boolean value) {
-      if (!value) {
-        this.routerId = null;
+    private static class setEbgpMultihop_resultStandardScheme extends StandardScheme<setEbgpMultihop_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, setEbgpMultihop_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.success = iprot.readI32();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, setEbgpMultihop_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeI32(struct.success);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
       }
+
     }
 
-    public int getPort() {
-      return this.port;
+    private static class setEbgpMultihop_resultTupleSchemeFactory implements SchemeFactory {
+      public setEbgpMultihop_resultTupleScheme getScheme() {
+        return new setEbgpMultihop_resultTupleScheme();
+      }
     }
 
-    public startBgpServer_args setPort(int port) {
-      this.port = port;
-      setPortIsSet(true);
-      return this;
+    private static class setEbgpMultihop_resultTupleScheme extends TupleScheme<setEbgpMultihop_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, setEbgpMultihop_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSuccess()) {
+          oprot.writeI32(struct.success);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, setEbgpMultihop_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = iprot.readI32();
+          struct.setSuccessIsSet(true);
+        }
+      }
     }
 
-    public void unsetPort() {
-      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
+  }
+
+  public static class unsetEbgpMultihop_args implements org.apache.thrift.TBase<unsetEbgpMultihop_args, unsetEbgpMultihop_args._Fields>, java.io.Serializable, Cloneable, Comparable<unsetEbgpMultihop_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unsetEbgpMultihop_args");
+
+    private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new unsetEbgpMultihop_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new unsetEbgpMultihop_argsTupleSchemeFactory());
     }
 
-    /** Returns true if field port is set (has been assigned a value) and false otherwise */
-    public boolean isSetPort() {
-      return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
+    public String peerIp; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      PEER_IP((short)1, "peerIp");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // PEER_IP
+            return PEER_IP;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
     }
 
-    public void setPortIsSet(boolean value) {
-      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unsetEbgpMultihop_args.class, metaDataMap);
     }
 
-    public int getHoldTime() {
-      return this.holdTime;
+    public unsetEbgpMultihop_args() {
     }
 
-    public startBgpServer_args setHoldTime(int holdTime) {
-      this.holdTime = holdTime;
-      setHoldTimeIsSet(true);
-      return this;
+    public unsetEbgpMultihop_args(
+      String peerIp)
+    {
+      this();
+      this.peerIp = peerIp;
     }
 
-    public void unsetHoldTime() {
-      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public unsetEbgpMultihop_args(unsetEbgpMultihop_args other) {
+      if (other.isSetPeerIp()) {
+        this.peerIp = other.peerIp;
+      }
     }
 
-    /** Returns true if field holdTime is set (has been assigned a value) and false otherwise */
-    public boolean isSetHoldTime() {
-      return EncodingUtils.testBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
+    public unsetEbgpMultihop_args deepCopy() {
+      return new unsetEbgpMultihop_args(this);
     }
 
-    public void setHoldTimeIsSet(boolean value) {
-      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HOLDTIME_ISSET_ID, value);
+    @Override
+    public void clear() {
+      this.peerIp = null;
     }
 
-    public int getKeepAliveTime() {
-      return this.keepAliveTime;
+    public String getPeerIp() {
+      return this.peerIp;
     }
 
-    public startBgpServer_args setKeepAliveTime(int keepAliveTime) {
-      this.keepAliveTime = keepAliveTime;
-      setKeepAliveTimeIsSet(true);
+    public unsetEbgpMultihop_args setPeerIp(String peerIp) {
+      this.peerIp = peerIp;
       return this;
     }
 
-    public void unsetKeepAliveTime() {
-      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID);
+    public void unsetPeerIp() {
+      this.peerIp = null;
     }
 
-    /** Returns true if field keepAliveTime is set (has been assigned a value) and false otherwise */
-    public boolean isSetKeepAliveTime() {
-      return EncodingUtils.testBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID);
+    /** Returns true if field peerIp is set (has been assigned a value) and false otherwise */
+    public boolean isSetPeerIp() {
+      return this.peerIp != null;
     }
 
-    public void setKeepAliveTimeIsSet(boolean value) {
-      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID, value);
+    public void setPeerIpIsSet(boolean value) {
+      if (!value) {
+        this.peerIp = null;
+      }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case AS_NUMBER:
-        if (value == null) {
-          unsetAsNumber();
-        } else {
-          setAsNumber((Integer)value);
-        }
-        break;
-
-      case ROUTER_ID:
-        if (value == null) {
-          unsetRouterId();
-        } else {
-          setRouterId((String)value);
-        }
-        break;
-
-      case PORT:
-        if (value == null) {
-          unsetPort();
-        } else {
-          setPort((Integer)value);
-        }
-        break;
-
-      case HOLD_TIME:
-        if (value == null) {
-          unsetHoldTime();
-        } else {
-          setHoldTime((Integer)value);
-        }
-        break;
-
-      case KEEP_ALIVE_TIME:
+      case PEER_IP:
         if (value == null) {
-          unsetKeepAliveTime();
+          unsetPeerIp();
         } else {
-          setKeepAliveTime((Integer)value);
+          setPeerIp((String)value);
         }
         break;
 
@@ -1692,20 +10583,8 @@ public class BgpConfigurator {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case AS_NUMBER:
-        return Integer.valueOf(getAsNumber());
-
-      case ROUTER_ID:
-        return getRouterId();
-
-      case PORT:
-        return Integer.valueOf(getPort());
-
-      case HOLD_TIME:
-        return Integer.valueOf(getHoldTime());
-
-      case KEEP_ALIVE_TIME:
-        return Integer.valueOf(getKeepAliveTime());
+      case PEER_IP:
+        return getPeerIp();
 
       }
       throw new IllegalStateException();
@@ -1718,16 +10597,8 @@ public class BgpConfigurator {
       }
 
       switch (field) {
-      case AS_NUMBER:
-        return isSetAsNumber();
-      case ROUTER_ID:
-        return isSetRouterId();
-      case PORT:
-        return isSetPort();
-      case HOLD_TIME:
-        return isSetHoldTime();
-      case KEEP_ALIVE_TIME:
-        return isSetKeepAliveTime();
+      case PEER_IP:
+        return isSetPeerIp();
       }
       throw new IllegalStateException();
     }
@@ -1736,57 +10607,21 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof startBgpServer_args)
-        return this.equals((startBgpServer_args)that);
+      if (that instanceof unsetEbgpMultihop_args)
+        return this.equals((unsetEbgpMultihop_args)that);
       return false;
     }
 
-    public boolean equals(startBgpServer_args that) {
+    public boolean equals(unsetEbgpMultihop_args that) {
       if (that == null)
         return false;
 
-      boolean this_present_asNumber = true;
-      boolean that_present_asNumber = true;
-      if (this_present_asNumber || that_present_asNumber) {
-        if (!(this_present_asNumber && that_present_asNumber))
-          return false;
-        if (this.asNumber != that.asNumber)
-          return false;
-      }
-
-      boolean this_present_routerId = true && this.isSetRouterId();
-      boolean that_present_routerId = true && that.isSetRouterId();
-      if (this_present_routerId || that_present_routerId) {
-        if (!(this_present_routerId && that_present_routerId))
-          return false;
-        if (!this.routerId.equals(that.routerId))
-          return false;
-      }
-
-      boolean this_present_port = true;
-      boolean that_present_port = true;
-      if (this_present_port || that_present_port) {
-        if (!(this_present_port && that_present_port))
-          return false;
-        if (this.port != that.port)
-          return false;
-      }
-
-      boolean this_present_holdTime = true;
-      boolean that_present_holdTime = true;
-      if (this_present_holdTime || that_present_holdTime) {
-        if (!(this_present_holdTime && that_present_holdTime))
-          return false;
-        if (this.holdTime != that.holdTime)
-          return false;
-      }
-
-      boolean this_present_keepAliveTime = true;
-      boolean that_present_keepAliveTime = true;
-      if (this_present_keepAliveTime || that_present_keepAliveTime) {
-        if (!(this_present_keepAliveTime && that_present_keepAliveTime))
+      boolean this_present_peerIp = true && this.isSetPeerIp();
+      boolean that_present_peerIp = true && that.isSetPeerIp();
+      if (this_present_peerIp || that_present_peerIp) {
+        if (!(this_present_peerIp && that_present_peerIp))
           return false;
-        if (this.keepAliveTime != that.keepAliveTime)
+        if (!this.peerIp.equals(that.peerIp))
           return false;
       }
 
@@ -1799,59 +10634,19 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(startBgpServer_args other) {
+    public int compareTo(unsetEbgpMultihop_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetAsNumber()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetRouterId()).compareTo(other.isSetRouterId());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetRouterId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.routerId, other.routerId);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetPort()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetHoldTime()).compareTo(other.isSetHoldTime());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetHoldTime()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.holdTime, other.holdTime);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetKeepAliveTime()).compareTo(other.isSetKeepAliveTime());
+      lastComparison = Boolean.valueOf(isSetPeerIp()).compareTo(other.isSetPeerIp());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetKeepAliveTime()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keepAliveTime, other.keepAliveTime);
+      if (isSetPeerIp()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerIp, other.peerIp);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -1873,32 +10668,16 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("startBgpServer_args(");
+      StringBuilder sb = new StringBuilder("unsetEbgpMultihop_args(");
       boolean first = true;
 
-      sb.append("asNumber:");
-      sb.append(this.asNumber);
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("routerId:");
-      if (this.routerId == null) {
+      sb.append("peerIp:");
+      if (this.peerIp == null) {
         sb.append("null");
       } else {
-        sb.append(this.routerId);
+        sb.append(this.peerIp);
       }
       first = false;
-      if (!first) sb.append(", ");
-      sb.append("port:");
-      sb.append(this.port);
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("holdTime:");
-      sb.append(this.holdTime);
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("keepAliveTime:");
-      sb.append(this.keepAliveTime);
-      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -1918,68 +10697,34 @@ public class BgpConfigurator {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-        __isset_bitfield = 0;
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
       }
     }
 
-    private static class startBgpServer_argsStandardSchemeFactory implements SchemeFactory {
-      public startBgpServer_argsStandardScheme getScheme() {
-        return new startBgpServer_argsStandardScheme();
+    private static class unsetEbgpMultihop_argsStandardSchemeFactory implements SchemeFactory {
+      public unsetEbgpMultihop_argsStandardScheme getScheme() {
+        return new unsetEbgpMultihop_argsStandardScheme();
       }
     }
 
-    private static class startBgpServer_argsStandardScheme extends StandardScheme<startBgpServer_args> {
+    private static class unsetEbgpMultihop_argsStandardScheme extends StandardScheme<unsetEbgpMultihop_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, startBgpServer_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, unsetEbgpMultihop_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
         {
           schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 1: // AS_NUMBER
-              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-                struct.asNumber = iprot.readI32();
-                struct.setAsNumberIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 2: // ROUTER_ID
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.routerId = iprot.readString();
-                struct.setRouterIdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 3: // PORT
-              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-                struct.port = iprot.readI32();
-                struct.setPortIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 4: // HOLD_TIME
-              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-                struct.holdTime = iprot.readI32();
-                struct.setHoldTimeIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 5: // KEEP_ALIVE_TIME
-              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-                struct.keepAliveTime = iprot.readI32();
-                struct.setKeepAliveTimeIsSet(true);
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // PEER_IP
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.peerIp = iprot.readString();
+                struct.setPeerIpIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -1995,116 +10740,64 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, startBgpServer_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, unsetEbgpMultihop_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC);
-        oprot.writeI32(struct.asNumber);
-        oprot.writeFieldEnd();
-        if (struct.routerId != null) {
-          oprot.writeFieldBegin(ROUTER_ID_FIELD_DESC);
-          oprot.writeString(struct.routerId);
+        if (struct.peerIp != null) {
+          oprot.writeFieldBegin(PEER_IP_FIELD_DESC);
+          oprot.writeString(struct.peerIp);
           oprot.writeFieldEnd();
         }
-        oprot.writeFieldBegin(PORT_FIELD_DESC);
-        oprot.writeI32(struct.port);
-        oprot.writeFieldEnd();
-        oprot.writeFieldBegin(HOLD_TIME_FIELD_DESC);
-        oprot.writeI32(struct.holdTime);
-        oprot.writeFieldEnd();
-        oprot.writeFieldBegin(KEEP_ALIVE_TIME_FIELD_DESC);
-        oprot.writeI32(struct.keepAliveTime);
-        oprot.writeFieldEnd();
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
 
     }
 
-    private static class startBgpServer_argsTupleSchemeFactory implements SchemeFactory {
-      public startBgpServer_argsTupleScheme getScheme() {
-        return new startBgpServer_argsTupleScheme();
+    private static class unsetEbgpMultihop_argsTupleSchemeFactory implements SchemeFactory {
+      public unsetEbgpMultihop_argsTupleScheme getScheme() {
+        return new unsetEbgpMultihop_argsTupleScheme();
       }
     }
 
-    private static class startBgpServer_argsTupleScheme extends TupleScheme<startBgpServer_args> {
+    private static class unsetEbgpMultihop_argsTupleScheme extends TupleScheme<unsetEbgpMultihop_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, startBgpServer_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, unsetEbgpMultihop_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
-        if (struct.isSetAsNumber()) {
+        if (struct.isSetPeerIp()) {
           optionals.set(0);
         }
-        if (struct.isSetRouterId()) {
-          optionals.set(1);
-        }
-        if (struct.isSetPort()) {
-          optionals.set(2);
-        }
-        if (struct.isSetHoldTime()) {
-          optionals.set(3);
-        }
-        if (struct.isSetKeepAliveTime()) {
-          optionals.set(4);
-        }
-        oprot.writeBitSet(optionals, 5);
-        if (struct.isSetAsNumber()) {
-          oprot.writeI32(struct.asNumber);
-        }
-        if (struct.isSetRouterId()) {
-          oprot.writeString(struct.routerId);
-        }
-        if (struct.isSetPort()) {
-          oprot.writeI32(struct.port);
-        }
-        if (struct.isSetHoldTime()) {
-          oprot.writeI32(struct.holdTime);
-        }
-        if (struct.isSetKeepAliveTime()) {
-          oprot.writeI32(struct.keepAliveTime);
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetPeerIp()) {
+          oprot.writeString(struct.peerIp);
         }
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, startBgpServer_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, unsetEbgpMultihop_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(5);
+        BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
-          struct.asNumber = iprot.readI32();
-          struct.setAsNumberIsSet(true);
-        }
-        if (incoming.get(1)) {
-          struct.routerId = iprot.readString();
-          struct.setRouterIdIsSet(true);
-        }
-        if (incoming.get(2)) {
-          struct.port = iprot.readI32();
-          struct.setPortIsSet(true);
-        }
-        if (incoming.get(3)) {
-          struct.holdTime = iprot.readI32();
-          struct.setHoldTimeIsSet(true);
-        }
-        if (incoming.get(4)) {
-          struct.keepAliveTime = iprot.readI32();
-          struct.setKeepAliveTimeIsSet(true);
+          struct.peerIp = iprot.readString();
+          struct.setPeerIpIsSet(true);
         }
       }
     }
 
   }
 
-  public static class startBgpServer_result implements org.apache.thrift.TBase<startBgpServer_result, startBgpServer_result._Fields>, java.io.Serializable, Cloneable, Comparable<startBgpServer_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startBgpServer_result");
+  public static class unsetEbgpMultihop_result implements org.apache.thrift.TBase<unsetEbgpMultihop_result, unsetEbgpMultihop_result._Fields>, java.io.Serializable, Cloneable, Comparable<unsetEbgpMultihop_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unsetEbgpMultihop_result");
 
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new startBgpServer_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new startBgpServer_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new unsetEbgpMultihop_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new unsetEbgpMultihop_resultTupleSchemeFactory());
     }
 
     public int success; // required
@@ -2176,13 +10869,13 @@ public class BgpConfigurator {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startBgpServer_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unsetEbgpMultihop_result.class, metaDataMap);
     }
 
-    public startBgpServer_result() {
+    public unsetEbgpMultihop_result() {
     }
 
-    public startBgpServer_result(
+    public unsetEbgpMultihop_result(
       int success)
     {
       this();
@@ -2193,13 +10886,13 @@ public class BgpConfigurator {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public startBgpServer_result(startBgpServer_result other) {
+    public unsetEbgpMultihop_result(unsetEbgpMultihop_result other) {
       __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
     }
 
-    public startBgpServer_result deepCopy() {
-      return new startBgpServer_result(this);
+    public unsetEbgpMultihop_result deepCopy() {
+      return new unsetEbgpMultihop_result(this);
     }
 
     @Override
@@ -2212,7 +10905,7 @@ public class BgpConfigurator {
       return this.success;
     }
 
-    public startBgpServer_result setSuccess(int success) {
+    public unsetEbgpMultihop_result setSuccess(int success) {
       this.success = success;
       setSuccessIsSet(true);
       return this;
@@ -2270,12 +10963,12 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof startBgpServer_result)
-        return this.equals((startBgpServer_result)that);
+      if (that instanceof unsetEbgpMultihop_result)
+        return this.equals((unsetEbgpMultihop_result)that);
       return false;
     }
 
-    public boolean equals(startBgpServer_result that) {
+    public boolean equals(unsetEbgpMultihop_result that) {
       if (that == null)
         return false;
 
@@ -2297,7 +10990,7 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(startBgpServer_result other) {
+    public int compareTo(unsetEbgpMultihop_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -2331,7 +11024,7 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("startBgpServer_result(");
+      StringBuilder sb = new StringBuilder("unsetEbgpMultihop_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -2364,15 +11057,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class startBgpServer_resultStandardSchemeFactory implements SchemeFactory {
-      public startBgpServer_resultStandardScheme getScheme() {
-        return new startBgpServer_resultStandardScheme();
+    private static class unsetEbgpMultihop_resultStandardSchemeFactory implements SchemeFactory {
+      public unsetEbgpMultihop_resultStandardScheme getScheme() {
+        return new unsetEbgpMultihop_resultStandardScheme();
       }
     }
 
-    private static class startBgpServer_resultStandardScheme extends StandardScheme<startBgpServer_result> {
+    private static class unsetEbgpMultihop_resultStandardScheme extends StandardScheme<unsetEbgpMultihop_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, startBgpServer_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, unsetEbgpMultihop_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -2401,7 +11094,7 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, startBgpServer_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, unsetEbgpMultihop_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -2416,16 +11109,16 @@ public class BgpConfigurator {
 
     }
 
-    private static class startBgpServer_resultTupleSchemeFactory implements SchemeFactory {
-      public startBgpServer_resultTupleScheme getScheme() {
-        return new startBgpServer_resultTupleScheme();
+    private static class unsetEbgpMultihop_resultTupleSchemeFactory implements SchemeFactory {
+      public unsetEbgpMultihop_resultTupleScheme getScheme() {
+        return new unsetEbgpMultihop_resultTupleScheme();
       }
     }
 
-    private static class startBgpServer_resultTupleScheme extends TupleScheme<startBgpServer_result> {
+    private static class unsetEbgpMultihop_resultTupleScheme extends TupleScheme<unsetEbgpMultihop_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, startBgpServer_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, unsetEbgpMultihop_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -2438,7 +11131,7 @@ public class BgpConfigurator {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, startBgpServer_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, unsetEbgpMultihop_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
@@ -2450,20 +11143,25 @@ public class BgpConfigurator {
 
   }
 
-  public static class stopBgpServer_args implements org.apache.thrift.TBase<stopBgpServer_args, stopBgpServer_args._Fields>, java.io.Serializable, Cloneable, Comparable<stopBgpServer_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stopBgpServer_args");
+  public static class setUpdateSource_args implements org.apache.thrift.TBase<setUpdateSource_args, setUpdateSource_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUpdateSource_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUpdateSource_args");
 
+    private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField SRC_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("srcIp", org.apache.thrift.protocol.TType.STRING, (short)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new stopBgpServer_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new stopBgpServer_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new setUpdateSource_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new setUpdateSource_argsTupleSchemeFactory());
     }
 
+    public String peerIp; // required
+    public String srcIp; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
+      PEER_IP((short)1, "peerIp"),
+      SRC_IP((short)2, "srcIp");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -2478,6 +11176,10 @@ public class BgpConfigurator {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
+          case 1: // PEER_IP
+            return PEER_IP;
+          case 2: // SRC_IP
+            return SRC_IP;
           default:
             return null;
         }
@@ -2516,37 +11218,130 @@ public class BgpConfigurator {
         return _fieldName;
       }
     }
+
+    // isset id assignments
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.SRC_IP, new org.apache.thrift.meta_data.FieldMetaData("srcIp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopBgpServer_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUpdateSource_args.class, metaDataMap);
     }
 
-    public stopBgpServer_args() {
+    public setUpdateSource_args() {
+    }
+
+    public setUpdateSource_args(
+      String peerIp,
+      String srcIp)
+    {
+      this();
+      this.peerIp = peerIp;
+      this.srcIp = srcIp;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public stopBgpServer_args(stopBgpServer_args other) {
+    public setUpdateSource_args(setUpdateSource_args other) {
+      if (other.isSetPeerIp()) {
+        this.peerIp = other.peerIp;
+      }
+      if (other.isSetSrcIp()) {
+        this.srcIp = other.srcIp;
+      }
     }
 
-    public stopBgpServer_args deepCopy() {
-      return new stopBgpServer_args(this);
+    public setUpdateSource_args deepCopy() {
+      return new setUpdateSource_args(this);
     }
 
     @Override
     public void clear() {
+      this.peerIp = null;
+      this.srcIp = null;
+    }
+
+    public String getPeerIp() {
+      return this.peerIp;
+    }
+
+    public setUpdateSource_args setPeerIp(String peerIp) {
+      this.peerIp = peerIp;
+      return this;
+    }
+
+    public void unsetPeerIp() {
+      this.peerIp = null;
+    }
+
+    /** Returns true if field peerIp is set (has been assigned a value) and false otherwise */
+    public boolean isSetPeerIp() {
+      return this.peerIp != null;
+    }
+
+    public void setPeerIpIsSet(boolean value) {
+      if (!value) {
+        this.peerIp = null;
+      }
+    }
+
+    public String getSrcIp() {
+      return this.srcIp;
+    }
+
+    public setUpdateSource_args setSrcIp(String srcIp) {
+      this.srcIp = srcIp;
+      return this;
+    }
+
+    public void unsetSrcIp() {
+      this.srcIp = null;
+    }
+
+    /** Returns true if field srcIp is set (has been assigned a value) and false otherwise */
+    public boolean isSetSrcIp() {
+      return this.srcIp != null;
+    }
+
+    public void setSrcIpIsSet(boolean value) {
+      if (!value) {
+        this.srcIp = null;
+      }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
+      case PEER_IP:
+        if (value == null) {
+          unsetPeerIp();
+        } else {
+          setPeerIp((String)value);
+        }
+        break;
+
+      case SRC_IP:
+        if (value == null) {
+          unsetSrcIp();
+        } else {
+          setSrcIp((String)value);
+        }
+        break;
+
       }
     }
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
+      case PEER_IP:
+        return getPeerIp();
+
+      case SRC_IP:
+        return getSrcIp();
+
       }
       throw new IllegalStateException();
     }
@@ -2558,6 +11353,10 @@ public class BgpConfigurator {
       }
 
       switch (field) {
+      case PEER_IP:
+        return isSetPeerIp();
+      case SRC_IP:
+        return isSetSrcIp();
       }
       throw new IllegalStateException();
     }
@@ -2566,15 +11365,33 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof stopBgpServer_args)
-        return this.equals((stopBgpServer_args)that);
+      if (that instanceof setUpdateSource_args)
+        return this.equals((setUpdateSource_args)that);
       return false;
     }
 
-    public boolean equals(stopBgpServer_args that) {
+    public boolean equals(setUpdateSource_args that) {
       if (that == null)
         return false;
 
+      boolean this_present_peerIp = true && this.isSetPeerIp();
+      boolean that_present_peerIp = true && that.isSetPeerIp();
+      if (this_present_peerIp || that_present_peerIp) {
+        if (!(this_present_peerIp && that_present_peerIp))
+          return false;
+        if (!this.peerIp.equals(that.peerIp))
+          return false;
+      }
+
+      boolean this_present_srcIp = true && this.isSetSrcIp();
+      boolean that_present_srcIp = true && that.isSetSrcIp();
+      if (this_present_srcIp || that_present_srcIp) {
+        if (!(this_present_srcIp && that_present_srcIp))
+          return false;
+        if (!this.srcIp.equals(that.srcIp))
+          return false;
+      }
+
       return true;
     }
 
@@ -2584,13 +11401,33 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(stopBgpServer_args other) {
+    public int compareTo(setUpdateSource_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
 
+      lastComparison = Boolean.valueOf(isSetPeerIp()).compareTo(other.isSetPeerIp());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetPeerIp()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerIp, other.peerIp);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetSrcIp()).compareTo(other.isSetSrcIp());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSrcIp()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.srcIp, other.srcIp);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -2608,9 +11445,24 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("stopBgpServer_args(");
+      StringBuilder sb = new StringBuilder("setUpdateSource_args(");
       boolean first = true;
 
+      sb.append("peerIp:");
+      if (this.peerIp == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.peerIp);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("srcIp:");
+      if (this.srcIp == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.srcIp);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -2636,15 +11488,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class stopBgpServer_argsStandardSchemeFactory implements SchemeFactory {
-      public stopBgpServer_argsStandardScheme getScheme() {
-        return new stopBgpServer_argsStandardScheme();
+    private static class setUpdateSource_argsStandardSchemeFactory implements SchemeFactory {
+      public setUpdateSource_argsStandardScheme getScheme() {
+        return new setUpdateSource_argsStandardScheme();
       }
     }
 
-    private static class stopBgpServer_argsStandardScheme extends StandardScheme<stopBgpServer_args> {
+    private static class setUpdateSource_argsStandardScheme extends StandardScheme<setUpdateSource_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, stopBgpServer_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, setUpdateSource_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -2654,6 +11506,22 @@ public class BgpConfigurator {
             break;
           }
           switch (schemeField.id) {
+            case 1: // PEER_IP
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.peerIp = iprot.readString();
+                struct.setPeerIpIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // SRC_IP
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.srcIp = iprot.readString();
+                struct.setSrcIpIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -2665,46 +11533,79 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, stopBgpServer_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, setUpdateSource_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.peerIp != null) {
+          oprot.writeFieldBegin(PEER_IP_FIELD_DESC);
+          oprot.writeString(struct.peerIp);
+          oprot.writeFieldEnd();
+        }
+        if (struct.srcIp != null) {
+          oprot.writeFieldBegin(SRC_IP_FIELD_DESC);
+          oprot.writeString(struct.srcIp);
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
 
     }
 
-    private static class stopBgpServer_argsTupleSchemeFactory implements SchemeFactory {
-      public stopBgpServer_argsTupleScheme getScheme() {
-        return new stopBgpServer_argsTupleScheme();
+    private static class setUpdateSource_argsTupleSchemeFactory implements SchemeFactory {
+      public setUpdateSource_argsTupleScheme getScheme() {
+        return new setUpdateSource_argsTupleScheme();
       }
     }
 
-    private static class stopBgpServer_argsTupleScheme extends TupleScheme<stopBgpServer_args> {
+    private static class setUpdateSource_argsTupleScheme extends TupleScheme<setUpdateSource_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, setUpdateSource_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetPeerIp()) {
+          optionals.set(0);
+        }
+        if (struct.isSetSrcIp()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetPeerIp()) {
+          oprot.writeString(struct.peerIp);
+        }
+        if (struct.isSetSrcIp()) {
+          oprot.writeString(struct.srcIp);
+        }
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, setUpdateSource_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          struct.peerIp = iprot.readString();
+          struct.setPeerIpIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.srcIp = iprot.readString();
+          struct.setSrcIpIsSet(true);
+        }
       }
     }
 
   }
 
-  public static class stopBgpServer_result implements org.apache.thrift.TBase<stopBgpServer_result, stopBgpServer_result._Fields>, java.io.Serializable, Cloneable, Comparable<stopBgpServer_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stopBgpServer_result");
+  public static class setUpdateSource_result implements org.apache.thrift.TBase<setUpdateSource_result, setUpdateSource_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUpdateSource_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUpdateSource_result");
 
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new stopBgpServer_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new stopBgpServer_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new setUpdateSource_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new setUpdateSource_resultTupleSchemeFactory());
     }
 
     public int success; // required
@@ -2776,13 +11677,13 @@ public class BgpConfigurator {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopBgpServer_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUpdateSource_result.class, metaDataMap);
     }
 
-    public stopBgpServer_result() {
+    public setUpdateSource_result() {
     }
 
-    public stopBgpServer_result(
+    public setUpdateSource_result(
       int success)
     {
       this();
@@ -2793,13 +11694,13 @@ public class BgpConfigurator {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public stopBgpServer_result(stopBgpServer_result other) {
+    public setUpdateSource_result(setUpdateSource_result other) {
       __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
     }
 
-    public stopBgpServer_result deepCopy() {
-      return new stopBgpServer_result(this);
+    public setUpdateSource_result deepCopy() {
+      return new setUpdateSource_result(this);
     }
 
     @Override
@@ -2812,7 +11713,7 @@ public class BgpConfigurator {
       return this.success;
     }
 
-    public stopBgpServer_result setSuccess(int success) {
+    public setUpdateSource_result setSuccess(int success) {
       this.success = success;
       setSuccessIsSet(true);
       return this;
@@ -2870,12 +11771,12 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof stopBgpServer_result)
-        return this.equals((stopBgpServer_result)that);
+      if (that instanceof setUpdateSource_result)
+        return this.equals((setUpdateSource_result)that);
       return false;
     }
 
-    public boolean equals(stopBgpServer_result that) {
+    public boolean equals(setUpdateSource_result that) {
       if (that == null)
         return false;
 
@@ -2897,7 +11798,7 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(stopBgpServer_result other) {
+    public int compareTo(setUpdateSource_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -2931,7 +11832,7 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("stopBgpServer_result(");
+      StringBuilder sb = new StringBuilder("setUpdateSource_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -2964,15 +11865,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class stopBgpServer_resultStandardSchemeFactory implements SchemeFactory {
-      public stopBgpServer_resultStandardScheme getScheme() {
-        return new stopBgpServer_resultStandardScheme();
+    private static class setUpdateSource_resultStandardSchemeFactory implements SchemeFactory {
+      public setUpdateSource_resultStandardScheme getScheme() {
+        return new setUpdateSource_resultStandardScheme();
       }
     }
 
-    private static class stopBgpServer_resultStandardScheme extends StandardScheme<stopBgpServer_result> {
+    private static class setUpdateSource_resultStandardScheme extends StandardScheme<setUpdateSource_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, stopBgpServer_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, setUpdateSource_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -3001,7 +11902,7 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, stopBgpServer_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, setUpdateSource_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -3016,16 +11917,16 @@ public class BgpConfigurator {
 
     }
 
-    private static class stopBgpServer_resultTupleSchemeFactory implements SchemeFactory {
-      public stopBgpServer_resultTupleScheme getScheme() {
-        return new stopBgpServer_resultTupleScheme();
+    private static class setUpdateSource_resultTupleSchemeFactory implements SchemeFactory {
+      public setUpdateSource_resultTupleScheme getScheme() {
+        return new setUpdateSource_resultTupleScheme();
       }
     }
 
-    private static class stopBgpServer_resultTupleScheme extends TupleScheme<stopBgpServer_result> {
+    private static class setUpdateSource_resultTupleScheme extends TupleScheme<setUpdateSource_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, setUpdateSource_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -3038,7 +11939,7 @@ public class BgpConfigurator {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, setUpdateSource_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
@@ -3050,25 +11951,22 @@ public class BgpConfigurator {
 
   }
 
-  public static class createPeer_args implements org.apache.thrift.TBase<createPeer_args, createPeer_args._Fields>, java.io.Serializable, Cloneable, Comparable<createPeer_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPeer_args");
+  public static class unsetUpdateSource_args implements org.apache.thrift.TBase<unsetUpdateSource_args, unsetUpdateSource_args._Fields>, java.io.Serializable, Cloneable, Comparable<unsetUpdateSource_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unsetUpdateSource_args");
 
-    private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I32, (short)2);
+    private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new createPeer_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new createPeer_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new unsetUpdateSource_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new unsetUpdateSource_argsTupleSchemeFactory());
     }
 
-    public String ipAddress; // required
-    public int asNumber; // required
+    public String peerIp; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      IP_ADDRESS((short)1, "ipAddress"),
-      AS_NUMBER((short)2, "asNumber");
+      PEER_IP((short)1, "peerIp");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -3083,10 +11981,8 @@ public class BgpConfigurator {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // IP_ADDRESS
-            return IP_ADDRESS;
-          case 2: // AS_NUMBER
-            return AS_NUMBER;
+          case 1: // PEER_IP
+            return PEER_IP;
           default:
             return null;
         }
@@ -3127,116 +12023,74 @@ public class BgpConfigurator {
     }
 
     // isset id assignments
-    private static final int __ASNUMBER_ISSET_ID = 0;
-    private byte __isset_bitfield = 0;
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+      tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPeer_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unsetUpdateSource_args.class, metaDataMap);
     }
 
-    public createPeer_args() {
+    public unsetUpdateSource_args() {
     }
 
-    public createPeer_args(
-      String ipAddress,
-      int asNumber)
+    public unsetUpdateSource_args(
+      String peerIp)
     {
       this();
-      this.ipAddress = ipAddress;
-      this.asNumber = asNumber;
-      setAsNumberIsSet(true);
+      this.peerIp = peerIp;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public createPeer_args(createPeer_args other) {
-      __isset_bitfield = other.__isset_bitfield;
-      if (other.isSetIpAddress()) {
-        this.ipAddress = other.ipAddress;
+    public unsetUpdateSource_args(unsetUpdateSource_args other) {
+      if (other.isSetPeerIp()) {
+        this.peerIp = other.peerIp;
       }
-      this.asNumber = other.asNumber;
     }
 
-    public createPeer_args deepCopy() {
-      return new createPeer_args(this);
+    public unsetUpdateSource_args deepCopy() {
+      return new unsetUpdateSource_args(this);
     }
 
     @Override
     public void clear() {
-      this.ipAddress = null;
-      setAsNumberIsSet(false);
-      this.asNumber = 0;
+      this.peerIp = null;
     }
 
-    public String getIpAddress() {
-      return this.ipAddress;
+    public String getPeerIp() {
+      return this.peerIp;
     }
 
-    public createPeer_args setIpAddress(String ipAddress) {
-      this.ipAddress = ipAddress;
+    public unsetUpdateSource_args setPeerIp(String peerIp) {
+      this.peerIp = peerIp;
       return this;
     }
 
-    public void unsetIpAddress() {
-      this.ipAddress = null;
+    public void unsetPeerIp() {
+      this.peerIp = null;
     }
 
-    /** Returns true if field ipAddress is set (has been assigned a value) and false otherwise */
-    public boolean isSetIpAddress() {
-      return this.ipAddress != null;
+    /** Returns true if field peerIp is set (has been assigned a value) and false otherwise */
+    public boolean isSetPeerIp() {
+      return this.peerIp != null;
     }
 
-    public void setIpAddressIsSet(boolean value) {
+    public void setPeerIpIsSet(boolean value) {
       if (!value) {
-        this.ipAddress = null;
+        this.peerIp = null;
       }
-    }
-
-    public int getAsNumber() {
-      return this.asNumber;
-    }
-
-    public createPeer_args setAsNumber(int asNumber) {
-      this.asNumber = asNumber;
-      setAsNumberIsSet(true);
-      return this;
-    }
-
-    public void unsetAsNumber() {
-      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
-    }
-
-    /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */
-    public boolean isSetAsNumber() {
-      return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
-    }
-
-    public void setAsNumberIsSet(boolean value) {
-      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value);
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case IP_ADDRESS:
-        if (value == null) {
-          unsetIpAddress();
-        } else {
-          setIpAddress((String)value);
-        }
-        break;
+    }
 
-      case AS_NUMBER:
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case PEER_IP:
         if (value == null) {
-          unsetAsNumber();
+          unsetPeerIp();
         } else {
-          setAsNumber((Integer)value);
+          setPeerIp((String)value);
         }
         break;
 
@@ -3245,11 +12099,8 @@ public class BgpConfigurator {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case IP_ADDRESS:
-        return getIpAddress();
-
-      case AS_NUMBER:
-        return Integer.valueOf(getAsNumber());
+      case PEER_IP:
+        return getPeerIp();
 
       }
       throw new IllegalStateException();
@@ -3262,10 +12113,8 @@ public class BgpConfigurator {
       }
 
       switch (field) {
-      case IP_ADDRESS:
-        return isSetIpAddress();
-      case AS_NUMBER:
-        return isSetAsNumber();
+      case PEER_IP:
+        return isSetPeerIp();
       }
       throw new IllegalStateException();
     }
@@ -3274,30 +12123,21 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof createPeer_args)
-        return this.equals((createPeer_args)that);
+      if (that instanceof unsetUpdateSource_args)
+        return this.equals((unsetUpdateSource_args)that);
       return false;
     }
 
-    public boolean equals(createPeer_args that) {
+    public boolean equals(unsetUpdateSource_args that) {
       if (that == null)
         return false;
 
-      boolean this_present_ipAddress = true && this.isSetIpAddress();
-      boolean that_present_ipAddress = true && that.isSetIpAddress();
-      if (this_present_ipAddress || that_present_ipAddress) {
-        if (!(this_present_ipAddress && that_present_ipAddress))
-          return false;
-        if (!this.ipAddress.equals(that.ipAddress))
-          return false;
-      }
-
-      boolean this_present_asNumber = true;
-      boolean that_present_asNumber = true;
-      if (this_present_asNumber || that_present_asNumber) {
-        if (!(this_present_asNumber && that_present_asNumber))
+      boolean this_present_peerIp = true && this.isSetPeerIp();
+      boolean that_present_peerIp = true && that.isSetPeerIp();
+      if (this_present_peerIp || that_present_peerIp) {
+        if (!(this_present_peerIp && that_present_peerIp))
           return false;
-        if (this.asNumber != that.asNumber)
+        if (!this.peerIp.equals(that.peerIp))
           return false;
       }
 
@@ -3310,29 +12150,19 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(createPeer_args other) {
+    public int compareTo(unsetUpdateSource_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(other.isSetIpAddress());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetIpAddress()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, other.ipAddress);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber());
+      lastComparison = Boolean.valueOf(isSetPeerIp()).compareTo(other.isSetPeerIp());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetAsNumber()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber);
+      if (isSetPeerIp()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerIp, other.peerIp);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -3354,20 +12184,16 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("createPeer_args(");
+      StringBuilder sb = new StringBuilder("unsetUpdateSource_args(");
       boolean first = true;
 
-      sb.append("ipAddress:");
-      if (this.ipAddress == null) {
+      sb.append("peerIp:");
+      if (this.peerIp == null) {
         sb.append("null");
       } else {
-        sb.append(this.ipAddress);
+        sb.append(this.peerIp);
       }
       first = false;
-      if (!first) sb.append(", ");
-      sb.append("asNumber:");
-      sb.append(this.asNumber);
-      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -3387,23 +12213,21 @@ public class BgpConfigurator {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-        __isset_bitfield = 0;
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
       }
     }
 
-    private static class createPeer_argsStandardSchemeFactory implements SchemeFactory {
-      public createPeer_argsStandardScheme getScheme() {
-        return new createPeer_argsStandardScheme();
+    private static class unsetUpdateSource_argsStandardSchemeFactory implements SchemeFactory {
+      public unsetUpdateSource_argsStandardScheme getScheme() {
+        return new unsetUpdateSource_argsStandardScheme();
       }
     }
 
-    private static class createPeer_argsStandardScheme extends StandardScheme<createPeer_args> {
+    private static class unsetUpdateSource_argsStandardScheme extends StandardScheme<unsetUpdateSource_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, createPeer_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, unsetUpdateSource_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -3413,18 +12237,10 @@ public class BgpConfigurator {
             break;
           }
           switch (schemeField.id) {
-            case 1: // IP_ADDRESS
+            case 1: // PEER_IP
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.ipAddress = iprot.readString();
-                struct.setIpAddressIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 2: // AS_NUMBER
-              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-                struct.asNumber = iprot.readI32();
-                struct.setAsNumberIsSet(true);
+                struct.peerIp = iprot.readString();
+                struct.setPeerIpIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -3440,77 +12256,64 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, createPeer_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, unsetUpdateSource_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.ipAddress != null) {
-          oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC);
-          oprot.writeString(struct.ipAddress);
+        if (struct.peerIp != null) {
+          oprot.writeFieldBegin(PEER_IP_FIELD_DESC);
+          oprot.writeString(struct.peerIp);
           oprot.writeFieldEnd();
         }
-        oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC);
-        oprot.writeI32(struct.asNumber);
-        oprot.writeFieldEnd();
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
 
     }
 
-    private static class createPeer_argsTupleSchemeFactory implements SchemeFactory {
-      public createPeer_argsTupleScheme getScheme() {
-        return new createPeer_argsTupleScheme();
+    private static class unsetUpdateSource_argsTupleSchemeFactory implements SchemeFactory {
+      public unsetUpdateSource_argsTupleScheme getScheme() {
+        return new unsetUpdateSource_argsTupleScheme();
       }
     }
 
-    private static class createPeer_argsTupleScheme extends TupleScheme<createPeer_args> {
+    private static class unsetUpdateSource_argsTupleScheme extends TupleScheme<unsetUpdateSource_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, createPeer_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, unsetUpdateSource_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
-        if (struct.isSetIpAddress()) {
+        if (struct.isSetPeerIp()) {
           optionals.set(0);
         }
-        if (struct.isSetAsNumber()) {
-          optionals.set(1);
-        }
-        oprot.writeBitSet(optionals, 2);
-        if (struct.isSetIpAddress()) {
-          oprot.writeString(struct.ipAddress);
-        }
-        if (struct.isSetAsNumber()) {
-          oprot.writeI32(struct.asNumber);
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetPeerIp()) {
+          oprot.writeString(struct.peerIp);
         }
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, createPeer_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, unsetUpdateSource_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(2);
+        BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
-          struct.ipAddress = iprot.readString();
-          struct.setIpAddressIsSet(true);
-        }
-        if (incoming.get(1)) {
-          struct.asNumber = iprot.readI32();
-          struct.setAsNumberIsSet(true);
+          struct.peerIp = iprot.readString();
+          struct.setPeerIpIsSet(true);
         }
       }
     }
 
   }
 
-  public static class createPeer_result implements org.apache.thrift.TBase<createPeer_result, createPeer_result._Fields>, java.io.Serializable, Cloneable, Comparable<createPeer_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPeer_result");
+  public static class unsetUpdateSource_result implements org.apache.thrift.TBase<unsetUpdateSource_result, unsetUpdateSource_result._Fields>, java.io.Serializable, Cloneable, Comparable<unsetUpdateSource_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unsetUpdateSource_result");
 
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new createPeer_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new createPeer_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new unsetUpdateSource_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new unsetUpdateSource_resultTupleSchemeFactory());
     }
 
     public int success; // required
@@ -3582,13 +12385,13 @@ public class BgpConfigurator {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPeer_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unsetUpdateSource_result.class, metaDataMap);
     }
 
-    public createPeer_result() {
+    public unsetUpdateSource_result() {
     }
 
-    public createPeer_result(
+    public unsetUpdateSource_result(
       int success)
     {
       this();
@@ -3599,13 +12402,13 @@ public class BgpConfigurator {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public createPeer_result(createPeer_result other) {
+    public unsetUpdateSource_result(unsetUpdateSource_result other) {
       __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
     }
 
-    public createPeer_result deepCopy() {
-      return new createPeer_result(this);
+    public unsetUpdateSource_result deepCopy() {
+      return new unsetUpdateSource_result(this);
     }
 
     @Override
@@ -3618,7 +12421,7 @@ public class BgpConfigurator {
       return this.success;
     }
 
-    public createPeer_result setSuccess(int success) {
+    public unsetUpdateSource_result setSuccess(int success) {
       this.success = success;
       setSuccessIsSet(true);
       return this;
@@ -3676,12 +12479,12 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof createPeer_result)
-        return this.equals((createPeer_result)that);
+      if (that instanceof unsetUpdateSource_result)
+        return this.equals((unsetUpdateSource_result)that);
       return false;
     }
 
-    public boolean equals(createPeer_result that) {
+    public boolean equals(unsetUpdateSource_result that) {
       if (that == null)
         return false;
 
@@ -3703,7 +12506,7 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(createPeer_result other) {
+    public int compareTo(unsetUpdateSource_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -3737,7 +12540,7 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("createPeer_result(");
+      StringBuilder sb = new StringBuilder("unsetUpdateSource_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -3770,15 +12573,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class createPeer_resultStandardSchemeFactory implements SchemeFactory {
-      public createPeer_resultStandardScheme getScheme() {
-        return new createPeer_resultStandardScheme();
+    private static class unsetUpdateSource_resultStandardSchemeFactory implements SchemeFactory {
+      public unsetUpdateSource_resultStandardScheme getScheme() {
+        return new unsetUpdateSource_resultStandardScheme();
       }
     }
 
-    private static class createPeer_resultStandardScheme extends StandardScheme<createPeer_result> {
+    private static class unsetUpdateSource_resultStandardScheme extends StandardScheme<unsetUpdateSource_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, createPeer_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, unsetUpdateSource_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -3807,7 +12610,7 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, createPeer_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, unsetUpdateSource_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -3822,16 +12625,16 @@ public class BgpConfigurator {
 
     }
 
-    private static class createPeer_resultTupleSchemeFactory implements SchemeFactory {
-      public createPeer_resultTupleScheme getScheme() {
-        return new createPeer_resultTupleScheme();
+    private static class unsetUpdateSource_resultTupleSchemeFactory implements SchemeFactory {
+      public unsetUpdateSource_resultTupleScheme getScheme() {
+        return new unsetUpdateSource_resultTupleScheme();
       }
     }
 
-    private static class createPeer_resultTupleScheme extends TupleScheme<createPeer_result> {
+    private static class unsetUpdateSource_resultTupleScheme extends TupleScheme<unsetUpdateSource_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, createPeer_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, unsetUpdateSource_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -3844,7 +12647,7 @@ public class BgpConfigurator {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, createPeer_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, unsetUpdateSource_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
@@ -3856,22 +12659,44 @@ public class BgpConfigurator {
 
   }
 
-  public static class deletePeer_args implements org.apache.thrift.TBase<deletePeer_args, deletePeer_args._Fields>, java.io.Serializable, Cloneable, Comparable<deletePeer_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePeer_args");
+  public static class enableAddressFamily_args implements org.apache.thrift.TBase<enableAddressFamily_args, enableAddressFamily_args._Fields>, java.io.Serializable, Cloneable, Comparable<enableAddressFamily_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableAddressFamily_args");
 
-    private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField AFI_FIELD_DESC = new org.apache.thrift.protocol.TField("afi", org.apache.thrift.protocol.TType.I32, (short)2);
+    private static final org.apache.thrift.protocol.TField SAFI_FIELD_DESC = new org.apache.thrift.protocol.TField("safi", org.apache.thrift.protocol.TType.I32, (short)3);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new deletePeer_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new deletePeer_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new enableAddressFamily_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new enableAddressFamily_argsTupleSchemeFactory());
     }
 
-    public String ipAddress; // required
+    public String peerIp; // required
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi afi; // required
+    /**
+     * 
+     * @see af_safi
+     */
+    public af_safi safi; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      IP_ADDRESS((short)1, "ipAddress");
+      PEER_IP((short)1, "peerIp"),
+      /**
+       * 
+       * @see af_afi
+       */
+      AFI((short)2, "afi"),
+      /**
+       * 
+       * @see af_safi
+       */
+      SAFI((short)3, "safi");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -3886,8 +12711,12 @@ public class BgpConfigurator {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // IP_ADDRESS
-            return IP_ADDRESS;
+          case 1: // PEER_IP
+            return PEER_IP;
+          case 2: // AFI
+            return AFI;
+          case 3: // SAFI
+            return SAFI;
           default:
             return null;
         }
@@ -3931,71 +12760,167 @@ public class BgpConfigurator {
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+      tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.AFI, new org.apache.thrift.meta_data.FieldMetaData("afi", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_afi.class)));
+      tmpMap.put(_Fields.SAFI, new org.apache.thrift.meta_data.FieldMetaData("safi", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_safi.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePeer_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableAddressFamily_args.class, metaDataMap);
     }
 
-    public deletePeer_args() {
+    public enableAddressFamily_args() {
     }
 
-    public deletePeer_args(
-      String ipAddress)
+    public enableAddressFamily_args(
+      String peerIp,
+      af_afi afi,
+      af_safi safi)
     {
       this();
-      this.ipAddress = ipAddress;
+      this.peerIp = peerIp;
+      this.afi = afi;
+      this.safi = safi;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public deletePeer_args(deletePeer_args other) {
-      if (other.isSetIpAddress()) {
-        this.ipAddress = other.ipAddress;
+    public enableAddressFamily_args(enableAddressFamily_args other) {
+      if (other.isSetPeerIp()) {
+        this.peerIp = other.peerIp;
+      }
+      if (other.isSetAfi()) {
+        this.afi = other.afi;
+      }
+      if (other.isSetSafi()) {
+        this.safi = other.safi;
       }
     }
 
-    public deletePeer_args deepCopy() {
-      return new deletePeer_args(this);
+    public enableAddressFamily_args deepCopy() {
+      return new enableAddressFamily_args(this);
     }
 
     @Override
     public void clear() {
-      this.ipAddress = null;
+      this.peerIp = null;
+      this.afi = null;
+      this.safi = null;
     }
 
-    public String getIpAddress() {
-      return this.ipAddress;
+    public String getPeerIp() {
+      return this.peerIp;
     }
 
-    public deletePeer_args setIpAddress(String ipAddress) {
-      this.ipAddress = ipAddress;
+    public enableAddressFamily_args setPeerIp(String peerIp) {
+      this.peerIp = peerIp;
       return this;
     }
 
-    public void unsetIpAddress() {
-      this.ipAddress = null;
+    public void unsetPeerIp() {
+      this.peerIp = null;
     }
 
-    /** Returns true if field ipAddress is set (has been assigned a value) and false otherwise */
-    public boolean isSetIpAddress() {
-      return this.ipAddress != null;
+    /** Returns true if field peerIp is set (has been assigned a value) and false otherwise */
+    public boolean isSetPeerIp() {
+      return this.peerIp != null;
     }
 
-    public void setIpAddressIsSet(boolean value) {
+    public void setPeerIpIsSet(boolean value) {
       if (!value) {
-        this.ipAddress = null;
+        this.peerIp = null;
+      }
+    }
+
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi getAfi() {
+      return this.afi;
+    }
+
+    /**
+     * 
+     * @see af_afi
+     */
+    public enableAddressFamily_args setAfi(af_afi afi) {
+      this.afi = afi;
+      return this;
+    }
+
+    public void unsetAfi() {
+      this.afi = null;
+    }
+
+    /** Returns true if field afi is set (has been assigned a value) and false otherwise */
+    public boolean isSetAfi() {
+      return this.afi != null;
+    }
+
+    public void setAfiIsSet(boolean value) {
+      if (!value) {
+        this.afi = null;
+      }
+    }
+
+    /**
+     * 
+     * @see af_safi
+     */
+    public af_safi getSafi() {
+      return this.safi;
+    }
+
+    /**
+     * 
+     * @see af_safi
+     */
+    public enableAddressFamily_args setSafi(af_safi safi) {
+      this.safi = safi;
+      return this;
+    }
+
+    public void unsetSafi() {
+      this.safi = null;
+    }
+
+    /** Returns true if field safi is set (has been assigned a value) and false otherwise */
+    public boolean isSetSafi() {
+      return this.safi != null;
+    }
+
+    public void setSafiIsSet(boolean value) {
+      if (!value) {
+        this.safi = null;
       }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case IP_ADDRESS:
+      case PEER_IP:
         if (value == null) {
-          unsetIpAddress();
+          unsetPeerIp();
         } else {
-          setIpAddress((String)value);
+          setPeerIp((String)value);
+        }
+        break;
+
+      case AFI:
+        if (value == null) {
+          unsetAfi();
+        } else {
+          setAfi((af_afi)value);
+        }
+        break;
+
+      case SAFI:
+        if (value == null) {
+          unsetSafi();
+        } else {
+          setSafi((af_safi)value);
         }
         break;
 
@@ -4004,8 +12929,14 @@ public class BgpConfigurator {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case IP_ADDRESS:
-        return getIpAddress();
+      case PEER_IP:
+        return getPeerIp();
+
+      case AFI:
+        return getAfi();
+
+      case SAFI:
+        return getSafi();
 
       }
       throw new IllegalStateException();
@@ -4018,8 +12949,12 @@ public class BgpConfigurator {
       }
 
       switch (field) {
-      case IP_ADDRESS:
-        return isSetIpAddress();
+      case PEER_IP:
+        return isSetPeerIp();
+      case AFI:
+        return isSetAfi();
+      case SAFI:
+        return isSetSafi();
       }
       throw new IllegalStateException();
     }
@@ -4028,21 +12963,39 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof deletePeer_args)
-        return this.equals((deletePeer_args)that);
+      if (that instanceof enableAddressFamily_args)
+        return this.equals((enableAddressFamily_args)that);
       return false;
     }
 
-    public boolean equals(deletePeer_args that) {
+    public boolean equals(enableAddressFamily_args that) {
       if (that == null)
         return false;
 
-      boolean this_present_ipAddress = true && this.isSetIpAddress();
-      boolean that_present_ipAddress = true && that.isSetIpAddress();
-      if (this_present_ipAddress || that_present_ipAddress) {
-        if (!(this_present_ipAddress && that_present_ipAddress))
+      boolean this_present_peerIp = true && this.isSetPeerIp();
+      boolean that_present_peerIp = true && that.isSetPeerIp();
+      if (this_present_peerIp || that_present_peerIp) {
+        if (!(this_present_peerIp && that_present_peerIp))
           return false;
-        if (!this.ipAddress.equals(that.ipAddress))
+        if (!this.peerIp.equals(that.peerIp))
+          return false;
+      }
+
+      boolean this_present_afi = true && this.isSetAfi();
+      boolean that_present_afi = true && that.isSetAfi();
+      if (this_present_afi || that_present_afi) {
+        if (!(this_present_afi && that_present_afi))
+          return false;
+        if (!this.afi.equals(that.afi))
+          return false;
+      }
+
+      boolean this_present_safi = true && this.isSetSafi();
+      boolean that_present_safi = true && that.isSetSafi();
+      if (this_present_safi || that_present_safi) {
+        if (!(this_present_safi && that_present_safi))
+          return false;
+        if (!this.safi.equals(that.safi))
           return false;
       }
 
@@ -4055,19 +13008,39 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(deletePeer_args other) {
+    public int compareTo(enableAddressFamily_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
-
-      int lastComparison = 0;
-
-      lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(other.isSetIpAddress());
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetPeerIp()).compareTo(other.isSetPeerIp());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetPeerIp()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerIp, other.peerIp);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetAfi()).compareTo(other.isSetAfi());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAfi()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.afi, other.afi);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetSafi()).compareTo(other.isSetSafi());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetIpAddress()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, other.ipAddress);
+      if (isSetSafi()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.safi, other.safi);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -4089,14 +13062,30 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("deletePeer_args(");
+      StringBuilder sb = new StringBuilder("enableAddressFamily_args(");
       boolean first = true;
 
-      sb.append("ipAddress:");
-      if (this.ipAddress == null) {
+      sb.append("peerIp:");
+      if (this.peerIp == null) {
         sb.append("null");
       } else {
-        sb.append(this.ipAddress);
+        sb.append(this.peerIp);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("afi:");
+      if (this.afi == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.afi);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("safi:");
+      if (this.safi == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.safi);
       }
       first = false;
       sb.append(")");
@@ -4124,15 +13113,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class deletePeer_argsStandardSchemeFactory implements SchemeFactory {
-      public deletePeer_argsStandardScheme getScheme() {
-        return new deletePeer_argsStandardScheme();
+    private static class enableAddressFamily_argsStandardSchemeFactory implements SchemeFactory {
+      public enableAddressFamily_argsStandardScheme getScheme() {
+        return new enableAddressFamily_argsStandardScheme();
       }
     }
 
-    private static class deletePeer_argsStandardScheme extends StandardScheme<deletePeer_args> {
+    private static class enableAddressFamily_argsStandardScheme extends StandardScheme<enableAddressFamily_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, deletePeer_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, enableAddressFamily_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -4142,10 +13131,26 @@ public class BgpConfigurator {
             break;
           }
           switch (schemeField.id) {
-            case 1: // IP_ADDRESS
+            case 1: // PEER_IP
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.ipAddress = iprot.readString();
-                struct.setIpAddressIsSet(true);
+                struct.peerIp = iprot.readString();
+                struct.setPeerIpIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // AFI
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.afi = af_afi.findByValue(iprot.readI32());
+                struct.setAfiIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // SAFI
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.safi = af_safi.findByValue(iprot.readI32());
+                struct.setSafiIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -4161,13 +13166,23 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, deletePeer_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, enableAddressFamily_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.ipAddress != null) {
-          oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC);
-          oprot.writeString(struct.ipAddress);
+        if (struct.peerIp != null) {
+          oprot.writeFieldBegin(PEER_IP_FIELD_DESC);
+          oprot.writeString(struct.peerIp);
+          oprot.writeFieldEnd();
+        }
+        if (struct.afi != null) {
+          oprot.writeFieldBegin(AFI_FIELD_DESC);
+          oprot.writeI32(struct.afi.getValue());
+          oprot.writeFieldEnd();
+        }
+        if (struct.safi != null) {
+          oprot.writeFieldBegin(SAFI_FIELD_DESC);
+          oprot.writeI32(struct.safi.getValue());
           oprot.writeFieldEnd();
         }
         oprot.writeFieldStop();
@@ -4176,49 +13191,69 @@ public class BgpConfigurator {
 
     }
 
-    private static class deletePeer_argsTupleSchemeFactory implements SchemeFactory {
-      public deletePeer_argsTupleScheme getScheme() {
-        return new deletePeer_argsTupleScheme();
+    private static class enableAddressFamily_argsTupleSchemeFactory implements SchemeFactory {
+      public enableAddressFamily_argsTupleScheme getScheme() {
+        return new enableAddressFamily_argsTupleScheme();
       }
     }
 
-    private static class deletePeer_argsTupleScheme extends TupleScheme<deletePeer_args> {
+    private static class enableAddressFamily_argsTupleScheme extends TupleScheme<enableAddressFamily_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, deletePeer_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, enableAddressFamily_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
-        if (struct.isSetIpAddress()) {
+        if (struct.isSetPeerIp()) {
           optionals.set(0);
         }
-        oprot.writeBitSet(optionals, 1);
-        if (struct.isSetIpAddress()) {
-          oprot.writeString(struct.ipAddress);
+        if (struct.isSetAfi()) {
+          optionals.set(1);
+        }
+        if (struct.isSetSafi()) {
+          optionals.set(2);
+        }
+        oprot.writeBitSet(optionals, 3);
+        if (struct.isSetPeerIp()) {
+          oprot.writeString(struct.peerIp);
+        }
+        if (struct.isSetAfi()) {
+          oprot.writeI32(struct.afi.getValue());
+        }
+        if (struct.isSetSafi()) {
+          oprot.writeI32(struct.safi.getValue());
         }
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, deletePeer_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, enableAddressFamily_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(1);
+        BitSet incoming = iprot.readBitSet(3);
         if (incoming.get(0)) {
-          struct.ipAddress = iprot.readString();
-          struct.setIpAddressIsSet(true);
+          struct.peerIp = iprot.readString();
+          struct.setPeerIpIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.afi = af_afi.findByValue(iprot.readI32());
+          struct.setAfiIsSet(true);
+        }
+        if (incoming.get(2)) {
+          struct.safi = af_safi.findByValue(iprot.readI32());
+          struct.setSafiIsSet(true);
         }
       }
     }
 
   }
 
-  public static class deletePeer_result implements org.apache.thrift.TBase<deletePeer_result, deletePeer_result._Fields>, java.io.Serializable, Cloneable, Comparable<deletePeer_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePeer_result");
+  public static class enableAddressFamily_result implements org.apache.thrift.TBase<enableAddressFamily_result, enableAddressFamily_result._Fields>, java.io.Serializable, Cloneable, Comparable<enableAddressFamily_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableAddressFamily_result");
 
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new deletePeer_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new deletePeer_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new enableAddressFamily_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new enableAddressFamily_resultTupleSchemeFactory());
     }
 
     public int success; // required
@@ -4290,13 +13325,13 @@ public class BgpConfigurator {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePeer_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableAddressFamily_result.class, metaDataMap);
     }
 
-    public deletePeer_result() {
+    public enableAddressFamily_result() {
     }
 
-    public deletePeer_result(
+    public enableAddressFamily_result(
       int success)
     {
       this();
@@ -4307,13 +13342,13 @@ public class BgpConfigurator {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public deletePeer_result(deletePeer_result other) {
+    public enableAddressFamily_result(enableAddressFamily_result other) {
       __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
     }
 
-    public deletePeer_result deepCopy() {
-      return new deletePeer_result(this);
+    public enableAddressFamily_result deepCopy() {
+      return new enableAddressFamily_result(this);
     }
 
     @Override
@@ -4326,7 +13361,7 @@ public class BgpConfigurator {
       return this.success;
     }
 
-    public deletePeer_result setSuccess(int success) {
+    public enableAddressFamily_result setSuccess(int success) {
       this.success = success;
       setSuccessIsSet(true);
       return this;
@@ -4384,12 +13419,12 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof deletePeer_result)
-        return this.equals((deletePeer_result)that);
+      if (that instanceof enableAddressFamily_result)
+        return this.equals((enableAddressFamily_result)that);
       return false;
     }
 
-    public boolean equals(deletePeer_result that) {
+    public boolean equals(enableAddressFamily_result that) {
       if (that == null)
         return false;
 
@@ -4411,7 +13446,7 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(deletePeer_result other) {
+    public int compareTo(enableAddressFamily_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -4445,7 +13480,7 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("deletePeer_result(");
+      StringBuilder sb = new StringBuilder("enableAddressFamily_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -4478,15 +13513,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class deletePeer_resultStandardSchemeFactory implements SchemeFactory {
-      public deletePeer_resultStandardScheme getScheme() {
-        return new deletePeer_resultStandardScheme();
+    private static class enableAddressFamily_resultStandardSchemeFactory implements SchemeFactory {
+      public enableAddressFamily_resultStandardScheme getScheme() {
+        return new enableAddressFamily_resultStandardScheme();
       }
     }
 
-    private static class deletePeer_resultStandardScheme extends StandardScheme<deletePeer_result> {
+    private static class enableAddressFamily_resultStandardScheme extends StandardScheme<enableAddressFamily_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, deletePeer_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, enableAddressFamily_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -4515,7 +13550,7 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, deletePeer_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, enableAddressFamily_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -4530,16 +13565,16 @@ public class BgpConfigurator {
 
     }
 
-    private static class deletePeer_resultTupleSchemeFactory implements SchemeFactory {
-      public deletePeer_resultTupleScheme getScheme() {
-        return new deletePeer_resultTupleScheme();
+    private static class enableAddressFamily_resultTupleSchemeFactory implements SchemeFactory {
+      public enableAddressFamily_resultTupleScheme getScheme() {
+        return new enableAddressFamily_resultTupleScheme();
       }
     }
 
-    private static class deletePeer_resultTupleScheme extends TupleScheme<deletePeer_result> {
+    private static class enableAddressFamily_resultTupleScheme extends TupleScheme<enableAddressFamily_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, deletePeer_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, enableAddressFamily_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -4552,7 +13587,7 @@ public class BgpConfigurator {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, deletePeer_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, enableAddressFamily_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
@@ -4564,28 +13599,44 @@ public class BgpConfigurator {
 
   }
 
-  public static class addVrf_args implements org.apache.thrift.TBase<addVrf_args, addVrf_args._Fields>, java.io.Serializable, Cloneable, Comparable<addVrf_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVrf_args");
+  public static class disableAddressFamily_args implements org.apache.thrift.TBase<disableAddressFamily_args, disableAddressFamily_args._Fields>, java.io.Serializable, Cloneable, Comparable<disableAddressFamily_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableAddressFamily_args");
 
-    private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField IRTS_FIELD_DESC = new org.apache.thrift.protocol.TField("irts", org.apache.thrift.protocol.TType.LIST, (short)2);
-    private static final org.apache.thrift.protocol.TField ERTS_FIELD_DESC = new org.apache.thrift.protocol.TField("erts", org.apache.thrift.protocol.TType.LIST, (short)3);
+    private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField AFI_FIELD_DESC = new org.apache.thrift.protocol.TField("afi", org.apache.thrift.protocol.TType.I32, (short)2);
+    private static final org.apache.thrift.protocol.TField SAFI_FIELD_DESC = new org.apache.thrift.protocol.TField("safi", org.apache.thrift.protocol.TType.I32, (short)3);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new addVrf_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new addVrf_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new disableAddressFamily_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new disableAddressFamily_argsTupleSchemeFactory());
     }
 
-    public String rd; // required
-    public List<String> irts; // required
-    public List<String> erts; // required
+    public String peerIp; // required
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi afi; // required
+    /**
+     * 
+     * @see af_safi
+     */
+    public af_safi safi; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      RD((short)1, "rd"),
-      IRTS((short)2, "irts"),
-      ERTS((short)3, "erts");
+      PEER_IP((short)1, "peerIp"),
+      /**
+       * 
+       * @see af_afi
+       */
+      AFI((short)2, "afi"),
+      /**
+       * 
+       * @see af_safi
+       */
+      SAFI((short)3, "safi");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -4600,12 +13651,12 @@ public class BgpConfigurator {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // RD
-            return RD;
-          case 2: // IRTS
-            return IRTS;
-          case 3: // ERTS
-            return ERTS;
+          case 1: // PEER_IP
+            return PEER_IP;
+          case 2: // AFI
+            return AFI;
+          case 3: // SAFI
+            return SAFI;
           default:
             return null;
         }
@@ -4649,185 +13700,167 @@ public class BgpConfigurator {
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+      tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.IRTS, new org.apache.thrift.meta_data.FieldMetaData("irts", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
-      tmpMap.put(_Fields.ERTS, new org.apache.thrift.meta_data.FieldMetaData("erts", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+      tmpMap.put(_Fields.AFI, new org.apache.thrift.meta_data.FieldMetaData("afi", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_afi.class)));
+      tmpMap.put(_Fields.SAFI, new org.apache.thrift.meta_data.FieldMetaData("safi", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_safi.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVrf_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableAddressFamily_args.class, metaDataMap);
     }
 
-    public addVrf_args() {
+    public disableAddressFamily_args() {
     }
 
-    public addVrf_args(
-      String rd,
-      List<String> irts,
-      List<String> erts)
+    public disableAddressFamily_args(
+      String peerIp,
+      af_afi afi,
+      af_safi safi)
     {
       this();
-      this.rd = rd;
-      this.irts = irts;
-      this.erts = erts;
+      this.peerIp = peerIp;
+      this.afi = afi;
+      this.safi = safi;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public addVrf_args(addVrf_args other) {
-      if (other.isSetRd()) {
-        this.rd = other.rd;
+    public disableAddressFamily_args(disableAddressFamily_args other) {
+      if (other.isSetPeerIp()) {
+        this.peerIp = other.peerIp;
       }
-      if (other.isSetIrts()) {
-        List<String> __this__irts = new ArrayList<String>(other.irts);
-        this.irts = __this__irts;
+      if (other.isSetAfi()) {
+        this.afi = other.afi;
       }
-      if (other.isSetErts()) {
-        List<String> __this__erts = new ArrayList<String>(other.erts);
-        this.erts = __this__erts;
+      if (other.isSetSafi()) {
+        this.safi = other.safi;
       }
     }
 
-    public addVrf_args deepCopy() {
-      return new addVrf_args(this);
+    public disableAddressFamily_args deepCopy() {
+      return new disableAddressFamily_args(this);
     }
 
     @Override
     public void clear() {
-      this.rd = null;
-      this.irts = null;
-      this.erts = null;
+      this.peerIp = null;
+      this.afi = null;
+      this.safi = null;
     }
 
-    public String getRd() {
-      return this.rd;
+    public String getPeerIp() {
+      return this.peerIp;
     }
 
-    public addVrf_args setRd(String rd) {
-      this.rd = rd;
+    public disableAddressFamily_args setPeerIp(String peerIp) {
+      this.peerIp = peerIp;
       return this;
     }
 
-    public void unsetRd() {
-      this.rd = null;
+    public void unsetPeerIp() {
+      this.peerIp = null;
     }
 
-    /** Returns true if field rd is set (has been assigned a value) and false otherwise */
-    public boolean isSetRd() {
-      return this.rd != null;
+    /** Returns true if field peerIp is set (has been assigned a value) and false otherwise */
+    public boolean isSetPeerIp() {
+      return this.peerIp != null;
     }
 
-    public void setRdIsSet(boolean value) {
+    public void setPeerIpIsSet(boolean value) {
       if (!value) {
-        this.rd = null;
-      }
-    }
-
-    public int getIrtsSize() {
-      return (this.irts == null) ? 0 : this.irts.size();
-    }
-
-    public java.util.Iterator<String> getIrtsIterator() {
-      return (this.irts == null) ? null : this.irts.iterator();
-    }
-
-    public void addToIrts(String elem) {
-      if (this.irts == null) {
-        this.irts = new ArrayList<String>();
+        this.peerIp = null;
       }
-      this.irts.add(elem);
     }
 
-    public List<String> getIrts() {
-      return this.irts;
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi getAfi() {
+      return this.afi;
     }
 
-    public addVrf_args setIrts(List<String> irts) {
-      this.irts = irts;
+    /**
+     * 
+     * @see af_afi
+     */
+    public disableAddressFamily_args setAfi(af_afi afi) {
+      this.afi = afi;
       return this;
     }
 
-    public void unsetIrts() {
-      this.irts = null;
+    public void unsetAfi() {
+      this.afi = null;
     }
 
-    /** Returns true if field irts is set (has been assigned a value) and false otherwise */
-    public boolean isSetIrts() {
-      return this.irts != null;
+    /** Returns true if field afi is set (has been assigned a value) and false otherwise */
+    public boolean isSetAfi() {
+      return this.afi != null;
     }
 
-    public void setIrtsIsSet(boolean value) {
+    public void setAfiIsSet(boolean value) {
       if (!value) {
-        this.irts = null;
-      }
-    }
-
-    public int getErtsSize() {
-      return (this.erts == null) ? 0 : this.erts.size();
-    }
-
-    public java.util.Iterator<String> getErtsIterator() {
-      return (this.erts == null) ? null : this.erts.iterator();
-    }
-
-    public void addToErts(String elem) {
-      if (this.erts == null) {
-        this.erts = new ArrayList<String>();
+        this.afi = null;
       }
-      this.erts.add(elem);
     }
 
-    public List<String> getErts() {
-      return this.erts;
+    /**
+     * 
+     * @see af_safi
+     */
+    public af_safi getSafi() {
+      return this.safi;
     }
 
-    public addVrf_args setErts(List<String> erts) {
-      this.erts = erts;
+    /**
+     * 
+     * @see af_safi
+     */
+    public disableAddressFamily_args setSafi(af_safi safi) {
+      this.safi = safi;
       return this;
     }
 
-    public void unsetErts() {
-      this.erts = null;
+    public void unsetSafi() {
+      this.safi = null;
     }
 
-    /** Returns true if field erts is set (has been assigned a value) and false otherwise */
-    public boolean isSetErts() {
-      return this.erts != null;
+    /** Returns true if field safi is set (has been assigned a value) and false otherwise */
+    public boolean isSetSafi() {
+      return this.safi != null;
     }
 
-    public void setErtsIsSet(boolean value) {
+    public void setSafiIsSet(boolean value) {
       if (!value) {
-        this.erts = null;
+        this.safi = null;
       }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case RD:
+      case PEER_IP:
         if (value == null) {
-          unsetRd();
+          unsetPeerIp();
         } else {
-          setRd((String)value);
+          setPeerIp((String)value);
         }
         break;
 
-      case IRTS:
+      case AFI:
         if (value == null) {
-          unsetIrts();
+          unsetAfi();
         } else {
-          setIrts((List<String>)value);
+          setAfi((af_afi)value);
         }
         break;
 
-      case ERTS:
+      case SAFI:
         if (value == null) {
-          unsetErts();
+          unsetSafi();
         } else {
-          setErts((List<String>)value);
+          setSafi((af_safi)value);
         }
         break;
 
@@ -4836,14 +13869,14 @@ public class BgpConfigurator {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case RD:
-        return getRd();
+      case PEER_IP:
+        return getPeerIp();
 
-      case IRTS:
-        return getIrts();
+      case AFI:
+        return getAfi();
 
-      case ERTS:
-        return getErts();
+      case SAFI:
+        return getSafi();
 
       }
       throw new IllegalStateException();
@@ -4856,12 +13889,12 @@ public class BgpConfigurator {
       }
 
       switch (field) {
-      case RD:
-        return isSetRd();
-      case IRTS:
-        return isSetIrts();
-      case ERTS:
-        return isSetErts();
+      case PEER_IP:
+        return isSetPeerIp();
+      case AFI:
+        return isSetAfi();
+      case SAFI:
+        return isSetSafi();
       }
       throw new IllegalStateException();
     }
@@ -4870,39 +13903,39 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof addVrf_args)
-        return this.equals((addVrf_args)that);
+      if (that instanceof disableAddressFamily_args)
+        return this.equals((disableAddressFamily_args)that);
       return false;
     }
 
-    public boolean equals(addVrf_args that) {
+    public boolean equals(disableAddressFamily_args that) {
       if (that == null)
         return false;
 
-      boolean this_present_rd = true && this.isSetRd();
-      boolean that_present_rd = true && that.isSetRd();
-      if (this_present_rd || that_present_rd) {
-        if (!(this_present_rd && that_present_rd))
+      boolean this_present_peerIp = true && this.isSetPeerIp();
+      boolean that_present_peerIp = true && that.isSetPeerIp();
+      if (this_present_peerIp || that_present_peerIp) {
+        if (!(this_present_peerIp && that_present_peerIp))
           return false;
-        if (!this.rd.equals(that.rd))
+        if (!this.peerIp.equals(that.peerIp))
           return false;
       }
 
-      boolean this_present_irts = true && this.isSetIrts();
-      boolean that_present_irts = true && that.isSetIrts();
-      if (this_present_irts || that_present_irts) {
-        if (!(this_present_irts && that_present_irts))
+      boolean this_present_afi = true && this.isSetAfi();
+      boolean that_present_afi = true && that.isSetAfi();
+      if (this_present_afi || that_present_afi) {
+        if (!(this_present_afi && that_present_afi))
           return false;
-        if (!this.irts.equals(that.irts))
+        if (!this.afi.equals(that.afi))
           return false;
       }
 
-      boolean this_present_erts = true && this.isSetErts();
-      boolean that_present_erts = true && that.isSetErts();
-      if (this_present_erts || that_present_erts) {
-        if (!(this_present_erts && that_present_erts))
+      boolean this_present_safi = true && this.isSetSafi();
+      boolean that_present_safi = true && that.isSetSafi();
+      if (this_present_safi || that_present_safi) {
+        if (!(this_present_safi && that_present_safi))
           return false;
-        if (!this.erts.equals(that.erts))
+        if (!this.safi.equals(that.safi))
           return false;
       }
 
@@ -4915,39 +13948,39 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(addVrf_args other) {
+    public int compareTo(disableAddressFamily_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
+      lastComparison = Boolean.valueOf(isSetPeerIp()).compareTo(other.isSetPeerIp());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetRd()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
+      if (isSetPeerIp()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerIp, other.peerIp);
         if (lastComparison != 0) {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetIrts()).compareTo(other.isSetIrts());
+      lastComparison = Boolean.valueOf(isSetAfi()).compareTo(other.isSetAfi());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetIrts()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.irts, other.irts);
+      if (isSetAfi()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.afi, other.afi);
         if (lastComparison != 0) {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetErts()).compareTo(other.isSetErts());
+      lastComparison = Boolean.valueOf(isSetSafi()).compareTo(other.isSetSafi());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetErts()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.erts, other.erts);
+      if (isSetSafi()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.safi, other.safi);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -4969,30 +14002,30 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("addVrf_args(");
+      StringBuilder sb = new StringBuilder("disableAddressFamily_args(");
       boolean first = true;
 
-      sb.append("rd:");
-      if (this.rd == null) {
+      sb.append("peerIp:");
+      if (this.peerIp == null) {
         sb.append("null");
       } else {
-        sb.append(this.rd);
+        sb.append(this.peerIp);
       }
       first = false;
       if (!first) sb.append(", ");
-      sb.append("irts:");
-      if (this.irts == null) {
+      sb.append("afi:");
+      if (this.afi == null) {
         sb.append("null");
       } else {
-        sb.append(this.irts);
+        sb.append(this.afi);
       }
       first = false;
       if (!first) sb.append(", ");
-      sb.append("erts:");
-      if (this.erts == null) {
+      sb.append("safi:");
+      if (this.safi == null) {
         sb.append("null");
       } else {
-        sb.append(this.erts);
+        sb.append(this.safi);
       }
       first = false;
       sb.append(")");
@@ -5020,15 +14053,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class addVrf_argsStandardSchemeFactory implements SchemeFactory {
-      public addVrf_argsStandardScheme getScheme() {
-        return new addVrf_argsStandardScheme();
+    private static class disableAddressFamily_argsStandardSchemeFactory implements SchemeFactory {
+      public disableAddressFamily_argsStandardScheme getScheme() {
+        return new disableAddressFamily_argsStandardScheme();
       }
     }
 
-    private static class addVrf_argsStandardScheme extends StandardScheme<addVrf_args> {
+    private static class disableAddressFamily_argsStandardScheme extends StandardScheme<disableAddressFamily_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, addVrf_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, disableAddressFamily_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -5038,46 +14071,26 @@ public class BgpConfigurator {
             break;
           }
           switch (schemeField.id) {
-            case 1: // RD
+            case 1: // PEER_IP
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.rd = iprot.readString();
-                struct.setRdIsSet(true);
+                struct.peerIp = iprot.readString();
+                struct.setPeerIpIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 2: // IRTS
-              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
-                {
-                  org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
-                  struct.irts = new ArrayList<String>(_list8.size);
-                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
-                  {
-                    String _elem10;
-                    _elem10 = iprot.readString();
-                    struct.irts.add(_elem10);
-                  }
-                  iprot.readListEnd();
-                }
-                struct.setIrtsIsSet(true);
+            case 2: // AFI
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.afi = af_afi.findByValue(iprot.readI32());
+                struct.setAfiIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 3: // ERTS
-              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
-                {
-                  org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();
-                  struct.erts = new ArrayList<String>(_list11.size);
-                  for (int _i12 = 0; _i12 < _list11.size; ++_i12)
-                  {
-                    String _elem13;
-                    _elem13 = iprot.readString();
-                    struct.erts.add(_elem13);
-                  }
-                  iprot.readListEnd();
-                }
-                struct.setErtsIsSet(true);
+            case 3: // SAFI
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.safi = af_safi.findByValue(iprot.readI32());
+                struct.setSafiIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -5093,37 +14106,23 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, addVrf_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, disableAddressFamily_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.rd != null) {
-          oprot.writeFieldBegin(RD_FIELD_DESC);
-          oprot.writeString(struct.rd);
+        if (struct.peerIp != null) {
+          oprot.writeFieldBegin(PEER_IP_FIELD_DESC);
+          oprot.writeString(struct.peerIp);
           oprot.writeFieldEnd();
         }
-        if (struct.irts != null) {
-          oprot.writeFieldBegin(IRTS_FIELD_DESC);
-          {
-            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.irts.size()));
-            for (String _iter14 : struct.irts)
-            {
-              oprot.writeString(_iter14);
-            }
-            oprot.writeListEnd();
-          }
+        if (struct.afi != null) {
+          oprot.writeFieldBegin(AFI_FIELD_DESC);
+          oprot.writeI32(struct.afi.getValue());
           oprot.writeFieldEnd();
         }
-        if (struct.erts != null) {
-          oprot.writeFieldBegin(ERTS_FIELD_DESC);
-          {
-            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.erts.size()));
-            for (String _iter15 : struct.erts)
-            {
-              oprot.writeString(_iter15);
-            }
-            oprot.writeListEnd();
-          }
+        if (struct.safi != null) {
+          oprot.writeFieldBegin(SAFI_FIELD_DESC);
+          oprot.writeI32(struct.safi.getValue());
           oprot.writeFieldEnd();
         }
         oprot.writeFieldStop();
@@ -5132,99 +14131,69 @@ public class BgpConfigurator {
 
     }
 
-    private static class addVrf_argsTupleSchemeFactory implements SchemeFactory {
-      public addVrf_argsTupleScheme getScheme() {
-        return new addVrf_argsTupleScheme();
+    private static class disableAddressFamily_argsTupleSchemeFactory implements SchemeFactory {
+      public disableAddressFamily_argsTupleScheme getScheme() {
+        return new disableAddressFamily_argsTupleScheme();
       }
     }
 
-    private static class addVrf_argsTupleScheme extends TupleScheme<addVrf_args> {
+    private static class disableAddressFamily_argsTupleScheme extends TupleScheme<disableAddressFamily_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, addVrf_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, disableAddressFamily_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
-        if (struct.isSetRd()) {
+        if (struct.isSetPeerIp()) {
           optionals.set(0);
         }
-        if (struct.isSetIrts()) {
+        if (struct.isSetAfi()) {
           optionals.set(1);
         }
-        if (struct.isSetErts()) {
+        if (struct.isSetSafi()) {
           optionals.set(2);
         }
         oprot.writeBitSet(optionals, 3);
-        if (struct.isSetRd()) {
-          oprot.writeString(struct.rd);
+        if (struct.isSetPeerIp()) {
+          oprot.writeString(struct.peerIp);
         }
-        if (struct.isSetIrts()) {
-          {
-            oprot.writeI32(struct.irts.size());
-            for (String _iter16 : struct.irts)
-            {
-              oprot.writeString(_iter16);
-            }
-          }
+        if (struct.isSetAfi()) {
+          oprot.writeI32(struct.afi.getValue());
         }
-        if (struct.isSetErts()) {
-          {
-            oprot.writeI32(struct.erts.size());
-            for (String _iter17 : struct.erts)
-            {
-              oprot.writeString(_iter17);
-            }
-          }
+        if (struct.isSetSafi()) {
+          oprot.writeI32(struct.safi.getValue());
         }
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, addVrf_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, disableAddressFamily_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(3);
         if (incoming.get(0)) {
-          struct.rd = iprot.readString();
-          struct.setRdIsSet(true);
+          struct.peerIp = iprot.readString();
+          struct.setPeerIpIsSet(true);
         }
         if (incoming.get(1)) {
-          {
-            org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-            struct.irts = new ArrayList<String>(_list18.size);
-            for (int _i19 = 0; _i19 < _list18.size; ++_i19)
-            {
-              String _elem20;
-              _elem20 = iprot.readString();
-              struct.irts.add(_elem20);
-            }
-          }
-          struct.setIrtsIsSet(true);
+          struct.afi = af_afi.findByValue(iprot.readI32());
+          struct.setAfiIsSet(true);
         }
         if (incoming.get(2)) {
-          {
-            org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-            struct.erts = new ArrayList<String>(_list21.size);
-            for (int _i22 = 0; _i22 < _list21.size; ++_i22)
-            {
-              String _elem23;
-              _elem23 = iprot.readString();
-              struct.erts.add(_elem23);
-            }
-          }
-          struct.setErtsIsSet(true);
+          struct.safi = af_safi.findByValue(iprot.readI32());
+          struct.setSafiIsSet(true);
         }
       }
     }
 
   }
 
-  public static class addVrf_result implements org.apache.thrift.TBase<addVrf_result, addVrf_result._Fields>, java.io.Serializable, Cloneable, Comparable<addVrf_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVrf_result");
+  public static class disableAddressFamily_result implements org.apache.thrift.TBase<disableAddressFamily_result, disableAddressFamily_result._Fields>, java.io.Serializable, Cloneable, Comparable<disableAddressFamily_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableAddressFamily_result");
 
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new addVrf_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new addVrf_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new disableAddressFamily_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new disableAddressFamily_resultTupleSchemeFactory());
     }
 
     public int success; // required
@@ -5296,13 +14265,13 @@ public class BgpConfigurator {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVrf_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableAddressFamily_result.class, metaDataMap);
     }
 
-    public addVrf_result() {
+    public disableAddressFamily_result() {
     }
 
-    public addVrf_result(
+    public disableAddressFamily_result(
       int success)
     {
       this();
@@ -5313,13 +14282,13 @@ public class BgpConfigurator {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public addVrf_result(addVrf_result other) {
+    public disableAddressFamily_result(disableAddressFamily_result other) {
       __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
     }
 
-    public addVrf_result deepCopy() {
-      return new addVrf_result(this);
+    public disableAddressFamily_result deepCopy() {
+      return new disableAddressFamily_result(this);
     }
 
     @Override
@@ -5332,7 +14301,7 @@ public class BgpConfigurator {
       return this.success;
     }
 
-    public addVrf_result setSuccess(int success) {
+    public disableAddressFamily_result setSuccess(int success) {
       this.success = success;
       setSuccessIsSet(true);
       return this;
@@ -5390,12 +14359,12 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof addVrf_result)
-        return this.equals((addVrf_result)that);
+      if (that instanceof disableAddressFamily_result)
+        return this.equals((disableAddressFamily_result)that);
       return false;
     }
 
-    public boolean equals(addVrf_result that) {
+    public boolean equals(disableAddressFamily_result that) {
       if (that == null)
         return false;
 
@@ -5417,7 +14386,7 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(addVrf_result other) {
+    public int compareTo(disableAddressFamily_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -5451,7 +14420,7 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("addVrf_result(");
+      StringBuilder sb = new StringBuilder("disableAddressFamily_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -5484,15 +14453,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class addVrf_resultStandardSchemeFactory implements SchemeFactory {
-      public addVrf_resultStandardScheme getScheme() {
-        return new addVrf_resultStandardScheme();
+    private static class disableAddressFamily_resultStandardSchemeFactory implements SchemeFactory {
+      public disableAddressFamily_resultStandardScheme getScheme() {
+        return new disableAddressFamily_resultStandardScheme();
       }
     }
 
-    private static class addVrf_resultStandardScheme extends StandardScheme<addVrf_result> {
+    private static class disableAddressFamily_resultStandardScheme extends StandardScheme<disableAddressFamily_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, addVrf_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, disableAddressFamily_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -5521,7 +14490,7 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, addVrf_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, disableAddressFamily_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -5536,16 +14505,16 @@ public class BgpConfigurator {
 
     }
 
-    private static class addVrf_resultTupleSchemeFactory implements SchemeFactory {
-      public addVrf_resultTupleScheme getScheme() {
-        return new addVrf_resultTupleScheme();
+    private static class disableAddressFamily_resultTupleSchemeFactory implements SchemeFactory {
+      public disableAddressFamily_resultTupleScheme getScheme() {
+        return new disableAddressFamily_resultTupleScheme();
       }
     }
 
-    private static class addVrf_resultTupleScheme extends TupleScheme<addVrf_result> {
+    private static class disableAddressFamily_resultTupleScheme extends TupleScheme<disableAddressFamily_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, addVrf_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, disableAddressFamily_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -5558,7 +14527,7 @@ public class BgpConfigurator {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, addVrf_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, disableAddressFamily_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
@@ -5570,22 +14539,25 @@ public class BgpConfigurator {
 
   }
 
-  public static class delVrf_args implements org.apache.thrift.TBase<delVrf_args, delVrf_args._Fields>, java.io.Serializable, Cloneable, Comparable<delVrf_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delVrf_args");
+  public static class setLogConfig_args implements org.apache.thrift.TBase<setLogConfig_args, setLogConfig_args._Fields>, java.io.Serializable, Cloneable, Comparable<setLogConfig_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setLogConfig_args");
 
-    private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField LOG_FILE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("logFileName", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField LOG_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("logLevel", org.apache.thrift.protocol.TType.STRING, (short)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new delVrf_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new delVrf_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new setLogConfig_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new setLogConfig_argsTupleSchemeFactory());
     }
 
-    public String rd; // required
+    public String logFileName; // required
+    public String logLevel; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      RD((short)1, "rd");
+      LOG_FILE_NAME((short)1, "logFileName"),
+      LOG_LEVEL((short)2, "logLevel");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -5600,8 +14572,10 @@ public class BgpConfigurator {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // RD
-            return RD;
+          case 1: // LOG_FILE_NAME
+            return LOG_FILE_NAME;
+          case 2: // LOG_LEVEL
+            return LOG_LEVEL;
           default:
             return null;
         }
@@ -5645,71 +14619,111 @@ public class BgpConfigurator {
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+      tmpMap.put(_Fields.LOG_FILE_NAME, new org.apache.thrift.meta_data.FieldMetaData("logFileName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.LOG_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("logLevel", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delVrf_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setLogConfig_args.class, metaDataMap);
     }
 
-    public delVrf_args() {
+    public setLogConfig_args() {
     }
 
-    public delVrf_args(
-      String rd)
+    public setLogConfig_args(
+      String logFileName,
+      String logLevel)
     {
       this();
-      this.rd = rd;
+      this.logFileName = logFileName;
+      this.logLevel = logLevel;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public delVrf_args(delVrf_args other) {
-      if (other.isSetRd()) {
-        this.rd = other.rd;
+    public setLogConfig_args(setLogConfig_args other) {
+      if (other.isSetLogFileName()) {
+        this.logFileName = other.logFileName;
+      }
+      if (other.isSetLogLevel()) {
+        this.logLevel = other.logLevel;
       }
     }
 
-    public delVrf_args deepCopy() {
-      return new delVrf_args(this);
+    public setLogConfig_args deepCopy() {
+      return new setLogConfig_args(this);
     }
 
     @Override
     public void clear() {
-      this.rd = null;
+      this.logFileName = null;
+      this.logLevel = null;
     }
 
-    public String getRd() {
-      return this.rd;
+    public String getLogFileName() {
+      return this.logFileName;
     }
 
-    public delVrf_args setRd(String rd) {
-      this.rd = rd;
+    public setLogConfig_args setLogFileName(String logFileName) {
+      this.logFileName = logFileName;
       return this;
     }
 
-    public void unsetRd() {
-      this.rd = null;
+    public void unsetLogFileName() {
+      this.logFileName = null;
     }
 
-    /** Returns true if field rd is set (has been assigned a value) and false otherwise */
-    public boolean isSetRd() {
-      return this.rd != null;
+    /** Returns true if field logFileName is set (has been assigned a value) and false otherwise */
+    public boolean isSetLogFileName() {
+      return this.logFileName != null;
     }
 
-    public void setRdIsSet(boolean value) {
+    public void setLogFileNameIsSet(boolean value) {
       if (!value) {
-        this.rd = null;
+        this.logFileName = null;
+      }
+    }
+
+    public String getLogLevel() {
+      return this.logLevel;
+    }
+
+    public setLogConfig_args setLogLevel(String logLevel) {
+      this.logLevel = logLevel;
+      return this;
+    }
+
+    public void unsetLogLevel() {
+      this.logLevel = null;
+    }
+
+    /** Returns true if field logLevel is set (has been assigned a value) and false otherwise */
+    public boolean isSetLogLevel() {
+      return this.logLevel != null;
+    }
+
+    public void setLogLevelIsSet(boolean value) {
+      if (!value) {
+        this.logLevel = null;
       }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case RD:
+      case LOG_FILE_NAME:
         if (value == null) {
-          unsetRd();
+          unsetLogFileName();
         } else {
-          setRd((String)value);
+          setLogFileName((String)value);
+        }
+        break;
+
+      case LOG_LEVEL:
+        if (value == null) {
+          unsetLogLevel();
+        } else {
+          setLogLevel((String)value);
         }
         break;
 
@@ -5718,8 +14732,11 @@ public class BgpConfigurator {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case RD:
-        return getRd();
+      case LOG_FILE_NAME:
+        return getLogFileName();
+
+      case LOG_LEVEL:
+        return getLogLevel();
 
       }
       throw new IllegalStateException();
@@ -5732,8 +14749,10 @@ public class BgpConfigurator {
       }
 
       switch (field) {
-      case RD:
-        return isSetRd();
+      case LOG_FILE_NAME:
+        return isSetLogFileName();
+      case LOG_LEVEL:
+        return isSetLogLevel();
       }
       throw new IllegalStateException();
     }
@@ -5742,21 +14761,30 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof delVrf_args)
-        return this.equals((delVrf_args)that);
+      if (that instanceof setLogConfig_args)
+        return this.equals((setLogConfig_args)that);
       return false;
     }
 
-    public boolean equals(delVrf_args that) {
+    public boolean equals(setLogConfig_args that) {
       if (that == null)
         return false;
 
-      boolean this_present_rd = true && this.isSetRd();
-      boolean that_present_rd = true && that.isSetRd();
-      if (this_present_rd || that_present_rd) {
-        if (!(this_present_rd && that_present_rd))
+      boolean this_present_logFileName = true && this.isSetLogFileName();
+      boolean that_present_logFileName = true && that.isSetLogFileName();
+      if (this_present_logFileName || that_present_logFileName) {
+        if (!(this_present_logFileName && that_present_logFileName))
           return false;
-        if (!this.rd.equals(that.rd))
+        if (!this.logFileName.equals(that.logFileName))
+          return false;
+      }
+
+      boolean this_present_logLevel = true && this.isSetLogLevel();
+      boolean that_present_logLevel = true && that.isSetLogLevel();
+      if (this_present_logLevel || that_present_logLevel) {
+        if (!(this_present_logLevel && that_present_logLevel))
+          return false;
+        if (!this.logLevel.equals(that.logLevel))
           return false;
       }
 
@@ -5769,19 +14797,29 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(delVrf_args other) {
+    public int compareTo(setLogConfig_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
+      lastComparison = Boolean.valueOf(isSetLogFileName()).compareTo(other.isSetLogFileName());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetLogFileName()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logFileName, other.logFileName);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetLogLevel()).compareTo(other.isSetLogLevel());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetRd()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
+      if (isSetLogLevel()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logLevel, other.logLevel);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -5803,14 +14841,22 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("delVrf_args(");
+      StringBuilder sb = new StringBuilder("setLogConfig_args(");
       boolean first = true;
 
-      sb.append("rd:");
-      if (this.rd == null) {
+      sb.append("logFileName:");
+      if (this.logFileName == null) {
         sb.append("null");
       } else {
-        sb.append(this.rd);
+        sb.append(this.logFileName);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("logLevel:");
+      if (this.logLevel == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.logLevel);
       }
       first = false;
       sb.append(")");
@@ -5838,15 +14884,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class delVrf_argsStandardSchemeFactory implements SchemeFactory {
-      public delVrf_argsStandardScheme getScheme() {
-        return new delVrf_argsStandardScheme();
+    private static class setLogConfig_argsStandardSchemeFactory implements SchemeFactory {
+      public setLogConfig_argsStandardScheme getScheme() {
+        return new setLogConfig_argsStandardScheme();
       }
     }
 
-    private static class delVrf_argsStandardScheme extends StandardScheme<delVrf_args> {
+    private static class setLogConfig_argsStandardScheme extends StandardScheme<setLogConfig_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, delVrf_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, setLogConfig_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -5856,10 +14902,18 @@ public class BgpConfigurator {
             break;
           }
           switch (schemeField.id) {
-            case 1: // RD
+            case 1: // LOG_FILE_NAME
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.rd = iprot.readString();
-                struct.setRdIsSet(true);
+                struct.logFileName = iprot.readString();
+                struct.setLogFileNameIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // LOG_LEVEL
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.logLevel = iprot.readString();
+                struct.setLogLevelIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -5875,13 +14929,18 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, delVrf_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, setLogConfig_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.rd != null) {
-          oprot.writeFieldBegin(RD_FIELD_DESC);
-          oprot.writeString(struct.rd);
+        if (struct.logFileName != null) {
+          oprot.writeFieldBegin(LOG_FILE_NAME_FIELD_DESC);
+          oprot.writeString(struct.logFileName);
+          oprot.writeFieldEnd();
+        }
+        if (struct.logLevel != null) {
+          oprot.writeFieldBegin(LOG_LEVEL_FIELD_DESC);
+          oprot.writeString(struct.logLevel);
           oprot.writeFieldEnd();
         }
         oprot.writeFieldStop();
@@ -5890,49 +14949,59 @@ public class BgpConfigurator {
 
     }
 
-    private static class delVrf_argsTupleSchemeFactory implements SchemeFactory {
-      public delVrf_argsTupleScheme getScheme() {
-        return new delVrf_argsTupleScheme();
+    private static class setLogConfig_argsTupleSchemeFactory implements SchemeFactory {
+      public setLogConfig_argsTupleScheme getScheme() {
+        return new setLogConfig_argsTupleScheme();
       }
     }
 
-    private static class delVrf_argsTupleScheme extends TupleScheme<delVrf_args> {
+    private static class setLogConfig_argsTupleScheme extends TupleScheme<setLogConfig_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, delVrf_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, setLogConfig_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
-        if (struct.isSetRd()) {
+        if (struct.isSetLogFileName()) {
           optionals.set(0);
         }
-        oprot.writeBitSet(optionals, 1);
-        if (struct.isSetRd()) {
-          oprot.writeString(struct.rd);
+        if (struct.isSetLogLevel()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetLogFileName()) {
+          oprot.writeString(struct.logFileName);
+        }
+        if (struct.isSetLogLevel()) {
+          oprot.writeString(struct.logLevel);
         }
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, delVrf_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, setLogConfig_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(1);
+        BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
-          struct.rd = iprot.readString();
-          struct.setRdIsSet(true);
+          struct.logFileName = iprot.readString();
+          struct.setLogFileNameIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.logLevel = iprot.readString();
+          struct.setLogLevelIsSet(true);
         }
       }
     }
 
   }
 
-  public static class delVrf_result implements org.apache.thrift.TBase<delVrf_result, delVrf_result._Fields>, java.io.Serializable, Cloneable, Comparable<delVrf_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delVrf_result");
+  public static class setLogConfig_result implements org.apache.thrift.TBase<setLogConfig_result, setLogConfig_result._Fields>, java.io.Serializable, Cloneable, Comparable<setLogConfig_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setLogConfig_result");
 
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new delVrf_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new delVrf_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new setLogConfig_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new setLogConfig_resultTupleSchemeFactory());
     }
 
     public int success; // required
@@ -6004,13 +15073,13 @@ public class BgpConfigurator {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delVrf_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setLogConfig_result.class, metaDataMap);
     }
 
-    public delVrf_result() {
+    public setLogConfig_result() {
     }
 
-    public delVrf_result(
+    public setLogConfig_result(
       int success)
     {
       this();
@@ -6021,13 +15090,13 @@ public class BgpConfigurator {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public delVrf_result(delVrf_result other) {
+    public setLogConfig_result(setLogConfig_result other) {
       __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
     }
 
-    public delVrf_result deepCopy() {
-      return new delVrf_result(this);
+    public setLogConfig_result deepCopy() {
+      return new setLogConfig_result(this);
     }
 
     @Override
@@ -6040,7 +15109,7 @@ public class BgpConfigurator {
       return this.success;
     }
 
-    public delVrf_result setSuccess(int success) {
+    public setLogConfig_result setSuccess(int success) {
       this.success = success;
       setSuccessIsSet(true);
       return this;
@@ -6098,12 +15167,12 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof delVrf_result)
-        return this.equals((delVrf_result)that);
+      if (that instanceof setLogConfig_result)
+        return this.equals((setLogConfig_result)that);
       return false;
     }
 
-    public boolean equals(delVrf_result that) {
+    public boolean equals(setLogConfig_result that) {
       if (that == null)
         return false;
 
@@ -6125,7 +15194,7 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(delVrf_result other) {
+    public int compareTo(setLogConfig_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -6159,7 +15228,7 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("delVrf_result(");
+      StringBuilder sb = new StringBuilder("setLogConfig_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -6192,15 +15261,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class delVrf_resultStandardSchemeFactory implements SchemeFactory {
-      public delVrf_resultStandardScheme getScheme() {
-        return new delVrf_resultStandardScheme();
+    private static class setLogConfig_resultStandardSchemeFactory implements SchemeFactory {
+      public setLogConfig_resultStandardScheme getScheme() {
+        return new setLogConfig_resultStandardScheme();
       }
     }
 
-    private static class delVrf_resultStandardScheme extends StandardScheme<delVrf_result> {
+    private static class setLogConfig_resultStandardScheme extends StandardScheme<setLogConfig_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, delVrf_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, setLogConfig_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -6229,7 +15298,7 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, delVrf_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, setLogConfig_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -6244,16 +15313,16 @@ public class BgpConfigurator {
 
     }
 
-    private static class delVrf_resultTupleSchemeFactory implements SchemeFactory {
-      public delVrf_resultTupleScheme getScheme() {
-        return new delVrf_resultTupleScheme();
+    private static class setLogConfig_resultTupleSchemeFactory implements SchemeFactory {
+      public setLogConfig_resultTupleScheme getScheme() {
+        return new setLogConfig_resultTupleScheme();
       }
     }
 
-    private static class delVrf_resultTupleScheme extends TupleScheme<delVrf_result> {
+    private static class setLogConfig_resultTupleScheme extends TupleScheme<setLogConfig_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, delVrf_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, setLogConfig_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -6266,7 +15335,7 @@ public class BgpConfigurator {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, delVrf_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, setLogConfig_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
@@ -6278,31 +15347,22 @@ public class BgpConfigurator {
 
   }
 
-  public static class pushRoute_args implements org.apache.thrift.TBase<pushRoute_args, pushRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<pushRoute_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushRoute_args");
+  public static class enableGracefulRestart_args implements org.apache.thrift.TBase<enableGracefulRestart_args, enableGracefulRestart_args._Fields>, java.io.Serializable, Cloneable, Comparable<enableGracefulRestart_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableGracefulRestart_args");
 
-    private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField NEXTHOP_FIELD_DESC = new org.apache.thrift.protocol.TField("nexthop", org.apache.thrift.protocol.TType.STRING, (short)2);
-    private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)3);
-    private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.I32, (short)4);
+    private static final org.apache.thrift.protocol.TField STALEPATH_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("stalepathTime", org.apache.thrift.protocol.TType.I32, (short)1);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new pushRoute_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new pushRoute_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new enableGracefulRestart_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new enableGracefulRestart_argsTupleSchemeFactory());
     }
 
-    public String prefix; // required
-    public String nexthop; // required
-    public String rd; // required
-    public int label; // required
+    public int stalepathTime; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      PREFIX((short)1, "prefix"),
-      NEXTHOP((short)2, "nexthop"),
-      RD((short)3, "rd"),
-      LABEL((short)4, "label");
+      STALEPATH_TIME((short)1, "stalepathTime");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -6317,14 +15377,8 @@ public class BgpConfigurator {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // PREFIX
-            return PREFIX;
-          case 2: // NEXTHOP
-            return NEXTHOP;
-          case 3: // RD
-            return RD;
-          case 4: // LABEL
-            return LABEL;
+          case 1: // STALEPATH_TIME
+            return STALEPATH_TIME;
           default:
             return null;
         }
@@ -6365,196 +15419,76 @@ public class BgpConfigurator {
     }
 
     // isset id assignments
-    private static final int __LABEL_ISSET_ID = 0;
+    private static final int __STALEPATHTIME_ISSET_ID = 0;
     private byte __isset_bitfield = 0;
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.NEXTHOP, new org.apache.thrift.meta_data.FieldMetaData("nexthop", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+      tmpMap.put(_Fields.STALEPATH_TIME, new org.apache.thrift.meta_data.FieldMetaData("stalepathTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushRoute_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableGracefulRestart_args.class, metaDataMap);
     }
 
-    public pushRoute_args() {
+    public enableGracefulRestart_args() {
     }
 
-    public pushRoute_args(
-      String prefix,
-      String nexthop,
-      String rd,
-      int label)
+    public enableGracefulRestart_args(
+      int stalepathTime)
     {
       this();
-      this.prefix = prefix;
-      this.nexthop = nexthop;
-      this.rd = rd;
-      this.label = label;
-      setLabelIsSet(true);
+      this.stalepathTime = stalepathTime;
+      setStalepathTimeIsSet(true);
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public pushRoute_args(pushRoute_args other) {
+    public enableGracefulRestart_args(enableGracefulRestart_args other) {
       __isset_bitfield = other.__isset_bitfield;
-      if (other.isSetPrefix()) {
-        this.prefix = other.prefix;
-      }
-      if (other.isSetNexthop()) {
-        this.nexthop = other.nexthop;
-      }
-      if (other.isSetRd()) {
-        this.rd = other.rd;
-      }
-      this.label = other.label;
+      this.stalepathTime = other.stalepathTime;
     }
 
-    public pushRoute_args deepCopy() {
-      return new pushRoute_args(this);
+    public enableGracefulRestart_args deepCopy() {
+      return new enableGracefulRestart_args(this);
     }
 
     @Override
     public void clear() {
-      this.prefix = null;
-      this.nexthop = null;
-      this.rd = null;
-      setLabelIsSet(false);
-      this.label = 0;
-    }
-
-    public String getPrefix() {
-      return this.prefix;
-    }
-
-    public pushRoute_args setPrefix(String prefix) {
-      this.prefix = prefix;
-      return this;
-    }
-
-    public void unsetPrefix() {
-      this.prefix = null;
-    }
-
-    /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
-    public boolean isSetPrefix() {
-      return this.prefix != null;
-    }
-
-    public void setPrefixIsSet(boolean value) {
-      if (!value) {
-        this.prefix = null;
-      }
-    }
-
-    public String getNexthop() {
-      return this.nexthop;
-    }
-
-    public pushRoute_args setNexthop(String nexthop) {
-      this.nexthop = nexthop;
-      return this;
-    }
-
-    public void unsetNexthop() {
-      this.nexthop = null;
-    }
-
-    /** Returns true if field nexthop is set (has been assigned a value) and false otherwise */
-    public boolean isSetNexthop() {
-      return this.nexthop != null;
-    }
-
-    public void setNexthopIsSet(boolean value) {
-      if (!value) {
-        this.nexthop = null;
-      }
-    }
-
-    public String getRd() {
-      return this.rd;
-    }
-
-    public pushRoute_args setRd(String rd) {
-      this.rd = rd;
-      return this;
-    }
-
-    public void unsetRd() {
-      this.rd = null;
-    }
-
-    /** Returns true if field rd is set (has been assigned a value) and false otherwise */
-    public boolean isSetRd() {
-      return this.rd != null;
-    }
-
-    public void setRdIsSet(boolean value) {
-      if (!value) {
-        this.rd = null;
-      }
+      setStalepathTimeIsSet(false);
+      this.stalepathTime = 0;
     }
 
-    public int getLabel() {
-      return this.label;
+    public int getStalepathTime() {
+      return this.stalepathTime;
     }
 
-    public pushRoute_args setLabel(int label) {
-      this.label = label;
-      setLabelIsSet(true);
+    public enableGracefulRestart_args setStalepathTime(int stalepathTime) {
+      this.stalepathTime = stalepathTime;
+      setStalepathTimeIsSet(true);
       return this;
     }
 
-    public void unsetLabel() {
-      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LABEL_ISSET_ID);
-    }
-
-    /** Returns true if field label is set (has been assigned a value) and false otherwise */
-    public boolean isSetLabel() {
-      return EncodingUtils.testBit(__isset_bitfield, __LABEL_ISSET_ID);
-    }
-
-    public void setLabelIsSet(boolean value) {
-      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LABEL_ISSET_ID, value);
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case PREFIX:
-        if (value == null) {
-          unsetPrefix();
-        } else {
-          setPrefix((String)value);
-        }
-        break;
-
-      case NEXTHOP:
-        if (value == null) {
-          unsetNexthop();
-        } else {
-          setNexthop((String)value);
-        }
-        break;
-
-      case RD:
-        if (value == null) {
-          unsetRd();
-        } else {
-          setRd((String)value);
-        }
-        break;
+    public void unsetStalepathTime() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID);
+    }
 
-      case LABEL:
+    /** Returns true if field stalepathTime is set (has been assigned a value) and false otherwise */
+    public boolean isSetStalepathTime() {
+      return EncodingUtils.testBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID);
+    }
+
+    public void setStalepathTimeIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case STALEPATH_TIME:
         if (value == null) {
-          unsetLabel();
+          unsetStalepathTime();
         } else {
-          setLabel((Integer)value);
+          setStalepathTime((Integer)value);
         }
         break;
 
@@ -6563,17 +15497,8 @@ public class BgpConfigurator {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case PREFIX:
-        return getPrefix();
-
-      case NEXTHOP:
-        return getNexthop();
-
-      case RD:
-        return getRd();
-
-      case LABEL:
-        return Integer.valueOf(getLabel());
+      case STALEPATH_TIME:
+        return Integer.valueOf(getStalepathTime());
 
       }
       throw new IllegalStateException();
@@ -6586,14 +15511,8 @@ public class BgpConfigurator {
       }
 
       switch (field) {
-      case PREFIX:
-        return isSetPrefix();
-      case NEXTHOP:
-        return isSetNexthop();
-      case RD:
-        return isSetRd();
-      case LABEL:
-        return isSetLabel();
+      case STALEPATH_TIME:
+        return isSetStalepathTime();
       }
       throw new IllegalStateException();
     }
@@ -6602,48 +15521,21 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof pushRoute_args)
-        return this.equals((pushRoute_args)that);
+      if (that instanceof enableGracefulRestart_args)
+        return this.equals((enableGracefulRestart_args)that);
       return false;
     }
 
-    public boolean equals(pushRoute_args that) {
+    public boolean equals(enableGracefulRestart_args that) {
       if (that == null)
         return false;
 
-      boolean this_present_prefix = true && this.isSetPrefix();
-      boolean that_present_prefix = true && that.isSetPrefix();
-      if (this_present_prefix || that_present_prefix) {
-        if (!(this_present_prefix && that_present_prefix))
-          return false;
-        if (!this.prefix.equals(that.prefix))
-          return false;
-      }
-
-      boolean this_present_nexthop = true && this.isSetNexthop();
-      boolean that_present_nexthop = true && that.isSetNexthop();
-      if (this_present_nexthop || that_present_nexthop) {
-        if (!(this_present_nexthop && that_present_nexthop))
-          return false;
-        if (!this.nexthop.equals(that.nexthop))
-          return false;
-      }
-
-      boolean this_present_rd = true && this.isSetRd();
-      boolean that_present_rd = true && that.isSetRd();
-      if (this_present_rd || that_present_rd) {
-        if (!(this_present_rd && that_present_rd))
-          return false;
-        if (!this.rd.equals(that.rd))
+      boolean this_present_stalepathTime = true;
+      boolean that_present_stalepathTime = true;
+      if (this_present_stalepathTime || that_present_stalepathTime) {
+        if (!(this_present_stalepathTime && that_present_stalepathTime))
           return false;
-      }
-
-      boolean this_present_label = true;
-      boolean that_present_label = true;
-      if (this_present_label || that_present_label) {
-        if (!(this_present_label && that_present_label))
-          return false;
-        if (this.label != that.label)
+        if (this.stalepathTime != that.stalepathTime)
           return false;
       }
 
@@ -6656,49 +15548,19 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(pushRoute_args other) {
+    public int compareTo(enableGracefulRestart_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetPrefix()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetNexthop()).compareTo(other.isSetNexthop());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetNexthop()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nexthop, other.nexthop);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetRd()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetLabel()).compareTo(other.isSetLabel());
+      lastComparison = Boolean.valueOf(isSetStalepathTime()).compareTo(other.isSetStalepathTime());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetLabel()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label);
+      if (isSetStalepathTime()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stalepathTime, other.stalepathTime);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -6720,35 +15582,11 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("pushRoute_args(");
+      StringBuilder sb = new StringBuilder("enableGracefulRestart_args(");
       boolean first = true;
 
-      sb.append("prefix:");
-      if (this.prefix == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.prefix);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("nexthop:");
-      if (this.nexthop == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.nexthop);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("rd:");
-      if (this.rd == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.rd);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("label:");
-      sb.append(this.label);
+      sb.append("stalepathTime:");
+      sb.append(this.stalepathTime);
       first = false;
       sb.append(")");
       return sb.toString();
@@ -6777,15 +15615,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class pushRoute_argsStandardSchemeFactory implements SchemeFactory {
-      public pushRoute_argsStandardScheme getScheme() {
-        return new pushRoute_argsStandardScheme();
+    private static class enableGracefulRestart_argsStandardSchemeFactory implements SchemeFactory {
+      public enableGracefulRestart_argsStandardScheme getScheme() {
+        return new enableGracefulRestart_argsStandardScheme();
       }
     }
 
-    private static class pushRoute_argsStandardScheme extends StandardScheme<pushRoute_args> {
+    private static class enableGracefulRestart_argsStandardScheme extends StandardScheme<enableGracefulRestart_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, pushRoute_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, enableGracefulRestart_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -6795,34 +15633,10 @@ public class BgpConfigurator {
             break;
           }
           switch (schemeField.id) {
-            case 1: // PREFIX
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.prefix = iprot.readString();
-                struct.setPrefixIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 2: // NEXTHOP
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.nexthop = iprot.readString();
-                struct.setNexthopIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 3: // RD
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.rd = iprot.readString();
-                struct.setRdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 4: // LABEL
+            case 1: // STALEPATH_TIME
               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-                struct.label = iprot.readI32();
-                struct.setLabelIsSet(true);
+                struct.stalepathTime = iprot.readI32();
+                struct.setStalepathTimeIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -6838,27 +15652,12 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, pushRoute_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, enableGracefulRestart_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.prefix != null) {
-          oprot.writeFieldBegin(PREFIX_FIELD_DESC);
-          oprot.writeString(struct.prefix);
-          oprot.writeFieldEnd();
-        }
-        if (struct.nexthop != null) {
-          oprot.writeFieldBegin(NEXTHOP_FIELD_DESC);
-          oprot.writeString(struct.nexthop);
-          oprot.writeFieldEnd();
-        }
-        if (struct.rd != null) {
-          oprot.writeFieldBegin(RD_FIELD_DESC);
-          oprot.writeString(struct.rd);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldBegin(LABEL_FIELD_DESC);
-        oprot.writeI32(struct.label);
+        oprot.writeFieldBegin(STALEPATH_TIME_FIELD_DESC);
+        oprot.writeI32(struct.stalepathTime);
         oprot.writeFieldEnd();
         oprot.writeFieldStop();
         oprot.writeStructEnd();
@@ -6866,79 +15665,49 @@ public class BgpConfigurator {
 
     }
 
-    private static class pushRoute_argsTupleSchemeFactory implements SchemeFactory {
-      public pushRoute_argsTupleScheme getScheme() {
-        return new pushRoute_argsTupleScheme();
+    private static class enableGracefulRestart_argsTupleSchemeFactory implements SchemeFactory {
+      public enableGracefulRestart_argsTupleScheme getScheme() {
+        return new enableGracefulRestart_argsTupleScheme();
       }
     }
 
-    private static class pushRoute_argsTupleScheme extends TupleScheme<pushRoute_args> {
+    private static class enableGracefulRestart_argsTupleScheme extends TupleScheme<enableGracefulRestart_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, pushRoute_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, enableGracefulRestart_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
-        if (struct.isSetPrefix()) {
+        if (struct.isSetStalepathTime()) {
           optionals.set(0);
         }
-        if (struct.isSetNexthop()) {
-          optionals.set(1);
-        }
-        if (struct.isSetRd()) {
-          optionals.set(2);
-        }
-        if (struct.isSetLabel()) {
-          optionals.set(3);
-        }
-        oprot.writeBitSet(optionals, 4);
-        if (struct.isSetPrefix()) {
-          oprot.writeString(struct.prefix);
-        }
-        if (struct.isSetNexthop()) {
-          oprot.writeString(struct.nexthop);
-        }
-        if (struct.isSetRd()) {
-          oprot.writeString(struct.rd);
-        }
-        if (struct.isSetLabel()) {
-          oprot.writeI32(struct.label);
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetStalepathTime()) {
+          oprot.writeI32(struct.stalepathTime);
         }
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, pushRoute_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, enableGracefulRestart_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(4);
+        BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
-          struct.prefix = iprot.readString();
-          struct.setPrefixIsSet(true);
-        }
-        if (incoming.get(1)) {
-          struct.nexthop = iprot.readString();
-          struct.setNexthopIsSet(true);
-        }
-        if (incoming.get(2)) {
-          struct.rd = iprot.readString();
-          struct.setRdIsSet(true);
-        }
-        if (incoming.get(3)) {
-          struct.label = iprot.readI32();
-          struct.setLabelIsSet(true);
+          struct.stalepathTime = iprot.readI32();
+          struct.setStalepathTimeIsSet(true);
         }
       }
     }
 
   }
 
-  public static class pushRoute_result implements org.apache.thrift.TBase<pushRoute_result, pushRoute_result._Fields>, java.io.Serializable, Cloneable, Comparable<pushRoute_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushRoute_result");
+  public static class enableGracefulRestart_result implements org.apache.thrift.TBase<enableGracefulRestart_result, enableGracefulRestart_result._Fields>, java.io.Serializable, Cloneable, Comparable<enableGracefulRestart_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableGracefulRestart_result");
 
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new pushRoute_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new pushRoute_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new enableGracefulRestart_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new enableGracefulRestart_resultTupleSchemeFactory());
     }
 
     public int success; // required
@@ -7010,13 +15779,13 @@ public class BgpConfigurator {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushRoute_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableGracefulRestart_result.class, metaDataMap);
     }
 
-    public pushRoute_result() {
+    public enableGracefulRestart_result() {
     }
 
-    public pushRoute_result(
+    public enableGracefulRestart_result(
       int success)
     {
       this();
@@ -7027,13 +15796,13 @@ public class BgpConfigurator {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public pushRoute_result(pushRoute_result other) {
+    public enableGracefulRestart_result(enableGracefulRestart_result other) {
       __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
     }
 
-    public pushRoute_result deepCopy() {
-      return new pushRoute_result(this);
+    public enableGracefulRestart_result deepCopy() {
+      return new enableGracefulRestart_result(this);
     }
 
     @Override
@@ -7046,7 +15815,7 @@ public class BgpConfigurator {
       return this.success;
     }
 
-    public pushRoute_result setSuccess(int success) {
+    public enableGracefulRestart_result setSuccess(int success) {
       this.success = success;
       setSuccessIsSet(true);
       return this;
@@ -7104,12 +15873,12 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof pushRoute_result)
-        return this.equals((pushRoute_result)that);
+      if (that instanceof enableGracefulRestart_result)
+        return this.equals((enableGracefulRestart_result)that);
       return false;
     }
 
-    public boolean equals(pushRoute_result that) {
+    public boolean equals(enableGracefulRestart_result that) {
       if (that == null)
         return false;
 
@@ -7131,7 +15900,7 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(pushRoute_result other) {
+    public int compareTo(enableGracefulRestart_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -7165,7 +15934,7 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("pushRoute_result(");
+      StringBuilder sb = new StringBuilder("enableGracefulRestart_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -7198,15 +15967,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class pushRoute_resultStandardSchemeFactory implements SchemeFactory {
-      public pushRoute_resultStandardScheme getScheme() {
-        return new pushRoute_resultStandardScheme();
+    private static class enableGracefulRestart_resultStandardSchemeFactory implements SchemeFactory {
+      public enableGracefulRestart_resultStandardScheme getScheme() {
+        return new enableGracefulRestart_resultStandardScheme();
       }
     }
 
-    private static class pushRoute_resultStandardScheme extends StandardScheme<pushRoute_result> {
+    private static class enableGracefulRestart_resultStandardScheme extends StandardScheme<enableGracefulRestart_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, pushRoute_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, enableGracefulRestart_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -7235,7 +16004,7 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, pushRoute_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, enableGracefulRestart_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -7250,16 +16019,16 @@ public class BgpConfigurator {
 
     }
 
-    private static class pushRoute_resultTupleSchemeFactory implements SchemeFactory {
-      public pushRoute_resultTupleScheme getScheme() {
-        return new pushRoute_resultTupleScheme();
+    private static class enableGracefulRestart_resultTupleSchemeFactory implements SchemeFactory {
+      public enableGracefulRestart_resultTupleScheme getScheme() {
+        return new enableGracefulRestart_resultTupleScheme();
       }
     }
 
-    private static class pushRoute_resultTupleScheme extends TupleScheme<pushRoute_result> {
+    private static class enableGracefulRestart_resultTupleScheme extends TupleScheme<enableGracefulRestart_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, pushRoute_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, enableGracefulRestart_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -7272,7 +16041,7 @@ public class BgpConfigurator {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, pushRoute_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, enableGracefulRestart_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
@@ -7284,25 +16053,20 @@ public class BgpConfigurator {
 
   }
 
-  public static class withdrawRoute_args implements org.apache.thrift.TBase<withdrawRoute_args, withdrawRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<withdrawRoute_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("withdrawRoute_args");
+  public static class disableGracefulRestart_args implements org.apache.thrift.TBase<disableGracefulRestart_args, disableGracefulRestart_args._Fields>, java.io.Serializable, Cloneable, Comparable<disableGracefulRestart_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableGracefulRestart_args");
 
-    private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new withdrawRoute_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new withdrawRoute_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new disableGracefulRestart_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new disableGracefulRestart_argsTupleSchemeFactory());
     }
 
-    public String prefix; // required
-    public String rd; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      PREFIX((short)1, "prefix"),
-      RD((short)2, "rd");
+;
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -7317,10 +16081,6 @@ public class BgpConfigurator {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // PREFIX
-            return PREFIX;
-          case 2: // RD
-            return RD;
           default:
             return null;
         }
@@ -7359,130 +16119,37 @@ public class BgpConfigurator {
         return _fieldName;
       }
     }
-
-    // isset id assignments
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(withdrawRoute_args.class, metaDataMap);
-    }
-
-    public withdrawRoute_args() {
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableGracefulRestart_args.class, metaDataMap);
     }
 
-    public withdrawRoute_args(
-      String prefix,
-      String rd)
-    {
-      this();
-      this.prefix = prefix;
-      this.rd = rd;
+    public disableGracefulRestart_args() {
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public withdrawRoute_args(withdrawRoute_args other) {
-      if (other.isSetPrefix()) {
-        this.prefix = other.prefix;
-      }
-      if (other.isSetRd()) {
-        this.rd = other.rd;
-      }
+    public disableGracefulRestart_args(disableGracefulRestart_args other) {
     }
 
-    public withdrawRoute_args deepCopy() {
-      return new withdrawRoute_args(this);
+    public disableGracefulRestart_args deepCopy() {
+      return new disableGracefulRestart_args(this);
     }
 
     @Override
     public void clear() {
-      this.prefix = null;
-      this.rd = null;
-    }
-
-    public String getPrefix() {
-      return this.prefix;
-    }
-
-    public withdrawRoute_args setPrefix(String prefix) {
-      this.prefix = prefix;
-      return this;
-    }
-
-    public void unsetPrefix() {
-      this.prefix = null;
-    }
-
-    /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
-    public boolean isSetPrefix() {
-      return this.prefix != null;
-    }
-
-    public void setPrefixIsSet(boolean value) {
-      if (!value) {
-        this.prefix = null;
-      }
-    }
-
-    public String getRd() {
-      return this.rd;
-    }
-
-    public withdrawRoute_args setRd(String rd) {
-      this.rd = rd;
-      return this;
-    }
-
-    public void unsetRd() {
-      this.rd = null;
-    }
-
-    /** Returns true if field rd is set (has been assigned a value) and false otherwise */
-    public boolean isSetRd() {
-      return this.rd != null;
-    }
-
-    public void setRdIsSet(boolean value) {
-      if (!value) {
-        this.rd = null;
-      }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case PREFIX:
-        if (value == null) {
-          unsetPrefix();
-        } else {
-          setPrefix((String)value);
-        }
-        break;
-
-      case RD:
-        if (value == null) {
-          unsetRd();
-        } else {
-          setRd((String)value);
-        }
-        break;
-
       }
     }
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case PREFIX:
-        return getPrefix();
-
-      case RD:
-        return getRd();
-
       }
       throw new IllegalStateException();
     }
@@ -7494,10 +16161,6 @@ public class BgpConfigurator {
       }
 
       switch (field) {
-      case PREFIX:
-        return isSetPrefix();
-      case RD:
-        return isSetRd();
       }
       throw new IllegalStateException();
     }
@@ -7506,33 +16169,15 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof withdrawRoute_args)
-        return this.equals((withdrawRoute_args)that);
+      if (that instanceof disableGracefulRestart_args)
+        return this.equals((disableGracefulRestart_args)that);
       return false;
     }
 
-    public boolean equals(withdrawRoute_args that) {
+    public boolean equals(disableGracefulRestart_args that) {
       if (that == null)
         return false;
 
-      boolean this_present_prefix = true && this.isSetPrefix();
-      boolean that_present_prefix = true && that.isSetPrefix();
-      if (this_present_prefix || that_present_prefix) {
-        if (!(this_present_prefix && that_present_prefix))
-          return false;
-        if (!this.prefix.equals(that.prefix))
-          return false;
-      }
-
-      boolean this_present_rd = true && this.isSetRd();
-      boolean that_present_rd = true && that.isSetRd();
-      if (this_present_rd || that_present_rd) {
-        if (!(this_present_rd && that_present_rd))
-          return false;
-        if (!this.rd.equals(that.rd))
-          return false;
-      }
-
       return true;
     }
 
@@ -7542,33 +16187,13 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(withdrawRoute_args other) {
+    public int compareTo(disableGracefulRestart_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetPrefix()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetRd()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
       return 0;
     }
 
@@ -7586,24 +16211,9 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("withdrawRoute_args(");
+      StringBuilder sb = new StringBuilder("disableGracefulRestart_args(");
       boolean first = true;
 
-      sb.append("prefix:");
-      if (this.prefix == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.prefix);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("rd:");
-      if (this.rd == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.rd);
-      }
-      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -7629,15 +16239,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class withdrawRoute_argsStandardSchemeFactory implements SchemeFactory {
-      public withdrawRoute_argsStandardScheme getScheme() {
-        return new withdrawRoute_argsStandardScheme();
+    private static class disableGracefulRestart_argsStandardSchemeFactory implements SchemeFactory {
+      public disableGracefulRestart_argsStandardScheme getScheme() {
+        return new disableGracefulRestart_argsStandardScheme();
       }
     }
 
-    private static class withdrawRoute_argsStandardScheme extends StandardScheme<withdrawRoute_args> {
+    private static class disableGracefulRestart_argsStandardScheme extends StandardScheme<disableGracefulRestart_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, withdrawRoute_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, disableGracefulRestart_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -7647,22 +16257,6 @@ public class BgpConfigurator {
             break;
           }
           switch (schemeField.id) {
-            case 1: // PREFIX
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.prefix = iprot.readString();
-                struct.setPrefixIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 2: // RD
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.rd = iprot.readString();
-                struct.setRdIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -7674,79 +16268,46 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, withdrawRoute_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, disableGracefulRestart_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.prefix != null) {
-          oprot.writeFieldBegin(PREFIX_FIELD_DESC);
-          oprot.writeString(struct.prefix);
-          oprot.writeFieldEnd();
-        }
-        if (struct.rd != null) {
-          oprot.writeFieldBegin(RD_FIELD_DESC);
-          oprot.writeString(struct.rd);
-          oprot.writeFieldEnd();
-        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
 
     }
 
-    private static class withdrawRoute_argsTupleSchemeFactory implements SchemeFactory {
-      public withdrawRoute_argsTupleScheme getScheme() {
-        return new withdrawRoute_argsTupleScheme();
+    private static class disableGracefulRestart_argsTupleSchemeFactory implements SchemeFactory {
+      public disableGracefulRestart_argsTupleScheme getScheme() {
+        return new disableGracefulRestart_argsTupleScheme();
       }
     }
 
-    private static class withdrawRoute_argsTupleScheme extends TupleScheme<withdrawRoute_args> {
+    private static class disableGracefulRestart_argsTupleScheme extends TupleScheme<disableGracefulRestart_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, disableGracefulRestart_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
-        BitSet optionals = new BitSet();
-        if (struct.isSetPrefix()) {
-          optionals.set(0);
-        }
-        if (struct.isSetRd()) {
-          optionals.set(1);
-        }
-        oprot.writeBitSet(optionals, 2);
-        if (struct.isSetPrefix()) {
-          oprot.writeString(struct.prefix);
-        }
-        if (struct.isSetRd()) {
-          oprot.writeString(struct.rd);
-        }
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, disableGracefulRestart_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(2);
-        if (incoming.get(0)) {
-          struct.prefix = iprot.readString();
-          struct.setPrefixIsSet(true);
-        }
-        if (incoming.get(1)) {
-          struct.rd = iprot.readString();
-          struct.setRdIsSet(true);
-        }
       }
     }
 
   }
 
-  public static class withdrawRoute_result implements org.apache.thrift.TBase<withdrawRoute_result, withdrawRoute_result._Fields>, java.io.Serializable, Cloneable, Comparable<withdrawRoute_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("withdrawRoute_result");
+  public static class disableGracefulRestart_result implements org.apache.thrift.TBase<disableGracefulRestart_result, disableGracefulRestart_result._Fields>, java.io.Serializable, Cloneable, Comparable<disableGracefulRestart_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableGracefulRestart_result");
 
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new withdrawRoute_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new withdrawRoute_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new disableGracefulRestart_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new disableGracefulRestart_resultTupleSchemeFactory());
     }
 
     public int success; // required
@@ -7818,13 +16379,13 @@ public class BgpConfigurator {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(withdrawRoute_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableGracefulRestart_result.class, metaDataMap);
     }
 
-    public withdrawRoute_result() {
+    public disableGracefulRestart_result() {
     }
 
-    public withdrawRoute_result(
+    public disableGracefulRestart_result(
       int success)
     {
       this();
@@ -7835,13 +16396,13 @@ public class BgpConfigurator {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public withdrawRoute_result(withdrawRoute_result other) {
+    public disableGracefulRestart_result(disableGracefulRestart_result other) {
       __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
     }
 
-    public withdrawRoute_result deepCopy() {
-      return new withdrawRoute_result(this);
+    public disableGracefulRestart_result deepCopy() {
+      return new disableGracefulRestart_result(this);
     }
 
     @Override
@@ -7854,7 +16415,7 @@ public class BgpConfigurator {
       return this.success;
     }
 
-    public withdrawRoute_result setSuccess(int success) {
+    public disableGracefulRestart_result setSuccess(int success) {
       this.success = success;
       setSuccessIsSet(true);
       return this;
@@ -7912,12 +16473,12 @@ public class BgpConfigurator {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof withdrawRoute_result)
-        return this.equals((withdrawRoute_result)that);
+      if (that instanceof disableGracefulRestart_result)
+        return this.equals((disableGracefulRestart_result)that);
       return false;
     }
 
-    public boolean equals(withdrawRoute_result that) {
+    public boolean equals(disableGracefulRestart_result that) {
       if (that == null)
         return false;
 
@@ -7939,7 +16500,7 @@ public class BgpConfigurator {
     }
 
     @Override
-    public int compareTo(withdrawRoute_result other) {
+    public int compareTo(disableGracefulRestart_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -7973,7 +16534,7 @@ public class BgpConfigurator {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("withdrawRoute_result(");
+      StringBuilder sb = new StringBuilder("disableGracefulRestart_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -8006,15 +16567,15 @@ public class BgpConfigurator {
       }
     }
 
-    private static class withdrawRoute_resultStandardSchemeFactory implements SchemeFactory {
-      public withdrawRoute_resultStandardScheme getScheme() {
-        return new withdrawRoute_resultStandardScheme();
+    private static class disableGracefulRestart_resultStandardSchemeFactory implements SchemeFactory {
+      public disableGracefulRestart_resultStandardScheme getScheme() {
+        return new disableGracefulRestart_resultStandardScheme();
       }
     }
 
-    private static class withdrawRoute_resultStandardScheme extends StandardScheme<withdrawRoute_result> {
+    private static class disableGracefulRestart_resultStandardScheme extends StandardScheme<disableGracefulRestart_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, withdrawRoute_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, disableGracefulRestart_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -8043,7 +16604,7 @@ public class BgpConfigurator {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, withdrawRoute_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, disableGracefulRestart_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -8058,16 +16619,16 @@ public class BgpConfigurator {
 
     }
 
-    private static class withdrawRoute_resultTupleSchemeFactory implements SchemeFactory {
-      public withdrawRoute_resultTupleScheme getScheme() {
-        return new withdrawRoute_resultTupleScheme();
+    private static class disableGracefulRestart_resultTupleSchemeFactory implements SchemeFactory {
+      public disableGracefulRestart_resultTupleScheme getScheme() {
+        return new disableGracefulRestart_resultTupleScheme();
       }
     }
 
-    private static class withdrawRoute_resultTupleScheme extends TupleScheme<withdrawRoute_result> {
+    private static class disableGracefulRestart_resultTupleScheme extends TupleScheme<disableGracefulRestart_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, disableGracefulRestart_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -8080,7 +16641,7 @@ public class BgpConfigurator {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, disableGracefulRestart_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
index 4d46d3e0b0f59093a703f97c2e4611d9a4539577..b1104b16489dd8fb0e1c98a9904dabb84862e666 100644 (file)
@@ -4,6 +4,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
+
 package org.opendaylight.bgpmanager.thrift.gen;
 
 import org.apache.thrift.scheme.IScheme;
@@ -42,6 +43,8 @@ public class BgpUpdater {
 
     public void onStartConfigResyncNotification() throws org.apache.thrift.TException;
 
+    public void onNotificationSendEvent(String prefix, byte errCode, byte errSubcode) throws org.apache.thrift.TException;
+
   }
 
   public interface AsyncIface {
@@ -52,6 +55,8 @@ public class BgpUpdater {
 
     public void onStartConfigResyncNotification(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void onNotificationSendEvent(String prefix, byte errCode, byte errSubcode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
   }
 
   public static class Client extends org.apache.thrift.TServiceClient implements Iface {
@@ -115,6 +120,20 @@ public class BgpUpdater {
       sendBase("onStartConfigResyncNotification", args);
     }
 
+    public void onNotificationSendEvent(String prefix, byte errCode, byte errSubcode) throws org.apache.thrift.TException
+    {
+      send_onNotificationSendEvent(prefix, errCode, errSubcode);
+    }
+
+    public void send_onNotificationSendEvent(String prefix, byte errCode, byte errSubcode) throws org.apache.thrift.TException
+    {
+      onNotificationSendEvent_args args = new onNotificationSendEvent_args();
+      args.setPrefix(prefix);
+      args.setErrCode(errCode);
+      args.setErrSubcode(errSubcode);
+      sendBase("onNotificationSendEvent", args);
+    }
+
   }
   public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
     public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
@@ -241,6 +260,43 @@ public class BgpUpdater {
       }
     }
 
+    public void onNotificationSendEvent(String prefix, byte errCode, byte errSubcode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      onNotificationSendEvent_call method_call = new onNotificationSendEvent_call(prefix, errCode, errSubcode, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class onNotificationSendEvent_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String prefix;
+      private byte errCode;
+      private byte errSubcode;
+      public onNotificationSendEvent_call(String prefix, byte errCode, byte errSubcode, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, true);
+        this.prefix = prefix;
+        this.errCode = errCode;
+        this.errSubcode = errSubcode;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onNotificationSendEvent", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        onNotificationSendEvent_args args = new onNotificationSendEvent_args();
+        args.setPrefix(prefix);
+        args.setErrCode(errCode);
+        args.setErrSubcode(errSubcode);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public void getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+      }
+    }
+
   }
 
   public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
@@ -257,6 +313,7 @@ public class BgpUpdater {
       processMap.put("onUpdatePushRoute", new onUpdatePushRoute());
       processMap.put("onUpdateWithdrawRoute", new onUpdateWithdrawRoute());
       processMap.put("onStartConfigResyncNotification", new onStartConfigResyncNotification());
+      processMap.put("onNotificationSendEvent", new onNotificationSendEvent());
       return processMap;
     }
 
@@ -317,6 +374,25 @@ public class BgpUpdater {
       }
     }
 
+    public static class onNotificationSendEvent<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onNotificationSendEvent_args> {
+      public onNotificationSendEvent() {
+        super("onNotificationSendEvent");
+      }
+
+      public onNotificationSendEvent_args getEmptyArgsInstance() {
+        return new onNotificationSendEvent_args();
+      }
+
+      protected boolean isOneway() {
+        return true;
+      }
+
+      public org.apache.thrift.TBase getResult(I iface, onNotificationSendEvent_args args) throws org.apache.thrift.TException {
+        iface.onNotificationSendEvent(args.prefix, args.errCode, args.errSubcode);
+        return null;
+      }
+    }
+
   }
 
   public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
@@ -333,6 +409,7 @@ public class BgpUpdater {
       processMap.put("onUpdatePushRoute", new onUpdatePushRoute());
       processMap.put("onUpdateWithdrawRoute", new onUpdateWithdrawRoute());
       processMap.put("onStartConfigResyncNotification", new onStartConfigResyncNotification());
+      processMap.put("onNotificationSendEvent", new onNotificationSendEvent());
       return processMap;
     }
 
@@ -420,6 +497,34 @@ public class BgpUpdater {
       }
     }
 
+    public static class onNotificationSendEvent<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, onNotificationSendEvent_args, Void> {
+      public onNotificationSendEvent() {
+        super("onNotificationSendEvent");
+      }
+
+      public onNotificationSendEvent_args getEmptyArgsInstance() {
+        return new onNotificationSendEvent_args();
+      }
+
+      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Void>() { 
+          public void onComplete(Void o) {
+          }
+          public void onError(Exception e) {
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return true;
+      }
+
+      public void start(I iface, onNotificationSendEvent_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+        iface.onNotificationSendEvent(args.prefix, args.errCode, args.errSubcode,resultHandler);
+      }
+    }
+
   }
 
   public static class onUpdatePushRoute_args implements org.apache.thrift.TBase<onUpdatePushRoute_args, onUpdatePushRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<onUpdatePushRoute_args>   {
@@ -1966,4 +2071,550 @@ public class BgpUpdater {
 
   }
 
+  public static class onNotificationSendEvent_args implements org.apache.thrift.TBase<onNotificationSendEvent_args, onNotificationSendEvent_args._Fields>, java.io.Serializable, Cloneable, Comparable<onNotificationSendEvent_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onNotificationSendEvent_args");
+
+    private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField ERR_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errCode", org.apache.thrift.protocol.TType.BYTE, (short)2);
+    private static final org.apache.thrift.protocol.TField ERR_SUBCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errSubcode", org.apache.thrift.protocol.TType.BYTE, (short)3);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new onNotificationSendEvent_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new onNotificationSendEvent_argsTupleSchemeFactory());
+    }
+
+    public String prefix; // required
+    public byte errCode; // required
+    public byte errSubcode; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      PREFIX((short)1, "prefix"),
+      ERR_CODE((short)2, "errCode"),
+      ERR_SUBCODE((short)3, "errSubcode");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // PREFIX
+            return PREFIX;
+          case 2: // ERR_CODE
+            return ERR_CODE;
+          case 3: // ERR_SUBCODE
+            return ERR_SUBCODE;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    private static final int __ERRCODE_ISSET_ID = 0;
+    private static final int __ERRSUBCODE_ISSET_ID = 1;
+    private byte __isset_bitfield = 0;
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.ERR_CODE, new org.apache.thrift.meta_data.FieldMetaData("errCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
+      tmpMap.put(_Fields.ERR_SUBCODE, new org.apache.thrift.meta_data.FieldMetaData("errSubcode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onNotificationSendEvent_args.class, metaDataMap);
+    }
+
+    public onNotificationSendEvent_args() {
+    }
+
+    public onNotificationSendEvent_args(
+      String prefix,
+      byte errCode,
+      byte errSubcode)
+    {
+      this();
+      this.prefix = prefix;
+      this.errCode = errCode;
+      setErrCodeIsSet(true);
+      this.errSubcode = errSubcode;
+      setErrSubcodeIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public onNotificationSendEvent_args(onNotificationSendEvent_args other) {
+      __isset_bitfield = other.__isset_bitfield;
+      if (other.isSetPrefix()) {
+        this.prefix = other.prefix;
+      }
+      this.errCode = other.errCode;
+      this.errSubcode = other.errSubcode;
+    }
+
+    public onNotificationSendEvent_args deepCopy() {
+      return new onNotificationSendEvent_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.prefix = null;
+      setErrCodeIsSet(false);
+      this.errCode = 0;
+      setErrSubcodeIsSet(false);
+      this.errSubcode = 0;
+    }
+
+    public String getPrefix() {
+      return this.prefix;
+    }
+
+    public onNotificationSendEvent_args setPrefix(String prefix) {
+      this.prefix = prefix;
+      return this;
+    }
+
+    public void unsetPrefix() {
+      this.prefix = null;
+    }
+
+    /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
+    public boolean isSetPrefix() {
+      return this.prefix != null;
+    }
+
+    public void setPrefixIsSet(boolean value) {
+      if (!value) {
+        this.prefix = null;
+      }
+    }
+
+    public byte getErrCode() {
+      return this.errCode;
+    }
+
+    public onNotificationSendEvent_args setErrCode(byte errCode) {
+      this.errCode = errCode;
+      setErrCodeIsSet(true);
+      return this;
+    }
+
+    public void unsetErrCode() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERRCODE_ISSET_ID);
+    }
+
+    /** Returns true if field errCode is set (has been assigned a value) and false otherwise */
+    public boolean isSetErrCode() {
+      return EncodingUtils.testBit(__isset_bitfield, __ERRCODE_ISSET_ID);
+    }
+
+    public void setErrCodeIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERRCODE_ISSET_ID, value);
+    }
+
+    public byte getErrSubcode() {
+      return this.errSubcode;
+    }
+
+    public onNotificationSendEvent_args setErrSubcode(byte errSubcode) {
+      this.errSubcode = errSubcode;
+      setErrSubcodeIsSet(true);
+      return this;
+    }
+
+    public void unsetErrSubcode() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERRSUBCODE_ISSET_ID);
+    }
+
+    /** Returns true if field errSubcode is set (has been assigned a value) and false otherwise */
+    public boolean isSetErrSubcode() {
+      return EncodingUtils.testBit(__isset_bitfield, __ERRSUBCODE_ISSET_ID);
+    }
+
+    public void setErrSubcodeIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERRSUBCODE_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case PREFIX:
+        if (value == null) {
+          unsetPrefix();
+        } else {
+          setPrefix((String)value);
+        }
+        break;
+
+      case ERR_CODE:
+        if (value == null) {
+          unsetErrCode();
+        } else {
+          setErrCode((Byte)value);
+        }
+        break;
+
+      case ERR_SUBCODE:
+        if (value == null) {
+          unsetErrSubcode();
+        } else {
+          setErrSubcode((Byte)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case PREFIX:
+        return getPrefix();
+
+      case ERR_CODE:
+        return Byte.valueOf(getErrCode());
+
+      case ERR_SUBCODE:
+        return Byte.valueOf(getErrSubcode());
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case PREFIX:
+        return isSetPrefix();
+      case ERR_CODE:
+        return isSetErrCode();
+      case ERR_SUBCODE:
+        return isSetErrSubcode();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof onNotificationSendEvent_args)
+        return this.equals((onNotificationSendEvent_args)that);
+      return false;
+    }
+
+    public boolean equals(onNotificationSendEvent_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_prefix = true && this.isSetPrefix();
+      boolean that_present_prefix = true && that.isSetPrefix();
+      if (this_present_prefix || that_present_prefix) {
+        if (!(this_present_prefix && that_present_prefix))
+          return false;
+        if (!this.prefix.equals(that.prefix))
+          return false;
+      }
+
+      boolean this_present_errCode = true;
+      boolean that_present_errCode = true;
+      if (this_present_errCode || that_present_errCode) {
+        if (!(this_present_errCode && that_present_errCode))
+          return false;
+        if (this.errCode != that.errCode)
+          return false;
+      }
+
+      boolean this_present_errSubcode = true;
+      boolean that_present_errSubcode = true;
+      if (this_present_errSubcode || that_present_errSubcode) {
+        if (!(this_present_errSubcode && that_present_errSubcode))
+          return false;
+        if (this.errSubcode != that.errSubcode)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(onNotificationSendEvent_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetPrefix()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetErrCode()).compareTo(other.isSetErrCode());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetErrCode()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errCode, other.errCode);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetErrSubcode()).compareTo(other.isSetErrSubcode());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetErrSubcode()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errSubcode, other.errSubcode);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("onNotificationSendEvent_args(");
+      boolean first = true;
+
+      sb.append("prefix:");
+      if (this.prefix == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.prefix);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("errCode:");
+      sb.append(this.errCode);
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("errSubcode:");
+      sb.append(this.errSubcode);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class onNotificationSendEvent_argsStandardSchemeFactory implements SchemeFactory {
+      public onNotificationSendEvent_argsStandardScheme getScheme() {
+        return new onNotificationSendEvent_argsStandardScheme();
+      }
+    }
+
+    private static class onNotificationSendEvent_argsStandardScheme extends StandardScheme<onNotificationSendEvent_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, onNotificationSendEvent_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // PREFIX
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.prefix = iprot.readString();
+                struct.setPrefixIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // ERR_CODE
+              if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
+                struct.errCode = iprot.readByte();
+                struct.setErrCodeIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // ERR_SUBCODE
+              if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
+                struct.errSubcode = iprot.readByte();
+                struct.setErrSubcodeIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, onNotificationSendEvent_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.prefix != null) {
+          oprot.writeFieldBegin(PREFIX_FIELD_DESC);
+          oprot.writeString(struct.prefix);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldBegin(ERR_CODE_FIELD_DESC);
+        oprot.writeByte(struct.errCode);
+        oprot.writeFieldEnd();
+        oprot.writeFieldBegin(ERR_SUBCODE_FIELD_DESC);
+        oprot.writeByte(struct.errSubcode);
+        oprot.writeFieldEnd();
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class onNotificationSendEvent_argsTupleSchemeFactory implements SchemeFactory {
+      public onNotificationSendEvent_argsTupleScheme getScheme() {
+        return new onNotificationSendEvent_argsTupleScheme();
+      }
+    }
+
+    private static class onNotificationSendEvent_argsTupleScheme extends TupleScheme<onNotificationSendEvent_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, onNotificationSendEvent_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetPrefix()) {
+          optionals.set(0);
+        }
+        if (struct.isSetErrCode()) {
+          optionals.set(1);
+        }
+        if (struct.isSetErrSubcode()) {
+          optionals.set(2);
+        }
+        oprot.writeBitSet(optionals, 3);
+        if (struct.isSetPrefix()) {
+          oprot.writeString(struct.prefix);
+        }
+        if (struct.isSetErrCode()) {
+          oprot.writeByte(struct.errCode);
+        }
+        if (struct.isSetErrSubcode()) {
+          oprot.writeByte(struct.errSubcode);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, onNotificationSendEvent_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(3);
+        if (incoming.get(0)) {
+          struct.prefix = iprot.readString();
+          struct.setPrefixIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.errCode = iprot.readByte();
+          struct.setErrCodeIsSet(true);
+        }
+        if (incoming.get(2)) {
+          struct.errSubcode = iprot.readByte();
+          struct.setErrSubcodeIsSet(true);
+        }
+      }
+    }
+
+  }
+
 }
index 77ab80d4ec5dc1f1ade771bc8849459ef4f78fbc..acbac5566d843d8bf97171ef06670d3a3af7e581 100644 (file)
@@ -4,6 +4,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
+
 package org.opendaylight.bgpmanager.thrift.gen;
 
 import org.apache.thrift.scheme.IScheme;
index 45a335356f8735ac51bb1c079da13802c5712127..4f2083e8457870998fec4e2f81100bc5eba870a7 100644 (file)
@@ -4,6 +4,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
+
 package org.opendaylight.bgpmanager.thrift.gen;
 
 import org.apache.thrift.scheme.IScheme;
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/af_afi.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/af_afi.java
new file mode 100644 (file)
index 0000000..d7734d5
--- /dev/null
@@ -0,0 +1,42 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+
+package org.opendaylight.bgpmanager.thrift.gen;
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum af_afi implements org.apache.thrift.TEnum {
+  AFI_IP(1);
+
+  private final int value;
+
+  private af_afi(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static af_afi findByValue(int value) { 
+    switch (value) {
+      case 1:
+        return AFI_IP;
+      default:
+        return null;
+    }
+  }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/af_safi.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/af_safi.java
new file mode 100644 (file)
index 0000000..a4ecca8
--- /dev/null
@@ -0,0 +1,45 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+
+package org.opendaylight.bgpmanager.thrift.gen;
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum af_safi implements org.apache.thrift.TEnum {
+  SAFI_IPV4_LABELED_UNICAST(4),
+  SAFI_MPLS_VPN(5);
+
+  private final int value;
+
+  private af_safi(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static af_safi findByValue(int value) { 
+    switch (value) {
+      case 4:
+        return SAFI_IPV4_LABELED_UNICAST;
+      case 5:
+        return SAFI_MPLS_VPN;
+      default:
+        return null;
+    }
+  }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/qbgpConstants.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/qbgpConstants.java
new file mode 100644 (file)
index 0000000..b634910
--- /dev/null
@@ -0,0 +1,60 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+
+package org.opendaylight.bgpmanager.thrift.gen;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class qbgpConstants {
+
+  public static final int LBL_NO_LABEL = 0;
+
+  public static final int LBL_EXPLICIT_NULL = 3;
+
+  public static final int BGP_RT_ADD = 0;
+
+  public static final int BGP_RT_DEL = 1;
+
+  public static final int GET_RTS_INIT = 0;
+
+  public static final int GET_RTS_NEXT = 1;
+
+  public static final int BGP_ERR_FAILED = 1;
+
+  public static final int BGP_ERR_ACTIVE = 10;
+
+  public static final int BGP_ERR_INACTIVE = 11;
+
+  public static final int BGP_ERR_NOT_ITER = 15;
+
+  public static final int BGP_ERR_PARAM = 100;
+
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/idl/qbgp.thrift b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/idl/qbgp.thrift
new file mode 100644 (file)
index 0000000..229ccc9
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+// the label argument in pushRoute can use these
+const i32 LBL_NO_LABEL = 0
+const i32 LBL_EXPLICIT_NULL = 3
+
+// FIB entry type
+const i32 BGP_RT_ADD = 0
+const i32 BGP_RT_DEL = 1
+
+// FIB table iteration op
+const i32 GET_RTS_INIT = 0
+const i32 GET_RTS_NEXT = 1
+
+/*
+ * Error codes. 
+ * 0 is success.
+ * ERR_FAILED because something not permitted 
+ *    was attempted, such as deleting a route
+ *    that doesn't exist.
+ * ERR_ACTIVE when session is sought to be created
+ *    when it is already running.
+ * ERR_INACTIVE when an RPC is called but there is
+ *    no session.
+ * ERR_NOT_ITER when GET_RTS_NEXT is called without 
+ *    initializing with GET_RTS_INIT 
+ * ERR_PARAM when there is an issue with params
+ */
+const i32 BGP_ERR_FAILED = 1 
+const i32 BGP_ERR_ACTIVE = 10
+const i32 BGP_ERR_INACTIVE = 11
+const i32 BGP_ERR_NOT_ITER = 15
+const i32 BGP_ERR_PARAM = 100
+
+// these are the supported afi-safi combinations 
+enum af_afi {
+    AFI_IP = 1
+}
+
+enum af_safi {
+    SAFI_IPV4_LABELED_UNICAST = 4,
+    SAFI_MPLS_VPN = 5
+}
+
+/*
+ * FIB update.
+ * type is either RT_ADD(0) or RT_DEL(1)
+ */
+
+struct Update {
+    1: i32 type,
+    2: i32 reserved,
+    3: i32 prefixlen,
+    4: i32 label,
+    5: string rd,
+    6: string prefix,
+    7: string nexthop
+}
+
+/*
+ * A sequence of FIB updates, valid only if errcode
+   is zero. Returned as a result of iteration using
+   getRoutes() (ie, a database read). more=0 signals
+   end of iteration.
+ */
+
+struct Routes {
+    1: i32 errcode,
+    2: optional list<Update> updates,
+    4: optional i32 more
+}
+
+service BgpConfigurator {
+    /*
+     * startBgp() starts a BGP instance on the BGP VM. Graceful Restart
+     * also must be configured (stalepathTime > 0). If local BGP is 
+     * restarting, announceFlush tells neighbor to flush all routes 
+     * previously advertised by us. This is the F bit of RFC 4724. 
+     */
+    i32 startBgp(1:i32 asNumber, 2:string routerId, 3: i32 port, 
+                       4:i32 holdTime, 5:i32 keepAliveTime, 
+                       6:i32 stalepathTime, 7:bool announceFlush),
+    i32 stopBgp(1:i32 asNumber),
+    i32 createPeer(1:string ipAddress, 2:i32 asNumber),
+    i32 deletePeer(1:string ipAddress)
+    i32 addVrf(1:string rd, 2:list<string> irts, 3:list<string> erts),
+    i32 delVrf(1:string rd),
+    /*
+     * pushRoute:
+     * IPv6 is not supported.
+     * 'nexthop' cannot be null for VPNv4 and LU.
+     * 'rd' is null for LU (and unicast). 
+     * 'label' cannot be NO_LABEL for VPNv4 and LU. 
+     *  ipv4 unicast is not fully supported.  
+     */
+    i32 pushRoute(1:string prefix, 2:string nexthop, 3:string rd, 4:i32 label),
+    /*
+     * withdrawRoute:
+     * Second argument is either 'rd' (VPNv4) or 
+     * label (LU) as a string (eg: "2500")
+     */
+    i32 withdrawRoute(1:string prefix, 2:string rd),
+    i32 setEbgpMultihop(1:string peerIp, 2:i32 nHops),
+    i32 unsetEbgpMultihop(1:string peerIp),
+    i32 setUpdateSource(1:string peerIp, 2:string srcIp),
+    i32 unsetUpdateSource(1:string peerIp),
+    i32 enableAddressFamily(1:string peerIp, 2:af_afi afi, 3:af_safi safi),
+    i32 disableAddressFamily(1:string peerIp, 2:af_afi afi, 3:af_safi safi),
+    i32 setLogConfig(1:string logFileName, 2:string logLevel),
+    i32 enableGracefulRestart(1:i32 stalepathTime),
+    i32 disableGracefulRestart(),
+    /*
+     * getRoutes():
+     * optype is one of: GET_RTS_INIT: initialize iteration,
+     * GET_RTS_NEXT: get next bunch of routes. winSize is
+     * the size of the buffer that caller has allocated to 
+     * receive the array. QBGP sends no more than the number 
+     * of routes that would fit in this buffer, but not 
+     * necessarily the maximum number that would fit. 
+     * Calling INIT when NEXT is expected causes reinit.
+     */
+    Routes getRoutes(1:i32 optype, 2:i32 winSize)
+}
+
+service BgpUpdater {
+    oneway void onUpdatePushRoute(1:string rd, 2:string prefix, 
+                                  3:i32 prefixlen, 4:string nexthop, 
+                                  5:i32 label),
+    oneway void onUpdateWithdrawRoute(1:string rd, 2:string prefix, 
+                                      3:i32 prefixlen), 
+    oneway void onStartConfigResyncNotification(),
+    /* communicate to ODL a BGP Notification received from peer */
+    oneway void onNotificationSendEvent(1:string prefix, 
+                                        2:byte errCode, 3:byte errSubcode)
+}
+
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/server/BgpThriftService.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/server/BgpThriftService.java
new file mode 100644 (file)
index 0000000..f1951ba
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.bgpmanager.thrift.server;
+
+import java.util.*;
+
+import org.apache.thrift.server.TServer;
+import org.apache.thrift.server.TServer.Args;
+import org.apache.thrift.server.TSimpleServer;
+import org.apache.thrift.transport.TServerSocket;
+import org.apache.thrift.transport.TServerTransport;
+import org.opendaylight.bgpmanager.BgpManager;
+import org.opendaylight.bgpmanager.BgpConfigurationManager;
+import org.opendaylight.bgpmanager.FibDSWriter;
+import org.opendaylight.bgpmanager.thrift.gen.BgpUpdater;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.fibmanager.rev150330.fibentries.VrfTables;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class BgpThriftService {
+    int ourPort;
+    BgpManager bgpManager;
+    FibDSWriter fibDSWriter;
+    TServer server;
+    // to store copy fo FIB-VRF tables on QBGP restart.
+    public List<VrfTables> stale_vrfTables;
+
+    private static final Logger LOGGER =
+        LoggerFactory.getLogger(BgpThriftService.class);
+     
+    public BgpThriftService(int ourPort, BgpManager bm) {
+        this.ourPort = ourPort;
+        bgpManager = bm;
+        fibDSWriter = bm.getFibWriter();
+    }
+    public class BgpUpdateServer implements Runnable, BgpUpdater.Iface {
+
+        public void BgpUpdateServer() {
+        }
+
+        public void run() {
+            try {
+                BgpUpdater.Processor processor = new BgpUpdater.Processor(this);
+                TServerTransport transport = new TServerSocket(ourPort);
+                server = new TSimpleServer(new Args(transport).processor(processor));
+                server.serve();
+            } catch (Exception e) {
+                LOGGER.error("Exception in BGP Updater server"+e);
+            }
+        }
+
+        public void onUpdatePushRoute(String rd, String prefix, int plen,
+                                                 String nexthop, int label) {
+            try {
+                BgpConfigurationManager.onUpdatePushRoute(rd, prefix, plen, nexthop, label);
+            } catch (Throwable e) {
+                LOGGER.error("failed to handle update route " ,e);
+            }
+        }
+
+        public void onUpdateWithdrawRoute(String rd, String prefix, int plen) {
+            LOGGER.debug("Route del ** {} ** {}/{} ", rd, prefix, plen);
+            try {
+                fibDSWriter.removeFibEntryFromDS(rd, prefix + "/" + plen);
+            } catch (Throwable e) {
+                LOGGER.error("failed to handle withdraw route " ,e);
+            }
+        }
+
+        public void onStartConfigResyncNotification() {
+            LOGGER.info("BGP (re)started");
+            try {
+                bgpManager.bgpRestarted();
+            } catch (Throwable e) {
+                LOGGER.error("failed to handle onStartConfigResyncNotification " ,e);
+            }
+        }
+
+        public void onNotificationSendEvent(String prefix, byte errCode,
+                                                           byte errSubcode) {
+            int code = errCode;
+            int subCode = errSubcode;
+            bgpManager.sendNotificationEvent(prefix, errCode, errSubcode);
+        }
+
+    }
+
+    Thread thread;
+
+    public void start() {
+        thread = new Thread(new BgpUpdateServer());
+        thread.start();
+    }
+
+    public void stop() {
+        server.stop();
+        thread.stop();
+    }
+} 
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/server/implementation/BgpThriftService.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/server/implementation/BgpThriftService.java
deleted file mode 100644 (file)
index cf42d69..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.bgpmanager.thrift.server.implementation;
-
-import org.apache.thrift.server.THsHaServer;
-import org.apache.thrift.server.TServer;
-import org.apache.thrift.server.TSimpleServer;
-import org.apache.thrift.server.TThreadPoolServer;
-import org.apache.thrift.transport.*;
-import org.opendaylight.bgpmanager.BgpManager;
-import org.opendaylight.bgpmanager.FibDSWriter;
-import org.opendaylight.bgpmanager.thrift.common.Constants;
-import org.opendaylight.bgpmanager.thrift.gen.BgpUpdater;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class BgpThriftService {
-
-       private static final Logger LOGGER = LoggerFactory.getLogger(BgpThriftService.class);
-
-       private int port;
-       private int maxWorkerThreads;
-       private int minWorkerThreads;
-    private TServerTransport serverTransport;
-    private TServer server;
-       private BgpUpdateHandler notificationHandler;
-       private BgpManager bgpManager;
-
-    public BgpThriftService(BgpManager bgpMgr, FibDSWriter dsWriter) {
-       bgpManager = bgpMgr;
-               notificationHandler = new BgpUpdateHandler(bgpManager, dsWriter);
-    }
-
-
-       public void start() {
-               LOGGER.debug("BGP Thrift Server starting...");
-               startBgpThriftServer();
-       }
-
-       public void stop() {
-               LOGGER.debug("BGP Thrift Server stopping...");
-               stopBgpThriftServer();
-       }
-
-       /**
-        * Destroy method called up after the bundle has been stopped
-        */
-       public void destroy() {
-               LOGGER.debug("BGP Thrift Server destroy ");
-       }
-
-    /**
-     * Loading the parameters required for a connection
-     *
-     */
-    private void loadParameters() {
-        port = Integer.getInteger(Constants.PROP_BGP_THRIFT_PORT, Constants.BGP_SERVICE_PORT);
-               maxWorkerThreads = Integer.getInteger(Constants.PROP_MAX_WORKER_THREADS,
-                       Constants.DEFAULT_MAX_WORKER_THREADS);
-               minWorkerThreads = Integer.getInteger(Constants.PROP_MIN_WORKER_THREADS,
-                       Constants.DEFAULT_MIN_WORKER_THREADS);
-
-       }
-
-
-       public void startBgpThriftServer() {
-               loadParameters();
-               new Thread(new ThriftRunnable()).start();
-       }
-
-       public void stopBgpThriftServer() {
-               try {
-            if (serverTransport != null) {
-                serverTransport.close();
-            }
-
-            server.stop();
-                       LOGGER.info("BGP Thrift Server stopped");
-        } catch (Exception e) {
-            LOGGER.error("Error while stopping the server - {} {}", getClass().getName(), e.getMessage());
-        }
-       }
-
-       private class ThriftRunnable implements Runnable {
-               @Override
-               public void run() {
-
-               try {
-                               serverTransport = new TServerSocket(port);
-                               LOGGER.info("BGP Thrift Server started on port {} ", port);
-                       } catch (TTransportException e) {
-                               LOGGER.error("Transport Exception while starting bgp thrift server", e);
-                               return;
-                       }
-                       /* This may need to change. Right now, its as good as a blocking server for each client (client would be
-                       single - qbgp). We may want to change the server to TSimpleServer which queues up the notifications and
-                       let worker threads process notifications based on rd.
-                        */
-               server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport)
-                       .maxWorkerThreads(maxWorkerThreads).minWorkerThreads(minWorkerThreads)
-                       .processor(new BgpUpdater.Processor<BgpUpdateHandler>(notificationHandler)));
-                       server.serve();
-               }
-       }
-
-}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/server/implementation/BgpUpdateHandler.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/server/implementation/BgpUpdateHandler.java
deleted file mode 100644 (file)
index bd650ff..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.bgpmanager.thrift.server.implementation;
-
-import org.opendaylight.bgpmanager.BgpManager;
-import org.opendaylight.bgpmanager.FibDSWriter;
-import org.opendaylight.bgpmanager.thrift.gen.BgpUpdater;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-class BgpUpdateHandler implements BgpUpdater.Iface {
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(BgpUpdateHandler.class);
-    private BgpManager bgpManager;
-    private FibDSWriter fibDSWriter;
-
-    public BgpUpdateHandler(BgpManager bgpMgr, FibDSWriter dsWriter) {
-        bgpManager = bgpMgr;
-        fibDSWriter = dsWriter;
-    }
-
-    public void onUpdatePushRoute(String rd, String prefix, int plen,
-                                String nexthop, int label) {
-
-       LOGGER.debug("Route add ** {} ** {}/{} ** {} ** {} ", rd, prefix, plen, nexthop, label);
-        //Write to FIB in Data Store
-        fibDSWriter.addFibEntryToDS(rd, prefix + "/" + plen, nexthop, label);
-
-   }
-
-   public void onUpdateWithdrawRoute(String rd, String prefix, int plen) {
-       LOGGER.debug("Route del ** {} ** {}/{} ", rd, prefix, plen);
-       fibDSWriter.removeFibEntryFromDS(rd, prefix + "/" + plen);
-
-   }
-
-   public void onStartConfigResyncNotification() {
-       LOGGER.debug("BGP (re)started");
-       bgpManager.reInitConn();
-   }
-
-}
-
index fe391a64bb1b1d9fea66945a5210d77087d8ce6c..74d53a8133f41324c65d1fc7c9c9e576c2cf6e17 100644 (file)
@@ -21,6 +21,7 @@ public class BgpManagerImplModule extends org.opendaylight.yang.gen.v1.urn.opend
         // TODO:implement
         //throw new java.lang.UnsupportedOperationException();
         BgpManager provider = new BgpManager();
+        //provider.setITMProvider(getItmDependency());
         getBrokerDependency().registerProvider(provider);
         return provider;
     }
diff --git a/bgpmanager/bgpmanager-impl/src/main/resources/OSGI-INF/blueprint/commands.xml b/bgpmanager/bgpmanager-impl/src/main/resources/OSGI-INF/blueprint/commands.xml
new file mode 100644 (file)
index 0000000..796fc46
--- /dev/null
@@ -0,0 +1,71 @@
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+   <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+      <command>
+         <action class="org.opendaylight.bgpmanager.ConfigureBgpCli">
+         </action>
+      </command>
+   </command-bundle>
+
+<command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+         <command>
+         <action class="org.opendaylight.bgpmanager.DisplayBgpConfigCli">
+         </action>
+      </command>
+</command-bundle>
+
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.opendaylight.bgpmanager.VtyshCli"/>
+        </command>
+    </command-bundle>
+
+<command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.opendaylight.bgpmanager.commands.ClearBgpCli"/>
+        </command>
+    </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.opendaylight.bgpmanager.commands.Connect"/>
+        </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.opendaylight.bgpmanager.commands.Neighbor"/>
+        </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.opendaylight.bgpmanager.commands.Router"/>
+        </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.opendaylight.bgpmanager.commands.Vrf"/>
+        </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.opendaylight.bgpmanager.commands.Network"/>
+        </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.opendaylight.bgpmanager.commands.Misc"/>
+        </command>
+ </command-bundle>
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.opendaylight.bgpmanager.commands.Cache"/>
+        </command>
+ </command-bundle>
+
+</blueprint>
index e4006364fdf82539c1de5949bae6be8ba562b957..e743a2b46d560e95f456d461f2e59a2dd19a7bb6 100644 (file)
@@ -6,6 +6,7 @@ module bgpmanager-impl {
     import config { prefix config; revision-date 2013-04-05; }
     import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
     import bgpmanager-api { prefix bgpmgr-api; revision-date 2015-04-20;}
+    //import itm { prefix itm; revision-date 2015-07-01; }
 
     description
         "Service definition for bgpmanager project";
@@ -32,6 +33,14 @@ module bgpmanager-impl {
                     }
                 }
             }
+            /*container itm {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity itm:itm;
+                    }
+                }
+            }*/
         }
     }
 }
index a9b9fdb0dd79bea2beb5f24281c8927610378600..fe62595fdc6bc6f205ca781c65de0471644a685e 100644 (file)
@@ -25,7 +25,7 @@ public class MockFibManager extends AbstractMockFibManager<VrfEntry> {
     }
 
     private void registerListener(final DataBroker db) {
-        final DataTreeIdentifier<VrfEntry> treeId = new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, getWildCardPath());
+        final DataTreeIdentifier<VrfEntry> treeId = new DataTreeIdentifier<>(LogicalDatastoreType.CONFIGURATION, getWildCardPath());
         try {
             listenerRegistration = db.registerDataTreeChangeListener(treeId, MockFibManager.this);
         } catch (final Exception e) {
diff --git a/model-bgp/src/main/yang/ebgp.yang b/model-bgp/src/main/yang/ebgp.yang
new file mode 100644 (file)
index 0000000..4611809
--- /dev/null
@@ -0,0 +1,153 @@
+module ebgp {
+
+  yang-version "1";
+
+  // namespace
+  namespace "urn:ericsson:params:xml:ns:yang:ebgp";
+
+  prefix "ericsson-bgp";
+
+  // import some basic inet types
+  import ietf-inet-types { prefix inet; }
+
+  // meta
+  organization
+    "Ericsson Bangalore";
+
+  contact
+    "Ericsson Bangalore"; 
+
+  description
+    "BGP configuration model for Ericsson's implementation of
+    Opendaylight L3VPN";
+
+  revision "2015-09-01" {
+  }
+
+ container bgp {
+  config "true"; 
+  container config-server {
+    leaf host {
+      type inet:ipv4-address;
+      mandatory "true";
+    }
+    leaf port {
+      type uint32;
+      mandatory "true"; 
+    } 
+  }
+
+  container as-id {
+    leaf local-as {
+      type uint32;
+      mandatory "true";
+    }
+    leaf router-id {
+      type inet:ipv4-address;
+    }
+    leaf stalepath-time {
+      type uint32;
+      default 360;
+    }
+    leaf announce-fbit {
+      type boolean;
+    }
+  }
+
+  container graceful-restart {
+    leaf stalepath-time {
+      type uint32;
+      mandatory "true";
+    }
+  }
+
+  container logging {
+    leaf file {
+      type string;
+    }
+    leaf level {
+      type string;
+    }
+  }
+
+  list neighbors { 
+    key "address";
+    leaf address {
+      type inet:ipv4-address;
+      mandatory "true";
+    }
+    leaf remote-as {
+      type uint32;
+      mandatory "true";
+    }
+    container ebgp-multihop {
+      leaf nhops {
+        type uint32;
+        mandatory "true";
+      }
+      leaf peer-ip {
+        type leafref {
+          path "/ericsson-bgp:bgp/neighbors/address";
+        }
+      }
+    }
+    container update-source {
+      leaf source-ip {
+        type inet:ipv4-address;
+      }
+      leaf peer-ip {
+        type leafref {
+          path "/ericsson-bgp:bgp/neighbors/address";
+        }
+      }
+    }
+    list address-families {
+      key "afi safi";
+      leaf afi {
+        type uint32;
+        mandatory "true";
+      }
+      leaf safi {
+        type uint32;
+        mandatory "true";
+      }
+      leaf peer-ip {
+        type leafref {
+          path "/ericsson-bgp:bgp/neighbors/address";
+        }
+      }
+    } //addr-families
+  } // neighbhors
+
+  list networks {
+    key "rd prefix-len";
+    leaf rd {
+      type string;
+    }
+    leaf prefix-len {
+          type string;
+    }
+    leaf nexthop {
+      type inet:ipv4-address;
+      mandatory "false";
+    }
+    leaf label {
+      type uint32;
+      mandatory "false";
+    }
+  } // networks
+
+  list vrfs {
+    key "rd";
+    leaf rd {
+      type string;
+    }
+    leaf-list import-rts {
+      type string;
+    }
+    leaf-list export-rts {
+      type string;
+    }
+  }
+ } // bgp
+}