bgpcep.git
8 years agoBug-2802: BGP Update message serialization bug 30/22830/2
Milos Fabian [Wed, 17 Jun 2015 15:55:07 +0000 (17:55 +0200)]
Bug-2802: BGP Update message serialization bug

The next-hop value from MP reach attribute is not stored in AdjRibIn,
thus next-hop is missing in output Update message.
Copy next-hop value from MP reach to next hop attribute to keep it in DS.

Change-Id: I866af30ecc2cd0baa0ca1ca2f763dc03176ac009
Signed-off-by: Milos Fabian <milfabia@cisco.com>
(cherry picked from commit 7505f0031b58a178994ed90e12d0a7bb111ae8e1)

8 years agoRemoved duplicate logging from message parsers. 79/22979/4
Dana Kutenicsova [Fri, 19 Jun 2015 09:47:20 +0000 (11:47 +0200)]
Removed duplicate logging from message parsers.

Message hex dumps are already printed out via Encoder/Decoder
classes, no need to print them in here as well.

Unified log messages and renamed some variables to make
code more readable.

Change-Id: I9bdcfed891ee1175d28ba1b993f1f22c9774da3e
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
8 years agoBGPCEP Tests 29/23029/2
Claudio D. Gasparini [Wed, 17 Jun 2015 11:11:38 +0000 (13:11 +0200)]
BGPCEP Tests

PCEPExtensionProviderContextTest
LinkstateRIBSupportTest
FlowspecModuleTest

Change-Id: Ieec83b4dec1b010355a1001cf0f5adda4094c524
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
(cherry picked from commit bfb96610200e708c010048c4ffde17c98e97000e)

8 years agoAdded a bit more tests for correctness and code coverage. 91/22891/2
Dana Kutenicsova [Thu, 18 Jun 2015 14:23:40 +0000 (16:23 +0200)]
Added a bit more tests for correctness and code coverage.

Change-Id: I21f1497279d4b297b533b5dc0872b545e594b11a
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
8 years agoBUG-3362 : improved tests for application peer 89/22989/2
Dana Kutenicsova [Mon, 15 Jun 2015 21:53:38 +0000 (23:53 +0200)]
BUG-3362 : improved tests for application peer

Change-Id: I7fd771d534b1950ff08b47e7126009d8d3afe768
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
(cherry picked from commit 9fee7709aee0234aa264f8d38bd3127957872cc0)

8 years agoRibSupportUtils Unit Test 64/22864/4
Iveta Halanova [Thu, 18 Jun 2015 09:20:02 +0000 (11:20 +0200)]
RibSupportUtils Unit Test

Change-Id: I520fea6782847f3c29ffbfb520f133944613aa99
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
8 years agoUnit test: PCCEndPointIpv4ObjectParser 83/22883/4
Iveta Halanova [Thu, 18 Jun 2015 13:07:07 +0000 (15:07 +0200)]
Unit test: PCCEndPointIpv4ObjectParser

Test coverage from 5.6% to 100%

Change-Id: I33855fba9d89d30cfaef9cec325020833d4a41e7
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
8 years agoUnit test: MultiProtocolCapabilityHandler 89/22889/5
Iveta Halanova [Thu, 18 Jun 2015 14:13:10 +0000 (16:13 +0200)]
Unit test: MultiProtocolCapabilityHandler

from 19.5% to 100% test coverage

Change-Id: I3b7ff5e31ef2c2bd33561366902f3d87fc40e531
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
8 years agoUnit test for Ipv4NlriParser 54/22754/4
Iveta Halanova [Wed, 17 Jun 2015 05:26:38 +0000 (07:26 +0200)]
Unit test for Ipv4NlriParser

created Ipv4NlriParserTest
correction of:
- check of nlri instance type
- serialize nlri in <length, prefix> order

Change-Id: I00c06b352aabe4eb94a492c737377ec1efefec99
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
8 years agoTest - PCEPDispatcherImpl : customizeBootstrap method 84/22784/8
Iveta Halanova [Wed, 17 Jun 2015 12:30:24 +0000 (14:30 +0200)]
Test - PCEPDispatcherImpl : customizeBootstrap method

Change-Id: Ifc2dab2ca522f53de81c31ffe0c3464ab065cef1
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
8 years agoBUG-3768 : fixed AdjRibsOutWriter 73/22773/1
Dana Kutenicsova [Wed, 17 Jun 2015 08:38:47 +0000 (10:38 +0200)]
BUG-3768 : fixed AdjRibsOutWriter

Added peerId to list of arguments for this writer
and limited listening to AdjRibsOut only for that
particular peer.

Fixed switched arguments for creating Mp_Reach and Mp_Unreach.

Change-Id: If1f3c576395d68aa3c26d2e4fabd696a4bf14457
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
(cherry picked from commit 8bf877875bc2038063008ffd2d99e67591db73ba)

8 years agoBUG-3664: make sure the transaction is committed 72/22772/1
Robert Varga [Mon, 15 Jun 2015 20:54:22 +0000 (22:54 +0200)]
BUG-3664: make sure the transaction is committed

Even in face of error, do not leave a transaction hanging, but rather
commit it with an error-level message logged beforehand.

Change-Id: I211caa7cae954d76e9a47021afcb466f8e7e6004
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 410d7ba6265f74c8180bf63ede523c30093e20e9)

