openflowplugin.git
7 years agoMerge "Convert Functions to private methods"
Jozef Bacigal [Tue, 28 Feb 2017 18:42:22 +0000 (18:42 +0000)]
Merge "Convert Functions to private methods"

7 years agoMerge "Fix some FRM checkstyle violations"
Jozef Bacigal [Mon, 27 Feb 2017 16:56:15 +0000 (16:56 +0000)]
Merge "Fix some FRM checkstyle violations"

7 years agoMerge "Fix comparison of match extensions"
Jozef Bacigal [Mon, 27 Feb 2017 16:52:45 +0000 (16:52 +0000)]
Merge "Fix comparison of match extensions"

7 years agoConvert Functions to private methods 10/52310/1
Robert Varga [Mon, 27 Feb 2017 13:27:07 +0000 (14:27 +0100)]
Convert Functions to private methods

Using method handles allows us to eliminate explicit dependency
on Function and simplify declaration.

Change-Id: I8317fd3f37c569612b8d865a39871eb09dd30c81
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoFix some FRM checkstyle violations 89/51889/3
Robert Varga [Wed, 15 Feb 2017 09:28:26 +0000 (10:28 +0100)]
Fix some FRM checkstyle violations

- whitespace around generic arguments
- unneeded public modifiers
- line length

Change-Id: I3febf13cf3f01e043f2406b20b57f9e37a6103b4
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoFix connection closing on switch IDLE state 16/52116/4
Tomas Slusny [Tue, 21 Feb 2017 15:04:57 +0000 (16:04 +0100)]
Fix connection closing on switch IDLE state

When device is disconnected, and connection is not equal primary
connection context, do not shut down all services and just remove
this connection context.

Resolves: bug 7689

Change-Id: I3c6149a44f266b423fdc4f6396022ad4c650e872
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoBug 7736 - Forwarding Rules application cluster singleton id should not use the same... 25/52225/2
Jon Castro [Mon, 6 Feb 2017 23:35:13 +0000 (10:35 +1100)]
Bug 7736 - Forwarding Rules application cluster singleton id should not use the same cluster singleton id as the openflow switch singleton connection handler

Change-Id: Ie82b2d7d23444927375ed5b63f5e765f3277ed00
Signed-off-by: Jon Castro <castro.jon@gmail.com>
7 years agoFix comparison of match extensions 39/51839/5
Tomas Slusny [Tue, 14 Feb 2017 09:01:58 +0000 (10:01 +0100)]
Fix comparison of match extensions

Add comparison between match extension lists to MatchComparatorFactory
to treat matches with different extensions as unique.

Change-Id: Ia43322d5e3ca3ee62e8313fd1286a6a9c68f7423
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoMerge changes from topic 'ofj-models-to-ofp-models'
Jozef Bacigal [Wed, 22 Feb 2017 16:17:56 +0000 (16:17 +0000)]
Merge changes from topic 'ofj-models-to-ofp-models'

* changes:
  Add single layer deserialization support
  Fix errors in serializers and deserializers
  Add multipart reply deserializers unit tests
  Update AbstractService to support isComplete
  Add multipart reply deserializers
  Add PortMessageDeserializer
  Add MeterMessageDeserializer
  Add GroupMessageDeserializer
  Add FlowMessageDeserializer
  Add Instruction deserializers
  Add InstructionDeserializerInjector
  Add Action deserializers
  Add ActionDeserializerInjector
  Add Match entry deserializers
  Add MatchDeserializerInjector
  Add MessageDeserializerInjector
  Add PortMessageService
  Add GroupMessageService
  Add MeterMessageService
  Add FlowMessageService
  Add AbstractMessageService
  Add configuration parameter for single layer

7 years agoAdd single layer deserialization support 04/51304/35
deathbeam [Mon, 30 Jan 2017 18:16:45 +0000 (19:16 +0100)]
Add single layer deserialization support

  - Update MultiMsgCollector to support multiple reply types
  - Update DeviceContext to support mulyiple reply types
  - Update AbstractService and MultipartService* implementations
    to support multiple reply types
  - Update GroupDirectStatisticsService
  - Update FlowDirectStatisticsService
  - Update MeterDirectStatisticsService
  - Update PortDirectStatisticsService
  - Update QueueDirectStatisticsService
  - Update SalExperimenterMpMessageService
  - Update SalTableService
  - Change giant StatisticsGatheringUtils to separate statistics
    writers and add support for writing both deserialization paths
  - Refactor structure of services because of a lot of new classes
    added, it became mess
  - Create new initialization chain for device that supports both
    deserialization paths

Resolves: bug 7141

Change-Id: I21b9b894d89db220ccf20ebb031fcb9e039b184a
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoFix errors in serializers and deserializers 79/51579/13
Tomas Slusny [Wed, 8 Feb 2017 19:14:02 +0000 (20:14 +0100)]
Fix errors in serializers and deserializers

Fixed issues with deserializing missing multipart table features,
flows and unsigned longs.
Fixed issues when serializing Ipv4 and Ipv6 source and destination
match entries.
Added additional safety checks to match entry deserializers.

See also: bug 7139, bug 7141

Change-Id: Ie93a486aa847fdb39f01d24768f259cc4661fcad
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoBug 7811 - Conntrack Action deserialization - IndexOutOfBoundsException 26/52026/1
Aswin Suryanarayanan [Sat, 18 Feb 2017 08:19:10 +0000 (13:49 +0530)]
Bug 7811 - Conntrack Action deserialization - IndexOutOfBoundsException

1)Added check for the presence of NAT Action during deserialization
2)Added UT to check the presence of NAT Action.

