Disable to create duplicate (with same IP Address) PCEP sessions. 41/13541/8
authorMilos Fabian <milfabia@cisco.com>
Wed, 10 Dec 2014 15:21:54 +0000 (16:21 +0100)
committerDana Kutenicsova <dkutenic@cisco.com>
Fri, 12 Dec 2014 14:07:46 +0000 (14:07 +0000)
commitc8a9576a21d1d3a4ea34c37f8accf710c50750b0
tree12bce0b0861948a20c86d66b5d10aae24ea0295d
parentc3aadd1f5006b0c477396039a873dd2b03e66741
Disable to create duplicate (with same IP Address) PCEP sessions.

Session ref. entries stored in bi-map were identifed by byte array (raw IP Address of client),
casuing that already existing session in bi-map were not look-up properly => allowing to create duplicate sessions.
Changed type of bi-map's key to wrapper of byte array.

Fixed also removing of session refs. from map on channel close. Turned bi-map to map, since inverse map is not used anymore.

pcc-mock is reusing this code - need to create session negotiator factory per pcc.

Change-Id: I85670b083b6ea832f8b9a4891c812845174f03ff
Signed-off-by: Milos Fabian <milfabia@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/AbstractPCEPSessionNegotiatorFactory.java
pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPDispatcherImplTest.java
pcep/pcc-mock/src/main/java/org/opendaylight/protocol/pcep/pcc/mock/Main.java
pcep/pcc-mock/src/test/java/org/opendaylight/protocol/pcep/pcc/mock/PCCMockTest.java