8 years agoRemoved the rest of old BGP-RIB classes. 18/22718/2
Dana Kutenicsova [Tue, 16 Jun 2015 18:20:51 +0000 (20:20 +0200)]
Removed the rest of old BGP-RIB classes.

Change-Id: Ia849ec2ee2332b957f816b4691d5fd45dd1a2942
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
8 years agoBug 3044 - Conversion from Flowspec BI -> BA 22/22622/5
Ladislav Borak [Mon, 15 Jun 2015 15:26:21 +0000 (17:26 +0200)]
Bug 3044 - Conversion from Flowspec BI -> BA

Added support to convert flowspec type in BI to the BA.

Change-Id: I780cab9e3a2fb6c8acc4fdab6572057d76f63432
Signed-off-by: Ladislav Borak <lborak@cisco.com>
8 years agoBUG-3664 Fix NPE caused by null AbstractRouteEntry 95/22695/1
Claudio D. Gasparini [Mon, 15 Jun 2015 13:35:44 +0000 (15:35 +0200)]
BUG-3664 Fix NPE caused by null AbstractRouteEntry

When we tried to get effectiveAttributes from an AbstractRouteEntry
which is null will cause a NPE, since it doesnt contain any attribute.
Fix by check this case.

Change-Id: I311743a165373ee2da4bd4f73e2d468023e445ad
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
(cherry picked from commit 902ea39154b62c25659967493a0130f1bed9a5bc)

8 years agoBug-3204: If no LSP Identifiers TLV is present in PCRpt message updateLsp in DS throw... 75/22675/1
Milos Fabian [Mon, 15 Jun 2015 09:04:03 +0000 (11:04 +0200)]
Bug-3204: If no LSP Identifiers TLV is present in PCRpt message updateLsp in DS throws exception

-handle report message including non-RSVP-TE payload and no LSP Identifier TLV
-in this case use PLSP-ID value as a path identifier in PCEP topology

Change-Id: If1f5716ce0dfaa635028bb4e956ea8595d7b3e34
Signed-off-by: Milos Fabian <milfabia@cisco.com>
8 years agoBgpTableType: toString() 31/22331/7
Iveta Halanova [Thu, 11 Jun 2015 07:15:47 +0000 (09:15 +0200)]
BgpTableType: toString()

added toString method into BGPTableTypeImplModule $ AutoCloseableBgpTableType
changed toString in BgpTableTypeImpl

Change-Id: Idf122147522718ec98080d9e81d38bd7c17d9e93
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
8 years agoFix delete case in EffRibIn. 72/22172/8
Iveta Halanova [Wed, 10 Jun 2015 09:00:39 +0000 (11:00 +0200)]
Fix delete case in EffRibIn.

Delete case was pushed with wrong InstanceIdentifier.

Change-Id: I3e57f5f0b7915bcd290d4b2e851bbb388a092eb4
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
(cherry picked from commit 34ccd897e1384038c9e8a5cf8e270cd12b4c3199)

8 years agoBUG-3347 : fix receiving updates only on first route 65/22465/3
Dana Kutenicsova [Wed, 10 Jun 2015 13:42:00 +0000 (15:42 +0200)]
BUG-3347 : fix receiving updates only on first route

This was due to calling clear before each write into AdjRibsOut.
Create tables in AdjRibsOut beforehand, so we don't have to take
care about it when a route comes.

Change-Id: I442f9cb2bda715e57fc1c453a81caf13265980cd
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
(cherry picked from commit dc9c5f40dea1243dc044acc73904d3944809c10b)

8 years agoBUG-3300 : Fixed BGP transitive attribute filtering 63/22463/1
Claudio D. Gasparini [Thu, 11 Jun 2015 12:56:32 +0000 (14:56 +0200)]
BUG-3300 : Fixed BGP transitive attribute filtering

Namespace in AttributeOperation were hardcode therefore any transitive
attribute with different namespace(inet..) were not valid, reason why
FromExternalImportPolicy did not return any attribute, causing a NPE.
Fixed them by matching extension QName to corresponding Attribute.

Change-Id: Ic3ccf5eb0b1d181baaf8ea5b6dea6f84828b92a4
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
(cherry picked from commit 1114255dc1be6586cef529178e1b1b3078f15b71)

8 years agoRevert "BUG-3347 : fix receiving updates only on first route" 57/22457/1
Dana Kutenicsova [Fri, 12 Jun 2015 11:43:39 +0000 (11:43 +0000)]
Revert "BUG-3347 : fix receiving updates only on first route"

This reverts commit 0025391f847840fc6e89bcb6193695bc34f44d5f.

Change-Id: I6f690cddb114a3832301f855b281769e66f79b96
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
8 years agoBUG-3347 : fix receiving updates only on first route 51/22451/1
Iveta Halanova [Fri, 12 Jun 2015 10:17:51 +0000 (12:17 +0200)]
BUG-3347 : fix receiving updates only on first route

This was due to calling clear before each write into AdjRibsOut.
Create tables in AdjRibsOut beforehand, so we don't have to take
care about it when a route comes.

Change-Id: I8679399a50b54d83d5432c7b75aadd9e1c7ea928
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
(cherry-picked from dc9c5f40dea1243dc044acc73904d3944809c10b)