Change-Id: I87ec08f81b1f6372690e5e8d0dbb7ae1ab3e7c74
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
7 years agoAdd multipart reply deserializers unit tests 55/50955/24
miroslav.macko [Tue, 24 Jan 2017 15:00:29 +0000 (16:00 +0100)]
Add multipart reply deserializers unit tests

Add unit tests

See also: bug 7140

Change-Id: Ice9189919efca286c06ea1cced0265dd7e43429d
Signed-off-by: miroslav.macko <miroslav.macko@pantheon.tech>
7 years agoUpdate AbstractService to support isComplete 80/51180/8
deathbeam [Mon, 30 Jan 2017 12:21:41 +0000 (13:21 +0100)]
Update AbstractService to support isComplete

Overload AbstractService#handleServiceCall to also have
parameter with isComplete function.

See also: bug 7141

Change-Id: I51ee1032ac7b443cf8b442ef66eca42380e938b0
Signed-off-by: deathbeam <tomas.slusny@pantheon.tech>
7 years agoAdd multipart reply deserializers 56/50556/22
Tomas Slusny [Tue, 17 Jan 2017 15:07:05 +0000 (16:07 +0100)]
Add multipart reply deserializers

 - Add yang models for multipart reply
 - Add MultipartDeserializerInjector that will inject multipart reply
   deserializers to OpenflowJava
 - Add these mutlipart reply deserializers:
    * Flow aggregate stats
    * Flow stats
    * Flow table stats
    * Group desc
    * Group features
    * Group stats
    * Meter config
    * Meter features
    * Meter stats
    * Port stats
    * Queue stats
    * Table features
    * Experimenter

See also: bug 7140

Change-Id: I0844c54435b3b029982e7cd6e6b9c2cb01138c67
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd PortMessageDeserializer 55/49255/16
Tomas Slusny [Mon, 12 Dec 2016 16:28:24 +0000 (17:28 +0100)]
Add PortMessageDeserializer

Add PortMessageDeserializer Inject PortMessageDeserializer into OFJ.
This deserializer will deserialize raw bytes into PortMessage.

See also: bug 7140

Change-Id: Ia3fd168d424138e81eb9f24ede232d954503a40c
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd MeterMessageDeserializer 49/49249/16
Tomas Slusny [Mon, 12 Dec 2016 15:16:49 +0000 (16:16 +0100)]
Add MeterMessageDeserializer

Inject MeterMessageDeserializer into OFJ. This deserializer will
deserialize raw bytes into MeterMessage.

See also: bug 7140

Change-Id: Ia66378d4ad01a6b273308f6d6e25e86f639f90a5
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd GroupMessageDeserializer 16/50016/20
Tomas Slusny [Wed, 4 Jan 2017 12:41:58 +0000 (13:41 +0100)]
Add GroupMessageDeserializer

Inject GroupMessageDeserializer into OFJ.
This deserializer will deserialize raw bytes into GroupMessage.

See also: bug 7140

Change-Id: I07e0ec7601155eb4138b598c9c4f39dfd1e31d03
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd FlowMessageDeserializer 89/50189/19
Tomas Slusny [Thu, 5 Jan 2017 15:54:46 +0000 (16:54 +0100)]
Add FlowMessageDeserializer

Inject FlowMessageDeserializer into OFJ.
This deserializer will deserialize raw bytes into FlowMessage.

Change-Id: Ic098a80a6d0b97fbf8ab3761d15a09de3d46defd
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd Instruction deserializers 64/50064/18
Tomas Slusny [Thu, 5 Jan 2017 13:15:43 +0000 (14:15 +0100)]
Add Instruction deserializers

Inject instruction deserializers into DeserializerRegistry.
These deserializers will deserialize these instructions:

 - GoToTable
 - WriteMetadata
 - WriteActions
 - ApplyActions
 - ClearActions
 - Meter

See also: bug 7140

Change-Id: Ie38961458157cac46a4bdeba18c0e6c9020d3671
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd InstructionDeserializerInjector 48/50048/16
Tomas Slusny [Thu, 5 Jan 2017 09:02:30 +0000 (10:02 +0100)]
Add InstructionDeserializerInjector

Add injector where all instruction deserializers will be
registered and call it from general DeserializerInjector.
Create AbstractInstructionDeserializer and
AbstractActionInstructionDeserializer that will define
structure for all instruction deserializers.

See also: bug 7140

Change-Id: Icf76321ed0e51c004d003be585f40cfe4710b1b3
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd Action deserializers 43/49943/23
Tomas Slusny [Mon, 2 Jan 2017 09:01:30 +0000 (10:01 +0100)]
Add Action deserializers

Inject action deserializers into DeserializerRegistry.
These deserializers will deserialize these actions:

 - CopyTtlIn
 - CopyTtlOut
 - DecMplsTtl
 - DecNwTtl
 - Group
 - Output
 - PopMpls
 - PopPbb
 - PopVlan
 - PushMpls
 - PushPbb
 - PushVlan
 - SetField
 - SetMplsTtl
 - SetNwTtl
 - SetQueue

See also: bug 7140

Change-Id: I0f36092ca99de0ca51719c3c2099ebe1d904a72f
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd ActionDeserializerInjector 37/49737/21
Tomas Slusny [Thu, 22 Dec 2016 12:35:26 +0000 (13:35 +0100)]
Add ActionDeserializerInjector

Add injector where all action deserializers will be registered and call it
from general DeserializerInjector.
Add AbstractActionDeserializer that will define structure for all action
deserializers.
Add ActionUtil#readAction that will try to deserialize action or use
extensions.
Add MessageCodeExperimenterKey for registering action deserializers with
experimenters.

See also: bug 7140

Change-Id: I1a1eaec5c9aa128f2c2d5e2a31b37086f2a56734
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd Match entry deserializers 57/49357/19
Tomas Slusny [Wed, 14 Dec 2016 08:23:19 +0000 (09:23 +0100)]
Add Match entry deserializers

