Thrift changes to support IPv6 calls over Quagga BGP stack 54/56654/3
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 11 Apr 2017 14:43:04 +0000 (15:43 +0100)
committerVivekanandan Narasimhan <n.vivekanandan@ericsson.com>
Tue, 9 May 2017 04:45:56 +0000 (04:45 +0000)
Quagga BGP stack enhancement to support IPv6 leads to Thrift interface
modifications, which specifically include the following Type changes:
a) new AFI parameter - IPv6
b) pushRoute() includes new AFI parameter
c) withdrawRoute() includes new AFI parameter
d) getRoutes() includes new AFI parameter
e) onUpdatePushRoute() includes new AFI parameter
f) onUpdateWithdrawRoute() includes new AFI parameter
Thrift interface changes to include information on afi type.

Change-Id: Id4aea3809e58910c57e588fa6018119911b57834
Signed-off-by: Noel De Prandieres <prandieres@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
21 files changed:
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/BgpConfigurationManager.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/BgpManager.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/BgpUtil.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/client/BgpRouter.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/BgpConfigurator.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/BgpUpdater.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/Routes.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/Update.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/af_afi.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/af_safi.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/encap_type.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/layer_type.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/protocol_type.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/qbgpConstants.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/idl/qbgp.thrift
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/server/BgpThriftService.java
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NatEvpnUtil.java
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NatUtil.java
vpnservice/vpnmanager/vpnmanager-impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnInterfaceManager.java
vpnservice/vpnmanager/vpnmanager-impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnSubnetRouteHandler.java
vpnservice/vpnmanager/vpnmanager-impl/src/main/java/org/opendaylight/netvirt/vpnmanager/intervpnlink/InterVpnLinkUtil.java

index 8a5adfb5c30de56e97329d67ba900a584c42d7c6..4fd52f9134e1401e0a4bcd47e48fa554be9f8ae7 100755 (executable)
@@ -56,20 +56,6 @@ import org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker;
 import org.opendaylight.genius.mdsalutil.NwConstants;
 import org.opendaylight.genius.utils.batching.DefaultBatchHandler;
 import org.opendaylight.genius.utils.clustering.EntityOwnerUtils;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.AddressFamiliesReactor;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.AsIdReactor;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.BgpReactor;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.ConfigServerReactor;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.EbgpMultihopReactor;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.GracefulRestartReactor;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.LoggingReactor;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.MultipathReactor;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.NeighborsReactor;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.NetworksReactor;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.RouteCleanup;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.UpdateSourceReactor;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.VrfMaxpathReactor;
-import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager.VrfsReactor;
 import org.opendaylight.netvirt.bgpmanager.api.IBgpManager;
 import org.opendaylight.netvirt.bgpmanager.commands.ClearBgpCli;
 import org.opendaylight.netvirt.bgpmanager.oam.BgpAlarms;
@@ -1085,10 +1071,12 @@ public class BgpConfigurationManager {
                 String macaddress = val.getMacaddress();
                 EncapType encapType = val.getEncapType();
                 String routerMac = val.getRoutermac();
+                int afiInt = testValueAFI(pfxlen);
 
                 try {
                     br.addPrefix(rd, pfxlen, nh, lbl, l3vni, BgpUtil.convertToThriftProtocolType(protocolType),
-                            ethernetTag, esi, macaddress, BgpUtil.convertToThriftEncapType(encapType), routerMac);
+                            ethernetTag, esi, macaddress, BgpUtil.convertToThriftEncapType(encapType),
+                            routerMac);
                 } catch (TException | BgpRouterException e) {
                     LOG.error("{} Add received exception; {}", YANG_OBJ, ADD_WARN, e);
                 }
@@ -1117,6 +1105,7 @@ public class BgpConfigurationManager {
                 }
                 Long label = val.getLabel();
                 int lbl = (label == null) ? 0 : label.intValue();
+                int  afiInt = testValueAFI(pfxlen);
                 if (rd == null && lbl > 0) {
                     //LU prefix is being deleted.
                     rd = Integer.toString(lbl);
@@ -1129,6 +1118,24 @@ public class BgpConfigurationManager {
             }
         }
 