8 years agoCache UnrecognizedAttributes 42/22442/2
Robert Varga [Thu, 11 Jun 2015 05:22:59 +0000 (07:22 +0200)]
Cache UnrecognizedAttributes

UnrecognizedAttributes is typically empty, so we can reuse it widely.

Change-Id: Ifff9a45335e6a0ffaf07db789e9d36394ff61301
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 0efe3c646ac46ed0855754ec627ead7b061ed297)

8 years agoCache IPv4/IPv6 nexthops 43/22443/1
Robert Varga [Thu, 11 Jun 2015 18:24:27 +0000 (20:24 +0200)]
Cache IPv4/IPv6 nexthops

Next hop values are readily reused, so cache them to share instances.

Change-Id: Ib946a82d950c51644bea3cbc394d536e76663c6e
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoFix EffectiveRibInWriter overwriting the entire route table 63/22363/2
Iveta Halanova [Thu, 11 Jun 2015 13:36:28 +0000 (15:36 +0200)]
Fix EffectiveRibInWriter overwriting the entire route table

The fall-through in SUBTREE_MODIFIED case means that for any new write we
replace the entire route table, which has the effect of LocRib having to
run route selection even on routes which have not changed.

Fix this by removing the fall-through and deal with individual routes as appropriate.

Change-Id: I1297afc878d3d8bf9d0c0f461244cc4414f1caa1
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
(cherry picked from commit 1d6e02186ac85eff5734db59d3cbf5017214ddce)

8 years agoFix confusing peer AS message 64/22264/2
Robert Varga [Tue, 9 Jun 2015 20:30:19 +0000 (22:30 +0200)]
Fix confusing peer AS message

We printed the expected number in place of what the peer sent and vice
versa, confusing users. Fix that.

Change-Id: I874a25598818e58f4a05a10a977724b0cc853140
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit bcaeb7773976be48a2a8f52dd9fdf33e66d333a6)

8 years agoLower tracing overhead 26/22326/2
Robert Varga [Tue, 9 Jun 2015 23:38:42 +0000 (01:38 +0200)]
Lower tracing overhead

Arrays.toString() and ByteBufUtil.hexDump() are expensive relative to an
disabled trace call. Guard the corresponding trace() calls with
LOG.isTraceEnabled(). Discovered in BGP performance traces to have some
4% overhead.

Change-Id: I94ce9b57b86bae9be35e5839447a19b268064469
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoRemove LocRibWriter registration on close() 27/22327/1
Robert Varga [Wed, 10 Jun 2015 18:23:25 +0000 (20:23 +0200)]
Remove LocRibWriter registration on close()

Retain the DataTreeChangeListenerRegistration we get when we subscribe
and cancel it when we are being shut down. Also place two FIXMEs for
future work.

Change-Id: I74364473736e863e63557e8ebf652424ea312a59
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit c1206aa82aaf35f93a2b74f83dea8fd2dd5eb048)

8 years agoFix duplicate NodeIdentifier instances 23/22323/1
Robert Varga [Wed, 10 Jun 2015 08:17:11 +0000 (10:17 +0200)]
Fix duplicate NodeIdentifier instances

Memory dump has shown we have multitude of NodeIdentifiers pointing to
the prefix QName. This turns out to be the automatic completion of
missing key leaves. Fix the caller to set the leaf up correctly, thus
sharing the NodeIdentifier instance.

Change-Id: I5fb563a9048f4d48c2a2c5b96b8b9bfd08b867f6
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 390fbfa3f810ad278d3c55a256bd1deea2ac1bb0)

8 years agoBGP.parser.impl.messages: minor changes 60/22160/4
Iveta Halanova [Tue, 9 Jun 2015 08:18:05 +0000 (10:18 +0200)]
BGP.parser.impl.messages: minor changes

KeepaliveMsgParser - made final
NotifyMsgParser:
- Log just-built ByteBuf
- Reordered line - getData()
OpenMsgParser - log just-built ByteBuf
UpdateMsgParser - made final

Change-Id: I09283ee4505dfa5f8c747d7bfc12fc6a701efa96
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
8 years agoBGPServerSessionNegotiator: Use the correct AS number 88/22188/1
Vratko Polak [Thu, 4 Jun 2015 16:28:10 +0000 (18:28 +0200)]
BGPServerSessionNegotiator: Use the correct AS number

Before: toLong() on 2-octet value could result in AS_TRANS.
After: AsNumberUtil.advertizedAsNumber gives the correct 4-octet value.

Change-Id: I46b2a4baa25029b872e9b52c98823ee2b7f956bf
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit f4c914b9aaac0fea02a98ff4c67725686b0f2097)

8 years agoBUG-3348 : fixed Export Policy 66/22066/2
Dana Kutenicsova [Tue, 2 Jun 2015 13:52:23 +0000 (15:52 +0200)]
BUG-3348 : fixed Export Policy

Export policy located in LocRib was not informed
about peer change, therefore it didn't create any
groups. As a result, none of the routes could be
propagated to other peers. Change the LocRib to
listen to the same path as Effective RIB to obtain
also peer role changes.

Change-Id: Ic55cbba03952fbdcf7f63b76d159502c9af733b0
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
(cherry picked from commit d9a3fe3f83d3ca7bccdb543e02249a0c88a3fa95)

