BgpManager Initial commit 93/17893/1
authorManisha Malla <manisha.malla@ericsson.com>
Wed, 8 Apr 2015 06:36:44 +0000 (12:06 +0530)
committerManisha Malla <manisha.malla@ericsson.com>
Wed, 8 Apr 2015 06:37:48 +0000 (12:07 +0530)
Signed-off-by: Manisha Malla <manisha.malla@ericsson.com>
Change-Id: I829d6fff714610082f0b168eda5e05465acb4084

28 files changed:
bgpmanager/bgpmanager-api/pom.xml [new file with mode: 0644]
bgpmanager/bgpmanager-api/src/main/java/org.opendaylight.bgpmanager.api/IBgpManager.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/pom.xml [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/config/default-config.xml [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/AbstractDataChangeListener.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/BgpConfigurationManager.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/BgpManager.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/globals/BgpConfiguration.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/globals/BgpConstants.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/api-files/qbgp.thrift [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/globals/Route.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/implementation/BgpRouter.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/implementation/BgpSyncHandle.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/common/Constants.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/exceptions/BgpRouterException.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/BgpConfigurator.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/BgpUpdater.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/Routes.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/Update.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/server/implementation/BgpThriftService.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/server/implementation/BgpUpdateHandler.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/bgpmanager/impl/rev150326/BgpManagerImplModule.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/bgpmanager/impl/rev150326/BgpManagerImplModuleFactory.java [new file with mode: 0644]
bgpmanager/bgpmanager-impl/src/main/yang/bgpmanager-impl.yang [new file with mode: 0644]
bgpmanager/pom.xml [new file with mode: 0644]
features/pom.xml
features/src/main/features/features.xml
pom.xml

diff --git a/bgpmanager/bgpmanager-api/pom.xml b/bgpmanager/bgpmanager-api/pom.xml
new file mode 100644 (file)
index 0000000..609a4ac
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: --><!--
+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
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>config-parent</artifactId>
+    <version>0.3.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.vpnservice</groupId>
+  <artifactId>bgpmanager-api</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+<!--
+  <dependencies>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>vpnmanager-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>${project.groupId}.third-party</groupId>
+      <artifactId>org.apache.thriftlib</artifactId>
+      <version>1.0.1-SNAPSHOT</version>
+    </dependency>
+
+  </dependencies>
+ -->
+  <properties>
+    <maven.javadoc.skip>true</maven.javadoc.skip>
+  </properties>
+</project>
diff --git a/bgpmanager/bgpmanager-api/src/main/java/org.opendaylight.bgpmanager.api/IBgpManager.java b/bgpmanager/bgpmanager-api/src/main/java/org.opendaylight.bgpmanager.api/IBgpManager.java
new file mode 100644 (file)
index 0000000..36a2cff
--- /dev/null
@@ -0,0 +1,37 @@
+package org.opendaylight.bgpmanager.api;
+
+import java.util.Collection;
+
+public interface IBgpManager {
+
+    /**
+     *
+     * @param rd
+     * @param importRts
+     * @param exportRts
+     */
+    public void addVrf(String rd, Collection<String> importRts, Collection<String> exportRts);
+
+    /**
+     *
+     * @param rd
+     */
+    public void deleteVrf(String rd);
+
+    /**
+     *
+     * @param rd
+     * @param prefix
+     * @param nextHop
+     * @param vpnLabel
+     */
+    public void addPrefix(String rd, String prefix, String nextHop, int vpnLabel);
+
+    /**
+     *
+     * @param rd
+     * @param prefix
+     */
+    public void deletePrefix(String rd, String prefix);
+
+}
\ No newline at end of file
diff --git a/bgpmanager/bgpmanager-impl/pom.xml b/bgpmanager/bgpmanager-impl/pom.xml
new file mode 100644 (file)
index 0000000..11e14ff
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: --><!--
+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
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>config-parent</artifactId>
+    <version>0.3.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.vpnservice</groupId>
+  <artifactId>bgpmanager-impl</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+  <dependencies>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>bgpmanager-api</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>model-bgp</artifactId>
+      <version>2013.07.15.7-SNAPSHOT</version>
+    </dependency>
+    <!--
+    <dependency>
+      <groupId>${project.groupId}.third-party</groupId>
+      <artifactId>org.apache.thriftlib</artifactId>
+      <version>1.0.1-SNAPSHOT</version>
+    </dependency>
+  -->
+    <dependency>
+      <groupId>org.apache.thrift</groupId>
+      <artifactId>libthrift</artifactId>
+      <version>0.9.1</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <configLocation>
+            ${project.basedir}/../../commons/src/main/resources/vpns_checks.xml
+          </configLocation>
+          <failsOnError>true</failsOnError>
+          <includes>**/*.java,**/*.xml,**/*.ini</includes>
+          <excludes>**/yang/</excludes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/bgpmanager/bgpmanager-impl/src/main/config/default-config.xml b/bgpmanager/bgpmanager-impl/src/main/config/default-config.xml
new file mode 100644 (file)
index 0000000..e629fa0
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+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
+-->
+<snapshot>
+  <required-capabilities>
+      <capability>urn:opendaylight:params:xml:ns:yang:bgpmanager:impl?module=bgpmanager-impl&amp;revision=2015-03-26</capability>
+      <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
+  </required-capabilities>
+  <configuration>
+
+    <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+      <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+        <module>
+          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:bgpmanager:impl">prefix:bgpmanager-impl</type>
+          <name>bgpmanager-default</name>
+          <broker>
+            <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>
+        </module>
+      </modules>
+    </data>
+  </configuration>
+</snapshot>
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/AbstractDataChangeListener.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/AbstractDataChangeListener.java
new file mode 100644 (file)
index 0000000..e22c43d
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * 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 com.google.common.base.Preconditions;
+
+import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * AbstractDataChangeListener implemented basic {@link DataChangeListener} processing for
+ * VPN related Data Objects.
+ */
+public abstract class AbstractDataChangeListener <T extends DataObject> implements DataChangeListener {
+
+    protected final Class<T> clazz;
+
+    public AbstractDataChangeListener(Class<T> clazz) {
+        this.clazz = Preconditions.checkNotNull(clazz, "Class can not be null!");
+    }
+
+    @Override
+    public void onDataChanged(final AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> changeEvent) {
+        Preconditions.checkNotNull(changeEvent,"Async ChangeEvent can not be null!");
+
+        /* All DataObjects for create */
+        final Map<InstanceIdentifier<?>, DataObject> createdData = changeEvent.getCreatedData() != null
+                ? changeEvent.getCreatedData() : Collections.<InstanceIdentifier<?>, DataObject> emptyMap();
+        /* All DataObjects for remove */
+        final Set<InstanceIdentifier<?>> removeData = changeEvent.getRemovedPaths() != null
+                ? changeEvent.getRemovedPaths() : Collections.<InstanceIdentifier<?>> emptySet();
+        /* All DataObjects for updates */
+        final Map<InstanceIdentifier<?>, DataObject> updateData = changeEvent.getUpdatedData() != null
+                ? changeEvent.getUpdatedData() : Collections.<InstanceIdentifier<?>, DataObject> emptyMap();
+        /* All Original DataObjects */
+        final Map<InstanceIdentifier<?>, DataObject> originalData = changeEvent.getOriginalData() != null
+                ? changeEvent.getOriginalData() : Collections.<InstanceIdentifier<?>, DataObject> emptyMap();
+
+        this.createData(createdData);
+        this.updateData(updateData, originalData);
+        this.removeData(removeData, originalData);
+    }
+
+    @SuppressWarnings("unchecked")
+    private void createData(final Map<InstanceIdentifier<?>, DataObject> createdData) {
+        final Set<InstanceIdentifier<?>> keys = createdData.keySet() != null
+                ? createdData.keySet() : Collections.<InstanceIdentifier<?>> emptySet();
+        for (InstanceIdentifier<?> key : keys) {
+            if (clazz.equals(key.getTargetType())) {
+                 InstanceIdentifier<T> createKeyIdent = key.firstIdentifierOf(clazz);
+                 final Optional<DataObject> value = Optional.of(createdData.get(key));
+                 if (value.isPresent()) {
+                     this.add(createKeyIdent, (T)value.get());
+                 }
+            }
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    private void updateData(final Map<InstanceIdentifier<?>, DataObject> updateData,
+            final Map<InstanceIdentifier<?>, DataObject> originalData) {
+
+        final Set<InstanceIdentifier<?>> keys = updateData.keySet() != null
+                ? updateData.keySet() : Collections.<InstanceIdentifier<?>> emptySet();
+        for (InstanceIdentifier<?> key : keys) {
+          if (clazz.equals(key.getTargetType())) {
+              InstanceIdentifier<T> updateKeyIdent = key.firstIdentifierOf(clazz);
+              final Optional<DataObject> value = Optional.of(updateData.get(key));
+              final Optional<DataObject> original = Optional.of(originalData.get(key));
+              if (value.isPresent() && original.isPresent()) {
+                this.update(updateKeyIdent, (T)original.get(), (T)value.get());
+              }
+          }
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    private void removeData(final Set<InstanceIdentifier<?>> removeData,
+            final Map<InstanceIdentifier<?>, DataObject> originalData) {
+
+        for (InstanceIdentifier<?> key : removeData) {
+            if (clazz.equals(key.getTargetType())) {
+                   final InstanceIdentifier<T> ident = key.firstIdentifierOf(clazz);
+                    final DataObject removeValue = originalData.get(key);
+                    this.remove(ident, (T)removeValue);
+            }
+        }
+    }
+
+    protected abstract void remove(InstanceIdentifier<T> identifier, T del);
+
+    protected abstract void update(InstanceIdentifier<T> identifier, T original, T update);
+
+    protected abstract void add(InstanceIdentifier<T> identifier, T add);
+
+}
+
+
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/BgpConfigurationManager.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/BgpConfigurationManager.java
new file mode 100644 (file)
index 0000000..dfa061b
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * 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.Collections;
+import java.util.Map;
+import java.util.Set;
+
+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.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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
+
+public class BgpConfigurationManager {
+    private static final Logger LOG = LoggerFactory.getLogger(BgpConfigurationManager.class);
+    private ListenerRegistration<DataChangeListener> listenerRegistration;
+    private final DataBroker broker;
+
+    public BgpConfigurationManager(final DataBroker db) {
+        broker = db;
+        BgpRtrCfgManager rtrCfgManager = new BgpRtrCfgManager(db);
+        BgpNghbrCfgManager nghbrCfgManager = new BgpNghbrCfgManager(db);
+    }
+
+    public class BgpRtrCfgManager extends AbstractDataChangeListener<BgpRouter> implements AutoCloseable {
+
+        public BgpRtrCfgManager(final DataBroker db) {
+            super(BgpRouter.class);
+            registerListener(db);
+        }
+
+        private void registerListener(final DataBroker db) {
+            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);
+            }
+        }
+
+        @Override
+        protected void remove(InstanceIdentifier<BgpRouter> identifier,
+                              BgpRouter del) {
+            // TODO Auto-generated method stub
+        }
+
+        @Override
+        protected void update(InstanceIdentifier<BgpRouter> identifier,
+                              BgpRouter original, BgpRouter update) {
+            // TODO Auto-generated method stub
+        }
+
+        @Override
+        protected void add(InstanceIdentifier<BgpRouter> identifier,
+                           BgpRouter value) {
+            LOG.info("key: " + identifier + ", value=" + value);
+
+        }
+
+        private InstanceIdentifier<BgpRouter> getWildCardPath() {
+            return InstanceIdentifier.create(BgpRouter.class);
+        }
+
+        @Override
+        public void close() throws Exception {
+            if (listenerRegistration != null) {
+                try {
+                    listenerRegistration.close();
+                } catch (final Exception e) {
+                    LOG.error("Error when cleaning up DataChangeListener.", e);
+                }
+                listenerRegistration = null;
+            }
+            LOG.info("Bgp Router Manager Closed");
+        }
+
+    }
+    public class BgpNghbrCfgManager extends AbstractDataChangeListener<BgpNeighbors> implements AutoCloseable {
+
+        public BgpNghbrCfgManager(final DataBroker db) {
+            super(BgpNeighbors.class);
+            registerListener(db);
+        }
+
+        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);
+            }
+        }
+
+        @Override
+        protected void remove(InstanceIdentifier<BgpNeighbors> identifier,
+                              BgpNeighbors del) {
+            // TODO Auto-generated method stub
+        }
+
+        @Override
+        protected void update(InstanceIdentifier<BgpNeighbors> identifier,
+                              BgpNeighbors original, BgpNeighbors update) {
+            // TODO Auto-generated method stub
+        }
+
+        @Override
+        protected void add(InstanceIdentifier<BgpNeighbors> identifier,
+                           BgpNeighbors value) {
+            LOG.info("key: " + identifier + ", value=" + value);
+
+        }
+
+        private InstanceIdentifier<?> getWildCardPath() {
+            return InstanceIdentifier.create(BgpNeighbors.class);
+        }
+
+        @Override
+        public void close() throws Exception {
+            if (listenerRegistration != null) {
+                try {
+                    listenerRegistration.close();
+                } catch (final Exception e) {
+                    LOG.error("Error when cleaning up DataChangeListener.", e);
+                }
+                listenerRegistration = null;
+            }
+            LOG.info("Bgp Neighbor Manager Closed");
+        }
+
+    }
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/BgpManager.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/BgpManager.java
new file mode 100644 (file)
index 0000000..14cd1aa
--- /dev/null
@@ -0,0 +1,480 @@
+/*
+ * 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.SocketTimeoutException;
+import java.util.*;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.CountDownLatch;
+
+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.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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class BgpManager implements BindingAwareProvider, AutoCloseable, IBgpManager {
+
+    private static final Logger s_logger = LoggerFactory.getLogger(BgpManager.class);
+    private BgpConfigurationManager bgpConfigurationMgr;
+    private BgpConfiguration   bgpConfiguration = new BgpConfiguration();
+    private BgpRouter           bgpThriftClient;
+    private BgpThriftService    bgpThriftService;
+    private String                             bgpHost;
+    private int                                        bgpPort;
+
+    private void initializeBGPCommunication() {
+        //start our side of thrift server
+        bgpThriftService = new BgpThriftService();
+        bgpThriftService.start();
+
+        //start bgp thrift client connection
+        bgpThriftClient = new BgpRouter();
+
+        //get bgp server, port from config.ini and connect
+        bgpHost = System.getProperty(BgpConstants.BGP_SPEAKER_HOST_NAME, BgpConstants.DEFAULT_BGP_HOST_NAME);
+        bgpPort = Integer.getInteger(BgpConstants.BGP_SPEAKER_THRIFT_PORT, BgpConstants.DEFAULT_BGP_THRIFT_PORT);
+
+        configureBgpServer(bgpHost, bgpPort);
+        try {
+            connectToServer(bgpHost, bgpPort);
+        } catch (Exception e) {
+            //nothing to be done here, the logs have already been printed by the Exception handlers of "connectToServer"
+        }
+        /*  read bgp router and peer info from DS
+            for the case when the BGP module came down but the DataStore was still up
+        */
+        //for testing
+        configureBgp(101, "10.10.10.10");
+
+        // 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());
+            s_logger.info("Started BGP with AS number " + (int)bgpConfiguration.getAsNum() + " and router id " + bgpConfiguration.getRouterId());
+        } catch (BgpRouterException be) {
+            if(be.getErrorCode() == BgpRouterException.BGP_ERR_ACTIVE) {
+                s_logger.info("bgp server already active");
+                return;
+            }
+            else {
+                s_logger.error("application error while starting bgp server " + be.getErrorCode());
+                return;
+            }
+
+        }  catch (TException t) {
+            s_logger.error("Transport error while starting bgp server ", t);
+            return;
+        } catch (Exception e) {
+            s_logger.error("Error while starting bgp server", e);
+        }
+
+        //For testing - remove later
+        addNeighbor("169.144.42.168", 102);
+
+    }
+
+    @Override
+    public void onSessionInitiated(ProviderContext session) {
+        s_logger.info("BgpManager Session Initiated");
+        try {
+            final DataBroker dataBroker = session.getSALService(DataBroker.class);
+            bgpConfigurationMgr = new BgpConfigurationManager(dataBroker);
+        } catch (Exception e) {
+            s_logger.error("Error initializing services", e);
+        }
+
+        initializeBGPCommunication();
+    }
+
+
+   @Override
+    public void close() throws Exception {
+        s_logger.info("BgpManager Closed");
+    }
+
+    private void setBgpServerDetails() {
+        if(bgpThriftClient != null)
+            bgpThriftClient.setBgpServer(bgpHost, bgpPort);
+    }
+
+    private void configureBgpServer(String bgpServer, int bgpPort) {
+        bgpConfiguration.setBgpServer(bgpServer);
+        bgpConfiguration.setBgpPort(bgpPort);
+        setBgpServerDetails();
+    }
+
+    private void addNeighbor(String ipAddress, int asNum) {
+        if(bgpThriftClient == null) {
+            s_logger.info("Add BGP Neighbor - bgpThriftClient is null. Unable to add BGP Neighbor.");
+            return;
+        }
+        bgpConfiguration.setNeighbourIp(ipAddress);
+        bgpConfiguration.setNeighbourAsNum(asNum);
+        //updateBgpConfiguration(bgpConfiguration);
+        try {
+            bgpThriftClient.addNeighbor(ipAddress, asNum);
+        } catch (BgpRouterException b) {
+            s_logger.error("Failed to add BGP neighbor " + ipAddress + "due to BgpRouter Exception number " + b.getErrorCode());
+            s_logger.error("BgpRouterException trace ", b);
+        } catch (TException t) {
+            s_logger.error(String.format("Failed adding neighbor %s due to Transport error", ipAddress));
+            reInitConn();
+        } catch (Exception e) {
+            s_logger.error(String.format("Failed adding neighbor %s", ipAddress));
+        }
+    }
+
+
+    private void deleteNeighbor(String ipAddress) {
+        if(bgpThriftClient == null) {
+            s_logger.info("Delete BGP Neighbor - bgpThriftClient is null. Unable to delete BGP Neighbor.");
+            return;
+        }
+        bgpConfiguration.setNeighbourIp("");
+        try {
+            bgpThriftClient.delNeighbor(ipAddress);
+        } catch (BgpRouterException b) {
+            s_logger.error("Failed to delete BGP neighbor " + ipAddress + "due to BgpRouter Exception number " + b.getErrorCode());
+            s_logger.error("BgpRouterException trace ", b);
+        }catch (TException t) {
+            s_logger.error(String.format("Failed deleting neighbor %s due to Transport error", ipAddress));
+            reInitConn();
+        } catch (Exception e) {
+            s_logger.error(String.format("Failed deleting neighbor %s", ipAddress));
+        }
+    }
+
+
+    @Override
+    public void addVrf(String rd, Collection<String> importRts, Collection<String> exportRts) {
+        if(bgpThriftClient == null) {
+            s_logger.info("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) {
+            s_logger.error("Failed to add BGP vrf " + rd + "due to BgpRouter Exception number " + b.getErrorCode());
+            s_logger.error("BgpRouterException trace ", b);
+        } catch (TException t) {
+            s_logger.error(String.format("Failed adding vrf %s due to Transport error", rd));
+            reInitConn();
+        } catch (Exception e) {
+            s_logger.error(String.format("Failed adding vrf %s", rd));
+        }
+    }
+
+    @Override
+    public void deleteVrf(String rd) {
+        if(bgpThriftClient == null) {
+            s_logger.info("Delete BGP vrf - bgpThriftClient is null. Unable to delete BGP vrf.");
+            return;
+        }
+        try {
+            bgpThriftClient.delVrf(rd);
+        } catch (BgpRouterException b) {
+            s_logger.error("Failed to delete BGP vrf " + rd + "due to BgpRouter Exception number " + b.getErrorCode());
+            s_logger.error("BgpRouterException trace ", b);
+        } catch (TException t) {
+            s_logger.error(String.format("Failed deleting vrf %s due to Transport error", rd));
+            reInitConn();
+        } catch (Exception e) {
+            s_logger.error(String.format("Failed deleting vrf %s", rd));
+        }
+    }
+
+    @Override
+    public void addPrefix(String rd, String prefix, String nextHop, int vpnLabel) {
+        if(bgpThriftClient == null) {
+            s_logger.info("Add BGP prefix - bgpThriftClient is null. Unable to add BGP prefix.");
+            return;
+        }
+        try {
+            bgpThriftClient.addPrefix(rd, prefix, nextHop, vpnLabel);
+        } catch (BgpRouterException b) {
+            s_logger.error("Failed to add BGP prefix " + prefix + "due to BgpRouter Exception number " + b.getErrorCode());
+            s_logger.error("BgpRouterException trace ", b);
+        } catch (TException t) {
+            s_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();
+        } catch (Exception e) {
+            s_logger.error(String.format("Failed adding prefix entry <vrf:prefix:nexthop:vpnlabel> %s:%s:%s:%d",
+                rd, prefix, nextHop, vpnLabel));
+        }
+    }
+
+
+    @Override
+    public void deletePrefix(String rd, String prefix) {
+        if(bgpThriftClient == null) {
+            s_logger.info("Delete BGP prefix - bgpThriftClient is null. Unable to delete BGP prefix.");
+            return;
+        }
+        try {
+            bgpThriftClient.delPrefix(rd, prefix);
+        } catch (BgpRouterException b) {
+            s_logger.error("Failed to delete BGP prefix " + prefix + "due to BgpRouter Exception number " + b.getErrorCode());
+            s_logger.error("BgpRouterException trace ", b);
+        } catch (TException t) {
+            s_logger.error(String.format("Failed deleting prefix entry <vrf:prefix> %s:%s due to Transport error",
+                rd, prefix));
+            reInitConn();
+        } catch (Exception e) {
+            s_logger.error(String.format("Failed deleting prefix entry <vrf:prefix> %s:%s",
+                rd, prefix));
+        }
+    }
+
+    private void connectToServer(String host, int port) throws Exception {
+
+        bgpHost = host;
+        bgpPort = port;
+
+        if(bgpThriftClient == null) {
+            s_logger.error("Failed to connect to BGP server since Bgp Thrift Client is not initialized yet.");
+            return;
+        }
+        try {
+            bgpThriftClient.connect(host, port);
+            s_logger.info("Connected to BGP server " + host + " on port " + port);
+        } catch (BgpRouterException b) {
+            s_logger.error("Failed to connect to BGP server " + host + " on port " + port + " due to BgpRouter Exception number " + b.getErrorCode());
+            s_logger.error("BgpRouterException trace ", b);
+            throw b;
+        } catch (TException t) {
+            s_logger.error("Failed to initialize BGP Connection due to Transport error ", t);
+            throw t;
+        }
+        catch (Exception e) {
+            s_logger.error("Failed to initialize BGP Connection ", e);
+            throw e;
+        }
+    }
+
+    public void configureBgp(long asNum, String routerId) {
+        try {
+            bgpConfiguration.setAsNum(asNum);
+            bgpConfiguration.setRouterId(routerId);
+        } catch(Throwable e) {
+            s_logger.error("failed configuring bgp ",e);
+        }
+    }
+
+    public void reInitConn() {
+
+        try {
+            bgpThriftClient.reInit();
+            s_logger.info("Reinitialized connection to BGP Server " + bgpHost);
+        } catch (BgpRouterException b) {
+            s_logger.error("Failed to reinitialize connection to BGP server " + bgpHost + " on port " + bgpPort + " due to BgpRouter Exception number " + b.getErrorCode());
+            s_logger.error("BgpRouterException trace ", b);
+        } catch (TException t) {
+            s_logger.error("Failed to reinitialize BGP Connection due to Transport error.", t);
+        }
+        catch (Exception e) {
+            s_logger.error("Failed to reinitialize BGP Connection.", e);
+        }
+    }
+
+    /*public synchronized void startBgpSync() {
+        boolean getRoutes = true;
+        readBgpConfiguration();
+        try {
+            pushConfigurationToBgp();
+
+        } catch (BgpRouterException b) {
+            s_logger.error("Failed to push configuration to BGP due to BgpRouter Exception number " + b.getErrorCode());
+            s_logger.error("BgpRouterException trace ", b);
+            if(b.getErrorCode() == BgpRouterException.BGP_ERR_INACTIVE)
+                getRoutes = false;
+        } catch (Exception e) {
+            s_logger.error("Failed to push configuration to bgp ", e);
+        }
+        if(getRoutes == true)
+            pullConfigurationFromBgp();
+        //controllerResyncLatch.countDown();
+    }*/
+
+    /*public void waitForControllerBgpResync() {
+        try {
+            controllerResyncLatch.await();
+        } catch (InterruptedException e) {
+        }
+    }*/
+
+    /*private void pullConfigurationFromBgp() {
+        //get routes from bgp server
+        s_logger.info("Starting bgp route sync");
+        try {
+            bgpThriftClient.doRouteSync();
+        } catch (BgpRouterException b) {
+            s_logger.error("Failed BGP Route sync due to BgpRouter Exception number " + b.getErrorCode());
+            s_logger.error("BgpRouterException trace ", b);
+        } catch (Exception e) {
+            s_logger.error("Failed to pull configuration from bgp ", e);
+        }
+    }*/
+
+    /*private BgpConfiguration readBgpConfiguration() {
+        if (cache != null) {
+            bgpConfiguration = cache.get("bgpConfiguration");
+            if (bgpConfiguration == null) {
+                s_logger.info("Created bgp configuration cache");
+                bgpConfiguration = new BgpConfiguration();
+                cache.put("bgpConfiguration", bgpConfiguration);
+            } else {
+                s_logger.info("Using bgp configuration cache");
+            }
+        }
+        return bgpConfiguration;
+    }*/
+
+    /*public synchronized void pushConfigurationToBgp() throws Exception {
+        if (bgpConfiguration.getAsNum() == 0) {
+            s_logger.error("No as num configured, Skipping the push configuration to bgp ");
+            throw new BgpRouterException(BgpRouterException.BGP_ERR_INACTIVE);
+            //return;
+        }
+        if(bgpThriftClient == null) {
+            s_logger.error("bgpThriftClient is null. Skipping the push configuration to bgp.");
+            throw new BgpRouterException(BgpRouterException.BGP_ERR_INACTIVE);
+            //return;
+        }
+
+        try {
+            bgpThriftClient.startBgp((int)bgpConfiguration.getAsNum(), bgpConfiguration.getRouterId());
+            s_logger.info("Started BGP with AS number " + (int)bgpConfiguration.getAsNum() + " and router id " + bgpConfiguration.getRouterId());
+        } catch (BgpRouterException be) {
+            if(be.getErrorCode() == BgpRouterException.BGP_ERR_ACTIVE) {
+                s_logger.info("bgp server already active");
+                return;                //the assumption here is that bgp server is configured already with neighbor, vrfs and routes as well
+            } if(be.getErrorCode() == BgpRouterException.BGP_ERR_INACTIVE) {
+                s_logger.info("bgp server inactive");
+                throw be;
+            }
+
+            else {
+                s_logger.error("application error while starting bgp server %d", be.getErrorCode());
+                return;
+            }
+
+        } catch (SocketTimeoutException to) {
+            s_logger.error("Socket Timeout error while starting bgp server", to);
+            return;
+        } catch (TException t) {
+            s_logger.error("Transport error while starting bgp server ", t);
+            return;
+        } catch (Exception e) {
+            s_logger.error("Error while starting bgp server", e);
+        }
+
+        if (bgpConfiguration.getNeighbourIp().trim().length() > 0) {
+            try {
+                bgpThriftClient.addNeighbor(bgpConfiguration.getNeighbourIp(), bgpConfiguration.getNeighbourAsNum());
+            } catch (TException t) {
+                s_logger.error("Failed to push vrf to bgp due to Transport error" );
+                //retry connection
+                reInitConn();
+                addNeighbor(bgpConfiguration.getNeighbourIp(), bgpConfiguration.getNeighbourAsNum());
+            } catch (Exception e) {
+                s_logger.error("Error while starting bgp server", e);
+            }
+        }
+
+        Tenant tenant;
+        try {
+            tenant = tenantManager.getTenant("NEUTRON");
+        } catch (TenantNotFoundException e) {
+            s_logger.error("Tenant not found. Skipping push configuration to bgp.");
+            return;
+        }
+        if (tenant != null) {
+            int tenantId = tenant.getTenantId();
+
+            Set<VpnInstanceInfo> vpnInfos = l3Manager.getVpnInstanceManager().getVpnsForTenant(tenantId);
+            s_logger.info("Number of vpns to configure is "+vpnInfos.size());
+            for (VpnInstanceInfo vpnInfo: vpnInfos) {
+                try {
+                    bgpThriftClient.addVrf(vpnInfo.getRouteDistinguisher(),
+                        new ArrayList<>(vpnInfo.getRtImportList()),
+                        new ArrayList<>(vpnInfo.getRtExportList()));
+                } catch (TException t) {
+                    s_logger.error("Failed to push vrf to bgp due to Transport error" );
+                    //retry connection
+                    reInitConn();
+                    addVrf(vpnInfo.getRouteDistinguisher(), new ArrayList<>(vpnInfo.getRtImportList()),
+                        new ArrayList<>(vpnInfo.getRtExportList()));
+                } catch (Exception e) {
+                    s_logger.error("Failed to push vrf to bgp ", e);
+                }
+            }
+            for (VpnInstanceInfo vpnInfo: vpnInfos) {
+                ConcurrentMap<FibInfo, Object>  fibInfos = l3Manager.getVpnInstanceManager().
+                    getLocalFibInfosForRdCache(vpnInfo.getRouteDistinguisher());
+                s_logger.info("Number of fib infos to configure is "+fibInfos.size());
+                for (FibInfo fibInfo : fibInfos.keySet()) {
+                    try {
+                        bgpThriftClient.addPrefix(vpnInfo.getRouteDistinguisher(), fibInfo.getDestinationPrefix(),
+                            fibInfo.getNextHopPrefix(), (int) fibInfo.getLabel());
+                    } catch (TException t) {
+                        s_logger.error("Failed to push route to bgp due to Transport error" );
+                        reInitConn();
+                        addPrefix(vpnInfo.getRouteDistinguisher(), fibInfo.getDestinationPrefix(),
+                            fibInfo.getNextHopPrefix(), (int) fibInfo.getLabel());
+                    } catch (Exception e) {
+                        s_logger.error("Failed to push route to bgp ", e);
+                    }
+                }
+            }
+        }
+
+    }
+    */
+
+/*    public void disconnect() {
+        bgpThriftClient.disconnect();
+    }
+
+    public void setRoute(Route r) {
+        s_logger.info("Setting route in VPN Manager");
+        //l3Manager.getVpnInstanceManager().addRoute(r.getRd(), r.getPrefix(), r.getNexthop(), r.getLabel());
+    }*/
+
+    /* For testing purposes */
+    /*public String ribGet() {
+        String family = "ipv4";
+        String format = "json";
+
+        try {
+            List<Route> routeList = bgpThriftClient.getRoutes();
+            Iterator<Route> iter = routeList.iterator();
+            while(iter.hasNext()) {
+                Route r = iter.next();
+                System.out.println("Route:: vrf:" + r.getRd() + " Prefix: " + r.getPrefix() + " Nexthop: " + r.getNexthop() + "Label: " + r.getLabel());
+            }
+        } catch (Exception e) {
+            s_logger.error("Failed getting bgp routes ", e);
+        }
+        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
new file mode 100644 (file)
index 0000000..e1d1950
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * 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;
+
+import java.io.Serializable;
+
+public class BgpConfiguration implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    long asNum;
+    String bgpServer = "";
+    int bgpPort;
+    String routerId = "";
+    String neighbourIp = "";
+    int neighbourAsNum;
+
+    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 int getNeighbourAsNum() {
+        return neighbourAsNum;
+    }
+
+    public void setNeighbourAsNum(int neighbourAsNum) {
+        this.neighbourAsNum = neighbourAsNum;
+    }
+
+    @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/globals/BgpConstants.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/globals/BgpConstants.java
new file mode 100644 (file)
index 0000000..5ffca0a
--- /dev/null
@@ -0,0 +1,12 @@
+package org.opendaylight.bgpmanager.globals;
+
+
+public class BgpConstants {
+
+    public static final String BGP_SPEAKER_HOST_NAME = "bpg.speaker.host.name";
+    public static final String BGP_SPEAKER_THRIFT_PORT = "bgp.speaker.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
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
new file mode 100644 (file)
index 0000000..d6f75f8
--- /dev/null
@@ -0,0 +1,40 @@
+
+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/globals/Route.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/globals/Route.java
new file mode 100644 (file)
index 0000000..af75428
--- /dev/null
@@ -0,0 +1,53 @@
+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
new file mode 100644 (file)
index 0000000..c10bb30
--- /dev/null
@@ -0,0 +1,317 @@
+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 TSocket sock;
+    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;
+
+    //public final static int BGP_ERR_INITED = 101;
+    //public final static int BGP_ERR_NOT_INITED = 102;
+
+
+    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.info("Connecting to BGP Server " + bgpHost + " on port " + bgpPort);
+            reInit();
+        } catch (Exception e) {
+            logger.error("Failed connecting to BGP server ", e);
+            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.info("Starting BGP Server with as number " + asNum + " and router ID " + rtrId);
+        dispatch(bop);
+    }
+
+    public void addNeighbor(String nbrIp, int nbrAsNum)
+        throws TException, BgpRouterException {
+        bop.type = ADD_NBR;
+        bop.nbrIp = nbrIp;
+        bop.nbrAsNum = nbrAsNum;
+        logger.info("Adding BGP Neighbor " + nbrIp + " with as number " + nbrAsNum);
+        dispatch(bop);
+    }
+
+    public void delNeighbor(String nbrIp)
+        throws TException, BgpRouterException {
+        bop.type = DEL_NBR;
+        bop.nbrIp = nbrIp;
+        logger.info("Deleting BGP Neighbor " + nbrIp);
+        dispatch(bop);
+    }
+
+    public 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.info("Adding BGP VRF rd: " + rd);
+        dispatch(bop);
+    }
+
+    public void delVrf(String rd)
+        throws TException, BgpRouterException {
+        bop.type = DEL_VRF;
+        bop.rd = rd;
+        logger.info("Deleting BGP VRF rd: " + rd);
+        dispatch(bop);
+    }
+
+    public 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.info("Adding BGP route - rd:" + rd + " prefix:" + prefix + " nexthop:" + nexthop + " label:" + label);
+        dispatch(bop);
+    }
+
+    public void delPrefix(String rd, String prefix)
+        throws TException, BgpRouterException {
+        bop.type = DEL_PFX;
+        bop.rd = rd;
+        bop.pfx = prefix;
+        logger.info("Deleting BGP route - rd:" + rd + " prefix:" + 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.info("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.info("Completed BGP Route sync.");
+        }  catch (Exception e) {
+            throw e;
+        }
+    };
+
+
+    public List<Route> getRoutes()
+        throws TException, BgpRouterException {
+
+        BgpSyncHandle bsh = BgpSyncHandle.getInstance();
+        List<Route> allRoutes = new ArrayList<Route>();
+
+        try {
+            initRibSync(bsh);
+            while (bsh.getState() != bsh.DONE) {
+                Routes r = doRibSync(bsh);
+                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);
+
+                    allRoutes.add(route);
+                }
+            }
+            endRibSync(bsh);
+        }  catch (Exception e) {
+            throw e;
+        }
+        return allRoutes;
+    };
+
+
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/implementation/BgpSyncHandle.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/client/implementation/BgpSyncHandle.java
new file mode 100644 (file)
index 0000000..e00515f
--- /dev/null
@@ -0,0 +1,75 @@
+
+package org.opendaylight.bgpmanager.thrift.client.implementation;
+
+import java.io.IOException;
+import java.net.Socket;
+import java.net.SocketException;
+
+public class BgpSyncHandle {
+    private static BgpSyncHandle handle = null;
+    private int more;
+    private int state;
+
+    public static final int INITED = 1;
+    public static final int ITERATING = 2;
+    public static final int DONE = 3;
+    public static final int ABORTED = 4;
+    public static final int NEVER_DONE = 5;
+
+    public static final int default_tcp_sock_sz = 87380;    //default receive buffer size on linux > 2.4 (SLES 11)
+
+    private BgpSyncHandle() {
+        more = 1; 
+        state = NEVER_DONE;
+    }
+
+    public static synchronized BgpSyncHandle getInstance() {
+       if (handle == null) 
+           handle = new BgpSyncHandle();
+       return handle;
+    }
+
+    public synchronized int getState() {
+       return state;
+    }
+
+    public int getMaxCount() {
+        //compute the max count of routes we would like to send
+        Socket skt = new Socket();
+        int sockBufSz = default_tcp_sock_sz;
+        try {
+            sockBufSz = skt.getReceiveBufferSize();
+        } catch (SocketException s) {
+        }
+        try {
+            skt.close();
+        } catch (IOException e) {
+        }
+        return sockBufSz/getRouteSize();
+    }
+
+    public int getRouteSize() {
+       //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. 
+
+       return 96;
+    }
+
+    public int setState(int state) {
+       int retval = this.state;
+       this.state = state;
+       return retval;
+    }
+
+    public int setMore(int more) {
+       int retval = this.more;
+       this.more = more;
+       return retval;
+    }
+}
+
+        
+  
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
new file mode 100644 (file)
index 0000000..25dee2f
--- /dev/null
@@ -0,0 +1,21 @@
+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
new file mode 100644 (file)
index 0000000..405dc3d
--- /dev/null
@@ -0,0 +1,26 @@
+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;
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/BgpConfigurator.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/BgpConfigurator.java
new file mode 100644 (file)
index 0000000..6339516
--- /dev/null
@@ -0,0 +1,8900 @@
+/**
+ * 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 BgpConfigurator {
+
+  public interface Iface {
+
+    public int startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime) throws org.apache.thrift.TException;
+
+    public int stopBgpServer() throws org.apache.thrift.TException;
+
+    public int createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException;
+
+    public int deletePeer(String ipAddress) throws org.apache.thrift.TException;
+
+    public int addVrf(String rd, List<String> irts, List<String> erts) throws org.apache.thrift.TException;
+
+    public int delVrf(String rd) throws org.apache.thrift.TException;
+
+    public int pushRoute(String prefix, String nexthop, String rd, int label) throws org.apache.thrift.TException;
+
+    public int withdrawRoute(String prefix, String rd) 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 stopBgpServer(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;
+
+    public void deletePeer(String ipAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void addVrf(String rd, List<String> irts, List<String> erts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void delVrf(String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void pushRoute(String prefix, String nexthop, String rd, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void withdrawRoute(String prefix, String rd, 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;
+
+  }
+
+  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+      public Factory() {}
+      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+        return new Client(prot);
+      }
+      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+        return new Client(iprot, oprot);
+      }
+    }
+
+    public Client(org.apache.thrift.protocol.TProtocol prot)
+    {
+      super(prot, prot);
+    }
+
+    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+      super(iprot, oprot);
+    }
+
+    public int startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime) throws org.apache.thrift.TException
+    {
+      send_startBgpServer(asNumber, routerId, port, holdTime, keepAliveTime);
+      return recv_startBgpServer();
+    }
+
+    public void send_startBgpServer(int asNumber, String routerId, int port, int holdTime, int keepAliveTime) throws org.apache.thrift.TException
+    {
+      startBgpServer_args args = new startBgpServer_args();
+      args.setAsNumber(asNumber);
+      args.setRouterId(routerId);
+      args.setPort(port);
+      args.setHoldTime(holdTime);
+      args.setKeepAliveTime(keepAliveTime);
+      sendBase("startBgpServer", args);
+    }
+
+    public int recv_startBgpServer() throws org.apache.thrift.TException
+    {
+      startBgpServer_result result = new startBgpServer_result();
+      receiveBase(result, "startBgpServer");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startBgpServer failed: unknown result");
+    }
+
+    public int stopBgpServer() throws org.apache.thrift.TException
+    {
+      send_stopBgpServer();
+      return recv_stopBgpServer();
+    }
+
+    public void send_stopBgpServer() throws org.apache.thrift.TException
+    {
+      stopBgpServer_args args = new stopBgpServer_args();
+      sendBase("stopBgpServer", args);
+    }
+
+    public int recv_stopBgpServer() throws org.apache.thrift.TException
+    {
+      stopBgpServer_result result = new stopBgpServer_result();
+      receiveBase(result, "stopBgpServer");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "stopBgpServer failed: unknown result");
+    }
+
+    public int createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException
+    {
+      send_createPeer(ipAddress, asNumber);
+      return recv_createPeer();
+    }
+
+    public void send_createPeer(String ipAddress, int asNumber) throws org.apache.thrift.TException
+    {
+      createPeer_args args = new createPeer_args();
+      args.setIpAddress(ipAddress);
+      args.setAsNumber(asNumber);
+      sendBase("createPeer", args);
+    }
+
+    public int recv_createPeer() throws org.apache.thrift.TException
+    {
+      createPeer_result result = new createPeer_result();
+      receiveBase(result, "createPeer");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPeer failed: unknown result");
+    }
+
+    public int deletePeer(String ipAddress) throws org.apache.thrift.TException
+    {
+      send_deletePeer(ipAddress);
+      return recv_deletePeer();
+    }
+
+    public void send_deletePeer(String ipAddress) throws org.apache.thrift.TException
+    {
+      deletePeer_args args = new deletePeer_args();
+      args.setIpAddress(ipAddress);
+      sendBase("deletePeer", args);
+    }
+
+    public int recv_deletePeer() throws org.apache.thrift.TException
+    {
+      deletePeer_result result = new deletePeer_result();
+      receiveBase(result, "deletePeer");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deletePeer failed: unknown result");
+    }
+
+    public int addVrf(String rd, List<String> irts, List<String> erts) throws org.apache.thrift.TException
+    {
+      send_addVrf(rd, irts, erts);
+      return recv_addVrf();
+    }
+
+    public void send_addVrf(String rd, List<String> irts, List<String> erts) throws org.apache.thrift.TException
+    {
+      addVrf_args args = new addVrf_args();
+      args.setRd(rd);
+      args.setIrts(irts);
+      args.setErts(erts);
+      sendBase("addVrf", args);
+    }
+
+    public int recv_addVrf() throws org.apache.thrift.TException
+    {
+      addVrf_result result = new addVrf_result();
+      receiveBase(result, "addVrf");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addVrf failed: unknown result");
+    }
+
+    public int delVrf(String rd) throws org.apache.thrift.TException
+    {
+      send_delVrf(rd);
+      return recv_delVrf();
+    }
+
+    public void send_delVrf(String rd) throws org.apache.thrift.TException
+    {
+      delVrf_args args = new delVrf_args();
+      args.setRd(rd);
+      sendBase("delVrf", args);
+    }
+
+    public int recv_delVrf() throws org.apache.thrift.TException
+    {
+      delVrf_result result = new delVrf_result();
+      receiveBase(result, "delVrf");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delVrf failed: unknown result");
+    }
+
+    public int pushRoute(String prefix, String nexthop, String rd, int label) throws org.apache.thrift.TException
+    {
+      send_pushRoute(prefix, nexthop, rd, label);
+      return recv_pushRoute();
+    }
+
+    public void send_pushRoute(String prefix, String nexthop, String rd, int label) throws org.apache.thrift.TException
+    {
+      pushRoute_args args = new pushRoute_args();
+      args.setPrefix(prefix);
+      args.setNexthop(nexthop);
+      args.setRd(rd);
+      args.setLabel(label);
+      sendBase("pushRoute", args);
+    }
+
+    public int recv_pushRoute() throws org.apache.thrift.TException
+    {
+      pushRoute_result result = new pushRoute_result();
+      receiveBase(result, "pushRoute");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pushRoute failed: unknown result");
+    }
+
+    public int withdrawRoute(String prefix, String rd) throws org.apache.thrift.TException
+    {
+      send_withdrawRoute(prefix, rd);
+      return recv_withdrawRoute();
+    }
+
+    public void send_withdrawRoute(String prefix, String rd) throws org.apache.thrift.TException
+    {
+      withdrawRoute_args args = new withdrawRoute_args();
+      args.setPrefix(prefix);
+      args.setRd(rd);
+      sendBase("withdrawRoute", args);
+    }
+
+    public int recv_withdrawRoute() throws org.apache.thrift.TException
+    {
+      withdrawRoute_result result = new withdrawRoute_result();
+      receiveBase(result, "withdrawRoute");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "withdrawRoute failed: unknown result");
+    }
+
+    public Routes getRoutes(int optype, int winSize) throws org.apache.thrift.TException
+    {
+      send_getRoutes(optype, winSize);
+      return recv_getRoutes();
+    }
+
+    public void send_getRoutes(int optype, int winSize) throws org.apache.thrift.TException
+    {
+      getRoutes_args args = new getRoutes_args();
+      args.setOptype(optype);
+      args.setWinSize(winSize);
+      sendBase("getRoutes", args);
+    }
+
+    public Routes recv_getRoutes() throws org.apache.thrift.TException
+    {
+      getRoutes_result result = new getRoutes_result();
+      receiveBase(result, "getRoutes");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRoutes failed: unknown result");
+    }
+
+  }
+  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+      private org.apache.thrift.async.TAsyncClientManager clientManager;
+      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+        this.clientManager = clientManager;
+        this.protocolFactory = protocolFactory;
+      }
+      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+        return new AsyncClient(protocolFactory, clientManager, transport);
+      }
+    }
+
+    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+      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 {
+      checkReady();
+      startBgpServer_call method_call = new startBgpServer_call(asNumber, routerId, port, holdTime, keepAliveTime, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class startBgpServer_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 {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.asNumber = asNumber;
+        this.routerId = routerId;
+        this.port = port;
+        this.holdTime = holdTime;
+        this.keepAliveTime = keepAliveTime;
+      }
+
+      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();
+        args.setAsNumber(asNumber);
+        args.setRouterId(routerId);
+        args.setPort(port);
+        args.setHoldTime(holdTime);
+        args.setKeepAliveTime(keepAliveTime);
+        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_startBgpServer();
+      }
+    }
+
+    public void stopBgpServer(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      stopBgpServer_call method_call = new stopBgpServer_call(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 {
+        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("stopBgpServer", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        stopBgpServer_args args = new stopBgpServer_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_stopBgpServer();
+      }
+    }
+
+    public void createPeer(String ipAddress, int asNumber, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      createPeer_call method_call = new createPeer_call(ipAddress, asNumber, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class createPeer_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String ipAddress;
+      private int asNumber;
+      public createPeer_call(String ipAddress, 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.ipAddress = ipAddress;
+        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("createPeer", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        createPeer_args args = new createPeer_args();
+        args.setIpAddress(ipAddress);
+        args.setAsNumber(asNumber);
+        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_createPeer();
+      }
+    }
+
+    public void deletePeer(String ipAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      deletePeer_call method_call = new deletePeer_call(ipAddress, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class deletePeer_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String ipAddress;
+      public deletePeer_call(String ipAddress, 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.ipAddress = ipAddress;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deletePeer", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        deletePeer_args args = new deletePeer_args();
+        args.setIpAddress(ipAddress);
+        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_deletePeer();
+      }
+    }
+
+    public void addVrf(String rd, List<String> irts, List<String> erts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      addVrf_call method_call = new addVrf_call(rd, irts, erts, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class addVrf_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String rd;
+      private List<String> irts;
+      private List<String> erts;
+      public addVrf_call(String rd, List<String> irts, List<String> erts, 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.rd = rd;
+        this.irts = irts;
+        this.erts = erts;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addVrf", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        addVrf_args args = new addVrf_args();
+        args.setRd(rd);
+        args.setIrts(irts);
+        args.setErts(erts);
+        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_addVrf();
+      }
+    }
+
+    public void delVrf(String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      delVrf_call method_call = new delVrf_call(rd, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class delVrf_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String rd;
+      public delVrf_call(String rd, 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.rd = rd;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delVrf", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        delVrf_args args = new delVrf_args();
+        args.setRd(rd);
+        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_delVrf();
+      }
+    }
+
+    public void pushRoute(String prefix, String nexthop, String rd, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      pushRoute_call method_call = new pushRoute_call(prefix, nexthop, rd, label, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class pushRoute_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String prefix;
+      private String nexthop;
+      private String rd;
+      private int label;
+      public pushRoute_call(String prefix, String nexthop, String rd, int label, 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.prefix = prefix;
+        this.nexthop = nexthop;
+        this.rd = rd;
+        this.label = label;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pushRoute", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        pushRoute_args args = new pushRoute_args();
+        args.setPrefix(prefix);
+        args.setNexthop(nexthop);
+        args.setRd(rd);
+        args.setLabel(label);
+        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_pushRoute();
+      }
+    }
+
+    public void withdrawRoute(String prefix, String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      withdrawRoute_call method_call = new withdrawRoute_call(prefix, rd, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class withdrawRoute_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String prefix;
+      private String rd;
+      public withdrawRoute_call(String prefix, String rd, 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.prefix = prefix;
+        this.rd = rd;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("withdrawRoute", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        withdrawRoute_args args = new withdrawRoute_args();
+        args.setPrefix(prefix);
+        args.setRd(rd);
+        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_withdrawRoute();
+      }
+    }
+
+    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("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 startBgpServer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startBgpServer_args> {
+      public startBgpServer() {
+        super("startBgpServer");
+      }
+
+      public startBgpServer_args getEmptyArgsInstance() {
+        return new startBgpServer_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      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 static class stopBgpServer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, stopBgpServer_args> {
+      public stopBgpServer() {
+        super("stopBgpServer");
+      }
+
+      public stopBgpServer_args getEmptyArgsInstance() {
+        return new stopBgpServer_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      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 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;
+      }
+    }
+
+    public static class addVrf<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addVrf_args> {
+      public addVrf() {
+        super("addVrf");
+      }
+
+      public addVrf_args getEmptyArgsInstance() {
+        return new addVrf_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public addVrf_result getResult(I iface, addVrf_args args) throws org.apache.thrift.TException {
+        addVrf_result result = new addVrf_result();
+        result.success = iface.addVrf(args.rd, args.irts, args.erts);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class delVrf<I extends Iface> extends org.apache.thrift.ProcessFunction<I, delVrf_args> {
+      public delVrf() {
+        super("delVrf");
+      }
+
+      public delVrf_args getEmptyArgsInstance() {
+        return new delVrf_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public delVrf_result getResult(I iface, delVrf_args args) throws org.apache.thrift.TException {
+        delVrf_result result = new delVrf_result();
+        result.success = iface.delVrf(args.rd);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class pushRoute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, pushRoute_args> {
+      public pushRoute() {
+        super("pushRoute");
+      }
+
+      public pushRoute_args getEmptyArgsInstance() {
+        return new pushRoute_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public pushRoute_result getResult(I iface, pushRoute_args args) throws org.apache.thrift.TException {
+        pushRoute_result result = new pushRoute_result();
+        result.success = iface.pushRoute(args.prefix, args.nexthop, args.rd, args.label);
+        result.setSuccessIsSet(true);
+        return result;
+      }
+    }
+
+    public static class withdrawRoute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, withdrawRoute_args> {
+      public withdrawRoute() {
+        super("withdrawRoute");
+      }
+
+      public withdrawRoute_args getEmptyArgsInstance() {
+        return new withdrawRoute_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public withdrawRoute_result getResult(I iface, withdrawRoute_args args) throws org.apache.thrift.TException {
+        withdrawRoute_result result = new withdrawRoute_result();
+        result.success = iface.withdrawRoute(args.prefix, args.rd);
+        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("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 startBgpServer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startBgpServer_args, Integer> {
+      public startBgpServer() {
+        super("startBgpServer");
+      }
+
+      public startBgpServer_args getEmptyArgsInstance() {
+        return new startBgpServer_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();
+            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;
+            startBgpServer_result result = new startBgpServer_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, 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 static class stopBgpServer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, stopBgpServer_args, Integer> {
+      public stopBgpServer() {
+        super("stopBgpServer");
+      }
+
+      public stopBgpServer_args getEmptyArgsInstance() {
+        return new stopBgpServer_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();
+            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;
+            stopBgpServer_result result = new stopBgpServer_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, stopBgpServer_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.stopBgpServer(resultHandler);
+      }
+    }
+
+    public static class createPeer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createPeer_args, Integer> {
+      public createPeer() {
+        super("createPeer");
+      }
+
+      public createPeer_args getEmptyArgsInstance() {
+        return new createPeer_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) {
+            createPeer_result result = new createPeer_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;
+            createPeer_result result = new createPeer_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, createPeer_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.createPeer(args.ipAddress, args.asNumber,resultHandler);
+      }
+    }
+
+    public static class deletePeer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePeer_args, Integer> {
+      public deletePeer() {
+        super("deletePeer");
+      }
+
+      public deletePeer_args getEmptyArgsInstance() {
+        return new deletePeer_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) {
+            deletePeer_result result = new deletePeer_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;
+            deletePeer_result result = new deletePeer_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, deletePeer_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.deletePeer(args.ipAddress,resultHandler);
+      }
+    }
+
+    public static class addVrf<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addVrf_args, Integer> {
+      public addVrf() {
+        super("addVrf");
+      }
+
+      public addVrf_args getEmptyArgsInstance() {
+        return new addVrf_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) {
+            addVrf_result result = new addVrf_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;
+            addVrf_result result = new addVrf_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, addVrf_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.addVrf(args.rd, args.irts, args.erts,resultHandler);
+      }
+    }
+
+    public static class delVrf<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, delVrf_args, Integer> {
+      public delVrf() {
+        super("delVrf");
+      }
+
+      public delVrf_args getEmptyArgsInstance() {
+        return new delVrf_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) {
+            delVrf_result result = new delVrf_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;
+            delVrf_result result = new delVrf_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, delVrf_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.delVrf(args.rd,resultHandler);
+      }
+    }
+
+    public static class pushRoute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, pushRoute_args, Integer> {
+      public pushRoute() {
+        super("pushRoute");
+      }
+
+      public pushRoute_args getEmptyArgsInstance() {
+        return new pushRoute_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) {
+            pushRoute_result result = new pushRoute_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;
+            pushRoute_result result = new pushRoute_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, pushRoute_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.pushRoute(args.prefix, args.nexthop, args.rd, args.label,resultHandler);
+      }
+    }
+
+    public static class withdrawRoute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, withdrawRoute_args, Integer> {
+      public withdrawRoute() {
+        super("withdrawRoute");
+      }
+
+      public withdrawRoute_args getEmptyArgsInstance() {
+        return new withdrawRoute_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) {
+            withdrawRoute_result result = new withdrawRoute_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;
+            withdrawRoute_result result = new withdrawRoute_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, withdrawRoute_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+        iface.withdrawRoute(args.prefix, args.rd,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 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);
+        }
+      }
+
+      /**
+       * 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;
+        }
+      }
+
+      /**
+       * 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 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, 
+          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)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startBgpServer_args.class, metaDataMap);
+    }
+
+    public startBgpServer_args() {
+    }
+
+    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);
+    }
+
+    /**
+     * 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;
+      }
+      this.port = other.port;
+      this.holdTime = other.holdTime;
+      this.keepAliveTime = other.keepAliveTime;
+    }
+
+    public startBgpServer_args deepCopy() {
+      return new startBgpServer_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;
+    }
+
+    public int getAsNumber() {
+      return this.asNumber;
+    }
+
+    public startBgpServer_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 startBgpServer_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 startBgpServer_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 startBgpServer_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 startBgpServer_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 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;
+
+      }
+    }
+
+    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());
+
+      }
+      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();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof startBgpServer_args)
+        return this.equals((startBgpServer_args)that);
+      return false;
+    }
+
+    public boolean equals(startBgpServer_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;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(startBgpServer_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;
+        }
+      }
+      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("startBgpServer_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;
+      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 startBgpServer_argsStandardSchemeFactory implements SchemeFactory {
+      public startBgpServer_argsStandardScheme getScheme() {
+        return new startBgpServer_argsStandardScheme();
+      }
+    }
+
+    private static class startBgpServer_argsStandardScheme extends StandardScheme<startBgpServer_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, startBgpServer_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;
+            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, startBgpServer_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.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class startBgpServer_argsTupleSchemeFactory implements SchemeFactory {
+      public startBgpServer_argsTupleScheme getScheme() {
+        return new startBgpServer_argsTupleScheme();
+      }
+    }
+
+    private static class startBgpServer_argsTupleScheme extends TupleScheme<startBgpServer_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, startBgpServer_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);
+        }
+        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);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, startBgpServer_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(5);
+        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);
+        }
+      }
+    }
+
+  }
+
+  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");
+
+    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());
+    }
+
+    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_result.class, metaDataMap);
+    }
+
+    public startBgpServer_result() {
+    }
+
+    public startBgpServer_result(
+      int success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public startBgpServer_result(startBgpServer_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public startBgpServer_result deepCopy() {
+      return new startBgpServer_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = 0;
+    }
+
+    public int getSuccess() {
+      return this.success;
+    }
+
+    public startBgpServer_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 startBgpServer_result)
+        return this.equals((startBgpServer_result)that);
+      return false;
+    }
+
+    public boolean equals(startBgpServer_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(startBgpServer_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("startBgpServer_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 startBgpServer_resultStandardSchemeFactory implements SchemeFactory {
+      public startBgpServer_resultStandardScheme getScheme() {
+        return new startBgpServer_resultStandardScheme();
+      }
+    }
+
+    private static class startBgpServer_resultStandardScheme extends StandardScheme<startBgpServer_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, startBgpServer_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, startBgpServer_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 startBgpServer_resultTupleSchemeFactory implements SchemeFactory {
+      public startBgpServer_resultTupleScheme getScheme() {
+        return new startBgpServer_resultTupleScheme();
+      }
+    }
+
+    private static class startBgpServer_resultTupleScheme extends TupleScheme<startBgpServer_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, startBgpServer_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, startBgpServer_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 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");
+
+
+    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());
+    }
+
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+      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) {
+          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 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);
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopBgpServer_args.class, metaDataMap);
+    }
+
+    public stopBgpServer_args() {
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public stopBgpServer_args(stopBgpServer_args other) {
+    }
+
+    public stopBgpServer_args deepCopy() {
+      return new stopBgpServer_args(this);
+    }
+
+    @Override
+    public void clear() {
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      }
+      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) {
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof stopBgpServer_args)
+        return this.equals((stopBgpServer_args)that);
+      return false;
+    }
+
+    public boolean equals(stopBgpServer_args that) {
+      if (that == null)
+        return false;
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(stopBgpServer_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      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("stopBgpServer_args(");
+      boolean first = true;
+
+      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 stopBgpServer_argsStandardSchemeFactory implements SchemeFactory {
+      public stopBgpServer_argsStandardScheme getScheme() {
+        return new stopBgpServer_argsStandardScheme();
+      }
+    }
+
+    private static class stopBgpServer_argsStandardScheme extends StandardScheme<stopBgpServer_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, stopBgpServer_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) {
+            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, stopBgpServer_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class stopBgpServer_argsTupleSchemeFactory implements SchemeFactory {
+      public stopBgpServer_argsTupleScheme getScheme() {
+        return new stopBgpServer_argsTupleScheme();
+      }
+    }
+
+    private static class stopBgpServer_argsTupleScheme extends TupleScheme<stopBgpServer_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+      }
+    }
+
+  }
+
+  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");
+
+    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());
+    }
+
+    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(stopBgpServer_result.class, metaDataMap);
+    }
+
+    public stopBgpServer_result() {
+    }
+
+    public stopBgpServer_result(
+      int success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public stopBgpServer_result(stopBgpServer_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public stopBgpServer_result deepCopy() {
+      return new stopBgpServer_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = 0;
+    }
+
+    public int getSuccess() {
+      return this.success;
+    }
+
+    public stopBgpServer_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 stopBgpServer_result)
+        return this.equals((stopBgpServer_result)that);
+      return false;
+    }
+
+    public boolean equals(stopBgpServer_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(stopBgpServer_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("stopBgpServer_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 stopBgpServer_resultStandardSchemeFactory implements SchemeFactory {
+      public stopBgpServer_resultStandardScheme getScheme() {
+        return new stopBgpServer_resultStandardScheme();
+      }
+    }
+
+    private static class stopBgpServer_resultStandardScheme extends StandardScheme<stopBgpServer_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, stopBgpServer_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, stopBgpServer_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 stopBgpServer_resultTupleSchemeFactory implements SchemeFactory {
+      public stopBgpServer_resultTupleScheme getScheme() {
+        return new stopBgpServer_resultTupleScheme();
+      }
+    }
+
+    private static class stopBgpServer_resultTupleScheme extends TupleScheme<stopBgpServer_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, stopBgpServer_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, stopBgpServer_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 getRoutes_args implements org.apache.thrift.TBase<getRoutes_args, getRoutes_args._Fields>, java.io.Serializable, Cloneable, Comparable<getRoutes_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRoutes_args");
+
+    private static final org.apache.thrift.protocol.TField OPTYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("optype", org.apache.thrift.protocol.TType.I32, (short)1);
+    private static final org.apache.thrift.protocol.TField WIN_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("winSize", 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 getRoutes_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getRoutes_argsTupleSchemeFactory());
+    }
+
+    public int optype; // required
+    public int winSize; // 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 {
+      OPTYPE((short)1, "optype"),
+      WIN_SIZE((short)2, "winSize");
+
+      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: // OPTYPE
+            return OPTYPE;
+          case 2: // WIN_SIZE
+            return WIN_SIZE;
+          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 __OPTYPE_ISSET_ID = 0;
+    private static final int __WINSIZE_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.OPTYPE, new org.apache.thrift.meta_data.FieldMetaData("optype", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      tmpMap.put(_Fields.WIN_SIZE, new org.apache.thrift.meta_data.FieldMetaData("winSize", 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(getRoutes_args.class, metaDataMap);
+    }
+
+    public getRoutes_args() {
+    }
+
+    public getRoutes_args(
+      int optype,
+      int winSize)
+    {
+      this();
+      this.optype = optype;
+      setOptypeIsSet(true);
+      this.winSize = winSize;
+      setWinSizeIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getRoutes_args(getRoutes_args other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.optype = other.optype;
+      this.winSize = other.winSize;
+    }
+
+    public getRoutes_args deepCopy() {
+      return new getRoutes_args(this);
+    }
+
+    @Override
+    public void clear() {
+      setOptypeIsSet(false);
+      this.optype = 0;
+      setWinSizeIsSet(false);
+      this.winSize = 0;
+    }
+
+    public int getOptype() {
+      return this.optype;
+    }
+
+    public getRoutes_args setOptype(int optype) {
+      this.optype = optype;
+      setOptypeIsSet(true);
+      return this;
+    }
+
+    public void unsetOptype() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPTYPE_ISSET_ID);
+    }
+
+    /** Returns true if field optype is set (has been assigned a value) and false otherwise */
+    public boolean isSetOptype() {
+      return EncodingUtils.testBit(__isset_bitfield, __OPTYPE_ISSET_ID);
+    }
+
+    public void setOptypeIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPTYPE_ISSET_ID, value);
+    }
+
+    public int getWinSize() {
+      return this.winSize;
+    }
+
+    public getRoutes_args setWinSize(int winSize) {
+      this.winSize = winSize;
+      setWinSizeIsSet(true);
+      return this;
+    }
+
+    public void unsetWinSize() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WINSIZE_ISSET_ID);
+    }
+
+    /** Returns true if field winSize is set (has been assigned a value) and false otherwise */
+    public boolean isSetWinSize() {
+      return EncodingUtils.testBit(__isset_bitfield, __WINSIZE_ISSET_ID);
+    }
+
+    public void setWinSizeIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WINSIZE_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case OPTYPE:
+        if (value == null) {
+          unsetOptype();
+        } else {
+          setOptype((Integer)value);
+        }
+        break;
+
+      case WIN_SIZE:
+        if (value == null) {
+          unsetWinSize();
+        } else {
+          setWinSize((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case OPTYPE:
+        return Integer.valueOf(getOptype());
+
+      case WIN_SIZE:
+        return Integer.valueOf(getWinSize());
+
+      }
+      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 OPTYPE:
+        return isSetOptype();
+      case WIN_SIZE:
+        return isSetWinSize();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getRoutes_args)
+        return this.equals((getRoutes_args)that);
+      return false;
+    }
+
+    public boolean equals(getRoutes_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_optype = true;
+      boolean that_present_optype = true;
+      if (this_present_optype || that_present_optype) {
+        if (!(this_present_optype && that_present_optype))
+          return false;
+        if (this.optype != that.optype)
+          return false;
+      }
+
+      boolean this_present_winSize = true;
+      boolean that_present_winSize = true;
+      if (this_present_winSize || that_present_winSize) {
+        if (!(this_present_winSize && that_present_winSize))
+          return false;
+        if (this.winSize != that.winSize)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(getRoutes_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetOptype()).compareTo(other.isSetOptype());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetOptype()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.optype, other.optype);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetWinSize()).compareTo(other.isSetWinSize());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetWinSize()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.winSize, other.winSize);
+        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("getRoutes_args(");
+      boolean first = true;
+
+      sb.append("optype:");
+      sb.append(this.optype);
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("winSize:");
+      sb.append(this.winSize);
+      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 getRoutes_argsStandardSchemeFactory implements SchemeFactory {
+      public getRoutes_argsStandardScheme getScheme() {
+        return new getRoutes_argsStandardScheme();
+      }
+    }
+
+    private static class getRoutes_argsStandardScheme extends StandardScheme<getRoutes_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getRoutes_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: // OPTYPE
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.optype = iprot.readI32();
+                struct.setOptypeIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // WIN_SIZE
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.winSize = iprot.readI32();
+                struct.setWinSizeIsSet(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, getRoutes_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldBegin(OPTYPE_FIELD_DESC);
+        oprot.writeI32(struct.optype);
+        oprot.writeFieldEnd();
+        oprot.writeFieldBegin(WIN_SIZE_FIELD_DESC);
+        oprot.writeI32(struct.winSize);
+        oprot.writeFieldEnd();
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getRoutes_argsTupleSchemeFactory implements SchemeFactory {
+      public getRoutes_argsTupleScheme getScheme() {
+        return new getRoutes_argsTupleScheme();
+      }
+    }
+
+    private static class getRoutes_argsTupleScheme extends TupleScheme<getRoutes_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getRoutes_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetOptype()) {
+          optionals.set(0);
+        }
+        if (struct.isSetWinSize()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetOptype()) {
+          oprot.writeI32(struct.optype);
+        }
+        if (struct.isSetWinSize()) {
+          oprot.writeI32(struct.winSize);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getRoutes_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          struct.optype = iprot.readI32();
+          struct.setOptypeIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.winSize = iprot.readI32();
+          struct.setWinSizeIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class getRoutes_result implements org.apache.thrift.TBase<getRoutes_result, getRoutes_result._Fields>, java.io.Serializable, Cloneable, Comparable<getRoutes_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRoutes_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getRoutes_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getRoutes_resultTupleSchemeFactory());
+    }
+
+    public Routes 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
+    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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Routes.class)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRoutes_result.class, metaDataMap);
+    }
+
+    public getRoutes_result() {
+    }
+
+    public getRoutes_result(
+      Routes success)
+    {
+      this();
+      this.success = success;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getRoutes_result(getRoutes_result other) {
+      if (other.isSetSuccess()) {
+        this.success = new Routes(other.success);
+      }
+    }
+
+    public getRoutes_result deepCopy() {
+      return new getRoutes_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.success = null;
+    }
+
+    public Routes getSuccess() {
+      return this.success;
+    }
+
+    public getRoutes_result setSuccess(Routes success) {
+      this.success = success;
+      return this;
+    }
+
+    public void unsetSuccess() {
+      this.success = null;
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return this.success != null;
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      if (!value) {
+        this.success = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((Routes)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return 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 getRoutes_result)
+        return this.equals((getRoutes_result)that);
+      return false;
+    }
+
+    public boolean equals(getRoutes_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && this.isSetSuccess();
+      boolean that_present_success = true && that.isSetSuccess();
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(getRoutes_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("getRoutes_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      if (this.success == null) {
+        sb.append("null");
+      } else {
+        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
+      if (success != null) {
+        success.validate();
+      }
+    }
+
+    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 getRoutes_resultStandardSchemeFactory implements SchemeFactory {
+      public getRoutes_resultStandardScheme getScheme() {
+        return new getRoutes_resultStandardScheme();
+      }
+    }
+
+    private static class getRoutes_resultStandardScheme extends StandardScheme<getRoutes_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getRoutes_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.STRUCT) {
+                struct.success = new Routes();
+                struct.success.read(iprot);
+                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, getRoutes_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          struct.success.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getRoutes_resultTupleSchemeFactory implements SchemeFactory {
+      public getRoutes_resultTupleScheme getScheme() {
+        return new getRoutes_resultTupleScheme();
+      }
+    }
+
+    private static class getRoutes_resultTupleScheme extends TupleScheme<getRoutes_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getRoutes_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()) {
+          struct.success.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getRoutes_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.success = new Routes();
+          struct.success.read(iprot);
+          struct.setSuccessIsSet(true);
+        }
+      }
+    }
+
+  }
+
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/BgpUpdater.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/BgpUpdater.java
new file mode 100644 (file)
index 0000000..4d46d3e
--- /dev/null
@@ -0,0 +1,1969 @@
+/**
+ * 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 BgpUpdater {
+
+  public interface Iface {
+
+    public void onUpdatePushRoute(String rd, String prefix, int prefixlen, String nexthop, int label) throws org.apache.thrift.TException;
+
+    public void onUpdateWithdrawRoute(String rd, String prefix, int prefixlen) throws org.apache.thrift.TException;
+
+    public void onStartConfigResyncNotification() throws org.apache.thrift.TException;
+
+  }
+
+  public interface AsyncIface {
+
+    public void onUpdatePushRoute(String rd, String prefix, int prefixlen, String nexthop, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void onUpdateWithdrawRoute(String rd, String prefix, int prefixlen, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void onStartConfigResyncNotification(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+  }
+
+  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+      public Factory() {}
+      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+        return new Client(prot);
+      }
+      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+        return new Client(iprot, oprot);
+      }
+    }
+
+    public Client(org.apache.thrift.protocol.TProtocol prot)
+    {
+      super(prot, prot);
+    }
+
+    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+      super(iprot, oprot);
+    }
+
+    public void onUpdatePushRoute(String rd, String prefix, int prefixlen, String nexthop, int label) throws org.apache.thrift.TException
+    {
+      send_onUpdatePushRoute(rd, prefix, prefixlen, nexthop, label);
+    }
+
+    public void send_onUpdatePushRoute(String rd, String prefix, int prefixlen, String nexthop, int label) throws org.apache.thrift.TException
+    {
+      onUpdatePushRoute_args args = new onUpdatePushRoute_args();
+      args.setRd(rd);
+      args.setPrefix(prefix);
+      args.setPrefixlen(prefixlen);
+      args.setNexthop(nexthop);
+      args.setLabel(label);
+      sendBase("onUpdatePushRoute", args);
+    }
+
+    public void onUpdateWithdrawRoute(String rd, String prefix, int prefixlen) throws org.apache.thrift.TException
+    {
+      send_onUpdateWithdrawRoute(rd, prefix, prefixlen);
+    }
+
+    public void send_onUpdateWithdrawRoute(String rd, String prefix, int prefixlen) throws org.apache.thrift.TException
+    {
+      onUpdateWithdrawRoute_args args = new onUpdateWithdrawRoute_args();
+      args.setRd(rd);
+      args.setPrefix(prefix);
+      args.setPrefixlen(prefixlen);
+      sendBase("onUpdateWithdrawRoute", args);
+    }
+
+    public void onStartConfigResyncNotification() throws org.apache.thrift.TException
+    {
+      send_onStartConfigResyncNotification();
+    }
+
+    public void send_onStartConfigResyncNotification() throws org.apache.thrift.TException
+    {
+      onStartConfigResyncNotification_args args = new onStartConfigResyncNotification_args();
+      sendBase("onStartConfigResyncNotification", args);
+    }
+
+  }
+  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+      private org.apache.thrift.async.TAsyncClientManager clientManager;
+      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+        this.clientManager = clientManager;
+        this.protocolFactory = protocolFactory;
+      }
+      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+        return new AsyncClient(protocolFactory, clientManager, transport);
+      }
+    }
+
+    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+      super(protocolFactory, clientManager, transport);
+    }
+
+    public void onUpdatePushRoute(String rd, String prefix, int prefixlen, String nexthop, int label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      onUpdatePushRoute_call method_call = new onUpdatePushRoute_call(rd, prefix, prefixlen, nexthop, label, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class onUpdatePushRoute_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String rd;
+      private String prefix;
+      private int prefixlen;
+      private String nexthop;
+      private int label;
+      public onUpdatePushRoute_call(String rd, String prefix, int prefixlen, String nexthop, int label, 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.rd = rd;
+        this.prefix = prefix;
+        this.prefixlen = prefixlen;
+        this.nexthop = nexthop;
+        this.label = label;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onUpdatePushRoute", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        onUpdatePushRoute_args args = new onUpdatePushRoute_args();
+        args.setRd(rd);
+        args.setPrefix(prefix);
+        args.setPrefixlen(prefixlen);
+        args.setNexthop(nexthop);
+        args.setLabel(label);
+        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 void onUpdateWithdrawRoute(String rd, String prefix, int prefixlen, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      onUpdateWithdrawRoute_call method_call = new onUpdateWithdrawRoute_call(rd, prefix, prefixlen, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class onUpdateWithdrawRoute_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String rd;
+      private String prefix;
+      private int prefixlen;
+      public onUpdateWithdrawRoute_call(String rd, String prefix, int prefixlen, 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.rd = rd;
+        this.prefix = prefix;
+        this.prefixlen = prefixlen;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onUpdateWithdrawRoute", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        onUpdateWithdrawRoute_args args = new onUpdateWithdrawRoute_args();
+        args.setRd(rd);
+        args.setPrefix(prefix);
+        args.setPrefixlen(prefixlen);
+        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 void onStartConfigResyncNotification(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      onStartConfigResyncNotification_call method_call = new onStartConfigResyncNotification_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class onStartConfigResyncNotification_call extends org.apache.thrift.async.TAsyncMethodCall {
+      public onStartConfigResyncNotification_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, true);
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onStartConfigResyncNotification", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        onStartConfigResyncNotification_args args = new onStartConfigResyncNotification_args();
+        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 {
+    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("onUpdatePushRoute", new onUpdatePushRoute());
+      processMap.put("onUpdateWithdrawRoute", new onUpdateWithdrawRoute());
+      processMap.put("onStartConfigResyncNotification", new onStartConfigResyncNotification());
+      return processMap;
+    }
+
+    public static class onUpdatePushRoute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onUpdatePushRoute_args> {
+      public onUpdatePushRoute() {
+        super("onUpdatePushRoute");
+      }
+
+      public onUpdatePushRoute_args getEmptyArgsInstance() {
+        return new onUpdatePushRoute_args();
+      }
+
+      protected boolean isOneway() {
+        return true;
+      }
+
+      public org.apache.thrift.TBase getResult(I iface, onUpdatePushRoute_args args) throws org.apache.thrift.TException {
+        iface.onUpdatePushRoute(args.rd, args.prefix, args.prefixlen, args.nexthop, args.label);
+        return null;
+      }
+    }
+
+    public static class onUpdateWithdrawRoute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onUpdateWithdrawRoute_args> {
+      public onUpdateWithdrawRoute() {
+        super("onUpdateWithdrawRoute");
+      }
+
+      public onUpdateWithdrawRoute_args getEmptyArgsInstance() {
+        return new onUpdateWithdrawRoute_args();
+      }
+
+      protected boolean isOneway() {
+        return true;
+      }
+
+      public org.apache.thrift.TBase getResult(I iface, onUpdateWithdrawRoute_args args) throws org.apache.thrift.TException {
+        iface.onUpdateWithdrawRoute(args.rd, args.prefix, args.prefixlen);
+        return null;
+      }
+    }
+
+    public static class onStartConfigResyncNotification<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onStartConfigResyncNotification_args> {
+      public onStartConfigResyncNotification() {
+        super("onStartConfigResyncNotification");
+      }
+
+      public onStartConfigResyncNotification_args getEmptyArgsInstance() {
+        return new onStartConfigResyncNotification_args();
+      }
+
+      protected boolean isOneway() {
+        return true;
+      }
+
+      public org.apache.thrift.TBase getResult(I iface, onStartConfigResyncNotification_args args) throws org.apache.thrift.TException {
+        iface.onStartConfigResyncNotification();
+        return null;
+      }
+    }
+
+  }
+
+  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("onUpdatePushRoute", new onUpdatePushRoute());
+      processMap.put("onUpdateWithdrawRoute", new onUpdateWithdrawRoute());
+      processMap.put("onStartConfigResyncNotification", new onStartConfigResyncNotification());
+      return processMap;
+    }
+
+    public static class onUpdatePushRoute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, onUpdatePushRoute_args, Void> {
+      public onUpdatePushRoute() {
+        super("onUpdatePushRoute");
+      }
+
+      public onUpdatePushRoute_args getEmptyArgsInstance() {
+        return new onUpdatePushRoute_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, onUpdatePushRoute_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+        iface.onUpdatePushRoute(args.rd, args.prefix, args.prefixlen, args.nexthop, args.label,resultHandler);
+      }
+    }
+
+    public static class onUpdateWithdrawRoute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, onUpdateWithdrawRoute_args, Void> {
+      public onUpdateWithdrawRoute() {
+        super("onUpdateWithdrawRoute");
+      }
+
+      public onUpdateWithdrawRoute_args getEmptyArgsInstance() {
+        return new onUpdateWithdrawRoute_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, onUpdateWithdrawRoute_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+        iface.onUpdateWithdrawRoute(args.rd, args.prefix, args.prefixlen,resultHandler);
+      }
+    }
+
+    public static class onStartConfigResyncNotification<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, onStartConfigResyncNotification_args, Void> {
+      public onStartConfigResyncNotification() {
+        super("onStartConfigResyncNotification");
+      }
+
+      public onStartConfigResyncNotification_args getEmptyArgsInstance() {
+        return new onStartConfigResyncNotification_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, onStartConfigResyncNotification_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+        iface.onStartConfigResyncNotification(resultHandler);
+      }
+    }
+
+  }
+
+  public static class onUpdatePushRoute_args implements org.apache.thrift.TBase<onUpdatePushRoute_args, onUpdatePushRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<onUpdatePushRoute_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onUpdatePushRoute_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 PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)2);
+    private static final org.apache.thrift.protocol.TField PREFIXLEN_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixlen", org.apache.thrift.protocol.TType.I32, (short)3);
+    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)4);
+    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)5);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new onUpdatePushRoute_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new onUpdatePushRoute_argsTupleSchemeFactory());
+    }
+
+    public String rd; // required
+    public String prefix; // required
+    public int prefixlen; // required
+    public String nexthop; // 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 {
+      RD((short)1, "rd"),
+      PREFIX((short)2, "prefix"),
+      PREFIXLEN((short)3, "prefixlen"),
+      NEXTHOP((short)4, "nexthop"),
+      LABEL((short)5, "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: // RD
+            return RD;
+          case 2: // PREFIX
+            return PREFIX;
+          case 3: // PREFIXLEN
+            return PREFIXLEN;
+          case 4: // NEXTHOP
+            return NEXTHOP;
+          case 5: // 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 __PREFIXLEN_ISSET_ID = 0;
+    private static final int __LABEL_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.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.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.PREFIXLEN, new org.apache.thrift.meta_data.FieldMetaData("prefixlen", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      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.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(onUpdatePushRoute_args.class, metaDataMap);
+    }
+
+    public onUpdatePushRoute_args() {
+    }
+
+    public onUpdatePushRoute_args(
+      String rd,
+      String prefix,
+      int prefixlen,
+      String nexthop,
+      int label)
+    {
+      this();
+      this.rd = rd;
+      this.prefix = prefix;
+      this.prefixlen = prefixlen;
+      setPrefixlenIsSet(true);
+      this.nexthop = nexthop;
+      this.label = label;
+      setLabelIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public onUpdatePushRoute_args(onUpdatePushRoute_args other) {
+      __isset_bitfield = other.__isset_bitfield;
+      if (other.isSetRd()) {
+        this.rd = other.rd;
+      }
+      if (other.isSetPrefix()) {
+        this.prefix = other.prefix;
+      }
+      this.prefixlen = other.prefixlen;
+      if (other.isSetNexthop()) {
+        this.nexthop = other.nexthop;
+      }
+      this.label = other.label;
+    }
+
+    public onUpdatePushRoute_args deepCopy() {
+      return new onUpdatePushRoute_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.rd = null;
+      this.prefix = null;
+      setPrefixlenIsSet(false);
+      this.prefixlen = 0;
+      this.nexthop = null;
+      setLabelIsSet(false);
+      this.label = 0;
+    }
+
+    public String getRd() {
+      return this.rd;
+    }
+
+    public onUpdatePushRoute_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 String getPrefix() {
+      return this.prefix;
+    }
+
+    public onUpdatePushRoute_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 int getPrefixlen() {
+      return this.prefixlen;
+    }
+
+    public onUpdatePushRoute_args setPrefixlen(int prefixlen) {
+      this.prefixlen = prefixlen;
+      setPrefixlenIsSet(true);
+      return this;
+    }
+
+    public void unsetPrefixlen() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
+    }
+
+    /** Returns true if field prefixlen is set (has been assigned a value) and false otherwise */
+    public boolean isSetPrefixlen() {
+      return EncodingUtils.testBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
+    }
+
+    public void setPrefixlenIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PREFIXLEN_ISSET_ID, value);
+    }
+
+    public String getNexthop() {
+      return this.nexthop;
+    }
+
+    public onUpdatePushRoute_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 int getLabel() {
+      return this.label;
+    }
+
+    public onUpdatePushRoute_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 RD:
+        if (value == null) {
+          unsetRd();
+        } else {
+          setRd((String)value);
+        }
+        break;
+
+      case PREFIX:
+        if (value == null) {
+          unsetPrefix();
+        } else {
+          setPrefix((String)value);
+        }
+        break;
+
+      case PREFIXLEN:
+        if (value == null) {
+          unsetPrefixlen();
+        } else {
+          setPrefixlen((Integer)value);
+        }
+        break;
+
+      case NEXTHOP:
+        if (value == null) {
+          unsetNexthop();
+        } else {
+          setNexthop((String)value);
+        }
+        break;
+
+      case LABEL:
+        if (value == null) {
+          unsetLabel();
+        } else {
+          setLabel((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case RD:
+        return getRd();
+
+      case PREFIX:
+        return getPrefix();
+
+      case PREFIXLEN:
+        return Integer.valueOf(getPrefixlen());
+
+      case NEXTHOP:
+        return getNexthop();
+
+      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 RD:
+        return isSetRd();
+      case PREFIX:
+        return isSetPrefix();
+      case PREFIXLEN:
+        return isSetPrefixlen();
+      case NEXTHOP:
+        return isSetNexthop();
+      case LABEL:
+        return isSetLabel();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof onUpdatePushRoute_args)
+        return this.equals((onUpdatePushRoute_args)that);
+      return false;
+    }
+
+    public boolean equals(onUpdatePushRoute_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_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_prefixlen = true;
+      boolean that_present_prefixlen = true;
+      if (this_present_prefixlen || that_present_prefixlen) {
+        if (!(this_present_prefixlen && that_present_prefixlen))
+          return false;
+        if (this.prefixlen != that.prefixlen)
+          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_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(onUpdatePushRoute_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(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(isSetPrefixlen()).compareTo(other.isSetPrefixlen());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetPrefixlen()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixlen, other.prefixlen);
+        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(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("onUpdatePushRoute_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("prefix:");
+      if (this.prefix == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.prefix);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("prefixlen:");
+      sb.append(this.prefixlen);
+      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("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 onUpdatePushRoute_argsStandardSchemeFactory implements SchemeFactory {
+      public onUpdatePushRoute_argsStandardScheme getScheme() {
+        return new onUpdatePushRoute_argsStandardScheme();
+      }
+    }
+
+    private static class onUpdatePushRoute_argsStandardScheme extends StandardScheme<onUpdatePushRoute_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, onUpdatePushRoute_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: // 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 3: // PREFIXLEN
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.prefixlen = iprot.readI32();
+                struct.setPrefixlenIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 4: // 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 5: // 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, onUpdatePushRoute_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.prefix != null) {
+          oprot.writeFieldBegin(PREFIX_FIELD_DESC);
+          oprot.writeString(struct.prefix);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldBegin(PREFIXLEN_FIELD_DESC);
+        oprot.writeI32(struct.prefixlen);
+        oprot.writeFieldEnd();
+        if (struct.nexthop != null) {
+          oprot.writeFieldBegin(NEXTHOP_FIELD_DESC);
+          oprot.writeString(struct.nexthop);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldBegin(LABEL_FIELD_DESC);
+        oprot.writeI32(struct.label);
+        oprot.writeFieldEnd();
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class onUpdatePushRoute_argsTupleSchemeFactory implements SchemeFactory {
+      public onUpdatePushRoute_argsTupleScheme getScheme() {
+        return new onUpdatePushRoute_argsTupleScheme();
+      }
+    }
+
+    private static class onUpdatePushRoute_argsTupleScheme extends TupleScheme<onUpdatePushRoute_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, onUpdatePushRoute_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetRd()) {
+          optionals.set(0);
+        }
+        if (struct.isSetPrefix()) {
+          optionals.set(1);
+        }
+        if (struct.isSetPrefixlen()) {
+          optionals.set(2);
+        }
+        if (struct.isSetNexthop()) {
+          optionals.set(3);
+        }
+        if (struct.isSetLabel()) {
+          optionals.set(4);
+        }
+        oprot.writeBitSet(optionals, 5);
+        if (struct.isSetRd()) {
+          oprot.writeString(struct.rd);
+        }
+        if (struct.isSetPrefix()) {
+          oprot.writeString(struct.prefix);
+        }
+        if (struct.isSetPrefixlen()) {
+          oprot.writeI32(struct.prefixlen);
+        }
+        if (struct.isSetNexthop()) {
+          oprot.writeString(struct.nexthop);
+        }
+        if (struct.isSetLabel()) {
+          oprot.writeI32(struct.label);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, onUpdatePushRoute_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(5);
+        if (incoming.get(0)) {
+          struct.rd = iprot.readString();
+          struct.setRdIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.prefix = iprot.readString();
+          struct.setPrefixIsSet(true);
+        }
+        if (incoming.get(2)) {
+          struct.prefixlen = iprot.readI32();
+          struct.setPrefixlenIsSet(true);
+        }
+        if (incoming.get(3)) {
+          struct.nexthop = iprot.readString();
+          struct.setNexthopIsSet(true);
+        }
+        if (incoming.get(4)) {
+          struct.label = iprot.readI32();
+          struct.setLabelIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class onUpdateWithdrawRoute_args implements org.apache.thrift.TBase<onUpdateWithdrawRoute_args, onUpdateWithdrawRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<onUpdateWithdrawRoute_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onUpdateWithdrawRoute_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 PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)2);
+    private static final org.apache.thrift.protocol.TField PREFIXLEN_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixlen", 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 onUpdateWithdrawRoute_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new onUpdateWithdrawRoute_argsTupleSchemeFactory());
+    }
+
+    public String rd; // required
+    public String prefix; // required
+    public int prefixlen; // 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"),
+      PREFIX((short)2, "prefix"),
+      PREFIXLEN((short)3, "prefixlen");
+
+      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: // PREFIX
+            return PREFIX;
+          case 3: // PREFIXLEN
+            return PREFIXLEN;
+          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 __PREFIXLEN_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.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.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.PREFIXLEN, new org.apache.thrift.meta_data.FieldMetaData("prefixlen", 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(onUpdateWithdrawRoute_args.class, metaDataMap);
+    }
+
+    public onUpdateWithdrawRoute_args() {
+    }
+
+    public onUpdateWithdrawRoute_args(
+      String rd,
+      String prefix,
+      int prefixlen)
+    {
+      this();
+      this.rd = rd;
+      this.prefix = prefix;
+      this.prefixlen = prefixlen;
+      setPrefixlenIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public onUpdateWithdrawRoute_args(onUpdateWithdrawRoute_args other) {
+      __isset_bitfield = other.__isset_bitfield;
+      if (other.isSetRd()) {
+        this.rd = other.rd;
+      }
+      if (other.isSetPrefix()) {
+        this.prefix = other.prefix;
+      }
+      this.prefixlen = other.prefixlen;
+    }
+
+    public onUpdateWithdrawRoute_args deepCopy() {
+      return new onUpdateWithdrawRoute_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.rd = null;
+      this.prefix = null;
+      setPrefixlenIsSet(false);
+      this.prefixlen = 0;
+    }
+
+    public String getRd() {
+      return this.rd;
+    }
+
+    public onUpdateWithdrawRoute_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 String getPrefix() {
+      return this.prefix;
+    }
+
+    public onUpdateWithdrawRoute_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 int getPrefixlen() {
+      return this.prefixlen;
+    }
+
+    public onUpdateWithdrawRoute_args setPrefixlen(int prefixlen) {
+      this.prefixlen = prefixlen;
+      setPrefixlenIsSet(true);
+      return this;
+    }
+
+    public void unsetPrefixlen() {
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
+    }
+
+    /** Returns true if field prefixlen is set (has been assigned a value) and false otherwise */
+    public boolean isSetPrefixlen() {
+      return EncodingUtils.testBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
+    }
+
+    public void setPrefixlenIsSet(boolean value) {
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PREFIXLEN_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case RD:
+        if (value == null) {
+          unsetRd();
+        } else {
+          setRd((String)value);
+        }
+        break;
+
+      case PREFIX:
+        if (value == null) {
+          unsetPrefix();
+        } else {
+          setPrefix((String)value);
+        }
+        break;
+
+      case PREFIXLEN:
+        if (value == null) {
+          unsetPrefixlen();
+        } else {
+          setPrefixlen((Integer)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case RD:
+        return getRd();
+
+      case PREFIX:
+        return getPrefix();
+
+      case PREFIXLEN:
+        return Integer.valueOf(getPrefixlen());
+
+      }
+      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 PREFIX:
+        return isSetPrefix();
+      case PREFIXLEN:
+        return isSetPrefixlen();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof onUpdateWithdrawRoute_args)
+        return this.equals((onUpdateWithdrawRoute_args)that);
+      return false;
+    }
+
+    public boolean equals(onUpdateWithdrawRoute_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_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_prefixlen = true;
+      boolean that_present_prefixlen = true;
+      if (this_present_prefixlen || that_present_prefixlen) {
+        if (!(this_present_prefixlen && that_present_prefixlen))
+          return false;
+        if (this.prefixlen != that.prefixlen)
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(onUpdateWithdrawRoute_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(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(isSetPrefixlen()).compareTo(other.isSetPrefixlen());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetPrefixlen()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixlen, other.prefixlen);
+        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("onUpdateWithdrawRoute_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("prefix:");
+      if (this.prefix == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.prefix);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("prefixlen:");
+      sb.append(this.prefixlen);
+      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 onUpdateWithdrawRoute_argsStandardSchemeFactory implements SchemeFactory {
+      public onUpdateWithdrawRoute_argsStandardScheme getScheme() {
+        return new onUpdateWithdrawRoute_argsStandardScheme();
+      }
+    }
+
+    private static class onUpdateWithdrawRoute_argsStandardScheme extends StandardScheme<onUpdateWithdrawRoute_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, onUpdateWithdrawRoute_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: // 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 3: // PREFIXLEN
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.prefixlen = iprot.readI32();
+                struct.setPrefixlenIsSet(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, onUpdateWithdrawRoute_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.prefix != null) {
+          oprot.writeFieldBegin(PREFIX_FIELD_DESC);
+          oprot.writeString(struct.prefix);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldBegin(PREFIXLEN_FIELD_DESC);
+        oprot.writeI32(struct.prefixlen);
+        oprot.writeFieldEnd();
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class onUpdateWithdrawRoute_argsTupleSchemeFactory implements SchemeFactory {
+      public onUpdateWithdrawRoute_argsTupleScheme getScheme() {
+        return new onUpdateWithdrawRoute_argsTupleScheme();
+      }
+    }
+
+    private static class onUpdateWithdrawRoute_argsTupleScheme extends TupleScheme<onUpdateWithdrawRoute_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, onUpdateWithdrawRoute_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetRd()) {
+          optionals.set(0);
+        }
+        if (struct.isSetPrefix()) {
+          optionals.set(1);
+        }
+        if (struct.isSetPrefixlen()) {
+          optionals.set(2);
+        }
+        oprot.writeBitSet(optionals, 3);
+        if (struct.isSetRd()) {
+          oprot.writeString(struct.rd);
+        }
+        if (struct.isSetPrefix()) {
+          oprot.writeString(struct.prefix);
+        }
+        if (struct.isSetPrefixlen()) {
+          oprot.writeI32(struct.prefixlen);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, onUpdateWithdrawRoute_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)) {
+          struct.prefix = iprot.readString();
+          struct.setPrefixIsSet(true);
+        }
+        if (incoming.get(2)) {
+          struct.prefixlen = iprot.readI32();
+          struct.setPrefixlenIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class onStartConfigResyncNotification_args implements org.apache.thrift.TBase<onStartConfigResyncNotification_args, onStartConfigResyncNotification_args._Fields>, java.io.Serializable, Cloneable, Comparable<onStartConfigResyncNotification_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onStartConfigResyncNotification_args");
+
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new onStartConfigResyncNotification_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new onStartConfigResyncNotification_argsTupleSchemeFactory());
+    }
+
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+      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) {
+          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 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);
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onStartConfigResyncNotification_args.class, metaDataMap);
+    }
+
+    public onStartConfigResyncNotification_args() {
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public onStartConfigResyncNotification_args(onStartConfigResyncNotification_args other) {
+    }
+
+    public onStartConfigResyncNotification_args deepCopy() {
+      return new onStartConfigResyncNotification_args(this);
+    }
+
+    @Override
+    public void clear() {
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      }
+      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) {
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof onStartConfigResyncNotification_args)
+        return this.equals((onStartConfigResyncNotification_args)that);
+      return false;
+    }
+
+    public boolean equals(onStartConfigResyncNotification_args that) {
+      if (that == null)
+        return false;
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(onStartConfigResyncNotification_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      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("onStartConfigResyncNotification_args(");
+      boolean first = true;
+
+      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 onStartConfigResyncNotification_argsStandardSchemeFactory implements SchemeFactory {
+      public onStartConfigResyncNotification_argsStandardScheme getScheme() {
+        return new onStartConfigResyncNotification_argsStandardScheme();
+      }
+    }
+
+    private static class onStartConfigResyncNotification_argsStandardScheme extends StandardScheme<onStartConfigResyncNotification_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, onStartConfigResyncNotification_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) {
+            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, onStartConfigResyncNotification_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class onStartConfigResyncNotification_argsTupleSchemeFactory implements SchemeFactory {
+      public onStartConfigResyncNotification_argsTupleScheme getScheme() {
+        return new onStartConfigResyncNotification_argsTupleScheme();
+      }
+    }
+
+    private static class onStartConfigResyncNotification_argsTupleScheme extends TupleScheme<onStartConfigResyncNotification_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, onStartConfigResyncNotification_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, onStartConfigResyncNotification_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+      }
+    }
+
+  }
+
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/Routes.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/Routes.java
new file mode 100644 (file)
index 0000000..77ab80d
--- /dev/null
@@ -0,0 +1,638 @@
+/**
+ * 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 Routes implements org.apache.thrift.TBase<Routes, Routes._Fields>, java.io.Serializable, Cloneable, Comparable<Routes> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Routes");
+
+  private static final org.apache.thrift.protocol.TField ERRCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errcode", org.apache.thrift.protocol.TType.I32, (short)1);
+  private static final org.apache.thrift.protocol.TField UPDATES_FIELD_DESC = new org.apache.thrift.protocol.TField("updates", org.apache.thrift.protocol.TType.LIST, (short)2);
+  private static final org.apache.thrift.protocol.TField MORE_FIELD_DESC = new org.apache.thrift.protocol.TField("more", 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 RoutesStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new RoutesTupleSchemeFactory());
+  }
+
+  public int errcode; // required
+  public List<Update> updates; // optional
+  public int more; // optional
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    ERRCODE((short)1, "errcode"),
+    UPDATES((short)2, "updates"),
+    MORE((short)4, "more");
+
+    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: // ERRCODE
+          return ERRCODE;
+        case 2: // UPDATES
+          return UPDATES;
+        case 4: // MORE
+          return MORE;
+        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 __MORE_ISSET_ID = 1;
+  private byte __isset_bitfield = 0;
+  private _Fields optionals[] = {_Fields.UPDATES,_Fields.MORE};
+  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.ERRCODE, 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.I32)));
+    tmpMap.put(_Fields.UPDATES, new org.apache.thrift.meta_data.FieldMetaData("updates", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Update.class))));
+    tmpMap.put(_Fields.MORE, new org.apache.thrift.meta_data.FieldMetaData("more", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Routes.class, metaDataMap);
+  }
+
+  public Routes() {
+  }
+
+  public Routes(
+    int errcode)
+  {
+    this();
+    this.errcode = errcode;
+    setErrcodeIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Routes(Routes other) {
+    __isset_bitfield = other.__isset_bitfield;
+    this.errcode = other.errcode;
+    if (other.isSetUpdates()) {
+      List<Update> __this__updates = new ArrayList<Update>(other.updates.size());
+      for (Update other_element : other.updates) {
+        __this__updates.add(new Update(other_element));
+      }
+      this.updates = __this__updates;
+    }
+    this.more = other.more;
+  }
+
+  public Routes deepCopy() {
+    return new Routes(this);
+  }
+
+  @Override
+  public void clear() {
+    setErrcodeIsSet(false);
+    this.errcode = 0;
+    this.updates = null;
+    setMoreIsSet(false);
+    this.more = 0;
+  }
+
+  public int getErrcode() {
+    return this.errcode;
+  }
+
+  public Routes setErrcode(int 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 int getUpdatesSize() {
+    return (this.updates == null) ? 0 : this.updates.size();
+  }
+
+  public java.util.Iterator<Update> getUpdatesIterator() {
+    return (this.updates == null) ? null : this.updates.iterator();
+  }
+
+  public void addToUpdates(Update elem) {
+    if (this.updates == null) {
+      this.updates = new ArrayList<Update>();
+    }
+    this.updates.add(elem);
+  }
+
+  public List<Update> getUpdates() {
+    return this.updates;
+  }
+
+  public Routes setUpdates(List<Update> updates) {
+    this.updates = updates;
+    return this;
+  }
+
+  public void unsetUpdates() {
+    this.updates = null;
+  }
+
+  /** Returns true if field updates is set (has been assigned a value) and false otherwise */
+  public boolean isSetUpdates() {
+    return this.updates != null;
+  }
+
+  public void setUpdatesIsSet(boolean value) {
+    if (!value) {
+      this.updates = null;
+    }
+  }
+
+  public int getMore() {
+    return this.more;
+  }
+
+  public Routes setMore(int more) {
+    this.more = more;
+    setMoreIsSet(true);
+    return this;
+  }
+
+  public void unsetMore() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MORE_ISSET_ID);
+  }
+
+  /** Returns true if field more is set (has been assigned a value) and false otherwise */
+  public boolean isSetMore() {
+    return EncodingUtils.testBit(__isset_bitfield, __MORE_ISSET_ID);
+  }
+
+  public void setMoreIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MORE_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case ERRCODE:
+      if (value == null) {
+        unsetErrcode();
+      } else {
+        setErrcode((Integer)value);
+      }
+      break;
+
+    case UPDATES:
+      if (value == null) {
+        unsetUpdates();
+      } else {
+        setUpdates((List<Update>)value);
+      }
+      break;
+
+    case MORE:
+      if (value == null) {
+        unsetMore();
+      } else {
+        setMore((Integer)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case ERRCODE:
+      return Integer.valueOf(getErrcode());
+
+    case UPDATES:
+      return getUpdates();
+
+    case MORE:
+      return Integer.valueOf(getMore());
+
+    }
+    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 ERRCODE:
+      return isSetErrcode();
+    case UPDATES:
+      return isSetUpdates();
+    case MORE:
+      return isSetMore();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Routes)
+      return this.equals((Routes)that);
+    return false;
+  }
+
+  public boolean equals(Routes that) {
+    if (that == null)
+      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_updates = true && this.isSetUpdates();
+    boolean that_present_updates = true && that.isSetUpdates();
+    if (this_present_updates || that_present_updates) {
+      if (!(this_present_updates && that_present_updates))
+        return false;
+      if (!this.updates.equals(that.updates))
+        return false;
+    }
+
+    boolean this_present_more = true && this.isSetMore();
+    boolean that_present_more = true && that.isSetMore();
+    if (this_present_more || that_present_more) {
+      if (!(this_present_more && that_present_more))
+        return false;
+      if (this.more != that.more)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  @Override
+  public int compareTo(Routes other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    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(isSetUpdates()).compareTo(other.isSetUpdates());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetUpdates()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updates, other.updates);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetMore()).compareTo(other.isSetMore());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMore()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.more, other.more);
+      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("Routes(");
+    boolean first = true;
+
+    sb.append("errcode:");
+    sb.append(this.errcode);
+    first = false;
+    if (isSetUpdates()) {
+      if (!first) sb.append(", ");
+      sb.append("updates:");
+      if (this.updates == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.updates);
+      }
+      first = false;
+    }
+    if (isSetMore()) {
+      if (!first) sb.append(", ");
+      sb.append("more:");
+      sb.append(this.more);
+      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 RoutesStandardSchemeFactory implements SchemeFactory {
+    public RoutesStandardScheme getScheme() {
+      return new RoutesStandardScheme();
+    }
+  }
+
+  private static class RoutesStandardScheme extends StandardScheme<Routes> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Routes 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: // ERRCODE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.errcode = iprot.readI32();
+              struct.setErrcodeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // UPDATES
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+                struct.updates = new ArrayList<Update>(_list0.size);
+                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+                {
+                  Update _elem2;
+                  _elem2 = new Update();
+                  _elem2.read(iprot);
+                  struct.updates.add(_elem2);
+                }
+                iprot.readListEnd();
+              }
+              struct.setUpdatesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // MORE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.more = iprot.readI32();
+              struct.setMoreIsSet(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, Routes struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(ERRCODE_FIELD_DESC);
+      oprot.writeI32(struct.errcode);
+      oprot.writeFieldEnd();
+      if (struct.updates != null) {
+        if (struct.isSetUpdates()) {
+          oprot.writeFieldBegin(UPDATES_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.updates.size()));
+            for (Update _iter3 : struct.updates)
+            {
+              _iter3.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.isSetMore()) {
+        oprot.writeFieldBegin(MORE_FIELD_DESC);
+        oprot.writeI32(struct.more);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class RoutesTupleSchemeFactory implements SchemeFactory {
+    public RoutesTupleScheme getScheme() {
+      return new RoutesTupleScheme();
+    }
+  }
+
+  private static class RoutesTupleScheme extends TupleScheme<Routes> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Routes struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetErrcode()) {
+        optionals.set(0);
+      }
+      if (struct.isSetUpdates()) {
+        optionals.set(1);
+      }
+      if (struct.isSetMore()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetErrcode()) {
+        oprot.writeI32(struct.errcode);
+      }
+      if (struct.isSetUpdates()) {
+        {
+          oprot.writeI32(struct.updates.size());
+          for (Update _iter4 : struct.updates)
+          {
+            _iter4.write(oprot);
+          }
+        }
+      }
+      if (struct.isSetMore()) {
+        oprot.writeI32(struct.more);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Routes struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.errcode = iprot.readI32();
+        struct.setErrcodeIsSet(true);
+      }
+      if (incoming.get(1)) {
+        {
+          org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.updates = new ArrayList<Update>(_list5.size);
+          for (int _i6 = 0; _i6 < _list5.size; ++_i6)
+          {
+            Update _elem7;
+            _elem7 = new Update();
+            _elem7.read(iprot);
+            struct.updates.add(_elem7);
+          }
+        }
+        struct.setUpdatesIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.more = iprot.readI32();
+        struct.setMoreIsSet(true);
+      }
+    }
+  }
+
+}
+
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/Update.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/bgpmanager/thrift/gen/Update.java
new file mode 100644 (file)
index 0000000..45a3353
--- /dev/null
@@ -0,0 +1,968 @@
+/**
+ * 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 Update implements org.apache.thrift.TBase<Update, Update._Fields>, java.io.Serializable, Cloneable, Comparable<Update> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Update");
+
+  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1);
+  private static final org.apache.thrift.protocol.TField RESERVED_FIELD_DESC = new org.apache.thrift.protocol.TField("reserved", org.apache.thrift.protocol.TType.I32, (short)2);
+  private static final org.apache.thrift.protocol.TField PREFIXLEN_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixlen", org.apache.thrift.protocol.TType.I32, (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 RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)5);
+  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)6);
+  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)7);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new UpdateStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new UpdateTupleSchemeFactory());
+  }
+
+  public int type; // required
+  public int reserved; // required
+  public int prefixlen; // required
+  public int label; // required
+  public String rd; // required
+  public String prefix; // required
+  public String nexthop; // 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 {
+    TYPE((short)1, "type"),
+    RESERVED((short)2, "reserved"),
+    PREFIXLEN((short)3, "prefixlen"),
+    LABEL((short)4, "label"),
+    RD((short)5, "rd"),
+    PREFIX((short)6, "prefix"),
+    NEXTHOP((short)7, "nexthop");
+
+    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: // TYPE
+          return TYPE;
+        case 2: // RESERVED
+          return RESERVED;
+        case 3: // PREFIXLEN
+          return PREFIXLEN;
+        case 4: // LABEL
+          return LABEL;
+        case 5: // RD
+          return RD;
+        case 6: // PREFIX
+          return PREFIX;
+        case 7: // NEXTHOP
+          return NEXTHOP;
+        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 __TYPE_ISSET_ID = 0;
+  private static final int __RESERVED_ISSET_ID = 1;
+  private static final int __PREFIXLEN_ISSET_ID = 2;
+  private static final int __LABEL_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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.RESERVED, new org.apache.thrift.meta_data.FieldMetaData("reserved", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.PREFIXLEN, new org.apache.thrift.meta_data.FieldMetaData("prefixlen", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    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)));
+    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.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)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Update.class, metaDataMap);
+  }
+
+  public Update() {
+  }
+
+  public Update(
+    int type,
+    int reserved,
+    int prefixlen,
+    int label,
+    String rd,
+    String prefix,
+    String nexthop)
+  {
+    this();
+    this.type = type;
+    setTypeIsSet(true);
+    this.reserved = reserved;
+    setReservedIsSet(true);
+    this.prefixlen = prefixlen;
+    setPrefixlenIsSet(true);
+    this.label = label;
+    setLabelIsSet(true);
+    this.rd = rd;
+    this.prefix = prefix;
+    this.nexthop = nexthop;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Update(Update other) {
+    __isset_bitfield = other.__isset_bitfield;
+    this.type = other.type;
+    this.reserved = other.reserved;
+    this.prefixlen = other.prefixlen;
+    this.label = other.label;
+    if (other.isSetRd()) {
+      this.rd = other.rd;
+    }
+    if (other.isSetPrefix()) {
+      this.prefix = other.prefix;
+    }
+    if (other.isSetNexthop()) {
+      this.nexthop = other.nexthop;
+    }
+  }
+
+  public Update deepCopy() {
+    return new Update(this);
+  }
+
+  @Override
+  public void clear() {
+    setTypeIsSet(false);
+    this.type = 0;
+    setReservedIsSet(false);
+    this.reserved = 0;
+    setPrefixlenIsSet(false);
+    this.prefixlen = 0;
+    setLabelIsSet(false);
+    this.label = 0;
+    this.rd = null;
+    this.prefix = null;
+    this.nexthop = null;
+  }
+
+  public int getType() {
+    return this.type;
+  }
+
+  public Update setType(int type) {
+    this.type = type;
+    setTypeIsSet(true);
+    return this;
+  }
+
+  public void unsetType() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID);
+  }
+
+  /** Returns true if field type is set (has been assigned a value) and false otherwise */
+  public boolean isSetType() {
+    return EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID);
+  }
+
+  public void setTypeIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value);
+  }
+
+  public int getReserved() {
+    return this.reserved;
+  }
+
+  public Update setReserved(int reserved) {
+    this.reserved = reserved;
+    setReservedIsSet(true);
+    return this;
+  }
+
+  public void unsetReserved() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESERVED_ISSET_ID);
+  }
+
+  /** Returns true if field reserved is set (has been assigned a value) and false otherwise */
+  public boolean isSetReserved() {
+    return EncodingUtils.testBit(__isset_bitfield, __RESERVED_ISSET_ID);
+  }
+
+  public void setReservedIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESERVED_ISSET_ID, value);
+  }
+
+  public int getPrefixlen() {
+    return this.prefixlen;
+  }
+
+  public Update setPrefixlen(int prefixlen) {
+    this.prefixlen = prefixlen;
+    setPrefixlenIsSet(true);
+    return this;
+  }
+
+  public void unsetPrefixlen() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
+  }
+
+  /** Returns true if field prefixlen is set (has been assigned a value) and false otherwise */
+  public boolean isSetPrefixlen() {
+    return EncodingUtils.testBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
+  }
+
+  public void setPrefixlenIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PREFIXLEN_ISSET_ID, value);
+  }
+
+  public int getLabel() {
+    return this.label;
+  }
+
+  public Update 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 String getRd() {
+    return this.rd;
+  }
+
+  public Update 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 String getPrefix() {
+    return this.prefix;
+  }
+
+  public Update 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 Update 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 void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case TYPE:
+      if (value == null) {
+        unsetType();
+      } else {
+        setType((Integer)value);
+      }
+      break;
+
+    case RESERVED:
+      if (value == null) {
+        unsetReserved();
+      } else {
+        setReserved((Integer)value);
+      }
+      break;
+
+    case PREFIXLEN:
+      if (value == null) {
+        unsetPrefixlen();
+      } else {
+        setPrefixlen((Integer)value);
+      }
+      break;
+
+    case LABEL:
+      if (value == null) {
+        unsetLabel();
+      } else {
+        setLabel((Integer)value);
+      }
+      break;
+
+    case RD:
+      if (value == null) {
+        unsetRd();
+      } else {
+        setRd((String)value);
+      }
+      break;
+
+    case PREFIX:
+      if (value == null) {
+        unsetPrefix();
+      } else {
+        setPrefix((String)value);
+      }
+      break;
+
+    case NEXTHOP:
+      if (value == null) {
+        unsetNexthop();
+      } else {
+        setNexthop((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case TYPE:
+      return Integer.valueOf(getType());
+
+    case RESERVED:
+      return Integer.valueOf(getReserved());
+
+    case PREFIXLEN:
+      return Integer.valueOf(getPrefixlen());
+
+    case LABEL:
+      return Integer.valueOf(getLabel());
+
+    case RD:
+      return getRd();
+
+    case PREFIX:
+      return getPrefix();
+
+    case NEXTHOP:
+      return getNexthop();
+
+    }
+    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 TYPE:
+      return isSetType();
+    case RESERVED:
+      return isSetReserved();
+    case PREFIXLEN:
+      return isSetPrefixlen();
+    case LABEL:
+      return isSetLabel();
+    case RD:
+      return isSetRd();
+    case PREFIX:
+      return isSetPrefix();
+    case NEXTHOP:
+      return isSetNexthop();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Update)
+      return this.equals((Update)that);
+    return false;
+  }
+
+  public boolean equals(Update that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_type = true;
+    boolean that_present_type = true;
+    if (this_present_type || that_present_type) {
+      if (!(this_present_type && that_present_type))
+        return false;
+      if (this.type != that.type)
+        return false;
+    }
+
+    boolean this_present_reserved = true;
+    boolean that_present_reserved = true;
+    if (this_present_reserved || that_present_reserved) {
+      if (!(this_present_reserved && that_present_reserved))
+        return false;
+      if (this.reserved != that.reserved)
+        return false;
+    }
+
+    boolean this_present_prefixlen = true;
+    boolean that_present_prefixlen = true;
+    if (this_present_prefixlen || that_present_prefixlen) {
+      if (!(this_present_prefixlen && that_present_prefixlen))
+        return false;
+      if (this.prefixlen != that.prefixlen)
+        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;
+    }
+
+    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_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;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  @Override
+  public int compareTo(Update other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetType()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetReserved()).compareTo(other.isSetReserved());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetReserved()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reserved, other.reserved);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetPrefixlen()).compareTo(other.isSetPrefixlen());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPrefixlen()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixlen, other.prefixlen);
+      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;
+      }
+    }
+    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(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;
+      }
+    }
+    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("Update(");
+    boolean first = true;
+
+    sb.append("type:");
+    sb.append(this.type);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("reserved:");
+    sb.append(this.reserved);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("prefixlen:");
+    sb.append(this.prefixlen);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("label:");
+    sb.append(this.label);
+    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("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;
+    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 UpdateStandardSchemeFactory implements SchemeFactory {
+    public UpdateStandardScheme getScheme() {
+      return new UpdateStandardScheme();
+    }
+  }
+
+  private static class UpdateStandardScheme extends StandardScheme<Update> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Update 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: // TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.type = iprot.readI32();
+              struct.setTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // RESERVED
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.reserved = iprot.readI32();
+              struct.setReservedIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // PREFIXLEN
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.prefixlen = iprot.readI32();
+              struct.setPrefixlenIsSet(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;
+          case 5: // 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 6: // 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 7: // 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;
+          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, Update struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(TYPE_FIELD_DESC);
+      oprot.writeI32(struct.type);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(RESERVED_FIELD_DESC);
+      oprot.writeI32(struct.reserved);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(PREFIXLEN_FIELD_DESC);
+      oprot.writeI32(struct.prefixlen);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(LABEL_FIELD_DESC);
+      oprot.writeI32(struct.label);
+      oprot.writeFieldEnd();
+      if (struct.rd != null) {
+        oprot.writeFieldBegin(RD_FIELD_DESC);
+        oprot.writeString(struct.rd);
+        oprot.writeFieldEnd();
+      }
+      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();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class UpdateTupleSchemeFactory implements SchemeFactory {
+    public UpdateTupleScheme getScheme() {
+      return new UpdateTupleScheme();
+    }
+  }
+
+  private static class UpdateTupleScheme extends TupleScheme<Update> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Update struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetType()) {
+        optionals.set(0);
+      }
+      if (struct.isSetReserved()) {
+        optionals.set(1);
+      }
+      if (struct.isSetPrefixlen()) {
+        optionals.set(2);
+      }
+      if (struct.isSetLabel()) {
+        optionals.set(3);
+      }
+      if (struct.isSetRd()) {
+        optionals.set(4);
+      }
+      if (struct.isSetPrefix()) {
+        optionals.set(5);
+      }
+      if (struct.isSetNexthop()) {
+        optionals.set(6);
+      }
+      oprot.writeBitSet(optionals, 7);
+      if (struct.isSetType()) {
+        oprot.writeI32(struct.type);
+      }
+      if (struct.isSetReserved()) {
+        oprot.writeI32(struct.reserved);
+      }
+      if (struct.isSetPrefixlen()) {
+        oprot.writeI32(struct.prefixlen);
+      }
+      if (struct.isSetLabel()) {
+        oprot.writeI32(struct.label);
+      }
+      if (struct.isSetRd()) {
+        oprot.writeString(struct.rd);
+      }
+      if (struct.isSetPrefix()) {
+        oprot.writeString(struct.prefix);
+      }
+      if (struct.isSetNexthop()) {
+        oprot.writeString(struct.nexthop);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Update struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(7);
+      if (incoming.get(0)) {
+        struct.type = iprot.readI32();
+        struct.setTypeIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.reserved = iprot.readI32();
+        struct.setReservedIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.prefixlen = iprot.readI32();
+        struct.setPrefixlenIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.label = iprot.readI32();
+        struct.setLabelIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.rd = iprot.readString();
+        struct.setRdIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.prefix = iprot.readString();
+        struct.setPrefixIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.nexthop = iprot.readString();
+        struct.setNexthopIsSet(true);
+      }
+    }
+  }
+
+}
+
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
new file mode 100644 (file)
index 0000000..06c353e
--- /dev/null
@@ -0,0 +1,110 @@
+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.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 serverType;
+       private int maxWorkerThreads;
+       private int minWorkerThreads;
+    private TServerTransport serverTransport;
+       //private TNonblockingServerTransport serverTransport;
+    private TServer server;
+       private BgpUpdateHandler notificationHandler;
+    
+    public BgpThriftService() {
+       
+    }
+
+
+       public void start() {
+               logger.info("BGP Thrift Server starting.");
+               startBgpThriftServer();
+       }
+       
+       public void stop() {
+               logger.info("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 {
+            logger.debug("Server stopping");
+
+            if (serverTransport != null) {
+                serverTransport.close();
+            }
+            
+            server.stop();
+        } catch (Exception e) {
+            logger.error("Error while stopping the server - {} {}", getClass().getName(), e.getMessage());
+        }
+       }
+       
+       private class ThriftRunnable implements Runnable {
+               @Override
+               public void run() {
+                       notificationHandler = new BgpUpdateHandler();
+
+               try {
+                               serverTransport = new TServerSocket(port);
+                               //serverTransport = new TNonblockingServerSocket(port);
+                   logger.info("Server Socket on Port {} ", port);
+                       } catch (TTransportException e) {                       
+                               e.printStackTrace();
+                               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)));
+                       /*
+                       THsHaServer.Args args = new THsHaServer.Args(serverTransport);
+                       args.workerThreads(10);
+                       server = new THsHaServer(args.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
new file mode 100644 (file)
index 0000000..8688070
--- /dev/null
@@ -0,0 +1,36 @@
+package org.opendaylight.bgpmanager.thrift.server.implementation;
+
+import org.opendaylight.bgpmanager.thrift.gen.BgpUpdater;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.*;
+
+class BgpUpdateHandler implements BgpUpdater.Iface {
+
+    private static final Logger logger = LoggerFactory.getLogger(BgpUpdateHandler.class);
+
+    public BgpUpdateHandler() {}
+
+    public void onUpdatePushRoute(String rd, String prefix, int plen,
+                                String nexthop, int label) {
+       logger.info("Route add ** " + rd + " ** " + prefix + "/" + plen
+               + " ** " + nexthop + " ** " + label);
+        //Write to FIB in Data Store
+
+   }
+
+   public void onUpdateWithdrawRoute(String rd, String prefix, int plen) {
+       logger.info("Route del ** " + rd + " ** " + prefix + "/" + plen);
+       //Write to FIB in Data Store
+
+   }
+
+   public void onStartConfigResyncNotification() {
+       logger.info("BGP (re)started");
+
+        //Reconfigure BGP
+   }
+
+}
+
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/bgpmanager/impl/rev150326/BgpManagerImplModule.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/bgpmanager/impl/rev150326/BgpManagerImplModule.java
new file mode 100644 (file)
index 0000000..fe391a6
--- /dev/null
@@ -0,0 +1,28 @@
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgpmanager.impl.rev150326;
+
+import org.opendaylight.bgpmanager.BgpManager;
+
+public class BgpManagerImplModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgpmanager.impl.rev150326.AbstractBgpManagerImplModule {
+    public BgpManagerImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+        super(identifier, dependencyResolver);
+    }
+
+    public BgpManagerImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgpmanager.impl.rev150326.BgpManagerImplModule oldModule, java.lang.AutoCloseable oldInstance) {
+        super(identifier, dependencyResolver, oldModule, oldInstance);
+    }
+
+    @Override
+    public void customValidation() {
+        // add custom validation form module attributes here.
+    }
+
+    @Override
+    public java.lang.AutoCloseable createInstance() {
+        // TODO:implement
+        //throw new java.lang.UnsupportedOperationException();
+        BgpManager provider = new BgpManager();
+        getBrokerDependency().registerProvider(provider);
+        return provider;
+    }
+
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/bgpmanager/impl/rev150326/BgpManagerImplModuleFactory.java b/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/bgpmanager/impl/rev150326/BgpManagerImplModuleFactory.java
new file mode 100644 (file)
index 0000000..03be3d0
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+* Generated file
+*
+* Generated from: yang module name: bgpmanager-impl yang module local name: bgpmanager-impl
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Wed Mar 25 12:33:33 IST 2015
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgpmanager.impl.rev150326;
+public class BgpManagerImplModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgpmanager.impl.rev150326.AbstractBgpManagerImplModuleFactory {
+
+}
diff --git a/bgpmanager/bgpmanager-impl/src/main/yang/bgpmanager-impl.yang b/bgpmanager/bgpmanager-impl/src/main/yang/bgpmanager-impl.yang
new file mode 100644 (file)
index 0000000..60c8785
--- /dev/null
@@ -0,0 +1,35 @@
+module bgpmanager-impl {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:bgpmanager:impl";
+    prefix "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;}
+
+    description
+        "Service definition for bgpmanager project";
+
+    revision "2015-03-26" {
+        description
+            "Initial revision";
+    }
+
+    identity bgpmanager-impl {
+        base config:module-type;
+        config:java-name-prefix BgpManagerImpl;
+    }
+
+    augment "/config:modules/config:module/config:configuration" {
+        case bgpmanager-impl {
+            when "/config:modules/config:module/config:type = 'bgpmanager-impl'";
+            container broker {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;     //true or false
+                        config:required-identity md-sal-binding:binding-broker-osgi-registry;
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/bgpmanager/pom.xml b/bgpmanager/pom.xml
new file mode 100644 (file)
index 0000000..f979ed5
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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 INTERNAL
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>odlparent</artifactId>
+    <version>1.5.0-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.opendaylight.vpnservice</groupId>
+  <artifactId>bgpmanager</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
+  <name>bgpmanager</name>
+  <packaging>pom</packaging>
+  <modelVersion>4.0.0</modelVersion>
+  <prerequisites>
+    <maven>3.1.1</maven>
+  </prerequisites>
+
+  <modules>
+    <module>bgpmanager-api</module>
+    <module>bgpmanager-impl</module>
+  </modules>
+  <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-install-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
index 8605559f0cbac3fcbb7ff4a13afe1dafa927e0b5..93656e5f16c7d2bae465cd3f127ef6a1c1eb0a0f 100644 (file)
@@ -98,5 +98,39 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <artifactId>vpnmanager-api</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>bgpmanager-impl</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>bgpmanager-impl</artifactId>
+      <version>${project.version}</version>
+      <classifier>config</classifier>
+      <type>xml</type>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>bgpmanager-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <!--<dependency>
+      <groupId>${project.groupId}.third-party</groupId>
+      <artifactId>org.apache.thriftlib</artifactId>
+      <version>1.0.1-SNAPSHOT</version>
+    </dependency>-->
+    <dependency>
+      <groupId>org.apache.thrift</groupId>
+      <artifactId>libthrift</artifactId>
+      <version>0.9.1</version>
+    </dependency>
+    <!--
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <version>2.5</version>
+    </dependency>
+    -->
   </dependencies>
 </project>
index 69b08ff30b0d29d1981a64406af67231cdfcebcc..cf0d91c7cfd1f64fd636ad703cec30036a304b45 100644 (file)
@@ -19,14 +19,20 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <feature version='${mdsal.version}'>odl-flow-model</feature>
     <bundle>mvn:org.opendaylight.vpnservice/model-bgp/2013.07.15.7-SNAPSHOT</bundle>
     <bundle>mvn:org.opendaylight.vpnservice/vpnmanager-api/${project.version}</bundle>
+    <bundle>mvn:org.opendaylight.vpnservice/bgpmanager-api/${project.version}</bundle>
   </feature>
   <feature name='odl-vpnservice-impl' version='${project.version}' description='OpenDaylight :: vpnservice :: impl '>
     <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
     <feature version='${project.version}'>odl-vpnservice-api</feature>
     <bundle>mvn:org.opendaylight.vpnservice/vpnmanager-impl/${project.version}</bundle>
     <bundle>mvn:org.opendaylight.vpnservice/interfacemgr-impl/${interfacemgr.version}</bundle>
+    <bundle>mvn:org.opendaylight.vpnservice/bgpmanager-impl/${project.version}</bundle>
+    <!--<bundle>mvn:org.opendaylight.vpnservice.third-party/org.apache.thriftlib/1.0.1-SNAPSHOT</bundle>-->
+    <bundle>wrap:mvn:org.apache.thrift/libthrift/0.9.1$overwrite=merge&amp;Bundle-Version=0.9.1&amp;Export-Package=*;-noimport:=true;version="0.9.1"</bundle>
+    <!--<bundle>wrap:mvn:javax.servlet/servlet-api/2.5</bundle>-->
     <configfile finalname="vpnmanager-impl-default-config.xml">mvn:org.opendaylight.vpnservice/vpnmanager-impl/${project.version}/xml/config</configfile>
     <configfile finalname="interfacemgr-impl-default-config.xml">mvn:org.opendaylight.vpnservice/interfacemgr-impl/${interfacemgr.version}/xml/config</configfile>
+    <configfile finalname="bgpmanager-impl-default-config.xml">mvn:org.opendaylight.vpnservice/bgpmanager-impl/${project.version}/xml/config</configfile>
   </feature>
   <feature name='odl-vpnservice-impl-rest' version='${project.version}' description='OpenDaylight :: vpnservice :: impl :: REST '>
     <feature version="${project.version}">odl-vpnservice-impl</feature>
diff --git a/pom.xml b/pom.xml
index b3fd53725de0c5524f5ef8d1cd1a1e1952fb29dc..436bf1d3a2977105f6bf74025dd45708777db0fe 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -27,6 +27,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <module>idmanager</module>
     <module>fibmanager</module>
     <module>mdsalutil</module>
+    <module>bgpmanager</module>
   </modules>
 
   <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->