+        /**get the value AFI from a prefix as "x.x.x.x/x".
+         *
+         * @param pfxlen the prefix to get an afi
+         * @return the afi value as you are need
+         */
+        public  int  testValueAFI(String pfxlen) {
+            int afiNew = af_afi.AFI_IP.getValue();
+            try {
+                String ipOnly = pfxlen.substring(0, pfxlen.lastIndexOf("/"));
+                java.net.Inet6Address.getByName(ipOnly);
+                afiNew = af_afi.AFI_IPV6.getValue();
+            } catch (java.net.UnknownHostException e) {
+                //ce n'est pas de l'ipv6
+            }
+            return afiNew;
+        }
+
+
         @Override
         protected void update(final InstanceIdentifier<Networks> iid,
                 final Networks oldval, final Networks newval) {
@@ -1612,41 +1619,45 @@ public class BgpConfigurationManager {
             return;
         }
         while (bsh.getState() != bsh.DONE) {
-            Routes routes = null;
-            try {
-                routes = bgpRouter.doRibSync(bsh);
-            } catch (TException | BgpRouterException e) {
-                LOG.error("Route sync aborted, exception when syncing", e);
-                return;
-            }
-            Iterator<Update> updates = routes.getUpdatesIterator();
-            while (updates.hasNext()) {
-                Update update = updates.next();
-                Map<String, Map<String, Long>> staleFibRdMap = BgpConfigurationManager.getStaledFibEntriesMap();
-                String rd = update.getRd();
-                String nexthop = update.getNexthop();
+            for (af_afi afi : af_afi.values()) {
+                Routes routes = null;
+                try {
+                    routes = bgpRouter.doRibSync(bsh, afi);
+                } catch (TException | BgpRouterException e) {
+                    LOG.error("Route sync aborted, exception when syncing", e);
+                    return;
+                }
+                Iterator<Update> updates = routes.getUpdatesIterator();
+                while (updates.hasNext()) {
+                    Update update = updates.next();
+                    Map<String, Map<String, Long>> staleFibRdMap = BgpConfigurationManager.getStaledFibEntriesMap();
+                    String rd = update.getRd();
+                    String nexthop = update.getNexthop();
 
-                // TODO: decide correct label here
-                int label = update.getL3label();
+                    // TODO: decide correct label here
+                    int label = update.getL3label();
 
-                String prefix = update.getPrefix();
-                int plen = update.getPrefixlen();
+                    String prefix = update.getPrefix();
+                    int plen = update.getPrefixlen();
 
 
-                // TODO: protocol type will not be available in "update"
-                // use "rd" to query vrf table and obtain the protocol_type. Currently using PROTOCOL_EVPN as default.
-                onUpdatePushRoute(
-                        protocol_type.PROTOCOL_EVPN,
-                        rd,
-                        prefix,
-                        plen,
-                        nexthop,
-                        update.getEthtag(),
-                        update.getEsi(),
-                        update.getMacaddress(),
-                        label,
-                        update.getRoutermac()
-                );
+                    // TODO: protocol type will not be available in "update"
+                    // use "rd" to query vrf table and obtain the protocol_type.
+                    // Currently using PROTOCOL_EVPN as default.
+                    onUpdatePushRoute(
+                            protocol_type.PROTOCOL_EVPN,
+                            rd,
+                            prefix,
+                            plen,
+                            nexthop,
+                            update.getEthtag(),
+                            update.getEsi(),
+                            update.getMacaddress(),
+                            label,
+                            update.getRoutermac(),
+                            afi
+                    );
+                }
             }
         }
         try {
@@ -1676,7 +1687,8 @@ public class BgpConfigurationManager {
                                          String esi,
                                          String macaddress,
                                          int label,
-                                         String routermac)
+                                         String routermac,
+                                         af_afi afi)
             throws InterruptedException, ExecutionException, TimeoutException {
         boolean addroute = false;
         long l3vni = 0L;
@@ -1714,7 +1726,8 @@ public class BgpConfigurationManager {
             addroute = true;
         }
         if (addroute) {
-            LOG.info("ADD: Adding Fib entry rd {} prefix {} nexthop {} label {}", rd, prefix, nextHop, label);
+            LOG.info("ADD: Adding Fib entry rd {} prefix {} nexthop {} label {} afi {}",
+                    rd, prefix, nextHop, label, afi);
             // TODO: modify addFibEntryToDS signature
             List<String> nextHopList = Collections.singletonList(nextHop);
             fibDSWriter.addFibEntryToDS(rd, macaddress, prefix + "/" + plen, nextHopList, encapType, label, l3vni,
@@ -1908,6 +1921,8 @@ public class BgpConfigurationManager {
                     Long label = net.getLabel();
                     int lbl = (label == null) ? 0 : label.intValue();
                     int l3vni = (net.getL3vni() == null) ? 0 : net.getL3vni().intValue();
+                    Long afi = net.getAfi();
+                    int afint = (afi == null) ? (int) af_afi.AFI_IP.getValue() : afi.intValue();
                     if (rd == null && lbl > 0) {
                         //LU prefix is being deleted.
                         rd = Integer.toString(lbl);
@@ -1922,7 +1937,8 @@ public class BgpConfigurationManager {
 
                     try {
                         br.addPrefix(rd, pfxlen, nh, lbl, l3vni, BgpUtil.convertToThriftProtocolType(protocolType),
-                                ethernetTag, esi, macaddress, BgpUtil.convertToThriftEncapType(encapType), routerMac);
+                                ethernetTag, esi, macaddress, BgpUtil.convertToThriftEncapType(encapType),
+                                routerMac);
                     } catch (Exception e) {
                         LOG.error("Replay:addPfx() received exception", e);
                     }
@@ -2076,16 +2092,14 @@ public class BgpConfigurationManager {
     }
 
     public void addPrefix(String rd, String macAddress, String pfx, List<String> nhList,
-              VrfEntry.EncapType encapType, long lbl, long l3vni, long l2vni, String gatewayMac, int addressFamily) {
+              VrfEntry.EncapType encapType, long lbl, long l3vni, long l2vni, String gatewayMac) {
         for (String nh : nhList) {
             Ipv4Address nexthop = nh != null ? new Ipv4Address(nh) : null;
             Long label = lbl;
-            Long afi = (long) addressFamily;
             InstanceIdentifier<Networks> iid = InstanceIdentifier.builder(Bgp.class)
                     .child(Networks.class, new NetworksKey(pfx, rd)).build();
             NetworksBuilder networksBuilder = new NetworksBuilder().setRd(rd).setPrefixLen(pfx).setNexthop(nexthop)
-                                                .setLabel(label).setEthtag(BgpConstants.DEFAULT_ETH_TAG)
-                                                .setAfi(afi);
+                                                .setLabel(label).setEthtag(BgpConstants.DEFAULT_ETH_TAG);
             buildVpnEncapSpecificInfo(networksBuilder, encapType, label, l3vni, l2vni, macAddress, gatewayMac);
             update(iid, networksBuilder.build());
         }
@@ -2186,7 +2200,7 @@ public class BgpConfigurationManager {
         delete(iid);
     }
 
-    public void delPrefix(String rd, String pfx, int afi) {
+    public void delPrefix(String rd, String pfx) {
         InstanceIdentifier.InstanceIdentifierBuilder<Networks> iib =
                 InstanceIdentifier.builder(Bgp.class)
                         .child(Networks.class, new NetworksKey(pfx, rd));
index 05369c57f0065e69a9728e2ca2dcfac17b817796..970fc23af9064c333b7cf29f690bdb9df5d8fc43 100644 (file)
@@ -116,7 +116,7 @@ public class BgpManager implements AutoCloseable, IBgpManager {
         fibDSWriter.addFibEntryToDS(rd, macAddress, prefix, nextHopList,
                 encapType, vpnLabel, l3vni, gatewayMac, origin);
         bcm.addPrefix(rd, macAddress, prefix, nextHopList,
-                encapType, vpnLabel, l3vni, 0 /*l2vni*/, gatewayMac, 1 /* TODO FIX afi */);
+                encapType, vpnLabel, l3vni, 0 /*l2vni*/, gatewayMac);
     }
 
     @Override
@@ -129,7 +129,7 @@ public class BgpManager implements AutoCloseable, IBgpManager {
     @Override
     public void deletePrefix(String rd, String prefix) {
         fibDSWriter.removeFibEntryFromDS(rd, prefix);
-        bcm.delPrefix(rd, prefix, 1 /* TODO FIX afi */);
+        bcm.delPrefix(rd, prefix);
     }
 
     @Override
@@ -137,24 +137,26 @@ public class BgpManager implements AutoCloseable, IBgpManager {
                                 VrfEntry.EncapType encapType, long vpnLabel, long l3vni, long l2vni,
                                 String gatewayMac) throws Exception {
         bcm.addPrefix(rd, macAddress, prefix, nextHopList,
-                encapType, vpnLabel, l3vni, l2vni, gatewayMac, 1 /* TODO FIX afi */);
+                encapType, vpnLabel, l3vni, l2vni, gatewayMac);
     }
 
     @Override
     public void advertisePrefix(String rd, String macAddress, String prefix, String nextHop,
                                 VrfEntry.EncapType encapType, long vpnLabel, long l3vni, long l2vni,
                                 String gatewayMac) throws Exception {
-        LOG.info("ADVERTISE: Adding Prefix rd {} prefix {} nexthop {} label {}", rd, prefix, nextHop, vpnLabel);
+        LOG.info("ADVERTISE: Adding Prefix rd {} prefix {} nexthop {} label {} afi {}",
+                rd, prefix, nextHop, vpnLabel);
         bcm.addPrefix(rd, macAddress, prefix, Collections.singletonList(nextHop), encapType,
-                vpnLabel, l3vni, l2vni, gatewayMac, 1 /* TODO FIX afi */);
-        LOG.info("ADVERTISE: Added Prefix rd {} prefix {} nexthop {} label {}", rd, prefix, nextHop, vpnLabel);
+                vpnLabel, l3vni, l2vni, gatewayMac);
+        LOG.info("ADVERTISE: Added Prefix rd {} prefix {} nexthop {} label {} afi {}",
+                rd, prefix, nextHop, vpnLabel);
     }
 
     @Override
     public void withdrawPrefix(String rd, String prefix) {
-        LOG.info("WITHDRAW: Removing Prefix rd {} prefix {}", rd, prefix);
-        bcm.delPrefix(rd, prefix, 1 /* TODO FIX afi */);
-        LOG.info("WITHDRAW: Removed Prefix rd {} prefix {}", rd, prefix);
+        LOG.info("WITHDRAW: Removing Prefix rd {} prefix {} afi {}", rd, prefix);
+        bcm.delPrefix(rd, prefix);
+        LOG.info("WITHDRAW: Removed Prefix rd {} prefix {} afi {}", rd, prefix);
     }
 
     public void setQbgpLog(String fileName, String debugLevel) {
index 96d27c5225871a0a56a64def5d1e4a6660403083..721e017d621225a11c56b2ce34b77280f8755b92 100755 (executable)
@@ -57,6 +57,29 @@ public class BgpUtil {
 
     private static BlockingQueue<ActionableResource> bgpResourcesBufferQ = new LinkedBlockingQueue<>();
 
+    /** get a translation from prefix ipv6 to afi<br>.
+    * "ffff::1/128" sets afi as 2 because is an IPv6 value
+    * @param argPrefix ip address as ipv4 or ipv6
+    * @return afi 1 for ipv4 2 for ipv2
+    */
+    public static int getAFItranslatedfromPrefix(String argPrefix) {
+        int retValue = 1;//default afiValue is 1 (= ipv4)
+        try {
+            if (argPrefix == null) {
+                return retValue;
+            }
+            String ipValue =  argPrefix;
+            if (argPrefix.lastIndexOf("/") > 0) { /*then the prefix includes mask definition*/
+                ipValue =  argPrefix.substring(0, argPrefix.lastIndexOf("/"));
+            }
+            java.net.Inet6Address.getByName(ipValue);
+        } catch (java.net.UnknownHostException e) {
+            /*if exception is catched then the prefix is not an IPv6*/
+            retValue = 1;//default afiValue is 1 (= ipv4)
+        }
+        return retValue;
+    }
+
     // return number of pending Write Transactions with BGP-Util (no read)
     public static int getGetPendingWrTransaction() {
         return pendingWrTransaction.get();
index 1c8da30847ad1217ae3726227f8f5d29ae64e79f..7d47d0150ba5e7d248cadd25d417ae53077cadb4 100644 (file)
@@ -93,6 +93,7 @@ public class BgpRouter {
         public int l3label;
         public encap_type thriftEncapType;
         public String routermac;
+        public af_afi afi;
 
         BgpOp() {
             strs = new String[3];
@@ -202,6 +203,8 @@ public class BgpRouter {
             case PFX:
                 // order of args is different in addPrefix(), hence the
                 // seeming out-of-order-ness of string indices
+                afi = af_afi.findByValue(org.opendaylight.netvirt.bgpmanager.BgpUtil
+                        .getAFItranslatedfromPrefix(op.strs[1]));
                 result = bop.add
                         ? bgpClient.pushRoute(
                                 op.thriftProtocolType,
@@ -214,7 +217,8 @@ public class BgpRouter {
                                 op.l3label,
                                 op.l2label,
                                 op.thriftEncapType,
-                                op.routermac)
+                                op.routermac,
+                                op.afi)
 
                         : bgpClient.withdrawRoute(
                         op.thriftProtocolType,
@@ -222,7 +226,8 @@ public class BgpRouter {
                         op.strs[0],//rd
                         op.ethernetTag,
                         op.esi,
-                        op.macAddress);
+                        op.macAddress,
+                        op.afi);
                 break;
             case LOG:
                 result = bgpClient.setLogConfig(op.strs[0], op.strs[1]);
@@ -404,7 +409,7 @@ public class BgpRouter {
         return 0;
     }
 
-    public Routes doRibSync(BgpSyncHandle handle) throws TException, BgpRouterException {
+    public Routes doRibSync(BgpSyncHandle handle, af_afi afi) throws TException, BgpRouterException {
         if (bgpClient == null) {
             throw new BgpRouterException(BgpRouterException.BGP_ERR_NOT_INITED);
         }
@@ -418,8 +423,9 @@ public class BgpRouter {
         handle.setState(BgpSyncHandle.ITERATING);
         int winSize = handle.getMaxCount() * handle.getRouteSize();
 
+
         // TODO: receive correct protocol_type here, currently populating with dummy protocol type
-        Routes outRoutes = bgpClient.getRoutes(protocol_type.PROTOCOL_ANY, op, winSize);
+        Routes outRoutes = bgpClient.getRoutes(protocol_type.PROTOCOL_ANY, op, winSize, afi);
         if (outRoutes.errcode != 0) {
             return outRoutes;
         }
index b4dec891d87e42b2432c18bc2d0015963a2c043e..3fba3e41f12d12a30b92922f09d929f878241951 100644 (file)
@@ -1,12 +1,10 @@
-/**
+ /**
  * 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.netvirt.bgpmanager.thrift.gen;
-
+ package org.opendaylight.netvirt.bgpmanager.thrift.gen;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
@@ -51,9 +49,9 @@ public class BgpConfigurator {
 
     public int delVrf(String rd) throws org.apache.thrift.TException;
 
-    public int pushRoute(protocol_type p_type, String prefix, String nexthop, String rd, int ethtag, String esi, String macaddress, int l3label, int l2label, encap_type enc_type, String routermac) throws org.apache.thrift.TException;
+    public int pushRoute(protocol_type p_type, String prefix, String nexthop, String rd, int ethtag, String esi, String macaddress, int l3label, int l2label, encap_type enc_type, String routermac, af_afi afi) throws org.apache.thrift.TException;
 
-    public int withdrawRoute(protocol_type p_type, String prefix, String rd, int ethtag, String esi, String macaddress) throws org.apache.thrift.TException;
+    public int withdrawRoute(protocol_type p_type, String prefix, String rd, int ethtag, String esi, String macaddress, af_afi afi) throws org.apache.thrift.TException;
 
     public int setEbgpMultihop(String peerIp, int nHops) throws org.apache.thrift.TException;
 
@@ -73,7 +71,7 @@ public class BgpConfigurator {
 
     public int disableGracefulRestart() throws org.apache.thrift.TException;
 
-    public Routes getRoutes(protocol_type p_type, int optype, int winSize) throws org.apache.thrift.TException;
+    public Routes getRoutes(protocol_type p_type, int optype, int winSize, af_afi afi) throws org.apache.thrift.TException;
 
     public int enableMultipath(af_afi afi, af_safi safi) throws org.apache.thrift.TException;
 
@@ -99,9 +97,9 @@ public class BgpConfigurator {
 
     public void delVrf(String rd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void pushRoute(protocol_type p_type, String prefix, String nexthop, String rd, int ethtag, String esi, String macaddress, int l3label, int l2label, encap_type enc_type, String routermac, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void pushRoute(protocol_type p_type, String prefix, String nexthop, String rd, int ethtag, String esi, String macaddress, int l3label, int l2label, encap_type enc_type, String routermac, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void withdrawRoute(protocol_type p_type, String prefix, String rd, int ethtag, String esi, String macaddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void withdrawRoute(protocol_type p_type, String prefix, String rd, int ethtag, String esi, String macaddress, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void setEbgpMultihop(String peerIp, int nHops, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -121,7 +119,7 @@ public class BgpConfigurator {
 
     public void disableGracefulRestart(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getRoutes(protocol_type p_type, int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getRoutes(protocol_type p_type, int optype, int winSize, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void enableMultipath(af_afi afi, af_safi safi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -323,13 +321,13 @@ public class BgpConfigurator {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delVrf failed: unknown result");
     }
 
-    public int pushRoute(protocol_type p_type, String prefix, String nexthop, String rd, int ethtag, String esi, String macaddress, int l3label, int l2label, encap_type enc_type, String routermac) throws org.apache.thrift.TException
+    public int pushRoute(protocol_type p_type, String prefix, String nexthop, String rd, int ethtag, String esi, String macaddress, int l3label, int l2label, encap_type enc_type, String routermac, af_afi afi) throws org.apache.thrift.TException
     {
-      send_pushRoute(p_type, prefix, nexthop, rd, ethtag, esi, macaddress, l3label, l2label, enc_type, routermac);
+      send_pushRoute(p_type, prefix, nexthop, rd, ethtag, esi, macaddress, l3label, l2label, enc_type, routermac, afi);
       return recv_pushRoute();
     }
 
-    public void send_pushRoute(protocol_type p_type, String prefix, String nexthop, String rd, int ethtag, String esi, String macaddress, int l3label, int l2label, encap_type enc_type, String routermac) throws org.apache.thrift.TException
+    public void send_pushRoute(protocol_type p_type, String prefix, String nexthop, String rd, int ethtag, String esi, String macaddress, int l3label, int l2label, encap_type enc_type, String routermac, af_afi afi) throws org.apache.thrift.TException
     {
       pushRoute_args args = new pushRoute_args();
       args.setP_type(p_type);
@@ -343,6 +341,7 @@ public class BgpConfigurator {
       args.setL2label(l2label);
       args.setEnc_type(enc_type);
       args.setRoutermac(routermac);
+      args.setAfi(afi);
       sendBase("pushRoute", args);
     }
 
@@ -356,13 +355,13 @@ public class BgpConfigurator {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pushRoute failed: unknown result");
     }
 
-    public int withdrawRoute(protocol_type p_type, String prefix, String rd, int ethtag, String esi, String macaddress) throws org.apache.thrift.TException
+    public int withdrawRoute(protocol_type p_type, String prefix, String rd, int ethtag, String esi, String macaddress, af_afi afi) throws org.apache.thrift.TException
     {
-      send_withdrawRoute(p_type, prefix, rd, ethtag, esi, macaddress);
+      send_withdrawRoute(p_type, prefix, rd, ethtag, esi, macaddress, afi);
       return recv_withdrawRoute();
     }
 
-    public void send_withdrawRoute(protocol_type p_type, String prefix, String rd, int ethtag, String esi, String macaddress) throws org.apache.thrift.TException
+    public void send_withdrawRoute(protocol_type p_type, String prefix, String rd, int ethtag, String esi, String macaddress, af_afi afi) throws org.apache.thrift.TException
     {
       withdrawRoute_args args = new withdrawRoute_args();
       args.setP_type(p_type);
@@ -371,6 +370,7 @@ public class BgpConfigurator {
       args.setEthtag(ethtag);
       args.setEsi(esi);
       args.setMacaddress(macaddress);
+      args.setAfi(afi);
       sendBase("withdrawRoute", args);
     }
 
@@ -597,18 +597,19 @@ public class BgpConfigurator {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "disableGracefulRestart failed: unknown result");
     }
 
-    public Routes getRoutes(protocol_type p_type, int optype, int winSize) throws org.apache.thrift.TException
+    public Routes getRoutes(protocol_type p_type, int optype, int winSize, af_afi afi) throws org.apache.thrift.TException
     {
-      send_getRoutes(p_type, optype, winSize);
+      send_getRoutes(p_type, optype, winSize, afi);
       return recv_getRoutes();
     }
 
-    public void send_getRoutes(protocol_type p_type, int optype, int winSize) throws org.apache.thrift.TException
+    public void send_getRoutes(protocol_type p_type, int optype, int winSize, af_afi afi) throws org.apache.thrift.TException
     {
       getRoutes_args args = new getRoutes_args();
       args.setP_type(p_type);
       args.setOptype(optype);
       args.setWinSize(winSize);
+      args.setAfi(afi);
       sendBase("getRoutes", args);
     }
 
@@ -969,9 +970,9 @@ public class BgpConfigurator {
       }
     }
 
-    public void pushRoute(protocol_type p_type, String prefix, String nexthop, String rd, int ethtag, String esi, String macaddress, int l3label, int l2label, encap_type enc_type, String routermac, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void pushRoute(protocol_type p_type, String prefix, String nexthop, String rd, int ethtag, String esi, String macaddress, int l3label, int l2label, encap_type enc_type, String routermac, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      pushRoute_call method_call = new pushRoute_call(p_type, prefix, nexthop, rd, ethtag, esi, macaddress, l3label, l2label, enc_type, routermac, resultHandler, this, ___protocolFactory, ___transport);
+      pushRoute_call method_call = new pushRoute_call(p_type, prefix, nexthop, rd, ethtag, esi, macaddress, l3label, l2label, enc_type, routermac, afi, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -988,7 +989,8 @@ public class BgpConfigurator {
       private int l2label;
       private encap_type enc_type;
       private String routermac;
-      public pushRoute_call(protocol_type p_type, String prefix, String nexthop, String rd, int ethtag, String esi, String macaddress, int l3label, int l2label, encap_type enc_type, String routermac, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private af_afi afi;
+      public pushRoute_call(protocol_type p_type, String prefix, String nexthop, String rd, int ethtag, String esi, String macaddress, int l3label, int l2label, encap_type enc_type, String routermac, af_afi afi, 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.p_type = p_type;
         this.prefix = prefix;
@@ -1001,6 +1003,7 @@ public class BgpConfigurator {
         this.l2label = l2label;
         this.enc_type = enc_type;
         this.routermac = routermac;
+        this.afi = afi;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -1017,6 +1020,7 @@ public class BgpConfigurator {
         args.setL2label(l2label);
         args.setEnc_type(enc_type);
         args.setRoutermac(routermac);
+        args.setAfi(afi);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -1031,9 +1035,9 @@ public class BgpConfigurator {
       }
     }
 
-    public void withdrawRoute(protocol_type p_type, String prefix, String rd, int ethtag, String esi, String macaddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void withdrawRoute(protocol_type p_type, String prefix, String rd, int ethtag, String esi, String macaddress, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      withdrawRoute_call method_call = new withdrawRoute_call(p_type, prefix, rd, ethtag, esi, macaddress, resultHandler, this, ___protocolFactory, ___transport);
+      withdrawRoute_call method_call = new withdrawRoute_call(p_type, prefix, rd, ethtag, esi, macaddress, afi, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -1045,7 +1049,8 @@ public class BgpConfigurator {
       private int ethtag;
       private String esi;
       private String macaddress;
-      public withdrawRoute_call(protocol_type p_type, String prefix, String rd, int ethtag, String esi, String macaddress, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private af_afi afi;
+      public withdrawRoute_call(protocol_type p_type, String prefix, String rd, int ethtag, String esi, String macaddress, af_afi afi, 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.p_type = p_type;
         this.prefix = prefix;
@@ -1053,6 +1058,7 @@ public class BgpConfigurator {
         this.ethtag = ethtag;
         this.esi = esi;
         this.macaddress = macaddress;
+        this.afi = afi;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -1064,6 +1070,7 @@ public class BgpConfigurator {
         args.setEthtag(ethtag);
         args.setEsi(esi);
         args.setMacaddress(macaddress);
+        args.setAfi(afi);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -1384,9 +1391,9 @@ public class BgpConfigurator {
       }
     }
 
-    public void getRoutes(protocol_type p_type, int optype, int winSize, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getRoutes(protocol_type p_type, int optype, int winSize, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getRoutes_call method_call = new getRoutes_call(p_type, optype, winSize, resultHandler, this, ___protocolFactory, ___transport);
+      getRoutes_call method_call = new getRoutes_call(p_type, optype, winSize, afi, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -1395,11 +1402,13 @@ public class BgpConfigurator {
       private protocol_type p_type;
       private int optype;
       private int winSize;
-      public getRoutes_call(protocol_type p_type, 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 {
+      private af_afi afi;
+      public getRoutes_call(protocol_type p_type, int optype, int winSize, af_afi afi, 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.p_type = p_type;
         this.optype = optype;
         this.winSize = winSize;
+        this.afi = afi;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -1408,6 +1417,7 @@ public class BgpConfigurator {
         args.setP_type(p_type);
         args.setOptype(optype);
         args.setWinSize(winSize);
+        args.setAfi(afi);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -1727,7 +1737,7 @@ public class BgpConfigurator {
 
       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.p_type, args.prefix, args.nexthop, args.rd, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.enc_type, args.routermac);
+        result.success = iface.pushRoute(args.p_type, args.prefix, args.nexthop, args.rd, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.enc_type, args.routermac, args.afi);
         result.setSuccessIsSet(true);
         return result;
       }
@@ -1748,7 +1758,7 @@ public class BgpConfigurator {
 
       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.p_type, args.prefix, args.rd, args.ethtag, args.esi, args.macaddress);
+        result.success = iface.withdrawRoute(args.p_type, args.prefix, args.rd, args.ethtag, args.esi, args.macaddress, args.afi);
         result.setSuccessIsSet(true);
         return result;
       }
@@ -1958,7 +1968,7 @@ public class BgpConfigurator {
 
       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.p_type, args.optype, args.winSize);
+        result.success = iface.getRoutes(args.p_type, args.optype, args.winSize, args.afi);
         return result;
       }
     }
@@ -2075,7 +2085,7 @@ public class BgpConfigurator {
 
       public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Integer>() {
+        return new AsyncMethodCallback<Integer>() { 
           public void onComplete(Integer o) {
             startBgp_result result = new startBgp_result();
             result.success = o;
@@ -2231,7 +2241,7 @@ public class BgpConfigurator {
 
       public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Integer>() {
+        return new AsyncMethodCallback<Integer>() { 
           public void onComplete(Integer o) {
             setPeerSecret_result result = new setPeerSecret_result();
             result.success = o;
@@ -2476,7 +2486,7 @@ public class BgpConfigurator {
       }
 
       public void start(I iface, pushRoute_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
-        iface.pushRoute(args.p_type, args.prefix, args.nexthop, args.rd, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.enc_type, args.routermac,resultHandler);
+        iface.pushRoute(args.p_type, args.prefix, args.nexthop, args.rd, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.enc_type, args.routermac, args.afi,resultHandler);
       }
     }
 
@@ -2528,7 +2538,7 @@ public class BgpConfigurator {
       }
 
       public void start(I iface, withdrawRoute_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
-        iface.withdrawRoute(args.p_type, args.prefix, args.rd, args.ethtag, args.esi, args.macaddress,resultHandler);
+        iface.withdrawRoute(args.p_type, args.prefix, args.rd, args.ethtag, args.esi, args.macaddress, args.afi,resultHandler);
       }
     }
 
@@ -3047,7 +3057,7 @@ public class BgpConfigurator {
       }
 
       public void start(I iface, getRoutes_args args, org.apache.thrift.async.AsyncMethodCallback<Routes> resultHandler) throws TException {
-        iface.getRoutes(args.p_type, args.optype, args.winSize,resultHandler);
+        iface.getRoutes(args.p_type, args.optype, args.winSize, args.afi,resultHandler);
       }
     }
 
@@ -6077,9 +6087,9 @@ public class BgpConfigurator {
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT,
+      tmpMap.put(_Fields.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.RFC2385_SHARED_SECRET, new org.apache.thrift.meta_data.FieldMetaData("rfc2385_sharedSecret", org.apache.thrift.TFieldRequirementType.DEFAULT,
+      tmpMap.put(_Fields.RFC2385_SHARED_SECRET, new org.apache.thrift.meta_data.FieldMetaData("rfc2385_sharedSecret", 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(setPeerSecret_args.class, metaDataMap);
@@ -6356,7 +6366,7 @@ public class BgpConfigurator {
         while (true)
         {
           schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
             break;
           }
           switch (schemeField.id) {
@@ -6364,7 +6374,7 @@ public class BgpConfigurator {
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                 struct.ipAddress = iprot.readString();
                 struct.setIpAddressIsSet(true);
-              } else {
+              } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
@@ -6372,7 +6382,7 @@ public class BgpConfigurator {
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                 struct.rfc2385_sharedSecret = iprot.readString();
                 struct.setRfc2385_sharedSecretIsSet(true);
-              } else {
+              } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
@@ -6528,7 +6538,7 @@ public class BgpConfigurator {
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+      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(setPeerSecret_result.class, metaDataMap);
@@ -6733,7 +6743,7 @@ public class BgpConfigurator {
         while (true)
         {
           schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
             break;
           }
           switch (schemeField.id) {
@@ -6741,7 +6751,7 @@ public class BgpConfigurator {
               if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                 struct.success = iprot.readI32();
                 struct.setSuccessIsSet(true);
-              } else {
+              } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
@@ -9357,6 +9367,7 @@ public class BgpConfigurator {
     private static final org.apache.thrift.protocol.TField L2LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("l2label", org.apache.thrift.protocol.TType.I32, (short)9);
     private static final org.apache.thrift.protocol.TField ENC_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("enc_type", org.apache.thrift.protocol.TType.I32, (short)10);
     private static final org.apache.thrift.protocol.TField ROUTERMAC_FIELD_DESC = new org.apache.thrift.protocol.TField("routermac", org.apache.thrift.protocol.TType.STRING, (short)11);
+    private static final org.apache.thrift.protocol.TField AFI_FIELD_DESC = new org.apache.thrift.protocol.TField("afi", org.apache.thrift.protocol.TType.I32, (short)12);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -9383,6 +9394,11 @@ public class BgpConfigurator {
      */
     public encap_type enc_type; // required
     public String routermac; // required
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi afi; // 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 {
@@ -9404,7 +9420,12 @@ public class BgpConfigurator {
        * @see encap_type
        */
       ENC_TYPE((short)10, "enc_type"),
-      ROUTERMAC((short)11, "routermac");
+      ROUTERMAC((short)11, "routermac"),
+      /**
+       * 
+       * @see af_afi
+       */
+      AFI((short)12, "afi");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -9441,6 +9462,8 @@ public class BgpConfigurator {
             return ENC_TYPE;
           case 11: // ROUTERMAC
             return ROUTERMAC;
+          case 12: // AFI
+            return AFI;
           default:
             return null;
         }
@@ -9510,6 +9533,8 @@ public class BgpConfigurator {
           new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, encap_type.class)));
       tmpMap.put(_Fields.ROUTERMAC, new org.apache.thrift.meta_data.FieldMetaData("routermac", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.AFI, new org.apache.thrift.meta_data.FieldMetaData("afi", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_afi.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushRoute_args.class, metaDataMap);
     }
@@ -9528,7 +9553,8 @@ public class BgpConfigurator {
       int l3label,
       int l2label,
       encap_type enc_type,
-      String routermac)
+      String routermac,
+      af_afi afi)
     {
       this();
       this.p_type = p_type;
@@ -9545,6 +9571,7 @@ public class BgpConfigurator {
       setL2labelIsSet(true);
       this.enc_type = enc_type;
       this.routermac = routermac;
+      this.afi = afi;
     }
 
     /**
@@ -9579,6 +9606,9 @@ public class BgpConfigurator {
       if (other.isSetRoutermac()) {
         this.routermac = other.routermac;
       }
+      if (other.isSetAfi()) {
+        this.afi = other.afi;
+      }
     }
 
     public pushRoute_args deepCopy() {
@@ -9601,6 +9631,7 @@ public class BgpConfigurator {
       this.l2label = 0;
       this.enc_type = null;
       this.routermac = null;
+      this.afi = null;
     }
 
     /**
@@ -9880,6 +9911,38 @@ public class BgpConfigurator {
       }
     }
 
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi getAfi() {
+      return this.afi;
+    }
+
+    /**
+     * 
+     * @see af_afi
+     */
+    public pushRoute_args setAfi(af_afi afi) {
+      this.afi = afi;
+      return this;
+    }
+
+    public void unsetAfi() {
+      this.afi = null;
+    }
+
+    /** Returns true if field afi is set (has been assigned a value) and false otherwise */
+    public boolean isSetAfi() {
+      return this.afi != null;
+    }
+
+    public void setAfiIsSet(boolean value) {
+      if (!value) {
+        this.afi = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case P_TYPE:
@@ -9970,6 +10033,14 @@ public class BgpConfigurator {
         }
         break;
 
+      case AFI:
+        if (value == null) {
+          unsetAfi();
+        } else {
+          setAfi((af_afi)value);
+        }
+        break;
+
       }
     }
 
@@ -10008,6 +10079,9 @@ public class BgpConfigurator {
       case ROUTERMAC:
         return getRoutermac();
 
+      case AFI:
+        return getAfi();
+
       }
       throw new IllegalStateException();
     }
@@ -10041,6 +10115,8 @@ public class BgpConfigurator {
         return isSetEnc_type();
       case ROUTERMAC:
         return isSetRoutermac();
+      case AFI:
+        return isSetAfi();
       }
       throw new IllegalStateException();
     }
@@ -10157,6 +10233,15 @@ public class BgpConfigurator {
           return false;
       }
 
+      boolean this_present_afi = true && this.isSetAfi();
+      boolean that_present_afi = true && that.isSetAfi();
+      if (this_present_afi || that_present_afi) {
+        if (!(this_present_afi && that_present_afi))
+          return false;
+        if (!this.afi.equals(that.afi))
+          return false;
+      }
+
       return true;
     }
 
@@ -10283,6 +10368,16 @@ public class BgpConfigurator {
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetAfi()).compareTo(other.isSetAfi());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAfi()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.afi, other.afi);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -10378,6 +10473,14 @@ public class BgpConfigurator {
         sb.append(this.routermac);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("afi:");
+      if (this.afi == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.afi);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -10511,6 +10614,14 @@ public class BgpConfigurator {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 12: // AFI
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.afi = af_afi.findByValue(iprot.readI32());
+                struct.setAfiIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -10575,6 +10686,11 @@ public class BgpConfigurator {
           oprot.writeString(struct.routermac);
           oprot.writeFieldEnd();
         }
+        if (struct.afi != null) {
+          oprot.writeFieldBegin(AFI_FIELD_DESC);
+          oprot.writeI32(struct.afi.getValue());
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -10626,7 +10742,10 @@ public class BgpConfigurator {
         if (struct.isSetRoutermac()) {
           optionals.set(10);
         }
-        oprot.writeBitSet(optionals, 11);
+        if (struct.isSetAfi()) {
+          optionals.set(11);
+        }
+        oprot.writeBitSet(optionals, 12);
         if (struct.isSetP_type()) {
           oprot.writeI32(struct.p_type.getValue());
         }
@@ -10660,12 +10779,15 @@ public class BgpConfigurator {
         if (struct.isSetRoutermac()) {
           oprot.writeString(struct.routermac);
         }
+        if (struct.isSetAfi()) {
+          oprot.writeI32(struct.afi.getValue());
+        }
       }
 
       @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(11);
+        BitSet incoming = iprot.readBitSet(12);
         if (incoming.get(0)) {
           struct.p_type = protocol_type.findByValue(iprot.readI32());
           struct.setP_typeIsSet(true);
@@ -10710,6 +10832,10 @@ public class BgpConfigurator {
           struct.routermac = iprot.readString();
           struct.setRoutermacIsSet(true);
         }
+        if (incoming.get(11)) {
+          struct.afi = af_afi.findByValue(iprot.readI32());
+          struct.setAfiIsSet(true);
+        }
       }
     }
 
@@ -11078,6 +11204,7 @@ public class BgpConfigurator {
     private static final org.apache.thrift.protocol.TField ETHTAG_FIELD_DESC = new org.apache.thrift.protocol.TField("ethtag", org.apache.thrift.protocol.TType.I32, (short)4);
     private static final org.apache.thrift.protocol.TField ESI_FIELD_DESC = new org.apache.thrift.protocol.TField("esi", org.apache.thrift.protocol.TType.STRING, (short)5);
     private static final org.apache.thrift.protocol.TField MACADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("macaddress", org.apache.thrift.protocol.TType.STRING, (short)6);
+    private static final org.apache.thrift.protocol.TField AFI_FIELD_DESC = new org.apache.thrift.protocol.TField("afi", org.apache.thrift.protocol.TType.I32, (short)7);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -11095,6 +11222,11 @@ public class BgpConfigurator {
     public int ethtag; // required
     public String esi; // required
     public String macaddress; // required
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi afi; // 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 {
@@ -11107,7 +11239,12 @@ public class BgpConfigurator {
       RD((short)3, "rd"),
       ETHTAG((short)4, "ethtag"),
       ESI((short)5, "esi"),
-      MACADDRESS((short)6, "macaddress");
+      MACADDRESS((short)6, "macaddress"),
+      /**
+       * 
+       * @see af_afi
+       */
+      AFI((short)7, "afi");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -11134,6 +11271,8 @@ public class BgpConfigurator {
             return ESI;
           case 6: // MACADDRESS
             return MACADDRESS;
+          case 7: // AFI
+            return AFI;
           default:
             return null;
         }
@@ -11191,6 +11330,8 @@ public class BgpConfigurator {
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.MACADDRESS, new org.apache.thrift.meta_data.FieldMetaData("macaddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.AFI, new org.apache.thrift.meta_data.FieldMetaData("afi", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_afi.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(withdrawRoute_args.class, metaDataMap);
     }
@@ -11204,7 +11345,8 @@ public class BgpConfigurator {
       String rd,
       int ethtag,
       String esi,
-      String macaddress)
+      String macaddress,
+      af_afi afi)
     {
       this();
       this.p_type = p_type;
@@ -11214,6 +11356,7 @@ public class BgpConfigurator {
       setEthtagIsSet(true);
       this.esi = esi;
       this.macaddress = macaddress;
+      this.afi = afi;
     }
 
     /**
@@ -11237,6 +11380,9 @@ public class BgpConfigurator {
       if (other.isSetMacaddress()) {
         this.macaddress = other.macaddress;
       }
+      if (other.isSetAfi()) {
+        this.afi = other.afi;
+      }
     }
 
     public withdrawRoute_args deepCopy() {
@@ -11252,6 +11398,7 @@ public class BgpConfigurator {
       this.ethtag = 0;
       this.esi = null;
       this.macaddress = null;
+      this.afi = null;
     }
 
     /**
@@ -11405,6 +11552,38 @@ public class BgpConfigurator {
       }
     }
 
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi getAfi() {
+      return this.afi;
+    }
+
+    /**
+     * 
+     * @see af_afi
+     */
+    public withdrawRoute_args setAfi(af_afi afi) {
+      this.afi = afi;
+      return this;
+    }
+
+    public void unsetAfi() {
+      this.afi = null;
+    }
+
+    /** Returns true if field afi is set (has been assigned a value) and false otherwise */
+    public boolean isSetAfi() {
+      return this.afi != null;
+    }
+
+    public void setAfiIsSet(boolean value) {
+      if (!value) {
+        this.afi = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case P_TYPE:
@@ -11455,6 +11634,14 @@ public class BgpConfigurator {
         }
         break;
 
+      case AFI:
+        if (value == null) {
+          unsetAfi();
+        } else {
+          setAfi((af_afi)value);
+        }
+        break;
+
       }
     }
 
@@ -11478,6 +11665,9 @@ public class BgpConfigurator {
       case MACADDRESS:
         return getMacaddress();
 
+      case AFI:
+        return getAfi();
+
       }
       throw new IllegalStateException();
     }
@@ -11501,6 +11691,8 @@ public class BgpConfigurator {
         return isSetEsi();
       case MACADDRESS:
         return isSetMacaddress();
+      case AFI:
+        return isSetAfi();
       }
       throw new IllegalStateException();
     }
@@ -11572,6 +11764,15 @@ public class BgpConfigurator {
           return false;
       }
 
+      boolean this_present_afi = true && this.isSetAfi();
+      boolean that_present_afi = true && that.isSetAfi();
+      if (this_present_afi || that_present_afi) {
+        if (!(this_present_afi && that_present_afi))
+          return false;
+        if (!this.afi.equals(that.afi))
+          return false;
+      }
+
       return true;
     }
 
@@ -11648,6 +11849,16 @@ public class BgpConfigurator {
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetAfi()).compareTo(other.isSetAfi());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAfi()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.afi, other.afi);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -11711,6 +11922,14 @@ public class BgpConfigurator {
         sb.append(this.macaddress);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("afi:");
+      if (this.afi == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.afi);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -11804,6 +12023,14 @@ public class BgpConfigurator {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 7: // AFI
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.afi = af_afi.findByValue(iprot.readI32());
+                struct.setAfiIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -11847,6 +12074,11 @@ public class BgpConfigurator {
           oprot.writeString(struct.macaddress);
           oprot.writeFieldEnd();
         }
+        if (struct.afi != null) {
+          oprot.writeFieldBegin(AFI_FIELD_DESC);
+          oprot.writeI32(struct.afi.getValue());
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -11883,7 +12115,10 @@ public class BgpConfigurator {
         if (struct.isSetMacaddress()) {
           optionals.set(5);
         }
-        oprot.writeBitSet(optionals, 6);
+        if (struct.isSetAfi()) {
+          optionals.set(6);
+        }
+        oprot.writeBitSet(optionals, 7);
         if (struct.isSetP_type()) {
           oprot.writeI32(struct.p_type.getValue());
         }
@@ -11902,12 +12137,15 @@ public class BgpConfigurator {
         if (struct.isSetMacaddress()) {
           oprot.writeString(struct.macaddress);
         }
+        if (struct.isSetAfi()) {
+          oprot.writeI32(struct.afi.getValue());
+        }
       }
 
       @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(6);
+        BitSet incoming = iprot.readBitSet(7);
         if (incoming.get(0)) {
           struct.p_type = protocol_type.findByValue(iprot.readI32());
           struct.setP_typeIsSet(true);
@@ -11932,6 +12170,10 @@ public class BgpConfigurator {
           struct.macaddress = iprot.readString();
           struct.setMacaddressIsSet(true);
         }
+        if (incoming.get(6)) {
+          struct.afi = af_afi.findByValue(iprot.readI32());
+          struct.setAfiIsSet(true);
+        }
       }
     }
 
@@ -19321,6 +19563,7 @@ public class BgpConfigurator {
     private static final org.apache.thrift.protocol.TField P_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("p_type", org.apache.thrift.protocol.TType.I32, (short)1);
     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)2);
     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)3);
+    private static final org.apache.thrift.protocol.TField AFI_FIELD_DESC = new org.apache.thrift.protocol.TField("afi", org.apache.thrift.protocol.TType.I32, (short)4);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -19335,6 +19578,11 @@ public class BgpConfigurator {
     public protocol_type p_type; // required
     public int optype; // required
     public int winSize; // required
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi afi; // 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 {
@@ -19344,7 +19592,12 @@ public class BgpConfigurator {
        */
       P_TYPE((short)1, "p_type"),
       OPTYPE((short)2, "optype"),
-      WIN_SIZE((short)3, "winSize");
+      WIN_SIZE((short)3, "winSize"),
+      /**
+       * 
+       * @see af_afi
+       */
+      AFI((short)4, "afi");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -19365,6 +19618,8 @@ public class BgpConfigurator {
             return OPTYPE;
           case 3: // WIN_SIZE
             return WIN_SIZE;
+          case 4: // AFI
+            return AFI;
           default:
             return null;
         }
@@ -19417,6 +19672,8 @@ public class BgpConfigurator {
           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)));
+      tmpMap.put(_Fields.AFI, new org.apache.thrift.meta_data.FieldMetaData("afi", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_afi.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRoutes_args.class, metaDataMap);
     }
@@ -19427,7 +19684,8 @@ public class BgpConfigurator {
     public getRoutes_args(
       protocol_type p_type,
       int optype,
-      int winSize)
+      int winSize,
+      af_afi afi)
     {
       this();
       this.p_type = p_type;
@@ -19435,6 +19693,7 @@ public class BgpConfigurator {
       setOptypeIsSet(true);
       this.winSize = winSize;
       setWinSizeIsSet(true);
+      this.afi = afi;
     }
 
     /**
@@ -19447,6 +19706,9 @@ public class BgpConfigurator {
       }
       this.optype = other.optype;
       this.winSize = other.winSize;
+      if (other.isSetAfi()) {
+        this.afi = other.afi;
+      }
     }
 
     public getRoutes_args deepCopy() {
@@ -19460,6 +19722,7 @@ public class BgpConfigurator {
       this.optype = 0;
       setWinSizeIsSet(false);
       this.winSize = 0;
+      this.afi = null;
     }
 
     /**
@@ -19540,6 +19803,38 @@ public class BgpConfigurator {
       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WINSIZE_ISSET_ID, value);
     }
 
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi getAfi() {
+      return this.afi;
+    }
+
+    /**
+     * 
+     * @see af_afi
+     */
+    public getRoutes_args setAfi(af_afi afi) {
+      this.afi = afi;
+      return this;
+    }
+
+    public void unsetAfi() {
+      this.afi = null;
+    }
+
+    /** Returns true if field afi is set (has been assigned a value) and false otherwise */
+    public boolean isSetAfi() {
+      return this.afi != null;
+    }
+
+    public void setAfiIsSet(boolean value) {
+      if (!value) {
+        this.afi = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case P_TYPE:
@@ -19566,6 +19861,14 @@ public class BgpConfigurator {
         }
         break;
 
+      case AFI:
+        if (value == null) {
+          unsetAfi();
+        } else {
+          setAfi((af_afi)value);
+        }
+        break;
+
       }
     }
 
@@ -19580,6 +19883,9 @@ public class BgpConfigurator {
       case WIN_SIZE:
         return Integer.valueOf(getWinSize());
 
+      case AFI:
+        return getAfi();
+
       }
       throw new IllegalStateException();
     }
@@ -19597,6 +19903,8 @@ public class BgpConfigurator {
         return isSetOptype();
       case WIN_SIZE:
         return isSetWinSize();
+      case AFI:
+        return isSetAfi();
       }
       throw new IllegalStateException();
     }
@@ -19641,6 +19949,15 @@ public class BgpConfigurator {
           return false;
       }
 
+      boolean this_present_afi = true && this.isSetAfi();
+      boolean that_present_afi = true && that.isSetAfi();
+      if (this_present_afi || that_present_afi) {
+        if (!(this_present_afi && that_present_afi))
+          return false;
+        if (!this.afi.equals(that.afi))
+          return false;
+      }
+
       return true;
     }
 
@@ -19687,6 +20004,16 @@ public class BgpConfigurator {
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetAfi()).compareTo(other.isSetAfi());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAfi()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.afi, other.afi);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -19722,6 +20049,14 @@ public class BgpConfigurator {
       sb.append("winSize:");
       sb.append(this.winSize);
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("afi:");
+      if (this.afi == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.afi);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -19791,6 +20126,14 @@ public class BgpConfigurator {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 4: // AFI
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.afi = af_afi.findByValue(iprot.readI32());
+                struct.setAfiIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -19817,6 +20160,11 @@ public class BgpConfigurator {
         oprot.writeFieldBegin(WIN_SIZE_FIELD_DESC);
         oprot.writeI32(struct.winSize);
         oprot.writeFieldEnd();
+        if (struct.afi != null) {
+          oprot.writeFieldBegin(AFI_FIELD_DESC);
+          oprot.writeI32(struct.afi.getValue());
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -19844,7 +20192,10 @@ public class BgpConfigurator {
         if (struct.isSetWinSize()) {
           optionals.set(2);
         }
-        oprot.writeBitSet(optionals, 3);
+        if (struct.isSetAfi()) {
+          optionals.set(3);
+        }
+        oprot.writeBitSet(optionals, 4);
         if (struct.isSetP_type()) {
           oprot.writeI32(struct.p_type.getValue());
         }
@@ -19854,12 +20205,15 @@ public class BgpConfigurator {
         if (struct.isSetWinSize()) {
           oprot.writeI32(struct.winSize);
         }
+        if (struct.isSetAfi()) {
+          oprot.writeI32(struct.afi.getValue());
+        }
       }
 
       @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(3);
+        BitSet incoming = iprot.readBitSet(4);
         if (incoming.get(0)) {
           struct.p_type = protocol_type.findByValue(iprot.readI32());
           struct.setP_typeIsSet(true);
@@ -19872,6 +20226,10 @@ public class BgpConfigurator {
           struct.winSize = iprot.readI32();
           struct.setWinSizeIsSet(true);
         }
+        if (incoming.get(3)) {
+          struct.afi = af_afi.findByValue(iprot.readI32());
+          struct.setAfiIsSet(true);
+        }
       }
     }
 
index da2bdf6d4383a32634c4f76f1a62a88f542d2e2d..eb8ed42689a37ef0a5d2da3543c7f76a0b85ad95 100644 (file)
@@ -1,12 +1,11 @@
-/**
+ /**
  * 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.netvirt.bgpmanager.thrift.gen;
-
+ package org.opendaylight.netvirt.bgpmanager.thrift.gen;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
@@ -37,9 +36,9 @@ public class BgpUpdater {
 
   public interface Iface {
 
-    public void onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac) throws org.apache.thrift.TException;
+    public void onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi) throws org.apache.thrift.TException;
 
-    public void onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label) throws org.apache.thrift.TException;
+    public void onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi) throws org.apache.thrift.TException;
 
     public void onStartConfigResyncNotification() throws org.apache.thrift.TException;
 
@@ -49,9 +48,9 @@ public class BgpUpdater {
 
   public interface AsyncIface {
 
-    public void onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi, 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;
 
@@ -79,12 +78,12 @@ public class BgpUpdater {
       super(iprot, oprot);
     }
 
-    public void onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac) throws org.apache.thrift.TException
+    public void onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi) throws org.apache.thrift.TException
     {
-      send_onUpdatePushRoute(p_type, rd, prefix, prefixlen, nexthop, ethtag, esi, macaddress, l3label, l2label, routermac);
+      send_onUpdatePushRoute(p_type, rd, prefix, prefixlen, nexthop, ethtag, esi, macaddress, l3label, l2label, routermac, afi);
     }
 
-    public void send_onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac) throws org.apache.thrift.TException
+    public void send_onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi) throws org.apache.thrift.TException
     {
       onUpdatePushRoute_args args = new onUpdatePushRoute_args();
       args.setP_type(p_type);
@@ -98,15 +97,16 @@ public class BgpUpdater {
       args.setL3label(l3label);
       args.setL2label(l2label);
       args.setRoutermac(routermac);
+      args.setAfi(afi);
       sendBase("onUpdatePushRoute", args);
     }
 
-    public void onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label) throws org.apache.thrift.TException
+    public void onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi) throws org.apache.thrift.TException
     {
-      send_onUpdateWithdrawRoute(p_type, rd, prefix, prefixlen, nexthop, ethtag, esi, macaddress, l3label, l2label);
+      send_onUpdateWithdrawRoute(p_type, rd, prefix, prefixlen, nexthop, ethtag, esi, macaddress, l3label, l2label, afi);
     }
 
-    public void send_onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label) throws org.apache.thrift.TException
+    public void send_onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi) throws org.apache.thrift.TException
     {
       onUpdateWithdrawRoute_args args = new onUpdateWithdrawRoute_args();
       args.setP_type(p_type);
@@ -119,6 +119,7 @@ public class BgpUpdater {
       args.setMacaddress(macaddress);
       args.setL3label(l3label);
       args.setL2label(l2label);
+      args.setAfi(afi);
       sendBase("onUpdateWithdrawRoute", args);
     }
 
@@ -165,9 +166,9 @@ public class BgpUpdater {
       super(protocolFactory, clientManager, transport);
     }
 
-    public void onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void onUpdatePushRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      onUpdatePushRoute_call method_call = new onUpdatePushRoute_call(p_type, rd, prefix, prefixlen, nexthop, ethtag, esi, macaddress, l3label, l2label, routermac, resultHandler, this, ___protocolFactory, ___transport);
+      onUpdatePushRoute_call method_call = new onUpdatePushRoute_call(p_type, rd, prefix, prefixlen, nexthop, ethtag, esi, macaddress, l3label, l2label, routermac, afi, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -184,7 +185,8 @@ public class BgpUpdater {
       private int l3label;
       private int l2label;
       private String routermac;
-      public onUpdatePushRoute_call(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private af_afi afi;
+      public onUpdatePushRoute_call(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, String routermac, af_afi afi, 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.p_type = p_type;
         this.rd = rd;
@@ -197,6 +199,7 @@ public class BgpUpdater {
         this.l3label = l3label;
         this.l2label = l2label;
         this.routermac = routermac;
+        this.afi = afi;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -213,6 +216,7 @@ public class BgpUpdater {
         args.setL3label(l3label);
         args.setL2label(l2label);
         args.setRoutermac(routermac);
+        args.setAfi(afi);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -226,9 +230,9 @@ public class BgpUpdater {
       }
     }
 
-    public void onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void onUpdateWithdrawRoute(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      onUpdateWithdrawRoute_call method_call = new onUpdateWithdrawRoute_call(p_type, rd, prefix, prefixlen, nexthop, ethtag, esi, macaddress, l3label, l2label, resultHandler, this, ___protocolFactory, ___transport);
+      onUpdateWithdrawRoute_call method_call = new onUpdateWithdrawRoute_call(p_type, rd, prefix, prefixlen, nexthop, ethtag, esi, macaddress, l3label, l2label, afi, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -244,7 +248,8 @@ public class BgpUpdater {
       private String macaddress;
       private int l3label;
       private int l2label;
-      public onUpdateWithdrawRoute_call(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private af_afi afi;
+      public onUpdateWithdrawRoute_call(protocol_type p_type, String rd, String prefix, int prefixlen, String nexthop, int ethtag, String esi, String macaddress, int l3label, int l2label, af_afi afi, 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.p_type = p_type;
         this.rd = rd;
@@ -256,6 +261,7 @@ public class BgpUpdater {
         this.macaddress = macaddress;
         this.l3label = l3label;
         this.l2label = l2label;
+        this.afi = afi;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -271,6 +277,7 @@ public class BgpUpdater {
         args.setMacaddress(macaddress);
         args.setL3label(l3label);
         args.setL2label(l2label);
+        args.setAfi(afi);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -354,7 +361,7 @@ public class BgpUpdater {
   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<>()));
+      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) {
@@ -383,7 +390,7 @@ public class BgpUpdater {
       }
 
       public org.apache.thrift.TBase getResult(I iface, onUpdatePushRoute_args args) throws org.apache.thrift.TException {
-        iface.onUpdatePushRoute(args.p_type, args.rd, args.prefix, args.prefixlen, args.nexthop, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.routermac);
+        iface.onUpdatePushRoute(args.p_type, args.rd, args.prefix, args.prefixlen, args.nexthop, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.routermac, args.afi);
         return null;
       }
     }
@@ -402,7 +409,7 @@ public class BgpUpdater {
       }
 
       public org.apache.thrift.TBase getResult(I iface, onUpdateWithdrawRoute_args args) throws org.apache.thrift.TException {
-        iface.onUpdateWithdrawRoute(args.p_type, args.rd, args.prefix, args.prefixlen, args.nexthop, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label);
+        iface.onUpdateWithdrawRoute(args.p_type, args.rd, args.prefix, args.prefixlen, args.nexthop, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.afi);
         return null;
       }
     }
@@ -450,7 +457,7 @@ public class BgpUpdater {
   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<>()));
+      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) {
@@ -489,7 +496,7 @@ public class BgpUpdater {
       }
 
       public void start(I iface, onUpdatePushRoute_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
-        iface.onUpdatePushRoute(args.p_type, args.rd, args.prefix, args.prefixlen, args.nexthop, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.routermac,resultHandler);
+        iface.onUpdatePushRoute(args.p_type, args.rd, args.prefix, args.prefixlen, args.nexthop, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.routermac, args.afi,resultHandler);
       }
     }
 
@@ -517,7 +524,7 @@ public class BgpUpdater {
       }
 
       public void start(I iface, onUpdateWithdrawRoute_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
-        iface.onUpdateWithdrawRoute(args.p_type, args.rd, args.prefix, args.prefixlen, args.nexthop, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label,resultHandler);
+        iface.onUpdateWithdrawRoute(args.p_type, args.rd, args.prefix, args.prefixlen, args.nexthop, args.ethtag, args.esi, args.macaddress, args.l3label, args.l2label, args.afi,resultHandler);
       }
     }
 
@@ -593,8 +600,9 @@ public class BgpUpdater {
     private static final org.apache.thrift.protocol.TField L3LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("l3label", org.apache.thrift.protocol.TType.I32, (short)9);
     private static final org.apache.thrift.protocol.TField L2LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("l2label", org.apache.thrift.protocol.TType.I32, (short)10);
     private static final org.apache.thrift.protocol.TField ROUTERMAC_FIELD_DESC = new org.apache.thrift.protocol.TField("routermac", org.apache.thrift.protocol.TType.STRING, (short)11);
+    private static final org.apache.thrift.protocol.TField AFI_FIELD_DESC = new org.apache.thrift.protocol.TField("afi", org.apache.thrift.protocol.TType.I32, (short)12);
 
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
+    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());
@@ -615,6 +623,11 @@ public class BgpUpdater {
     public int l3label; // required
     public int l2label; // required
     public String routermac; // required
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi afi; // 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 {
@@ -632,9 +645,14 @@ public class BgpUpdater {
       MACADDRESS((short)8, "macaddress"),
       L3LABEL((short)9, "l3label"),
       L2LABEL((short)10, "l2label"),
-      ROUTERMAC((short)11, "routermac");
+      ROUTERMAC((short)11, "routermac"),
+      /**
+       * 
+       * @see af_afi
+       */
+      AFI((short)12, "afi");
 
-      private static final Map<String, _Fields> byName = new HashMap<>();
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
       static {
         for (_Fields field : EnumSet.allOf(_Fields.class)) {
@@ -669,6 +687,8 @@ public class BgpUpdater {
             return L2LABEL;
           case 11: // ROUTERMAC
             return ROUTERMAC;
+          case 12: // AFI
+            return AFI;
           default:
             return null;
         }
@@ -739,6 +759,8 @@ public class BgpUpdater {
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       tmpMap.put(_Fields.ROUTERMAC, new org.apache.thrift.meta_data.FieldMetaData("routermac", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.AFI, new org.apache.thrift.meta_data.FieldMetaData("afi", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_afi.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onUpdatePushRoute_args.class, metaDataMap);
     }
@@ -757,7 +779,8 @@ public class BgpUpdater {
       String macaddress,
       int l3label,
       int l2label,
-      String routermac)
+      String routermac,
+      af_afi afi)
     {
       this();
       this.p_type = p_type;
@@ -775,6 +798,7 @@ public class BgpUpdater {
       this.l2label = l2label;
       setL2labelIsSet(true);
       this.routermac = routermac;
+      this.afi = afi;
     }
 
     /**
@@ -807,6 +831,9 @@ public class BgpUpdater {
       if (other.isSetRoutermac()) {
         this.routermac = other.routermac;
       }
+      if (other.isSetAfi()) {
+        this.afi = other.afi;
+      }
     }
 
     public onUpdatePushRoute_args deepCopy() {
@@ -830,6 +857,7 @@ public class BgpUpdater {
       setL2labelIsSet(false);
       this.l2label = 0;
       this.routermac = null;
+      this.afi = null;
     }
 
     /**
@@ -1100,6 +1128,38 @@ public class BgpUpdater {
       }
     }
 
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi getAfi() {
+      return this.afi;
+    }
+
+    /**
+     * 
+     * @see af_afi
+     */
+    public onUpdatePushRoute_args setAfi(af_afi afi) {
+      this.afi = afi;
+      return this;
+    }
+
+    public void unsetAfi() {
+      this.afi = null;
+    }
+
+    /** Returns true if field afi is set (has been assigned a value) and false otherwise */
+    public boolean isSetAfi() {
+      return this.afi != null;
+    }
+
+    public void setAfiIsSet(boolean value) {
+      if (!value) {
+        this.afi = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case P_TYPE:
@@ -1190,6 +1250,14 @@ public class BgpUpdater {
         }
         break;
 
+      case AFI:
+        if (value == null) {
+          unsetAfi();
+        } else {
+          setAfi((af_afi)value);
+        }
+        break;
+
       }
     }
 
@@ -1228,6 +1296,9 @@ public class BgpUpdater {
       case ROUTERMAC:
         return getRoutermac();
 
+      case AFI:
+        return getAfi();
+
       }
       throw new IllegalStateException();
     }
@@ -1261,6 +1332,8 @@ public class BgpUpdater {
         return isSetL2label();
       case ROUTERMAC:
         return isSetRoutermac();
+      case AFI:
+        return isSetAfi();
       }
       throw new IllegalStateException();
     }
@@ -1377,6 +1450,15 @@ public class BgpUpdater {
           return false;
       }
 
+      boolean this_present_afi = true && this.isSetAfi();
+      boolean that_present_afi = true && that.isSetAfi();
+      if (this_present_afi || that_present_afi) {
+        if (!(this_present_afi && that_present_afi))
+          return false;
+        if (!this.afi.equals(that.afi))
+          return false;
+      }
+
       return true;
     }
 
@@ -1503,6 +1585,16 @@ public class BgpUpdater {
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetAfi()).compareTo(other.isSetAfi());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAfi()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.afi, other.afi);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -1594,6 +1686,14 @@ public class BgpUpdater {
         sb.append(this.routermac);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("afi:");
+      if (this.afi == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.afi);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -1727,6 +1827,14 @@ public class BgpUpdater {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 12: // AFI
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.afi = af_afi.findByValue(iprot.readI32());
+                struct.setAfiIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -1789,6 +1897,11 @@ public class BgpUpdater {
           oprot.writeString(struct.routermac);
           oprot.writeFieldEnd();
         }
+        if (struct.afi != null) {
+          oprot.writeFieldBegin(AFI_FIELD_DESC);
+          oprot.writeI32(struct.afi.getValue());
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -1840,7 +1953,10 @@ public class BgpUpdater {
         if (struct.isSetRoutermac()) {
           optionals.set(10);
         }
-        oprot.writeBitSet(optionals, 11);
+        if (struct.isSetAfi()) {
+          optionals.set(11);
+        }
+        oprot.writeBitSet(optionals, 12);
         if (struct.isSetP_type()) {
           oprot.writeI32(struct.p_type.getValue());
         }
@@ -1874,12 +1990,15 @@ public class BgpUpdater {
         if (struct.isSetRoutermac()) {
           oprot.writeString(struct.routermac);
         }
+        if (struct.isSetAfi()) {
+          oprot.writeI32(struct.afi.getValue());
+        }
       }
 
       @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(11);
+        BitSet incoming = iprot.readBitSet(12);
         if (incoming.get(0)) {
           struct.p_type = protocol_type.findByValue(iprot.readI32());
           struct.setP_typeIsSet(true);
@@ -1924,6 +2043,10 @@ public class BgpUpdater {
           struct.routermac = iprot.readString();
           struct.setRoutermacIsSet(true);
         }
+        if (incoming.get(11)) {
+          struct.afi = af_afi.findByValue(iprot.readI32());
+          struct.setAfiIsSet(true);
+        }
       }
     }
 
@@ -1942,8 +2065,9 @@ public class BgpUpdater {
     private static final org.apache.thrift.protocol.TField MACADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("macaddress", org.apache.thrift.protocol.TType.STRING, (short)8);
     private static final org.apache.thrift.protocol.TField L3LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("l3label", org.apache.thrift.protocol.TType.I32, (short)9);
     private static final org.apache.thrift.protocol.TField L2LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("l2label", org.apache.thrift.protocol.TType.I32, (short)10);
+    private static final org.apache.thrift.protocol.TField AFI_FIELD_DESC = new org.apache.thrift.protocol.TField("afi", org.apache.thrift.protocol.TType.I32, (short)11);
 
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
+    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());
@@ -1963,6 +2087,11 @@ public class BgpUpdater {
     public String macaddress; // required
     public int l3label; // required
     public int l2label; // required
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi afi; // 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 {
@@ -1979,9 +2108,14 @@ public class BgpUpdater {
       ESI((short)7, "esi"),
       MACADDRESS((short)8, "macaddress"),
       L3LABEL((short)9, "l3label"),
-      L2LABEL((short)10, "l2label");
+      L2LABEL((short)10, "l2label"),
+      /**
+       * 
+       * @see af_afi
+       */
+      AFI((short)11, "afi");
 
-      private static final Map<String, _Fields> byName = new HashMap<>();
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
       static {
         for (_Fields field : EnumSet.allOf(_Fields.class)) {
@@ -2014,6 +2148,8 @@ public class BgpUpdater {
             return L3LABEL;
           case 10: // L2LABEL
             return L2LABEL;
+          case 11: // AFI
+            return AFI;
           default:
             return null;
         }
@@ -2082,6 +2218,8 @@ public class BgpUpdater {
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
       tmpMap.put(_Fields.L2LABEL, new org.apache.thrift.meta_data.FieldMetaData("l2label", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      tmpMap.put(_Fields.AFI, new org.apache.thrift.meta_data.FieldMetaData("afi", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, af_afi.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onUpdateWithdrawRoute_args.class, metaDataMap);
     }
@@ -2099,7 +2237,8 @@ public class BgpUpdater {
       String esi,
       String macaddress,
       int l3label,
-      int l2label)
+      int l2label,
+      af_afi afi)
     {
       this();
       this.p_type = p_type;
@@ -2116,6 +2255,7 @@ public class BgpUpdater {
       setL3labelIsSet(true);
       this.l2label = l2label;
       setL2labelIsSet(true);
+      this.afi = afi;
     }
 
     /**
@@ -2145,6 +2285,9 @@ public class BgpUpdater {
       }
       this.l3label = other.l3label;
       this.l2label = other.l2label;
+      if (other.isSetAfi()) {
+        this.afi = other.afi;
+      }
     }
 
     public onUpdateWithdrawRoute_args deepCopy() {
@@ -2167,6 +2310,7 @@ public class BgpUpdater {
       this.l3label = 0;
       setL2labelIsSet(false);
       this.l2label = 0;
+      this.afi = null;
     }
 
     /**
@@ -2413,6 +2557,38 @@ public class BgpUpdater {
       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __L2LABEL_ISSET_ID, value);
     }
 
+    /**
+     * 
+     * @see af_afi
+     */
+    public af_afi getAfi() {
+      return this.afi;
+    }
+
+    /**
+     * 
+     * @see af_afi
+     */
+    public onUpdateWithdrawRoute_args setAfi(af_afi afi) {
+      this.afi = afi;
+      return this;
+    }
+
+    public void unsetAfi() {
+      this.afi = null;
+    }
+
+    /** Returns true if field afi is set (has been assigned a value) and false otherwise */
+    public boolean isSetAfi() {
+      return this.afi != null;
+    }
+
+    public void setAfiIsSet(boolean value) {
+      if (!value) {
+        this.afi = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case P_TYPE:
@@ -2495,6 +2671,14 @@ public class BgpUpdater {
         }
         break;
 
+      case AFI:
+        if (value == null) {
+          unsetAfi();
+        } else {
+          setAfi((af_afi)value);
+        }
+        break;
+
       }
     }
 
@@ -2530,6 +2714,9 @@ public class BgpUpdater {
       case L2LABEL:
         return Integer.valueOf(getL2label());
 
+      case AFI:
+        return getAfi();
+
       }
       throw new IllegalStateException();
     }
@@ -2561,6 +2748,8 @@ public class BgpUpdater {
         return isSetL3label();
       case L2LABEL:
         return isSetL2label();
+      case AFI:
+        return isSetAfi();
       }
       throw new IllegalStateException();
     }
@@ -2668,6 +2857,15 @@ public class BgpUpdater {
           return false;
       }
 
+      boolean this_present_afi = true && this.isSetAfi();
+      boolean that_present_afi = true && that.isSetAfi();
+      if (this_present_afi || that_present_afi) {
+        if (!(this_present_afi && that_present_afi))
+          return false;
+        if (!this.afi.equals(that.afi))
+          return false;
+      }
+
       return true;
     }
 
@@ -2784,6 +2982,16 @@ public class BgpUpdater {
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetAfi()).compareTo(other.isSetAfi());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAfi()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.afi, other.afi);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -2867,6 +3075,14 @@ public class BgpUpdater {
       sb.append("l2label:");
       sb.append(this.l2label);
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("afi:");
+      if (this.afi == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.afi);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -2992,6 +3208,14 @@ public class BgpUpdater {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 11: // AFI
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.afi = af_afi.findByValue(iprot.readI32());
+                struct.setAfiIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -3049,6 +3273,11 @@ public class BgpUpdater {
         oprot.writeFieldBegin(L2LABEL_FIELD_DESC);
         oprot.writeI32(struct.l2label);
         oprot.writeFieldEnd();
+        if (struct.afi != null) {
+          oprot.writeFieldBegin(AFI_FIELD_DESC);
+          oprot.writeI32(struct.afi.getValue());
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -3097,7 +3326,10 @@ public class BgpUpdater {
         if (struct.isSetL2label()) {
           optionals.set(9);
         }
-        oprot.writeBitSet(optionals, 10);
+        if (struct.isSetAfi()) {
+          optionals.set(10);
+        }
+        oprot.writeBitSet(optionals, 11);
         if (struct.isSetP_type()) {
           oprot.writeI32(struct.p_type.getValue());
         }
@@ -3128,12 +3360,15 @@ public class BgpUpdater {
         if (struct.isSetL2label()) {
           oprot.writeI32(struct.l2label);
         }
+        if (struct.isSetAfi()) {
+          oprot.writeI32(struct.afi.getValue());
+        }
       }
 
       @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(10);
+        BitSet incoming = iprot.readBitSet(11);
         if (incoming.get(0)) {
           struct.p_type = protocol_type.findByValue(iprot.readI32());
           struct.setP_typeIsSet(true);
@@ -3174,6 +3409,10 @@ public class BgpUpdater {
           struct.l2label = iprot.readI32();
           struct.setL2labelIsSet(true);
         }
+        if (incoming.get(10)) {
+          struct.afi = af_afi.findByValue(iprot.readI32());
+          struct.setAfiIsSet(true);
+        }
       }
     }
 
@@ -3183,7 +3422,7 @@ public class BgpUpdater {
     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<>();
+    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());
@@ -3194,7 +3433,7 @@ public class BgpUpdater {
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
 ;
 
-      private static final Map<String, _Fields> byName = new HashMap<>();
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
       static {
         for (_Fields field : EnumSet.allOf(_Fields.class)) {
@@ -3247,7 +3486,7 @@ public class BgpUpdater {
     }
     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.class);
+      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);
     }
@@ -3432,7 +3671,7 @@ public class BgpUpdater {
     private static final org.apache.thrift.protocol.TField ERR_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errCode", org.apache.thrift.protocol.TType.BYTE, (short)2);
     private static final org.apache.thrift.protocol.TField ERR_SUBCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errSubcode", org.apache.thrift.protocol.TType.BYTE, (short)3);
 
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
       schemes.put(StandardScheme.class, new onNotificationSendEvent_argsStandardSchemeFactory());
       schemes.put(TupleScheme.class, new onNotificationSendEvent_argsTupleSchemeFactory());
@@ -3448,7 +3687,7 @@ public class BgpUpdater {
       ERR_CODE((short)2, "errCode"),
       ERR_SUBCODE((short)3, "errSubcode");
 
-      private static final Map<String, _Fields> byName = new HashMap<>();
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
       static {
         for (_Fields field : EnumSet.allOf(_Fields.class)) {
@@ -3972,4 +4211,3 @@ public class BgpUpdater {
   }
 
 }
-
index a5d92c0cf24736c3bf4ac50cd9a15acd5ceb1010..ee00599e9fed6bef75fabc2d8f7a7775c89ddaff 100644 (file)
@@ -1,12 +1,10 @@
-/**
+ /**
  * 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.netvirt.bgpmanager.thrift.gen;
-
+ package org.opendaylight.netvirt.bgpmanager.thrift.gen;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
@@ -40,7 +38,7 @@ public class Routes implements org.apache.thrift.TBase<Routes, Routes._Fields>,
   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<>();
+  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());
@@ -56,7 +54,7 @@ public class Routes implements org.apache.thrift.TBase<Routes, Routes._Fields>,
     UPDATES((short)2, "updates"),
     MORE((short)4, "more");
 
-    private static final Map<String, _Fields> byName = new HashMap<>();
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
     static {
       for (_Fields field : EnumSet.allOf(_Fields.class)) {
@@ -121,7 +119,7 @@ public class Routes implements org.apache.thrift.TBase<Routes, Routes._Fields>,
   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.class);
+    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, 
@@ -151,7 +149,7 @@ public class Routes implements org.apache.thrift.TBase<Routes, Routes._Fields>,
     __isset_bitfield = other.__isset_bitfield;
     this.errcode = other.errcode;
     if (other.isSetUpdates()) {
-      List<Update> __this__updates = new ArrayList<>(other.updates.size());
+      List<Update> __this__updates = new ArrayList<Update>(other.updates.size());
       for (Update other_element : other.updates) {
         __this__updates.add(new Update(other_element));
       }
@@ -206,7 +204,7 @@ public class Routes implements org.apache.thrift.TBase<Routes, Routes._Fields>,
 
   public void addToUpdates(Update elem) {
     if (this.updates == null) {
-      this.updates = new ArrayList<>();
+      this.updates = new ArrayList<Update>();
     }
     this.updates.add(elem);
   }
@@ -290,13 +288,13 @@ public class Routes implements org.apache.thrift.TBase<Routes, Routes._Fields>,
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case ERRCODE:
-      return getErrcode();
+      return Integer.valueOf(getErrcode());
 
     case UPDATES:
       return getUpdates();
 
     case MORE:
-      return getMore();
+      return Integer.valueOf(getMore());
 
     }
     throw new IllegalStateException();
@@ -501,7 +499,7 @@ public class Routes implements org.apache.thrift.TBase<Routes, Routes._Fields>,
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
-                struct.updates = new ArrayList<>(_list0.size);
+                struct.updates = new ArrayList<Update>(_list0.size);
                 for (int _i1 = 0; _i1 < _list0.size; ++_i1)
                 {
                   Update _elem2;
@@ -617,7 +615,7 @@ public class Routes implements org.apache.thrift.TBase<Routes, Routes._Fields>,
       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<>(_list5.size);
+          struct.updates = new ArrayList<Update>(_list5.size);
           for (int _i6 = 0; _i6 < _list5.size; ++_i6)
           {
             Update _elem7;
@@ -637,4 +635,3 @@ public class Routes implements org.apache.thrift.TBase<Routes, Routes._Fields>,
 
 }
 
-
index b771f8166455e7ea5218b8b704c0d79260bd1ef5..c358125165e64ea3395899f14b15b7d643407028 100644 (file)
@@ -1,12 +1,10 @@
-/**
+ /**
  * 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.netvirt.bgpmanager.thrift.gen;
-
+ package org.opendaylight.netvirt.bgpmanager.thrift.gen;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
@@ -49,7 +47,7 @@ public class Update implements org.apache.thrift.TBase<Update, Update._Fields>,
   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)11);
   private static final org.apache.thrift.protocol.TField ROUTERMAC_FIELD_DESC = new org.apache.thrift.protocol.TField("routermac", org.apache.thrift.protocol.TType.STRING, (short)12);
 
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<>();
+  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());
@@ -83,7 +81,7 @@ public class Update implements org.apache.thrift.TBase<Update, Update._Fields>,
     NEXTHOP((short)11, "nexthop"),
     ROUTERMAC((short)12, "routermac");
 
-    private static final Map<String, _Fields> byName = new HashMap<>();
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
     static {
       for (_Fields field : EnumSet.allOf(_Fields.class)) {
@@ -169,7 +167,7 @@ public class Update implements org.apache.thrift.TBase<Update, Update._Fields>,
   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.class);
+    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, 
@@ -679,13 +677,13 @@ public class Update implements org.apache.thrift.TBase<Update, Update._Fields>,
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case TYPE:
-      return getType();
+      return Integer.valueOf(getType());
 
     case RESERVED:
-      return getReserved();
+      return Integer.valueOf(getReserved());
 
     case PREFIXLEN:
-      return getPrefixlen();
+      return Integer.valueOf(getPrefixlen());
 
     case L3LABEL:
       return Integer.valueOf(getL3label());
@@ -1455,4 +1453,3 @@ public class Update implements org.apache.thrift.TBase<Update, Update._Fields>,
 
 }
 
-
index f165cfa0fa094785e08a557a214aadbc258d4ea4..7b10b1b650be422beec7b90279e4234740477a86 100644 (file)
@@ -1,18 +1,17 @@
-/**
+ /**
  * 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.netvirt.bgpmanager.thrift.gen;
-
+ package org.opendaylight.netvirt.bgpmanager.thrift.gen;
 import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
 public enum af_afi implements org.apache.thrift.TEnum {
   AFI_IP(1),
+  AFI_IPV6(2),
   AFI_L2VPN(3);
 
   private final int value;
@@ -36,6 +35,8 @@ public enum af_afi implements org.apache.thrift.TEnum {
     switch (value) {
       case 1:
         return AFI_IP;
+      case 2:
+        return AFI_IPV6;
       case 3:
         return AFI_L2VPN;
       default:
@@ -43,4 +44,3 @@ public enum af_afi implements org.apache.thrift.TEnum {
     }
   }
 }
-
index ec5e151540eff88f1d2d725f6b0cff1b034f5d2c..ff143c2c06c561f5cd7630b74f10bc145e56dae3 100644 (file)
@@ -1,12 +1,10 @@
-/**
+ /**
  * 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.netvirt.bgpmanager.thrift.gen;
-
+ package org.opendaylight.netvirt.bgpmanager.thrift.gen;
 import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
@@ -46,4 +44,3 @@ public enum af_safi implements org.apache.thrift.TEnum {
     }
   }
 }
-
index 32667995a4a2df0b3775a527e0f920f6990a5527..8603924ca6f44595f5344f2f07b73ef9c273488b 100644 (file)
@@ -1,12 +1,10 @@
-/**
+ /**
  * 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.netvirt.bgpmanager.thrift.gen;
-
+ package org.opendaylight.netvirt.bgpmanager.thrift.gen;
 import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
@@ -52,4 +50,3 @@ public enum encap_type implements org.apache.thrift.TEnum {
     }
   }
 }
-
index 0316565a8fde39bbab0f6830ad9fa15f7ff09998..9a5ac493849077affcf38a78e947c7d014075790 100644 (file)
@@ -1,12 +1,10 @@
-/**
+ /**
  * 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.netvirt.bgpmanager.thrift.gen;
-
+ package org.opendaylight.netvirt.bgpmanager.thrift.gen;
 import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
@@ -43,4 +41,3 @@ public enum layer_type implements org.apache.thrift.TEnum {
     }
   }
 }
-
index f373057c07cc19d37ce37d8ac65bb933b4dd774b..a85ff4bce372eb90c9a691db01ca306235c271d8 100644 (file)
@@ -1,12 +1,10 @@
-/**
+ /**
  * 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.netvirt.bgpmanager.thrift.gen;
-
+ package org.opendaylight.netvirt.bgpmanager.thrift.gen;
 import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
@@ -49,4 +47,3 @@ public enum protocol_type implements org.apache.thrift.TEnum {
     }
   }
 }
-
index 7a209ab18e7cb84c3e9cba6f49ad76d2f1b4d6e0..4651b3e418b97242671cef04370cd4bcb1484e72 100644 (file)
@@ -1,12 +1,10 @@
-/**
+ /**
  * 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.netvirt.bgpmanager.thrift.gen;
-
+ package org.opendaylight.netvirt.bgpmanager.thrift.gen;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
@@ -60,4 +58,3 @@ public class qbgpConstants {
   public static final int BGP_ERR_NOT_SUPPORTED = 200;
 
 }
-
index 0a1cbf8d086ef6bc22707c7db941b9d98dcf82ee..1a0d21a7ca87987a1c6b9496c2c1548aab2710ff 100644 (file)
@@ -45,6 +45,7 @@ const i32 BGP_ERR_NOT_SUPPORTED = 200
 // these are the supported afi-safi combinations
 enum af_afi {
     AFI_IP = 1,
+    AFI_IPV6 = 2,
     AFI_L2VPN = 3
 }
 
@@ -157,7 +158,7 @@ service BgpConfigurator {
     i32 delVrf(1:string rd),
     /*
     * pushRoute:
-    * IPv6 is not supported.
+    * IPv6 is now supported through af_afi parameter, 'af_afi': indicates whether prefix is IPv4 or IPv6.
     * 'p_type' is mandatory
     * 'nexthop' cannot be null for VPNv4 and LU.
     * 'rd' is null for LU (and unicast).
@@ -180,13 +181,15 @@ service BgpConfigurator {
     8:i32 l3label,
     9:i32 l2label,
     10:encap_type enc_type,
-    11:string routermac),
+    11:string routermac,
+    12:af_afi afi),
 
 
     /*
     * 'p_type' is mandatory
     * kludge: second argument is either 'rd' (VPNv4) or
     * label (v4LU) as a string (eg: "2500")
+    * seventh argument is either ipv4 or ipv6
     */
     i32 withdrawRoute(
     1:protocol_type p_type,
@@ -194,7 +197,9 @@ service BgpConfigurator {
     3:string rd,
     4:i32 ethtag,
     5:string esi,
-    6:string macaddress),
+    6:string macaddress,
+    7:af_afi afi),
+
 
     i32 setEbgpMultihop(1:string peerIp, 2:i32 nHops),
     i32 unsetEbgpMultihop(1:string peerIp),
@@ -218,9 +223,9 @@ service BgpConfigurator {
     * but not necessarily the maximum number that would fit
     * (we currently use min(winSize, tcpWindowSize) ).
     * calling INIT when NEXT is expected causes reinit.
-    * only vpnv4 RIBs are supported.
+    * both vpnv4 or vpnv6 RIBs are supported.
     */
-    Routes getRoutes(1:protocol_type p_type, 2:i32 optype, 3:i32 winSize),
+    Routes getRoutes(1:protocol_type p_type, 2:i32 optype, 3:i32 winSize, 4:af_afi afi),
     i32 enableMultipath(1:af_afi afi, 2:af_safi safi),
     i32 disableMultipath(1:af_afi afi, 2:af_safi safi),
     i32 multipaths(1:string rd, 2:i32 maxPath)
@@ -239,7 +244,8 @@ service BgpUpdater {
            8:string macaddress,
            9:i32 l3label,
            10:i32 l2label,
-           11:string routermac),
+           11:string routermac,
+           12:af_afi afi),
 
     oneway void onUpdateWithdrawRoute(
            1:protocol_type p_type,
@@ -251,7 +257,8 @@ service BgpUpdater {
            7:string esi,
            8:string macaddress,
            9:i32 l3label,
-           10:i32 l2label),
+           10:i32 l2label,
+           11:af_afi afi),
 
     oneway void onStartConfigResyncNotification(),
     /* communicate to ODL a BGP Notification received from peer */
index 07f14672f8ec0747d566975b92771111a1b45760..bc7c32cf7b6e4f820917a34b8ebc87d6ef07f238 100644 (file)
@@ -24,6 +24,7 @@ import org.opendaylight.netvirt.bgpmanager.BgpConfigurationManager;
 import org.opendaylight.netvirt.bgpmanager.FibDSWriter;
 import org.opendaylight.netvirt.bgpmanager.api.IBgpManager;
 import org.opendaylight.netvirt.bgpmanager.thrift.gen.BgpUpdater;
+import org.opendaylight.netvirt.bgpmanager.thrift.gen.af_afi;
 import org.opendaylight.netvirt.bgpmanager.thrift.gen.protocol_type;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTables;
 import org.slf4j.Logger;
@@ -132,7 +133,8 @@ public class BgpThriftService {
                                       String macaddress,
                                       int l3label,
                                       int l2label,
-                                      String routermac) {
+                                      String routermac,
+                                      af_afi afi) {
             try {
                 LOGGER.debug("Update on push route : rd {} prefix {} plen {}", rd, prefix, plen);
 
@@ -147,7 +149,8 @@ public class BgpThriftService {
                         esi,
                         macaddress,
                         l3label,
-                        routermac);
+                        routermac,
+                        afi);
 
             } catch (Throwable e) {
                 LOGGER.error("failed to handle update route ", e);
@@ -163,7 +166,8 @@ public class BgpThriftService {
                                           String esi,
                                           String macaddress,
                                           int l3label,
-                                          int l2label) {
+                                          int l2label,
+                                          af_afi afi) {
             LOGGER.debug("Route del ** {} ** {}/{} ", rd, prefix, plen);
             LOGGER.info("REMOVE: Removing Fib entry rd {} prefix {} nexthop {}", rd, prefix, nexthop);
             fibDSWriter.removeOrUpdateFibEntryFromDS(rd, prefix + "/" + plen, nexthop);
index 0129993c320edfbb7b4a3b60bb89ef493e16b4db..54d10cfd2aa3410851a7eae718b88a907d544a2d 100644 (file)
@@ -183,7 +183,8 @@ public class NatEvpnUtil {
             /* Publish to Bgp only if its an INTERNET VPN */
             if ((rd != null) && (!rd.equalsIgnoreCase(vpnName))) {
                 bgpManager.advertisePrefix(rd, null /*macAddress*/, prefix, Collections.singletonList(nextHopIp),
-                        VrfEntry.EncapType.Vxlan, NatConstants.DEFAULT_LABEL_VALUE, l3Vni, 0 /*l2vni*/, gwMacAddress);
+                        VrfEntry.EncapType.Vxlan, NatConstants.DEFAULT_LABEL_VALUE, l3Vni, 0 /*l2vni*/,
+                        gwMacAddress);
             }
             LOG.info("NAT Service : ADD: Added Fib entry rd {} prefix {} nextHop {} l3Vni {}", rd, prefix,
                         nextHopIp, l3Vni);
index 1195fa830f3746866e2bf3e037311b9894e3d788..a40adc38f246cd9e1e16cc0eb71084670529601e 100644 (file)
@@ -679,7 +679,8 @@ public class NatUtil {
             if (rd != null && !rd.equalsIgnoreCase(vpnName)) {
             /* Publish to Bgp only if its an INTERNET VPN */
                 bgpManager.advertisePrefix(rd, null /*macAddress*/, prefix, Collections.singletonList(nextHopIp),
-                        VrfEntry.EncapType.Mplsgre, (int) label, 0 /*l3vni*/, 0 /*l2vni*/, null /*gatewayMac*/);
+                        VrfEntry.EncapType.Mplsgre, (int) label, 0 /*l3vni*/, 0 /*l2vni*/,
+                        null /*gatewayMac*/);
             }
             LOG.info("NAT Service : ADD: Added Fib entry rd {} prefix {} nextHop {} label {}", rd,
                     prefix, nextHopIp, label);
index 11106fc0abf374ab323daa744eeaa553a168b58e..db6e7fb23646efceacddd30197099742abb643fa 100755 (executable)
@@ -469,7 +469,8 @@ public class VpnInterfaceManager extends AsyncDataTreeChangeListenerBase<VpnInte
                         LOG.info("VPN ADVERTISE: Adding Fib Entry rd {} prefix {} nexthop {} label {}", rd,
                                 nextHop.getIpAddress(), nextHopIp, label);
                         bgpManager.advertisePrefix(rd, nextHop.getMacAddress(), nextHop.getIpAddress(), nextHopIp,
-                                encapType, (int)label, l3vni, 0 /*l2vni*/, gatewayMac);
+                                encapType, (int)label, l3vni, 0 /*l2vni*/,
+                                gatewayMac);
                         LOG.info("VPN ADVERTISE: Added Fib Entry rd {} prefix {} nexthop {} label {}", rd,
                                 nextHop.getIpAddress(), nextHopIp, label);
                     } catch (Exception e) {
@@ -1277,7 +1278,8 @@ public class VpnInterfaceManager extends AsyncDataTreeChangeListenerBase<VpnInte
                 }
                 fibManager.removeOrUpdateFibEntry(dataBroker, primaryRd, prefix, tunnelIp, writeConfigTxn);
                 if (rd != null && !rd.equalsIgnoreCase(vpnName)) {
-                    bgpManager.withdrawPrefix(rd, prefix); // TODO: Might be needed to include nextHop here
+                    // TODO: Might be needed to include nextHop here
+                    bgpManager.withdrawPrefix(rd, prefix);
                 }
             }
             LOG.info("VPN WITHDRAW: Removed Fib Entry rd {} prefix {}", rd, prefix);
index 1a5b982e475224dd6012f020e6c1087642459d97..76684020a932058012ae2adbe66117782ee67ad4 100644 (file)
@@ -672,6 +672,7 @@ public class VpnSubnetRouteHandler {
             //already exist
             long label = 0;
             long l3vni = 0;
+
             VrfEntry.EncapType encapType =  VpnUtil.getEncapType(VpnUtil.isL3VpnOverVxLan(l3vni));
             if (encapType.equals(VrfEntry.EncapType.Vxlan)) {
                 l3vni = subOpBuilder.getL3vni();
index eb90245285bdbf411e8b33e9f8dd08f56da2a6c0..af8cf620b2f889e4d9b5b112c03d2cc9fb806e30 100755 (executable)
@@ -413,6 +413,7 @@ public class InterVpnLinkUtil {
         LOG.debug("advertising IVpnLink route to BGP:  vpnRd={}, prefix={}, label={}, nexthops={}",
             vpnRd, destination, label, nexthopList);
         bgpManager.advertisePrefix(vpnRd, null /*macAddress*/, destination, nexthopList,
-                VrfEntry.EncapType.Mplsgre, label, 0 /*l3vni*/, 0 /*l2vni*/, null /*gatewayMacAddress*/);
+                VrfEntry.EncapType.Mplsgre, label, 0 /*l3vni*/, 0 /*l2vni*/,
+                null /*gatewayMacAddress*/);
     }
 }