8 years agoBUG-3348 : fixed application peer 50/22150/3
Ladislav Borak [Fri, 29 May 2015 07:25:11 +0000 (09:25 +0200)]
BUG-3348 : fixed application peer

By moving ipv4routes to inet, the namespaces in BestPathState
are no longer valid. Fixed them by matching extension QName
to BestPathState.

Change-Id: I9f09e92645fafc0d722109f10e06eb5bbaf17e37
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 695fae9adf96b34c6b94d41b9fb90e8bada91869)

8 years agoMake OffsetMap enforce access limit 51/22151/2
Robert Varga [Mon, 8 Jun 2015 19:08:31 +0000 (21:08 +0200)]
Make OffsetMap enforce access limit

getValue()/setValue() should ensure that the offset used is covered by
associated routerIds. Also fixes wrong format strings.

Change-Id: I4fafea959bc550e0bf9a2ec048c35ae63c255235
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 314664ba879180383f7b70d9b51906cdfa194aa3)

8 years agoMake methods static 58/22158/1
Dana Kutenicsova [Tue, 9 Jun 2015 07:03:09 +0000 (09:03 +0200)]
Make methods static

Some methods do not touch object state and can be made static. Turn them
into statics for better performance.

Change-Id: Ib561b6f5d0845261370ea28d6428262df887943f
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
(cherry picked from commit fc38e78649a09a058450dfcfd02ee48a39aa35f3)

8 years agoBug 3577 - Message decoder fails to decode "all IP addresses match this update" 79/21979/4
Ladislav Borak [Fri, 5 Jun 2015 12:35:45 +0000 (14:35 +0200)]
Bug 3577 - Message decoder fails to decode "all IP addresses match this update"

Added support to parse and serialize "default route" prefix in Ipv4Util and Ipv6Util.

Change-Id: Ibd84cad5864beb71112f72ac727ff7a65079efcf
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoMake deeper comparison for best path selection. 11/21811/2
Dana Kutenicsova [Wed, 3 Jun 2015 11:30:30 +0000 (13:30 +0200)]
Make deeper comparison for best path selection.

Superficial equals caused best path states to never equal,
even if they should. This resulted in more writes to LocRib,
as all paths were new.

Change-Id: Ie1b694acdddac2bd617bc1086dc63c8c8eef049d
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
(cherry picked from commit 0b08aa6f69c334f3c3e51bbb71e2605678316c1a)

9 years agoBUG-3593 : fixed error installing odl-bgpcep-bgp-all 73/21973/1
Dana Kutenicsova [Fri, 5 Jun 2015 11:53:09 +0000 (13:53 +0200)]
BUG-3593 : fixed error installing odl-bgpcep-bgp-all

Renamed dependencies feature to be unique in features list.

Change-Id: I217bb6a5ddf976e59900e62c3ce091a9e44aaca6
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoBGPMock fix 57/21757/2
Iveta Halanova [Wed, 3 Jun 2015 12:16:19 +0000 (14:16 +0200)]
BGPMock fix

List iterator fix in isMessageListSame()

Change-Id: I1a792107f05c7091e8b4ab7534c911c5404e4278
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
9 years agoReuse child NodeIdentifier 90/21790/2
Robert Varga [Wed, 3 Jun 2015 12:46:18 +0000 (14:46 +0200)]
Reuse child NodeIdentifier

We effectively create two YangInstanceIdentifiers for the same thing,
except for routes we end up creating a different instance of
NodeIdentifier, which forces a slower comparison. Reuse the same
identifier, lowring memory pressure and increasing performance slightly.

Change-Id: I80e8ffa89737476040727f45a8b90bd157527955
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 6416127e56a0fc0f2645823e082a4eaa39142a28)

9 years agoAdd performance fixmes 89/21789/2
Robert Varga [Wed, 3 Jun 2015 12:57:29 +0000 (14:57 +0200)]
Add performance fixmes

We could do with a cache in two strategic places, mark them.

Change-Id: I20a9e98d85740107413afad54b391d1bda990672
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 6ae16a4a9f737151a4209f1d13ee57e2b9babb49)

9 years agoCache QNames obtained from binding classes 88/21788/1
Robert Varga [Wed, 3 Jun 2015 09:30:32 +0000 (11:30 +0200)]
Cache QNames obtained from binding classes

Traces indicate we have a rogue QNameModule coming from this path, make
sure to squash it to a cached one.

Change-Id: I80f72ae0d4b80f35edc97060734fcc8df9c028c0
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 9d9038bca661edf88e1aae971b4c6883983cfb47)

9 years agoUnit test bgp-rib-impl 52/21752/3
Iveta Halanova [Wed, 3 Jun 2015 08:08:41 +0000 (10:08 +0200)]
Unit test bgp-rib-impl

Expanded existing test. Added tests for session preferences

Change-Id: I1326d5d34c768ddb063dc4a2324acb07849a0681
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
9 years agoBUG-3419 : fix calling get() on Absent value 89/21389/3
Dana Kutenicsova [Fri, 29 May 2015 07:09:10 +0000 (09:09 +0200)]
BUG-3419 : fix calling get() on Absent value

When BGP shuts down, LocRIB receives and uptodate
change with no data attached causing an Exception.
Fix this by checking existence of the data.