Inject match entry deserializers into MatchDeserializer.
These deserializers will deserialize these match entries:

 - ArpOp
 - ArpSha
 - ArpSpa
 - ArpTha
 - ArpTpa
 - InPort
 - InPhyPort
 - EthSrc
 - EthDst
 - EthType
 - Metadata
 - VlanPcp
 - VlanVid
 - IpDscp
 - IpEcn
 - IpProto
 - TcpSrc
 - TcpDst
 - UdpSrc
 - UdpDst
 - SctpSrc
 - SctpDst
 - Icmpv4Code
 - Icmpv4Type
 - Icmpv6Code
 - Icmpv6Type
 - Ipv4Source
 - Ipv4Destination
 - Ipv6Source
 - Ipv6Destination
 - Ipv6ExtHeader
 - Ipv6Flabel
 - Ipv6NdSll
 - Ipv6NdTll
 - Ipv6NdTarget
 - MplsLabel
 - MplsBos
 - MplsTc
 - PbbIsid
 - TunnelId
 - TcpFlags

Change-Id: Ic584d4610f2b2230542e449d3fae3f4affcc2756
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd MatchDeserializerInjector 02/49302/15
Tomas Slusny [Tue, 13 Dec 2016 10:00:48 +0000 (11:00 +0100)]
Add MatchDeserializerInjector

Add injector where all match and match entry deserializers will be
registered and call it from general DeserializerInjector.
Add MatchEntryDeserializer and MatchDeserializer to be able to actually
create match entry deserializers and deserialize match body.
Add new method to MatchExtensionHelper that can inject extension
augmentations one by one.

See also: bug 7140

Change-Id: Id15419539792cb4a21a5862be2dd423be34ab117
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd MessageDeserializerInjector 48/49248/10
Tomas Slusny [Mon, 12 Dec 2016 13:48:13 +0000 (14:48 +0100)]
Add MessageDeserializerInjector

Add injector where all message deserializers will be registered and call
it from general DeserializerInjector
Add unit tests for MessageDeserializerInjector

See also: bug 7140

Change-Id: I28e2795148597a1c15cb52dec46728a4324a4d0a
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd PortMessageService 41/50941/9
Tomas Slusny [Tue, 24 Jan 2017 12:55:04 +0000 (13:55 +0100)]
Add PortMessageService

Add PortMessageService that will convert Port to PortMessage and send
this meesage to serialization.
Update SalPortServiceImpl to use PortMessageService if supported and
enabled.

See also: bug 7139

Change-Id: I73a452770a745c5c7a7debe95cbcf7e04afebb89
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd GroupMessageService 25/50925/10
Tomas Slusny [Tue, 24 Jan 2017 09:31:56 +0000 (10:31 +0100)]
Add GroupMessageService

Add GroupMessageService that will convert Group to GroupMessage and
send this meesage to serialization.
Update SalGroupServiceImpl to use GroupMessageService if supported
and enabled.

See also: bug 7139

Change-Id: I07c2f8949f4b89d0cb921d82dfaed3159ca7da8e
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd MeterMessageService 30/50930/10
Tomas Slusny [Tue, 24 Jan 2017 09:52:45 +0000 (10:52 +0100)]
Add MeterMessageService

Add MeterMessageService that will convert Meter to MeterMessage
and send this meesage to serialization.
Update SalMeterServiceImpl to use MeterMessageService if supported and enabled.

See also: bug 7139

Change-Id: I158ddc58deb62394c50bc2e6d195abaa3f283532
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd FlowMessageService 14/50714/14
miroslav.macko [Fri, 20 Jan 2017 13:00:38 +0000 (14:00 +0100)]
Add FlowMessageService

See also: bug 7139

Change-Id: Idb4f5b40ce8f033deee209eec1596df2b8ff7d10
Signed-off-by: miroslav.macko <miroslav.macko@pantheon.tech>
7 years agoAdd AbstractMessageService 02/50702/11
miroslav.macko [Fri, 20 Jan 2017 07:51:38 +0000 (08:51 +0100)]
Add AbstractMessageService

Add AbstractMessageService that will define structure for
all other message services.

Modify AbstractService#handleServiceCall not to be final.

See also: bug 7139

Change-Id: I0bcfe8c0a5ba8ad572427240b29d7522ce0c5cf5
Signed-off-by: miroslav.macko <miroslav.macko@pantheon.tech>
7 years agoAdd configuration parameter for single layer 19/50819/10
Tomas Slusny [Mon, 23 Jan 2017 12:32:51 +0000 (13:32 +0100)]
Add configuration parameter for single layer

 - Add use-single-layer-serialization to openflow-provider-config.yang
 - Pass this new configuration parameter to DeviceContext

See also: bug 7139

Change-Id: I00557cd1c0c637fcf83c42e47808a5bf96a57a1b
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoRemove redundand case in nicira-action.yang 70/51470/3
Michal Rehak [Mon, 6 Feb 2017 13:12:45 +0000 (14:12 +0100)]
Remove redundand case in nicira-action.yang

    - created probably as unattended copy/paste
    - equal cases are forbidden by yang spec and next version
      of yang parser will check this rule

See: BUG-7424

Change-Id: I83c551dc5dd613163c3f8a47a443081d71f3c328
Signed-off-by: Michal Rehak <mirehak@cisco.com>
7 years agoFix failing test. 72/51772/1
Jozef Bacigal [Mon, 13 Feb 2017 08:40:03 +0000 (09:40 +0100)]
Fix failing test.

Yangtools fixed their issue and merged it.

Change-Id: I47c3397145a53c2d2db72093b153a40da5cee571
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
7 years agoMerge "Bug 7764 - Do no throw warning on explicit task cancellation"
Anil Vishnoi [Fri, 10 Feb 2017 18:30:27 +0000 (18:30 +0000)]
Merge "Bug 7764 - Do no throw warning on explicit task cancellation"

