- final int restartTime = advertisedGracefulRestartCapability.getRestartTime();
- setAfiSafiGracefulRestartState(restartTime, false, restartingLocally);
+ setAfiSafiGracefulRestartState(advertisedGracefulRestartCapability.getRestartTime().toJava(), false,
+ restartingLocally);
+
+ final Map<TablesKey, Integer> llTablesReceived;
+ if (advertisedLLTables != null) {
+ llTablesReceived = new HashMap<>();
+ for (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.mp
+ .capabilities.ll.graceful.restart.capability.Tables table : advertisedLLTables) {
+ llTablesReceived.put(new TablesKey(table.getAfi(), table.getSafi()),
+ table.getLongLivedStaleTime().getValue().intValue());
+ }
+ } else {
+ llTablesReceived = Collections.emptyMap();
+ }
+ setAdvertizedLlGracefulRestartTableTypes(llTablesReceived);
+
+ if (!llTablesReceived.isEmpty()) {
+ llgrSupport = true;
+ // FIXME: propagate preserved tables
+ } else {
+ // FIXME: clear preserved tables
+ llgrSupport = false;
+ }
+