Change-Id: Ibe1aeb8e7f02136be2c83be516e47833c1d8146a
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agopcep.impl.messages fix 15/21615/3
Iveta Halanova [Tue, 2 Jun 2015 08:30:18 +0000 (10:30 +0200)]
pcep.impl.messages fix

Fix of last merged commit faults in this package.
PCEPErrorMessageParser - reordered switch cases in order to return original functionality.
PCEPReplyMessageParser - BANDWIDTH_IN return value fix; extraction of one more switch

Change-Id: I7165fc1810abb1c79fab8f30a36130e4a44c740f
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
9 years agoComplexity issue: pcep.ietf.stateful07 16/21416/8
Iveta Halanova [Fri, 29 May 2015 13:59:08 +0000 (15:59 +0200)]
Complexity issue: pcep.ietf.stateful07

Switch extractions into private methods named insertObject

Change-Id: If9a04556097447d049c94054921afafcb3b66f47
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
9 years agoBug-3075: BMP messages yang model 31/20231/16
Milos Fabian [Sat, 23 May 2015 20:01:55 +0000 (22:01 +0200)]
Bug-3075: BMP messages yang model

-created yang model reprsenting BMP v3 messages
-ref.: https://tools.ietf.org/html/draft-ietf-grow-bmp-07

Change-Id: I2ef8b52d12f397c95bb69781c7bb4af0f4477bb2
Signed-off-by: Milos Fabian <milfabia@cisco.com>
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
9 years agoComplexity issue: pcep.impl.messages 96/21396/9
Iveta Halanova [Fri, 29 May 2015 11:06:15 +0000 (13:06 +0200)]
Complexity issue: pcep.impl.messages

Switch extractions into private methods named insertObject

Change-Id: I1ad50fed7370290b4a2c3ec15cefac3bb156d797
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
9 years agoBUG-3419 : fix shutdown of modules 42/21342/2
Dana Kutenicsova [Thu, 28 May 2015 15:54:04 +0000 (17:54 +0200)]
BUG-3419 : fix shutdown of modules

Turns out each extension when it's closed calls
stop() on their Activators. This nulls registration
list. But when the Activator itself is shut down,
it also calls its stop() method invoking an
IllegalStateException.

Change-Id: I3887cc687489e9e441224265f0e85baf6928aaee
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoBUG-2453 Replace enums in initial configs with proper value 39/21039/2
Maros Marsalek [Tue, 12 May 2015 14:55:33 +0000 (16:55 +0200)]
BUG-2453 Replace enums in initial configs with proper value

Proper value means value defined in yang, not in generated binding classes.

Change-Id: I1f9175a4d472b92c4795d8200e60e9ca6c0ad447
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
(cherry picked from commit ac987bdab12b1ed1657179570542c0d6aa15eb33)

9 years agoSonar method complexity issue 04/21204/4
Iveta Halanova [Wed, 27 May 2015 12:57:17 +0000 (14:57 +0200)]
Sonar method complexity issue

Method: checkDependencies
Extracted two for cycles into another private methods.

Change-Id: Ie9e5e9cfce85a2280c09d7fd3cb7a70bb4751b90
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
9 years agoSonar method complexity issue 93/21193/2
Iveta Halanova [Wed, 27 May 2015 11:28:38 +0000 (13:28 +0200)]
Sonar method complexity issue

Method: validateMonitoringMetrics
Extracted switch into private method insertObject

Change-Id: I3d129957dc245e4e3a117f10c0177cb1a1be8f99
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
9 years agoSonar issue fix 16/21116/10
Iveta Halanova [Wed, 27 May 2015 09:50:06 +0000 (11:50 +0200)]
Sonar issue fix

Simplified methods in:
- Stateful07TopologySessionListener.java
-- onMessage method. Code extraction into private methods. Complexity decreased
-- ensureLspOperational method. Extracted last-return's code. Complexity decreased

Change-Id: I34e9826f95ec0e095e63b426c6aa8a4e07dc0068
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
9 years agoUpdate of Unit test 52/21052/2
Iveta Halanova [Mon, 25 May 2015 13:38:27 +0000 (15:38 +0200)]
Update of Unit test

Added tests for updating values of different classes.
(note: MultiRegistry.java from 85% to 96.7% coverage)

Change-Id: I4316ec15d8dc3551e200c204aa1e52741136cec8
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
9 years agoBUG-3186 : fixed MPReachCodec not found 94/20994/3
Dana Kutenicsova [Fri, 22 May 2015 14:06:32 +0000 (16:06 +0200)]
BUG-3186 : fixed MPReachCodec not found

Turns out, one import problem can cause the whole
codec hierarchy to fail. Also make sure we can
troubleshoot such bugs easier in the future by
catching Exceptions from codec creation per RIB.

Change-Id: I675b70f6b8079d2a5a2eb7ded64be76d16f9e468
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoSonar issue fix 34/21034/5
Iveta Halanova [Mon, 25 May 2015 06:10:02 +0000 (08:10 +0200)]
Sonar issue fix

Extracted parts of code into another private methods in order to
decrease complexity.

Change-Id: I53363643ceecd70579f82dc2a829e043fcaf8d41
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
9 years agofixed sonar issue 43/20943/6
Iveta Halanova [Fri, 22 May 2015 09:35:23 +0000 (11:35 +0200)]
fixed sonar issue