7 years agoBug 7764 - Do no throw warning on explicit task cancellation 36/51636/2
Anil Vishnoi [Thu, 9 Feb 2017 08:12:20 +0000 (00:12 -0800)]
Bug 7764 - Do no throw warning on explicit task cancellation

Change-Id: I9477823ffd1b4e9b28484ae8cde166a2d03f5a9f
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
(cherry picked from commit d813c7f656b4dd6f460b66a2fa303a448f6a4e07)

7 years agoNAT Action added in Nicira Extension 70/49770/16
Aswin Suryanarayanan [Fri, 23 Dec 2016 08:50:25 +0000 (14:20 +0530)]
NAT Action added in Nicira Extension

Nat action is added as a port of conntrack action, it is an optional
action field.

Change-Id: Iec97d9d859e0e2060abc3a31ceb929c1b1e43b4a
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
7 years agoBug 7769 - Master branch is broken because of the test failures. 57/51657/1
Anil Vishnoi [Thu, 9 Feb 2017 23:54:32 +0000 (15:54 -0800)]
Bug 7769 - Master branch is broken because of the test failures.

Change-Id: I0f3d787011d388947b10f4fe94ed20e4a270293c
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
7 years agoMerge "Fix comparison between port numbers in match"
Jozef Bacigal [Thu, 9 Feb 2017 09:30:11 +0000 (09:30 +0000)]
Merge "Fix comparison between port numbers in match"

7 years agoFix PacketInV10TranslatorTest 45/51345/2
miroslav.macko [Thu, 2 Feb 2017 13:33:59 +0000 (14:33 +0100)]
Fix PacketInV10TranslatorTest

Use object instead hardcoded string

Change-Id: I6408a927e0c6c186e78884a9851f1dbea56456aa
Signed-off-by: miroslav.macko <miroslav.macko@pantheon.tech>
7 years agoMerge "Replace mockito-all by mockito-core (see Bug 7662)"
Abhijit Kumbhare [Fri, 3 Feb 2017 19:26:33 +0000 (19:26 +0000)]
Merge "Replace mockito-all by mockito-core (see Bug 7662)"

7 years agoBug 7499 - ensure statistics scheduler does not die and keep trying while the control... 53/51353/1
Jon Castro [Thu, 2 Feb 2017 01:57:49 +0000 (12:57 +1100)]
Bug 7499 - ensure statistics scheduler does not die and keep trying while the controller keeps the ownership of the device

Change-Id: Ia5923f200b6c7a8888d4e3c96fdf8358603d4ac9
Signed-off-by: Jon Castro <castro.jon@gmail.com>
7 years agoMerge "BUG-7608: use blueprint action-provider/action-service"
michal rehak [Tue, 31 Jan 2017 12:36:25 +0000 (12:36 +0000)]
Merge "BUG-7608: use blueprint action-provider/action-service"

7 years agoBug 7453 - FlowRemoved doesn't have Removed Reason Information 35/50335/7
eeiillu [Thu, 12 Jan 2017 04:59:18 +0000 (10:29 +0530)]
Bug 7453 - FlowRemoved doesn't have Removed Reason Information

On flow being removed from switch on idle timeout, onFlowRemoved() api was
invoked and while conversion reason was not being converted and added, so
the application using API onFlowRemoved() was not getting the reason for
flow being removed from the switch.
This change will provide the reason invoking onFlowRemoved() API

Change-Id: Id8b957b5b2cc581215fb84b8ca84d1d9a04e5619
Signed-off-by: eeiillu <suja.t@ericsson.com>
7 years agoBUG-7608: use blueprint action-provider/action-service 15/51115/2
Robert Varga [Fri, 27 Jan 2017 12:47:21 +0000 (13:47 +0100)]
BUG-7608: use blueprint action-provider/action-service

The contract for RPC services containing Routed RPCs (RFC7950
actions) with respect to routing is different from normal RPCs.

In order to properly express dependencies, it needs a concept
of a promise to register instantiations (action-provider)
and the dependency on that promise (action-service). Use these
concepts instead of realying on rpc-service which happens to
work due to sal-remoterpc-connector (incorrecty) providing
the equivalent of action-provider for all Routed RPCs defined
in the local SchemaContext.

Change-Id: Iaad5b5b0b4384a2e7d6302bd7de5bfa00c24d89b
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoReplace FindBugs :jsr305 by full :annotation (Bug 7663) 03/50903/4
Michael Vorburger [Mon, 23 Jan 2017 20:07:10 +0000 (21:07 +0100)]
Replace FindBugs :jsr305 by full :annotation (Bug 7663)

Change-Id: I05b3a0fd993c246617808d33d743d04976e0286c
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoAdd isComplete callback to commitEntry 69/51069/1
Tomas Slusny [Thu, 26 Jan 2017 12:36:36 +0000 (13:36 +0100)]
Add isComplete callback to commitEntry

Implement commitEntry with isComplete callback
from https://git.opendaylight.org/gerrit/#/c/51064/ to
OpenflowPlugin OutboundQueueProviderImpl.

See also: bug 7140

Change-Id: I7c4224e029f175a54b46246e1d409356f2447b16
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoFix comparison between port numbers in match 65/50965/1
Tomas Slusny [Tue, 24 Jan 2017 16:57:13 +0000 (17:57 +0100)]
Fix comparison between port numbers in match

Properly extract port number from NodeConnectorId when comparing
port numbers, as NodeConnectorId is basically string, and sometimes
when going back from device, it do not contains datapath id
or prefix (for example in new serialization/deserialization path).

See also: bug 7139