Extracted parts of serializeCapability method into private
methods to decrease method complexity.

Change-Id: I6b0810e48b525f7fa8b6f00ec2be2aee2aab6a25
Signed-off-by: Iveta Halanova <iveta.halanova@pantheon.sk>
9 years agoBUG-3225 : fix NPE 74/20874/2
Dana Kutenicsova [Wed, 20 May 2015 09:36:04 +0000 (11:36 +0200)]
BUG-3225 : fix NPE

Import policy requested by Effective RIB has yet to be put in policy database,
therefore the NPE occurred. Switched off listening for peer-role changes itself,
the change is now checked in Effective RIB. Since we are listening to a different
subtree, the handling in Effective RIB needed to be changed accordingly.

Change-Id: I0df6cf2234a27d99445af07dd47c9039a0418cb4
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
(cherry picked from commit 40aa438dc57d452f866fcf6c32b59a8a2d9f14e1)

9 years agoBUG-3252 : added a check for augmented transitive attributes. 47/20647/4
Dana Kutenicsova [Mon, 18 May 2015 13:04:55 +0000 (15:04 +0200)]
BUG-3252 : added a check for augmented transitive attributes.

Change-Id: I6e8636cec435da937ddabd78f7f5bcaa5edb2a89
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoBUG-3043 : fix for transaction closed exception 49/20249/2
Dana Kutenicsova [Wed, 13 May 2015 12:44:39 +0000 (14:44 +0200)]
BUG-3043 : fix for transaction closed exception

When the peer got session down, transaction chain
was closed. This caused problems, when the peer
reconnected.
Moved closing of transaction chaining to when the
peer closes.

Change-Id: I7da35d7e0a2238f38b5a549e9848b418d467d27a
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoBug 3198 - Extract BGP messages content into groupings 54/20254/1
Ladislav Borak [Wed, 13 May 2015 11:28:24 +0000 (13:28 +0200)]
Bug 3198 - Extract BGP messages content into groupings

- updated notification messages to be reusable

Change-Id: I0045ba18b618e7b3c4b441ae6ef6074acc25f1c5
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoBug 3117 - Capability Parameter Parse Issue 87/19787/12
Claudio D. Gasparini [Wed, 6 May 2015 12:42:07 +0000 (14:42 +0200)]
Bug 3117 - Capability Parameter Parse Issue

Change-Id: Iaa4e142b3387dc89778aba80fe8af34d72338bb7
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
9 years agoBUG-3074 : set initial uptodate state in LocRib to true 30/20130/2
Dana Kutenicsova [Tue, 12 May 2015 13:23:03 +0000 (15:23 +0200)]
BUG-3074 : set initial uptodate state in LocRib to true

Uptodate state was missing entirely from tables that
were not advertised by peer. This commit inserts the field
and sets it to true to inform the user, that there won't
be any more routes added to the table.

Change-Id: I539d3a9df388c476748c5009d945f7ad2eef792e
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoFixed some sonar issues: 49/19749/3
Ladislav Borak [Wed, 6 May 2015 18:40:54 +0000 (20:40 +0200)]
Fixed some sonar issues:

- magic numbers

Change-Id: I12ab7953d671a63807716940c2e54462fca82a7a
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoRefactored anonymous classes that were too long. 75/19975/2
Dana Kutenicsova [Sat, 9 May 2015 19:19:00 +0000 (21:19 +0200)]
Refactored anonymous classes that were too long.

Extracted parts of long methods to separate private
method.

Change-Id: I29db5e2e940385f735a037434564b0069da9a2d6
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoDeprecate stateful02 topology provider. 70/19970/2
Dana Kutenicsova [Sat, 9 May 2015 16:18:26 +0000 (18:18 +0200)]
Deprecate stateful02 topology provider.

In addition to deprecating stateful02 module.

Change-Id: I184876dd8eb0cae01765c6c1adb0b70425ae579a
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoFixed minor sonar warnings. 68/19968/1
Dana Kutenicsova [Sat, 9 May 2015 16:07:55 +0000 (18:07 +0200)]
Fixed minor sonar warnings.

Change-Id: Ib22579656e688a81011fc6b5761a20743ca44446
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoBUG 3094, Check AS number 76/19576/8
Claudio D. Gasparini [Tue, 5 May 2015 08:33:11 +0000 (10:33 +0200)]
BUG 3094, Check AS number

Change-Id: I345a3c5c2cb4a496b45e87aa11d1c752c39bc75c
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
9 years agoMake sure we close read-only transactions 86/19786/2
Robert Varga [Thu, 7 May 2015 09:45:32 +0000 (11:45 +0200)]
Make sure we close read-only transactions

Transactions are resources, so they should be closed when no longer in
use.

Change-Id: I45a8a89f56b61cb12addbdb3349ab408c8aa14ed
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unneeded MERGE modification type 73/19773/4
Robert Varga [Thu, 7 May 2015 08:05:37 +0000 (10:05 +0200)]
Remove unneeded MERGE modification type

This modification type is never generated, so eliminate the todos and
warnings stemming from the use of deprecated value. Default statement
will still catch/warn about it.

Change-Id: I3eb26a14d50e3428b5c10c34f39d3d1e3ebb12d5
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2383: cache effective attributes in import 79/19779/4
Robert Varga [Thu, 7 May 2015 08:26:12 +0000 (10:26 +0200)]
BUG-2383: cache effective attributes in import

This patch introduces a simple identity cache decorator around
AbstractImportPolicy. It is then used by ImportPolicyPeerTracker and
EffectiveRibInWriter to make sure we do not needlessly explode
attribute objects. This would typically happen when we receive multiple
routes within a single message and the import policy modifies the
attributes -- leading to a per-route attribute object.

Change-Id: I8581df3e3a2aae07a16d44f2554026afbad264fd
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-3074 : propagate up-to-date attribute 01/19701/3
Dana Kutenicsova [Wed, 6 May 2015 11:41:53 +0000 (13:41 +0200)]
BUG-3074 : propagate up-to-date attribute

Added a method to BGPPeer that will notify the
peer that the synchronization for a table is finished.
Peer than pushes this information to AdjRibsIn from
where it's propagated to other types of RIB.

Change-Id: Idb7ad21b136b03fb2ded1bf3fe720319298555a0
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoBug 3012 - Refactor linkstate serializeNlri methods 47/18647/9
Ladislav Borak [Wed, 6 May 2015 16:41:12 +0000 (18:41 +0200)]
Bug 3012 - Refactor linkstate serializeNlri methods

- refactoring serialization methods

Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Change-Id: I4ebb92104c487b93df8477c1acd2ca731d148caf

9 years agoFixed some sonar issues 34/19634/1
Ladislav Borak [Tue, 5 May 2015 15:24:22 +0000 (17:24 +0200)]
Fixed some sonar issues

- local variables should not shadow classfields

Change-Id: I10ce99bb4317f846fa3f1984a34a38a2f6b9b831
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoBug 3106 - Untangle directories 32/19632/1
Ladislav Borak [Tue, 5 May 2015 12:41:28 +0000 (14:41 +0200)]
Bug 3106 - Untangle directories

- Util class was moved into new package to remove cycle dependecy

Change-Id: Ib49a6770b19e9a1aae31825c7505bfec406a11d5
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoMerge "Version bump."
Robert Varga [Tue, 5 May 2015 13:14:48 +0000 (13:14 +0000)]
Merge "Version bump."

9 years agoVersion bump. 00/19600/2
Dana Kutenicsova [Tue, 5 May 2015 09:28:53 +0000 (11:28 +0200)]
Version bump.

Fixed indentations. Needed for version bump.

Change-Id: I9734661b525f01064690047f29741b29f41de7be
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoDo not override odlparent properties. 27/18727/3
Tony Tkacik [Tue, 21 Apr 2015 11:33:15 +0000 (13:33 +0200)]
Do not override odlparent properties.

Change-Id: Ic784de869ba3bf7e1b756a1ddcfd449a12375378
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-3108 : deprecated PCEP stateful02 classes. 12/19512/1
Dana Kutenicsova [Mon, 4 May 2015 11:14:51 +0000 (13:14 +0200)]
BUG-3108 : deprecated PCEP stateful02 classes.

Change-Id: Icfcf38947ed5ce0f4a00e7cb63add8d610bf6d1d
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoMerge "Removed deprecated classes."
Robert Varga [Fri, 1 May 2015 17:52:11 +0000 (17:52 +0000)]
Merge "Removed deprecated classes."

9 years agoMerge "BUG-2227 : fix exporting transitive attributes"
Robert Varga [Fri, 1 May 2015 17:50:34 +0000 (17:50 +0000)]
Merge "BUG-2227 : fix exporting transitive attributes"

9 years agoMerge "BUG-2571 : created configuration for Flowspec"
Robert Varga [Fri, 1 May 2015 17:50:01 +0000 (17:50 +0000)]
Merge "BUG-2571 : created configuration for Flowspec"

9 years agoRemoved deprecated classes. 30/19430/2
Dana Kutenicsova [Fri, 1 May 2015 07:35:36 +0000 (09:35 +0200)]
Removed deprecated classes.

AdjRibIns are no longer used and needed.

Change-Id: Iaa1a2268aabc2f4404f72fb78349168885f69dfc
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoBUG-2227 : fix exporting transitive attributes 45/18845/4
Dana Kutenicsova [Thu, 30 Apr 2015 17:07:06 +0000 (19:07 +0200)]
BUG-2227 : fix exporting transitive attributes

Change-Id: Ie4edcabd949f7c11d6904dcb9190981d82df970f
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoBug 2231 - Secure transport for PCEP 30/15730/8
Milos Fabian [Mon, 27 Apr 2015 19:51:01 +0000 (21:51 +0200)]
Bug 2231 - Secure transport for PCEP

http://tools.ietf.org/html/draft-ietf-pce-pceps-03

-configurable TLS parameters (location of keystore, truststore, etc.)
-example initial configuration
-if TLS is configured, PCEPS is enabled, session negotiation starts with StartTLS msg
-StartTLSWait timer set to 60 seconds
-extended PCEP FRM to handle StartTLS

Change-Id: I4ad4ebc52187eaa58654db3ccabe484758132761
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Signed-off-by: Milos Fabian <milfabia@cisco.com>
9 years agoBUG-2571 : created configuration for Flowspec 13/18913/6
Dana Kutenicsova [Thu, 23 Apr 2015 11:23:19 +0000 (13:23 +0200)]
BUG-2571 : created configuration for Flowspec