Change-Id: I89999b71dba2e834ea1f37f42b5cddf1082bdd12
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoReplace mockito-all by mockito-core (see Bug 7662) 80/50880/1
Michael Vorburger [Mon, 23 Jan 2017 18:58:43 +0000 (19:58 +0100)]
Replace mockito-all by mockito-core (see Bug 7662)

Change-Id: Iceeb2f1082a6ed3be04e99e17b2e6c3c3c4ebb31
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoFix Direct statistics RPC - actions part 61/50561/4
miroslav.macko [Mon, 16 Jan 2017 09:00:06 +0000 (10:00 +0100)]
Fix Direct statistics RPC - actions part

Handle actions for direct statistics.

See also: bug 7232

Change-Id: Ib29f9a760bf123bac1745ea2fe8bc7e6bd3de73c
Signed-off-by: miroslav.macko <miroslav.macko@pantheon.tech>
7 years agoRPC opendaylight-direct-statistics:get-flow-statistics not taking nicira 12/50412/9
D Arunprakash [Fri, 13 Jan 2017 10:50:49 +0000 (16:20 +0530)]
RPC opendaylight-direct-statistics:get-flow-statistics not taking nicira
extension match

This is just a draft review, still testing in progress

Added new MatchPath RPCFLOWSSTATISTICS_FLOWANDSTATISTICSMAPLIST_MATCH.

This will differentiate between the augment model between notification and
rpc.

Change-Id: If80ff86522ba406577b15c4a3d8a30ee364001db
Signed-off-by: D Arunprakash <d.arunprakash@ericsson.com>
7 years agoMerge "Bug7485 Make statistics poller parameters configurable."
Shuva Jyoti Kar [Wed, 18 Jan 2017 08:38:51 +0000 (08:38 +0000)]
Merge "Bug7485 Make statistics poller parameters configurable."

7 years agoBUG-5222: do not pull in odl-mdsal-xsql 95/50395/1
Robert Varga [Fri, 13 Jan 2017 09:03:20 +0000 (10:03 +0100)]
BUG-5222: do not pull in odl-mdsal-xsql

xsql is deprecated, buggy and never was meant for production
use. Do not pull it in.

Change-Id: Id534d17150a940ffad7f7c757146bca46fa1a923
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug7485 Make statistics poller parameters configurable. 79/50079/10
Sai MarapaReddy [Fri, 6 Jan 2017 00:52:06 +0000 (16:52 -0800)]
Bug7485 Make statistics poller parameters configurable.

Currently the the time intervals used for polling the statistics
are harcoded. (basicTimerDelay, maximumTimerDelay).
This patch helps makes parameters more configurable by defining
current default values in yang. Using BluePrint extensions user
can now configure the parameters without changing the source code.

Change-Id: Id06cb1e569b0d3c653c142bf5f5af5a24fd6e3ea
Signed-off-by: Sai Marapareddy <sai.marapareddy@gmail.com>
7 years agoMerge "BUG 7502: Switch throws an error message for the action type"
Shuva Jyoti Kar [Wed, 11 Jan 2017 15:29:09 +0000 (15:29 +0000)]
Merge "BUG 7502: Switch throws an error message for the action type"

7 years agoMerge "Remove use of triemap"
Shuva Jyoti Kar [Tue, 10 Jan 2017 15:33:15 +0000 (15:33 +0000)]
Merge "Remove use of triemap"

7 years agoRemove use of triemap 78/50178/1
Robert Varga [Tue, 10 Jan 2017 12:48:41 +0000 (13:48 +0100)]
Remove use of triemap

Triemap is not used anywhere, do not declare it as
a dependency.

Change-Id: I296374e2be486d6e77a74d709ce2bf021cab9088
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 7071: adding support for fin-timeout 65/49665/8
Slava Radune [Tue, 20 Dec 2016 14:55:21 +0000 (16:55 +0200)]
Bug 7071: adding support for fin-timeout

Add support for serialization/deseralization and encoding/decoding of fin-timeout action.
This action currently is created using the learn action, so we nead only deseralization/decoding way (when flow statistics is sent to odl),
but this patch suppors also the other way of insalling flows from odl, in case it will be needed in the future.

Change-Id: I061100fab61e8d3398fddde98e76493a5afef468
Signed-off-by: Slava Radune <slava.radune@hpe.com>
7 years agoBUG 7502: Switch throws an error message for the action type 57/50157/2
epgoraj [Tue, 10 Jan 2017 05:53:13 +0000 (11:23 +0530)]
BUG 7502: Switch throws an error message for the action type

       (move:NXM_NX_REG1[0..19]->OXM_OF_MPLS_LABEL[] )
       error message: OFPAT_BAD_MATCH due to wrong OXMClassCode.
       code-review contains the fix to address correct OXMclasscode for the matchtype.

Change-Id: I113e76111b4ca84e2a7c1f0f443af7330f33328f
Signed-off-by: epgoraj <p.govinda.rajulu@ericsson.com>
7 years agoMerge "Bug 7481 - Flows with nicira actions get corrupted after cluster failure"
Abhijit Kumbhare [Mon, 9 Jan 2017 21:57:26 +0000 (21:57 +0000)]
Merge "Bug 7481 - Flows with nicira actions get corrupted after cluster failure"

7 years agoMerge "Add GroupMessageSerializer"
Jozef Bacigal [Mon, 9 Jan 2017 14:49:13 +0000 (14:49 +0000)]
Merge "Add GroupMessageSerializer"

7 years agoMerge "Add PortMessage serializer"
Jozef Bacigal [Mon, 9 Jan 2017 14:49:09 +0000 (14:49 +0000)]
Merge "Add PortMessage serializer"

7 years agoMerge "Add MeterMessage serializer"
Jozef Bacigal [Mon, 9 Jan 2017 14:49:05 +0000 (14:49 +0000)]
Merge "Add MeterMessage serializer"

7 years agoMerge "Add FlowMessage serializer"
Jozef Bacigal [Mon, 9 Jan 2017 14:49:01 +0000 (14:49 +0000)]
Merge "Add FlowMessage serializer"

7 years agoMerge "Add Instruction serializers"
Jozef Bacigal [Mon, 9 Jan 2017 14:48:58 +0000 (14:48 +0000)]
Merge "Add Instruction serializers"

7 years agoMerge "Add InstructionSerializerInjector"
Jozef Bacigal [Mon, 9 Jan 2017 14:48:54 +0000 (14:48 +0000)]
Merge "Add InstructionSerializerInjector"

7 years agoMerge "Add Action serializers"
Jozef Bacigal [Mon, 9 Jan 2017 14:48:50 +0000 (14:48 +0000)]
Merge "Add Action serializers"

7 years agoMerge "Add ActionSerializerInjector"
Jozef Bacigal [Mon, 9 Jan 2017 14:48:46 +0000 (14:48 +0000)]
Merge "Add ActionSerializerInjector"

7 years agoMerge "Add Match entry serializers"
Jozef Bacigal [Mon, 9 Jan 2017 14:48:42 +0000 (14:48 +0000)]
Merge "Add Match entry serializers"

7 years agoMerge "Add MatchSerializerInjector"
Jozef Bacigal [Mon, 9 Jan 2017 14:48:37 +0000 (14:48 +0000)]
Merge "Add MatchSerializerInjector"

7 years agoMerge "Add MessageSerializerInjector"
Jozef Bacigal [Mon, 9 Jan 2017 14:48:31 +0000 (14:48 +0000)]
Merge "Add MessageSerializerInjector"

7 years agoAdd GroupMessageSerializer 44/48744/11
Tomas Slusny [Mon, 28 Nov 2016 09:00:23 +0000 (10:00 +0100)]
Add GroupMessageSerializer

Inject GroupMessageSerializer into OFJ. This serializer will
serialize GroupMod message to raw bytes.

See also: bug 7138

Change-Id: Ib2763904506d199d1a817449f4c08f1ec267f0cf
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd PortMessage serializer 59/48259/13
Tomas Slusny [Fri, 11 Nov 2016 13:38:09 +0000 (14:38 +0100)]
Add PortMessage serializer

Inject PortMessageSerializer into OFJ. This serializer will
serialize PortMod message to raw bytes.

See also: bug 7138

Change-Id: Iea3c90111cfc83b297e54559c4846a7949cc15df
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd MeterMessage serializer 20/48520/18
Tomas Slusny [Mon, 21 Nov 2016 09:18:07 +0000 (10:18 +0100)]
Add MeterMessage serializer

Inject MeterMessageSerializer into OFJ. This serializer will
serialize MeterMod message to raw bytes.
Added unit tests for ExperimentedIdMeterBandTypeSerializerKey

See also: bug 7138

Change-Id: I6b46f6f9e7e960055692c0a33932be373a783b47
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoBug 7481 - Flows with nicira actions get corrupted after cluster failure 29/50029/4
Tali [Wed, 4 Jan 2017 18:27:21 +0000 (20:27 +0200)]
Bug 7481 - Flows with nicira actions get corrupted after cluster failure

Change-Id: I7fe988b54af3823e0fad672f1f3c5d7750c9095a
Signed-off-by: Tali <tali.ben-meir@hpe.com>
7 years agoBug 7415 Reducing the severity of the log message 73/49673/2
Sai Marapareddy [Tue, 20 Dec 2016 23:42:51 +0000 (15:42 -0800)]
Bug 7415 Reducing the severity of the log message

Whenever there is a change in configuration of l2switch,
bundle refresh happens. When bundles refresh, openflowplugin
pushes the same flow. Changing the severity of of the exception
to warning since it is expected to have a flow with same id.

Change-Id: I69874d14b83053edc97b6d299c8fdb05d7ccdd8c
Signed-off-by: Sai MarapaReddy <sai.marapareddy@gmail.com>
Author: Sai MarapaReddy <sai.marapareddy@gmail.com>

7 years agoMerge "Create YANG builders for all relevant model types"
Jozef Bacigal [Tue, 20 Dec 2016 08:05:44 +0000 (08:05 +0000)]
Merge "Create YANG builders for all relevant model types"

7 years agoMerge "Add Serialization and Deserialization injectors"
Jozef Bacigal [Tue, 20 Dec 2016 08:05:38 +0000 (08:05 +0000)]
Merge "Add Serialization and Deserialization injectors"

7 years agoAdd FlowMessage serializer 90/48790/11
Tomas Slusny [Fri, 9 Dec 2016 13:58:41 +0000 (14:58 +0100)]
Add FlowMessage serializer

Inject FlowMessageSerializer into OFJ.
This serializer will serialize FlowMod message to raw bytes.

See also: bug 7138
Change-Id: I83038bdaab160a757dda78c4356af5a1e976d402
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd Instruction serializers 73/48773/13
Tomas Slusny [Tue, 29 Nov 2016 09:49:45 +0000 (10:49 +0100)]
Add Instruction serializers

Inject instruction serializers into InstructionSerializerInjector.
These serializers will serialize these intrusctions to raw bytes:

  - ApplyActions
  - ClearActions
  - GoToTable
  - Meter
  - WriteActions
  - WriteMetadata

Change-Id: I72a254b897234b3e7f29c0ea2d1496f0bc517e43
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd InstructionSerializerInjector 68/48768/13
Tomas Slusny [Tue, 29 Nov 2016 09:33:51 +0000 (10:33 +0100)]
Add InstructionSerializerInjector