Implemented configuration and registration for
parser and RIB for Flowspec support.

Change-Id: I46158998f4b7fb6de6c3fc018e02df2c150104dd
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoMerge "BUG-2383 : cleanup RIBImpl"
Robert Varga [Thu, 30 Apr 2015 23:40:20 +0000 (23:40 +0000)]
Merge "BUG-2383 : cleanup RIBImpl"

9 years agoBUG-2383 : cleanup RIBImpl 09/18609/7
Dana Kutenicsova [Mon, 20 Apr 2015 07:54:00 +0000 (09:54 +0200)]
BUG-2383 : cleanup RIBImpl

The creation by RIB itself and Loc-RIB was still done in
binding-aware form. This commit changes it to binding
independent and removes all the methods that are not needed
anymore.

Change-Id: I51ec54264747cff584f1ece24884d2732b39f0a2
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoImplementation for Path Binding Tlv. 16/18616/6
Dana Kutenicsova [Mon, 20 Apr 2015 12:56:24 +0000 (14:56 +0200)]
Implementation for Path Binding Tlv.

As per: https://tools.ietf.org/html/draft-sivabalan-pce-binding-label-sid

Implemented PathBindingTlv, its parser and wired
the TLV to LSP object.

Change-Id: I1803d6adca1132c88ca009417af6738759a5f443
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoFixed linkstate NLRI serializer registration. 96/19196/1
Dana Kutenicsova [Tue, 28 Apr 2015 08:10:06 +0000 (10:10 +0200)]
Fixed linkstate NLRI serializer registration.

The registered DataObject is not used in parsing, but
for creating correct MpReachNlri codec. Adding another
capability discovered this bug.

Change-Id: I626bccfee4974a5fe223b7588e77eda663d111b7
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoReordered serialization of prefix attributes. 36/19136/2
Dana Kutenicsova [Mon, 27 Apr 2015 09:16:05 +0000 (11:16 +0200)]
Reordered serialization of prefix attributes.

TLV types serialized must be in ascending order.

Change-Id: I02009ff56b857e58f2efbaa1846bf69fa1277a82
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoRemoved some sonar warnings. 91/19091/2
Dana Kutenicsova [Sat, 25 Apr 2015 17:42:29 +0000 (19:42 +0200)]
Removed some sonar warnings.

Inlcuding order of modifiers, magic numbers, unused
variables etc.

Change-Id: I4b77c48d558bbf02a3e99bb520656f133132d4f4
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoRevived Peer test. 35/19035/4
Dana Kutenicsova [Fri, 24 Apr 2015 16:58:58 +0000 (18:58 +0200)]
Revived Peer test.

First test tests onDataTreeChanged method in Application peer, second tests
the advertisement of routes from one peer to another.

Change-Id: Iee684935e67a4a9e62b4634b74858106da1734c8
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoBUG-2963 : fixed config file 36/19036/1
Dana Kutenicsova [Fri, 24 Apr 2015 17:05:33 +0000 (19:05 +0200)]
BUG-2963 : fixed config file

Change-Id: Ia7b19eb3af2afcc1cf01880c628cae455460ae2e
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoFixed missing break statements in switch. 17/19017/1
Dana Kutenicsova [Fri, 24 Apr 2015 13:31:53 +0000 (15:31 +0200)]
Fixed missing break statements in switch.

Change-Id: Ib1d895aa40976a12dbe7f6f28660ffb62dd9954d
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoBUG-2571 : created method for serializing FS NLRI to string 34/18634/8
Dana Kutenicsova [Mon, 20 Apr 2015 14:34:41 +0000 (16:34 +0200)]
BUG-2571 : created method for serializing FS NLRI to string

We will use this string key as a list key in flowspec-routes.

Change-Id: I5707e9f1ef2b999ad240af4a8e7a4d5c555aca44
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoBug 2963 - Make BGP peer role configurable 14/18614/12
Ladislav Borak [Mon, 20 Apr 2015 11:46:57 +0000 (13:46 +0200)]
Bug 2963 - Make BGP peer role configurable

- added support for BGP peer role configurable

Change-Id: I756c013538a3c10a509c48ab1b69cefac2c033da
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoMerge "Mark with FIXMEs places where manual conversion is made."
Robert Varga [Wed, 22 Apr 2015 13:57:24 +0000 (13:57 +0000)]
Merge "Mark with FIXMEs places where manual conversion is made."

9 years agoMerge "BUG-2571 : implemented (partially) conversion of Flowspec from BI to BA form"
Robert Varga [Wed, 22 Apr 2015 13:57:17 +0000 (13:57 +0000)]
Merge "BUG-2571 : implemented (partially) conversion of Flowspec from BI to BA form"

9 years agoMark with FIXMEs places where manual conversion is made. 29/18829/1
Dana Kutenicsova [Wed, 22 Apr 2015 12:08:17 +0000 (14:08 +0200)]
Mark with FIXMEs places where manual conversion is made.

Rather than making the conversion ourselves, we should rely on
the codec.

Change-Id: I9fe5cfc6251b4dab718f498fce93a0a9ec1f6b00
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>