Add injector where all instruction serializers will be registered and call
it from general SerializerInjector
Add AbstractInstructionSerializer and
AbstractActionInstructionSerializer
to unify all instruction serializers
Add unit tests

Change-Id: Id2c2462c950b127636f040b452226b2216e097ec
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd Action serializers 40/48540/21
Tomas Slusny [Mon, 21 Nov 2016 12:59:54 +0000 (13:59 +0100)]
Add Action serializers

Inject action serializers into OFJ. These serializers will serialize
these actions to raw bytes:

  - CopyTtlIn
  - CopyTtlOut
  - DecMplsTtl
  - DecNwTtl
  - GroupAction
  - OutputAction
  - PopMplsAction
  - PopPbbAction
  - PopVlanAction
  - PushMplsAction
  - PushPbbAction
  - PushVlanAction
  - SetMplsTtlAction
  - SetNwTtlAction
  - SetQueueAction
  - SetFieldAction
  - DropAction
  - SetVlanIdAction
  - SetVlanPcpAction
  - StripVlanAction
  - SetDlSrcAction
  - SetDlDstAction
  - SetNwSrcAction
  - SetNwDstAction
  - SetTpSrcAction
  - SetTpDstAction
  - SetNwTosAction

See also: bug 7138

Change-Id: I5b42b0b2d2afd3468768e28bd11bfdcfcbbbc142
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd ActionSerializerInjector 63/48563/15
Tomas Slusny [Tue, 22 Nov 2016 10:35:34 +0000 (11:35 +0100)]
Add ActionSerializerInjector

Add injector where all action serializers will be registered and
call it from general SerializerInjector.
Add AbstractActionSerializer and AbstractSetFieldActionSerializer to be able
to actually create action serializers.
Add unit tests for ActionSerializerInjector
Add ActionUtil#writeAction that tries to determine what type of
action we are serializing, and serializes it.

See also: bug 7138

Change-Id: I25549b453a0a36d38f9b42de7b8087a41d438f7b
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd Match entry serializers 29/48629/21
Tomas Slusny [Mon, 5 Dec 2016 14:41:03 +0000 (15:41 +0100)]
Add Match entry serializers

Inject match entry serializers into MatchSerializer.
These serializers will serialize these entries to raw bytes:

  - EthernetDestination
  - EthernetSource
  - EthernetType
  - InPhyPort
  - InPort
  - Metadata
  - VlanPcp
  - VlanVid
  - IpDscp
  - IpEcn
  - IpProto
  - TcpSource
  - TcpDestination
  - UdpSource
  - UdpDestination
  - SctpSource
  - SctpDestination
  - Icmpv4Type
  - Icmpv4Code
  - Icmpv6Type
  - Icmpv6Code
  - Ipv4ArbitraryBitMaskSource
  - Ipv4ArbitraryBitMaskDestination
  - Ipv4Source
  - Ipv4Destination
  - TunnelIpv4Source
  - TunnelIpv4Destination
  - ArpOp
  - ArpSourceTransportAddress
  - ArpTargetTransportAddress
  - ArpSourceHardwareAddress
  - ArpTargetHardwareAddress
  - Ipv6ArbitraryBitMaskSource
  - Ipv6ArbitraryBitMaskDestination
  - Ipv6Source
  - Ipv6Destination
  - Ipv6Label
  - Ipv6NdTarget
  - Ipv6NdSll
  - Ipv6NdTll
  - Ipv6ExtHeader
  - MplsLabel
  - MplsBos
  - MplsTc
  - Pbb
  - TunnelId
  - TcpFlags

Change-Id: I886e990aebc4ce02e5c7b571d06078aaf8033e07
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd MatchSerializerInjector 22/48622/15
Tomas Slusny [Wed, 23 Nov 2016 12:16:03 +0000 (13:16 +0100)]
Add MatchSerializerInjector

Add injector where all match and match entry serializers will be
registered and call it from general SerializerInjector.
Add AbstractMatchEntrySerializer and MatchSerializer to be able to
actually create match entry serializers and serialize match body.
Add AbstractExperimenterMatchEntrySerializer to serialize match
entries with experimenter id.
Add match extension serialization to MatchSerializer, using match
extension converters. This needs to be changed later, to also remove
use of match extension converters.

See also: bug 7138

Change-Id: Ifa3f0d52b384b173cf639f7d00fd5a4a3e0d30f4
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoRevert the functional behavior change introduced through 59/49159/2
Anil Vishnoi [Wed, 7 Dec 2016 20:14:43 +0000 (12:14 -0800)]
Revert the functional behavior change introduced through

https://git.opendaylight.org/gerrit/#/c/47138/3

Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
Change-Id: I0b8fc5b1e0763bb2b91302647037e1153fd41dc1
(cherry picked from commit 43b49485d25ebdf0dca58d46c14100a4aa7c6324)

7 years agoAdd MessageSerializerInjector 62/48562/10
Tomas Slusny [Tue, 22 Nov 2016 10:02:50 +0000 (11:02 +0100)]
Add MessageSerializerInjector

Add injector where all message serializers will be registered
and call it from general SerializerInjector
Add AbstractMessageSerializer to unify all message serializers
Add unit tests for MessageSerializerInjector

See also: bug 7138

Change-Id: Ie5f0652e31316ca33b6b6fb10d84bf9972a1fed5
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoCreate YANG builders for all relevant model types 54/48254/16
Tomas Slusny [Fri, 11 Nov 2016 11:25:27 +0000 (12:25 +0100)]
Create YANG builders for all relevant model types

Add new *message builders to flow, group, meter and port
YANG models to allow us to serialize and deserialize them
properly.
Add dependency on openflowjava for model-flow-base
Update set-tp-src and set-tp-dst yang with ip-protocol

See also: bug 7137

Change-Id: Ie552e5b06778ec0d0d803e34b9628fb1c627d1ab
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoAdd Serialization and Deserialization injectors 57/48257/13
Tomas Slusny [Fri, 11 Nov 2016 11:51:51 +0000 (12:51 +0100)]
Add Serialization and Deserialization injectors

Add SerializerInjector and DeserializerInjector that will
allow us to register new serializers and deserializers in
OpenflowPlugin easily.
Add abstract classes for unit tests to speed up unit test
development.

See also: bug 7136

Change-Id: I3135dd3d0ca49585f274f5c63f4ab6b35b525b6d
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoBug 7335 - Flow update rejected by switch generates 09/49209/1
Anil Vishnoi [Sat, 10 Dec 2016 08:53:11 +0000 (00:53 -0800)]
Bug 7335 - Flow update rejected by switch generates
faulty flow entry in operational DS

When flow update request comes to plugin, it cleans up
the flow hashmap for the updated flow, but it does not
clean up the flow with the assumption that in the next
statistics cycle, this stale flow in operational data
store will be overwritten by the new modified flow,
but as reported in the issue, if installation of modified
flow fails, it will leave the stale flow in the data store.

Change-Id: I47905f980aabc83134c6eccfbf0655d48e71484b
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
7 years agoMerge "BUG-6890:Flow-Removed Notification configuration"
Jozef Bacigal [Mon, 5 Dec 2016 11:05:01 +0000 (11:05 +0000)]
Merge "BUG-6890:Flow-Removed Notification configuration"

7 years agoMerge "Add new API's for LLDP"
Jozef Bacigal [Mon, 5 Dec 2016 09:51:10 +0000 (09:51 +0000)]
Merge "Add new API's for LLDP"

7 years agoBug 7209 - Null Pointer Exception in LearnCodecUtil when add learn flow for ipv6 22/48722/1
Vinh Nguyen [Fri, 18 Nov 2016 23:03:39 +0000 (15:03 -0800)]
Bug 7209 - Null Pointer Exception in LearnCodecUtil when add learn flow for ipv6

The exception caused by using ByteBuf::readShort
(valid range: -32,768 32,767) for ipv6 etherType '0x86dd'
The fix is to use ByteBuf::readUnsignedShort

Change-Id: I238535565a66692b5d4dbe39b8cb7809867f3cde
Signed-off-by: Vinh Nguyen <vinh.nguyen@hcl.com>
(cherry picked from commit e9deca32b7e455ba805adc35aa49d635b2a2537e)

7 years agoAdd new API's for LLDP 05/48005/4
senthil [Fri, 4 Nov 2016 17:26:49 +0000 (22:56 +0530)]
Add new API's for LLDP

  *Right now LLDP time period is hard coded
  *This patch enables to set the time period dynamically,
   which increases the performance of the CPU
  *Increase in CPU performance is observed clearly when we do scaling

Change-Id: I959e151c1e0f11799617bc3ae679cfb7539e764a
Signed-off-by: senthil <senthil.b@tataelxsi.co.in>
7 years agoBUG:6997 supporting OXM_OF_MPLS_LABEL in nicira extensiona 62/47662/8
epgoraj [Thu, 27 Oct 2016 11:22:18 +0000 (16:52 +0530)]
BUG:6997 supporting OXM_OF_MPLS_LABEL in nicira extensiona

        Description : currently under nicira-extension, MPLS support is not
        present in nicira Move action. Mainly in ECMP use-case we need to use
        mpls_label under nicira_move_action type. The mpls_label will be using as
        example ( move:NXM_NX_REG1[0..19]->OXM_OF_MPLS_LABEL[] )

Change-Id: Ia497b963f30bf9ffcd09430db8ed85661a64859f
Signed-off-by: epgoraj <p.govinda.rajulu@ericsson.com>
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
7 years agoMerge "Bug 6820 - Implement SalExperimenterMpMessageService"
Jozef Bacigal [Mon, 21 Nov 2016 14:42:20 +0000 (14:42 +0000)]
Merge "Bug 6820 - Implement SalExperimenterMpMessageService"

7 years agolower log level when stats come before flow is written to deviceflowregistry 90/48190/1
Jamo Luhrsen [Wed, 9 Nov 2016 18:55:13 +0000 (10:55 -0800)]
lower log level when stats come before flow is written to deviceflowregistry

Change-Id: Ib24b9e97c86b2d1a24610204b61fcf9237871f0e
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
(cherry picked from commit ac114ea16d60aff29106fdf687e2f35a33f7e0d6)

7 years agoBUG-6890:Flow-Removed Notification configuration 88/48188/1
Shuva Kar [Thu, 10 Nov 2016 05:47:23 +0000 (11:17 +0530)]
BUG-6890:Flow-Removed Notification configuration

Changing the flag to enable/disable flow removed
notification.

Currently the flow-removed notification is controlled by the flag
notification-flow-removed-off which is on by default(value set to false).
However this logic being double-negative causes some confusion to the
end-user. Thus modifying the flag to enable-flow-removed-notification
and setting it to true by default.

The associated logic involved at oyther places have been modified as
well as a part of this commit.

Change-Id: I1452de6e3e72030608c89168f19328d9c6aa8f1c
Signed-off-by: Shuva Kar <shuva.jyoti.kar@ericsson.com>
7 years agoMerge "Bug 7058 - [Helium Plugin]Stats collection issue when controller disconnect...
Shuva Jyoti Kar [Wed, 9 Nov 2016 10:16:26 +0000 (10:16 +0000)]
Merge "Bug 7058 - [Helium Plugin]Stats collection issue when controller disconnect the device"

7 years agoMerge "BUG-6890: Statistics-polling configuration"
Jozef Bacigal [Thu, 3 Nov 2016 11:40:04 +0000 (11:40 +0000)]
Merge "BUG-6890: Statistics-polling configuration"