openflowplugin.git
6 years agoExtract mastership blueprint service 81/60181/12
Jozef Bacigal [Tue, 11 Jul 2017 07:57:23 +0000 (09:57 +0200)]
Extract mastership blueprint service

Change-Id: I87180a1705c25cb51e9d71e1083e48cd4e52683c
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
6 years agoMastershipchange service implementation. 15/53615/21
Jozef Bacigal [Tue, 11 Jul 2017 07:26:44 +0000 (09:26 +0200)]
Mastershipchange service implementation.

Change-Id: I9ca11e05100a2369ae4a91f1232b4f14435a11f6
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
6 years agoMastership service provider API 98/53598/21
Jozef Bacigal [Mon, 10 Jul 2017 08:42:25 +0000 (10:42 +0200)]
Mastership service provider API

- create new API for mastership listener
- rename MastershipChangeListener to ContextChainMastershipWatcher

Change-Id: I45e919494039180df895602b6536af37f679cb58
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
6 years agoFix context chain initialization and SLAVE change 75/60075/22
Tomas Slusny [Fri, 7 Jul 2017 13:15:09 +0000 (15:15 +0200)]
Fix context chain initialization and SLAVE change

- Merge ContextChain and LifecycleService
- Let ClusterSingletonService handle stopping of mastership services in
closeServiceInstance method
- Store cluster singleton initialization future and process it
synchronously in case we are closing
- Cancel device initialization future if we got timeout
- Handle initialization chain order in ContextChain instead of storing
each next phase in contexts
- Remove SLAVE task from scheduler in case we acquired SLAVE role
already
- Prevent adding exactly same auxiliary connection twice to list of
auxiliary connections in ContextChain
- When SLAVE role is obtained from cluster singleton service, notify
MastershipChangeListener about it
- Log exceptions from handshake as warning instead of error (as only
problem is that device gets disconnected and reconnected, what is not
critical)
- In case context chain is still closing and we receive new connection,
drop the connection and let context chain finish closing

See also: bug 8805

Change-Id: If14da19899087018c5e6cc42d195af43c1e89bfd
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoMerge "Remove He-design inventory manager"
Jozef Bacigal [Mon, 17 Jul 2017 07:40:35 +0000 (07:40 +0000)]
Merge "Remove He-design inventory manager"

6 years agoMerge changes from topics 'bug/8836', 'bug/8772'
Jozef Bacigal [Thu, 13 Jul 2017 07:57:44 +0000 (07:57 +0000)]
Merge changes from topics 'bug/8836', 'bug/8772'

* changes:
  Fix match extensions deserialization
  Add missing augmentations for extensions
  Bail out earlier on alien message

6 years agoFix match extensions deserialization 43/60243/3
Tomas Slusny [Wed, 12 Jul 2017 11:28:03 +0000 (13:28 +0200)]
Fix match extensions deserialization

Fix transformation of match extensions for different match types during
deserialization so they will not be lost during this process.

Resolves: bug 8836

Change-Id: If089a72759a26b764479e58ea112b3a1a062c90e
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoMerge "Upgrade to odlparent 2.0.2"
Jozef Bacigal [Wed, 12 Jul 2017 09:00:55 +0000 (09:00 +0000)]
Merge "Upgrade to odlparent 2.0.2"

6 years agoAdd missing augmentations for extensions 34/60234/1
Tomas Slusny [Wed, 12 Jul 2017 08:24:58 +0000 (10:24 +0200)]
Add missing augmentations for extensions

- Add apply actions augmentations for nodes->node->table->flow
  ->instructions to action convertors for nicira extensions
- Add new packet in message augmentations to match convertors for nicira
  extensions

See also: bug 8772

Change-Id: I93fd2b05c5b699f6a31e960761da1d8e51a26939
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoBail out earlier on alien message 28/60128/2
Tomas Slusny [Mon, 10 Jul 2017 10:49:22 +0000 (12:49 +0200)]
Bail out earlier on alien message

Add boolean return to onAlienMessage method that shoudl return true if
alien message was successfully processed. In this case, do not try to
process received OfHeader message as it was processed in alien message
listener to prevent errors when alien message is received when dependant
project is for example gathering statistics.

See also: bug 8772

Change-Id: I2cd50412a6837d61ddbcc1053702b69a7882efc5
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoRemove He-design inventory manager 01/60201/1
Tomas Slusny [Tue, 11 Jul 2017 12:35:46 +0000 (14:35 +0200)]
Remove He-design inventory manager

See also: bug 8656

Change-Id: If11d9c79abe4f31b85d1bcb2d68a82042cf93dd0
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoMerge "Remove He-design statistics manager"
Tomas Slusny [Tue, 11 Jul 2017 12:13:41 +0000 (12:13 +0000)]
Merge "Remove He-design statistics manager"

6 years agoUpgrade to odlparent 2.0.2 97/60197/1
Tomas Slusny [Tue, 11 Jul 2017 11:53:57 +0000 (13:53 +0200)]
Upgrade to odlparent 2.0.2

Change-Id: I4d30033a9fd7495c2f75d88ace3d8f25c23e8eba
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoMerge "BUG-8607: Fix issues in checkstyle enforcement for module openflowplugin-common"
Tomas Slusny [Tue, 11 Jul 2017 08:01:39 +0000 (08:01 +0000)]
Merge "BUG-8607: Fix issues in checkstyle enforcement for module openflowplugin-common"

6 years agoRemove He-design statistics manager 67/59867/2
Jozef Bacigal [Mon, 3 Jul 2017 11:45:17 +0000 (13:45 +0200)]
Remove He-design statistics manager

See also:Bug8656

Change-Id: Ie7f2be3af703303691a31aa40eaae31d4ea35eb9
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
6 years agoBUG-8607: Fix issues in checkstyle enforcement for module 10/59110/3
David Suarez [Fri, 16 Jun 2017 21:49:38 +0000 (23:49 +0200)]
BUG-8607: Fix issues in checkstyle enforcement for module
openflowplugin-common

- Copyright section
- Line lengths
- JavaDoc
- Formatting
- Enforcement in pom.xml

Change-Id: Ic10c58b7c79760bf9079b53860831cddd7508951
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
6 years agoRemove config subsystem from OpenFlowJava 50/59550/7
Tomas Slusny [Tue, 27 Jun 2017 08:49:28 +0000 (10:49 +0200)]
Remove config subsystem from OpenFlowJava

- Remove config subsystem from OpenFlowJava, because it was replaced
  by blueprint and it is already removed from OpenFlowPlugin

See also: bug 8747

Change-Id: I9057c3614a47fd19cc797f1f1e299f8d265110a6
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoIntegrate OpenFlowJava into OpenFlowPlugin build 29/59529/16
Tomas Slusny [Mon, 26 Jun 2017 14:34:09 +0000 (16:34 +0200)]
Integrate OpenFlowJava into OpenFlowPlugin build

- Integrate OpenFlowJava artifacts building into OpenFlowPlugin maven
build
- Merge openflowjava-artifacts with openflowplugin-artifacts
- Remove odl-openflowjava-all feature, because it was unused and
contained only odl-openflowjava-protocol
- Change org.opendaylight.openflowjava groupId to
org.opendaylight.openflowplugin.openflowjava
- Move sample-client to OpenFlowPlugin samples and fix missing license
headers in sample-client

Resolves: bug 8747

Change-Id: I5cff2e93bcbe00aa7543a03c990aa4d61b0878b8
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoMerge OpenFlowJava repository into OpenFlowPlugin 28/59528/7
Tomas Slusny [Mon, 26 Jun 2017 11:41:54 +0000 (13:41 +0200)]
Merge OpenFlowJava repository into OpenFlowPlugin

Merge OpenFlowJava into OpenFlowPlugin repository to decrease the
logistics related to the OpenFlow southbound development.

Merged OpenFlowJava HEAD is
https://git.opendaylight.org/gerrit/gitweb?p=openflowjava.git;a=commit;h=76c83901c7a265e0d00c537d34f3f093c636129c

Old OpenFlowJava repo will serve just for archival purposes.

Detailed informations about this change and mailing lists thread:
https://lists.opendaylight.org/pipermail/openflowplugin-dev/2017-June/007276.html

Resolves: bug 8747

Change-Id: Ic5202e1b3781bb9b02b04683df32468a9f0d8571
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoMerge "ONF Bundles sample application"
Jozef Bacigal [Mon, 10 Jul 2017 07:09:23 +0000 (07:09 +0000)]
Merge "ONF Bundles sample application"

6 years agoAdd single-layer deserializer for PacketIn msg 75/59675/13
Tomas Slusny [Thu, 29 Jun 2017 13:15:36 +0000 (15:15 +0200)]
Add single-layer deserializer for PacketIn msg

Add single-layer deserializer for PacketIn message received from device
to OpenFlowPlugin to prevent deserialization errors when deserializing
PacketIn with single-layer-serialization enabled.

Resolves: bug 8772

Change-Id: I995af3114b808fec1ab214b7b8489c1932861ea5
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoMerge "BUG-8607: Fix issues in checkstyle enforcement for module bulk-o-matic"
Tomas Slusny [Mon, 3 Jul 2017 16:45:12 +0000 (16:45 +0000)]
Merge "BUG-8607: Fix issues in checkstyle enforcement for module bulk-o-matic"

6 years agoSolves compilation error 59/59859/3
Jozef Bacigal [Mon, 3 Jul 2017 10:34:14 +0000 (12:34 +0200)]
Solves compilation error

Change-Id: I41f964260c216fe3ee417c9d874cb58177f4596d
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
6 years agoFix NPE in ConnectionContextImpl 09/59609/1
Tomas Slusny [Wed, 28 Jun 2017 11:02:00 +0000 (13:02 +0200)]
Fix NPE in ConnectionContextImpl

- When we receive port status message, in some cases nodeId can be null,
  so when logging, get nodeId safely and in case it is null, just log
  "null"
- When we are closing outbound queue, log value of nodeId or null in
case nodeId is null

Resolves: bug 8762

Change-Id: Ifda277fd298f7d30fd5e94f07a94e67813971029
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoFix statistics polling on parameter 47/59547/1
Tomas Slusny [Tue, 27 Jun 2017 07:31:08 +0000 (09:31 +0200)]
Fix statistics polling on parameter

Fix value of statistics polling parameter to not be always
false and to be actually loaded from new configuration
service.

See also: bug 8705

Change-Id: I5d71c4f75a2b0dadc0551a8e763b9e4e36e647d1
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoBUG-8607: Fix issues in checkstyle enforcement for module bulk-o-matic 30/57730/8
David Suarez [Tue, 23 May 2017 22:27:36 +0000 (00:27 +0200)]
BUG-8607: Fix issues in checkstyle enforcement for module bulk-o-matic

- Copyright section
- Change variables and methods names
- Remove redundant modifiers
- Order imports
- Line lengths
- Declare some static constants properly
- Enforcement in pom.xml

Change-Id: I288ef46a01e5795081d28466ab7a4b9d896a4aa5
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
6 years agoEncapsulate OpenFlowPlugin configuration 66/59166/14
Tomas Slusny [Mon, 19 Jun 2017 12:45:35 +0000 (14:45 +0200)]
Encapsulate OpenFlowPlugin configuration

- Stop sending configuration to OpenFlow managers in long constructors
  and send just aggregated configuration in one class
- Add ability to register configuration listener to configuration
service
- Separate configuration service from OpenFlowPluginProviderImpl
- Fix FRM configuration breaking OpenFlowPlugin configuration by trying
  to load configuration from openflowplugin.cfg directly, what is only
  accesible to main OpenFlowPlugin project by creating configuration
  service and passing it to FRM
- Add missing 'disable-reconciliation' flag to FRM yang config, and use
  default values from YANG file for FRM configuration

Resolves: bug 8705

Change-Id: I791925bb1964c9eb5a9f1db77fcc25f6425f053f
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoMerge "Report (TCP) port number for switches"
Jozef Bacigal [Mon, 26 Jun 2017 07:23:37 +0000 (07:23 +0000)]
Merge "Report (TCP) port number for switches"

6 years agoFix context chain closing 14/57814/38
Tomas Slusny [Thu, 25 May 2017 13:26:44 +0000 (15:26 +0200)]
Fix context chain closing

- Close and create EOS registration correctly when closing context
chain holder and creating context chain holder.
- Cancel running scheduled task on context chain holder termination
- Always remove device from DS when we was not able to propagate roles,
not only when we have this device already in context chain map
- Add toleration for adding context chains to queue
- Wait for registration of RPC services before fully granting mastership
for context chain
- Close transaction chain manager on device context close
- Remove unnecessary auxiliary connection gathering in device context
(because this was moved to context chain)
- Fix closing of TxChain when DeviceContext is closed when activating tx
chain manager but not enabling submit transaction (do not try to submit
data)
- Unregister RPC registrations on RpcContext close
- Do not close ClusterSingletonServiceRegistration during
ClusterSingletonService initialization, to prevent freeze of
ClusterSingletonServiceGroup, send it to separate thread
- Prevent propagating of connection closed event twice (add checks for
RIP connection state)
- Fix ignored tests
- Remove getter for table statistics boolean from DeviceContext and just
send it to DeviceInitializer
- Close all RPC contexts when RPC manager is closed
- Do not reschedule statistics one more time when context chain is
closed

Resolves: bug 8668

Change-Id: Ifa8c492486c17a73eccd760fc610a435ef6a42ed
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoFix "stale" state after controller disconnected. 32/57232/24
Jozef Bacigal [Wed, 17 May 2017 05:23:39 +0000 (07:23 +0200)]
Fix "stale" state after controller disconnected.

See also: Bug 8411

Change-Id: If5bf24f34a87ef0a7d5514b1c655a42508889724
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
6 years agoReport (TCP) port number for switches 83/59383/2
Tomas Slusny [Thu, 22 Jun 2017 09:33:10 +0000 (11:33 +0200)]
Report (TCP) port number for switches

Write also port number to datastore for OpenFlow switches.

Resolves: bug 2188

Change-Id: I15054b55907b4f15b1567b21f5fa2d35ad416579
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoRemove config subsystem remains 31/59231/8
Tomas Slusny [Thu, 22 Jun 2017 15:53:13 +0000 (17:53 +0200)]
Remove config subsystem remains

- Remove what was left from config subsystem from project, as everything
was moved to Blueprint already.
- Cleanup artifacts POM, remove references to config subsystem config
files

Resolves: bug 8728

Change-Id: Ic6adcbc333e816aa15b546e44536d23c8ef4125b
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoBump to odlparent 2.0.0 23/59323/5
Jozef Bacigal [Thu, 22 Jun 2017 08:18:15 +0000 (10:18 +0200)]
Bump to odlparent 2.0.0

- removed feature with dlux dependency

Change-Id: I14db1f6d17624ba890bc1ed6491dfc91876d6a40
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
6 years agoMerge "Fix checkstyle API."
Tomas Slusny [Thu, 22 Jun 2017 07:04:32 +0000 (07:04 +0000)]
Merge "Fix checkstyle API."

6 years agoMove Nicira extensions to blueprint 14/59214/2
Tomas Slusny [Tue, 20 Jun 2017 10:44:44 +0000 (12:44 +0200)]
Move Nicira extensions to blueprint

- Add blueprint xmls for OpenFlowPlugin nicira extensions
- Remove CSS-related files from nicira extensions projects
- Stop copying CSS-related xmls during feature installations

Resolves: bug 8718

Change-Id: I115e59b87620f9be60ea9d1d48c9dccbc9c03031
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoFix checkstyle API. 27/59227/1
Jozef Bacigal [Tue, 20 Jun 2017 12:55:06 +0000 (14:55 +0200)]
Fix checkstyle API.

Change-Id: Ia25e794c95722f9ff9bf60393bbd18d803296581
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
6 years agoMerge "Bug 8647: remove odl-dlux-core as artifact POM"
Tomas Slusny [Mon, 19 Jun 2017 08:35:02 +0000 (08:35 +0000)]
Merge "Bug 8647: remove odl-dlux-core as artifact POM"

6 years agoMerge "Ensure that statistics gathering is terminated"
Jozef Bacigal [Mon, 19 Jun 2017 07:23:30 +0000 (07:23 +0000)]
Merge "Ensure that statistics gathering is terminated"

6 years agoBug 8647: remove odl-dlux-core as artifact POM 92/58592/2
Stephen Kitt [Fri, 9 Jun 2017 10:11:12 +0000 (12:11 +0200)]
Bug 8647: remove odl-dlux-core as artifact POM

odl-dlux-core is used in dependency management as an artifact POM, but
it isn’t. Removing the declaration is fine since the actual dlux
dependencies specify the version to use.

Change-Id: I83598feb8175d674616a3a3f25c0d52ca1739664
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoONF Bundles sample application 20/58120/5
miroslav.macko [Mon, 29 May 2017 09:41:49 +0000 (11:41 +0200)]
ONF Bundles sample application

- Add group and flows using ONF bundles implementation

Change-Id: Iba0be279a5219947bcd69f7e91eefab6d8d5212f
Signed-off-by: miroslav.macko <miroslav.macko@pantheon.tech>
6 years agoMerge "Fix connection when slave role request is unsupported"
Tomas Slusny [Thu, 15 Jun 2017 13:18:39 +0000 (13:18 +0000)]
Merge "Fix connection when slave role request is unsupported"

6 years agoMerge "Fix port update"
Tomas Slusny [Thu, 15 Jun 2017 13:15:53 +0000 (13:15 +0000)]
Merge "Fix port update"

6 years agoMerge "Fix 'INPORT' keyword in port field"
Tomas Slusny [Thu, 15 Jun 2017 13:04:30 +0000 (13:04 +0000)]
Merge "Fix 'INPORT' keyword in port field"

6 years agoFix port update 48/58948/4
miroslav.macko [Wed, 14 Jun 2017 12:06:30 +0000 (14:06 +0200)]
Fix port update

- Update yang models. Add grouping common port with mask.
- Use config mask in the PortConvertor and PortMessageSerializer.
- Update unit tests.

Resolves: bug 4747

Change-Id: If558fea34f86c026ca45ba2853107c2cd82c7f50
Signed-off-by: miroslav.macko <miroslav.macko@pantheon.tech>
6 years agoFix connection when slave role request is unsupported 18/58518/6
miroslav.macko [Thu, 8 Jun 2017 13:29:56 +0000 (15:29 +0200)]
Fix connection when slave role request is unsupported

- Allow the switch connection when OFPRRFC_UNSUP is received
- Set feature exception for getGenerationIdFromDevice RPC error
- Add unit test

Resolves: bug 7664

Change-Id: If8d7d045fb516f55346333cc7e60d0ccb2135efd
Signed-off-by: miroslav.macko <miroslav.macko@pantheon.tech>
6 years agoMerge "Fix SwitchIdleEvent echo request-reply xid"
Tomas Slusny [Thu, 15 Jun 2017 12:16:22 +0000 (12:16 +0000)]
Merge "Fix SwitchIdleEvent echo request-reply xid"

6 years agoFix 'INPORT' keyword in port field 00/58600/11
Jozef Bacigal [Fri, 9 Jun 2017 10:30:27 +0000 (12:30 +0200)]
Fix 'INPORT' keyword in port field

- also fix NPE in serialization by using wrong port number

Enumeration from opeflow java yang files is correct used keyword 'IN_PORT'.
Openflowplugin with the wrong translation (getString instead of getName) used the
keyword 'INPORT'. This fix use the correct name from enumeration but allow use
the legacy 'INPORT' keyword for next release.
Also prevent to throw NPE by using wrong keyword in port field.

Change-Id: If8b3d301d73169fd158a546a233928ab0c65d1c3
Fix: Bug 2095
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
6 years agoEnsure that statistics gathering is terminated 22/57122/12
Tomas Slusny [Tue, 16 May 2017 08:12:18 +0000 (10:12 +0200)]
Ensure that statistics gathering is terminated

Store current statistics gathering future for cancellation instead of
settable future, so we can cancel it when we need to (there is no point
in cancelling settable future other than preventing more statistics
running, but current in-progress statistics gathering will still try
to finish).
Cancel statistics gathering also when become slave.

Resolves: bug 8635

Change-Id: If221a34901b08f8923ae5321a51abd00f4b047b1
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoAdd Karaf 4 distribution, fix initial config 56/58956/4
Tomas Slusny [Wed, 14 Jun 2017 14:15:09 +0000 (16:15 +0200)]
Add Karaf 4 distribution, fix initial config

- Add Karaf 4 distribution for testing to distribution/karaf4.
  This distribution will replace current distribution/karaf
  after support for Karaf 3 will be removed.
- Fix using Karaf 3 shell commands dependencies, and use
  correct ones based on Karaf version specified in distribution
- Fix copying of initial configuration file (wrong path of config
  .xml, was `src/main/features/features.xml` but corrected it to
  `src/main/feature/feature.xml`)

Resolves: bug 8693

Change-Id: I9d65f9a369e1f7750724a432e37cef944f9dcfb4
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoMerge "Migrate to odlparent 1.9.0"
Thanh Ha [Wed, 14 Jun 2017 14:24:33 +0000 (14:24 +0000)]
Merge "Migrate to odlparent 1.9.0"

6 years agoMigrate to odlparent 1.9.0 75/58875/1
Thanh Ha [Tue, 13 Jun 2017 20:26:51 +0000 (16:26 -0400)]
Migrate to odlparent 1.9.0

Change-Id: I9d504715f4d75d636ffb9fb1b338221cd836927b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoBUG-8607: Replace logger and log by LOG 83/58183/4
David Suarez [Fri, 2 Jun 2017 16:23:48 +0000 (18:23 +0200)]
BUG-8607: Replace logger and log by LOG

Replace logger and log by LOG to follow the
OpenDaylight recommendations [1].

[1]
https://wiki.opendaylight.org/view/BestPractices/Logging_Best_Practices

Change-Id: I77ef621927ba05417736d24c18c6659c7f504917
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
6 years agoFix SwitchIdleEvent echo request-reply xid 86/58786/2
Jozef Bacigal [Tue, 13 Jun 2017 06:34:19 +0000 (08:34 +0200)]
Fix SwitchIdleEvent echo request-reply xid

- changed static Long to static Xid

Change-Id: Ib6540078c8143ce6fbe53a4cf379a0b285d53a1e
Solves: Bug-4422
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
6 years agoMerge "Fix onSwitchIdleEvent echo request-reply xid"
Tomas Slusny [Mon, 12 Jun 2017 13:26:55 +0000 (13:26 +0000)]
Merge "Fix onSwitchIdleEvent echo request-reply xid"

6 years agoMerge "HeaderDeserializer and HeaderSerializer for codecs"
Jozef Bacigal [Mon, 12 Jun 2017 07:43:41 +0000 (07:43 +0000)]
Merge "HeaderDeserializer and HeaderSerializer for codecs"

6 years agoFix onSwitchIdleEvent echo request-reply xid 34/58234/4
Jozef Bacigal [Mon, 5 Jun 2017 11:08:27 +0000 (13:08 +0200)]
Fix onSwitchIdleEvent echo request-reply xid

Solves: Bug-4422

Change-Id: I879e9e6aaf560da486767a68a7e2f015db5a7d95
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
6 years agoHeaderDeserializer and HeaderSerializer for codecs 17/58117/3
Tomas Slusny [Thu, 1 Jun 2017 13:53:30 +0000 (15:53 +0200)]
HeaderDeserializer and HeaderSerializer for codecs

Implement HeaderDeserializer and HeaderSerializer for nicira
match codecs.

Resolves: bug 4862

Change-Id: Ia3dbbf622460ecfa3b6a2c48e94e432294a08c0e
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoClose OpenFlowPluginProvider during shutdown 60/58260/3
Tomas Slusny [Mon, 5 Jun 2017 15:47:51 +0000 (17:47 +0200)]
Close OpenFlowPluginProvider during shutdown

- Call close method on OpenFlowPluginProvider during shutdown
- Close all created managers, thread pool and timer during shutdown
- Remove unused notification service
- Remove warning when unknown property is loaded on start (because of
  recent FRM changes)

Resolves: bug 8598

Change-Id: Ib5a4f84ea1fa0c957b90ef216346eb85aec81ad0
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
6 years agoMigrate to odlparent 1.8.0-Carbon 42/58642/1
Thanh Ha [Fri, 9 Jun 2017 23:09:43 +0000 (19:09 -0400)]
Migrate to odlparent 1.8.0-Carbon

Per request of odlparent project we are downgrading all Nitrogen
projects to use the released odlparent 1.8.0-Carbon to allow for the
odlparent project to start performing semver style releases.

Change-Id: I7e90ac5f5e9cbe5e2304f3c8711101547a740b98
Jira: RELENG-159
RT: 41406
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoStop reschedule stat. after device disconnected 55/58255/1
Jozef Bacigal [Mon, 5 Jun 2017 14:50:47 +0000 (16:50 +0200)]
Stop reschedule stat. after device disconnected

Resolves: Bug-7940

Change-Id: Ida42676ec5bf6f06fb47837c0532878976eed442
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
7 years agoFix sample-consumer compilation error 71/58171/2
Tomas Slusny [Fri, 2 Jun 2017 10:29:55 +0000 (12:29 +0200)]
Fix sample-consumer compilation error

Remove deprecated DataBrokerService that was probably removed from
sample-consumer code.

Change-Id: Ief90c7a5ddca7dd08de390ccf6dedc98c20078c1
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoFix auxiliary connections 10/58110/2
Jozef Bacigal [Thu, 1 Jun 2017 11:07:09 +0000 (13:07 +0200)]
Fix auxiliary connections

See also: Bug-6755

Change-Id: If4964c1a0f07bfdd8104c7254f4b4484fd42d81e
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
7 years agoMerge "Improve flow collection"
Jozef Bacigal [Thu, 1 Jun 2017 11:16:32 +0000 (11:16 +0000)]
Merge "Improve flow collection"

7 years agoMerge "Bug 8497 - Provide config knob to disable the Forwarding Rule Manager reconcil...
Tomas Slusny [Thu, 1 Jun 2017 08:10:28 +0000 (08:10 +0000)]
Merge "Bug 8497 - Provide config knob to disable the Forwarding Rule Manager reconciliation"

7 years agoMerge "Make create-parents in bulk-o-matic not required"
Jozef Bacigal [Thu, 1 Jun 2017 08:08:31 +0000 (08:08 +0000)]
Merge "Make create-parents in bulk-o-matic not required"

7 years agoMerge "Add missing convertors for OF1.0 actions"
Jozef Bacigal [Thu, 1 Jun 2017 08:05:50 +0000 (08:05 +0000)]
Merge "Add missing convertors for OF1.0 actions"

7 years agoBug 8497 - Provide config knob to disable the Forwarding Rule Manager reconciliation 14/57314/5
Anil Vishnoi [Wed, 17 May 2017 21:46:19 +0000 (14:46 -0700)]
Bug 8497 - Provide config knob to disable the Forwarding Rule Manager reconciliation

Resolves: Bug 8497, Bug 7957

Change-Id: Ib798d9282f019e0c8dd520c15d8794678ee9af3d
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
7 years agoMake create-parents in bulk-o-matic not required 06/58006/1
Tomas Slusny [Tue, 30 May 2017 07:40:54 +0000 (09:40 +0200)]
Make create-parents in bulk-o-matic not required

To make bulk-o-matic input working like before, make create-parents
to default to true to use original functionality with same input
as it was before patch that introduced this new flag.

Change-Id: I89ee7d299f0ade62bd6859209c537528e5728aa7
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoImprove flow collection 68/53368/40
Tomas Slusny [Wed, 15 Mar 2017 17:23:22 +0000 (18:23 +0100)]
Improve flow collection

- Delete all known flows synchronously
- Add boolean isTransactionsEnabled to TxFacade to determine if it was
initialized and initial submit was called
- Improve deletion of flows during on the fly statistics gathering (now,
  each gathering have 3 states, INITIALIZATION, WORKING and TERMINATION
  and behaves according to that)
- Fix possibility of statistics collection freeze when error occurs
  during OF Java to OF Plugin model translation while gathering
  statistics on the fly

Resolves: bug 7501

Change-Id: I74843d4536215c192ac43964634502430da1aa9a
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoMerge "Bug 8253: Set-Field can not accept vendor extension fields."
Tomas Slusny [Fri, 26 May 2017 07:22:40 +0000 (07:22 +0000)]
Merge "Bug 8253: Set-Field can not accept vendor extension fields."

7 years agoBug 8253: Set-Field can not accept vendor extension fields. 53/56653/4
Li Guosheng [Mon, 8 May 2017 02:58:31 +0000 (10:58 +0800)]
Bug 8253: Set-Field can not accept vendor extension fields.

The various Set-Field actions are identified by their field type
which defined in OpenFlow Specification. It will be failed if we
pass a vendor extension field to Set-Field, that means Set-Field
can not accept those vendor extension fields. There are products
that hope Set-Field can accept those vendor extension fields, so
it will make sense to make Set-Field extensible.

Change-Id: Id25456d2b9008ec260ce81d3a459bdc471a69e49
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
7 years agoMerge "Bug 8535: Fix IPv6 OXMHeader Mask issue"
Anil Vishnoi [Thu, 25 May 2017 18:17:25 +0000 (18:17 +0000)]
Merge "Bug 8535: Fix IPv6 OXMHeader Mask issue"

7 years agoMerge "Add Nicira extension support for matching IPv6 Src/Dst"
Anil Vishnoi [Thu, 25 May 2017 18:16:40 +0000 (18:16 +0000)]
Merge "Add Nicira extension support for matching IPv6 Src/Dst"

7 years agoAdd missing convertors for OF1.0 actions 80/57680/3
Tomas Slusny [Tue, 23 May 2017 12:05:43 +0000 (14:05 +0200)]
Add missing convertors for OF1.0 actions

- SetDlSrc
- SetDlDst
- SetNwSrc
- SetNwDst
- SetNwTos
- SetTpSrc
- SetTpDst
- SetVlanId
- SetVlanPcp

Resolves: bug 8527

Change-Id: I9c7c97804d077e1089fe92b3465c826a43da6a33
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoMerge "Adding Reason Attribute to FlowCapableNodeConnector"
Anil Vishnoi [Wed, 24 May 2017 01:04:26 +0000 (01:04 +0000)]
Merge "Adding Reason Attribute to FlowCapableNodeConnector"

7 years agoBug 8535: Fix IPv6 OXMHeader Mask issue 94/57694/1
Sridhar Gaddam [Tue, 23 May 2017 12:57:09 +0000 (18:27 +0530)]
Bug 8535: Fix IPv6 OXMHeader Mask issue

When programming an OVS flow to set an ipv6_src/dest as
an action field (i.e., set_field:2001::1->ipv6_src), the
current implementation is not checking the Mask and is
including the Mask (even for a full ipv6 address) in the
OXM header. Because of this, switch is rejecting the flow
with the following error.

"decode error: OFPBAC_BAD_SET_MASK. OXM header 0:32768:26:1:32
includes mask but masked OXMs are not allowed here"

This patch addresses this issue by checking the prefix and
including the prefix only if applicable.

Change-Id: Ieffdc7f0e74e9418156171d85a28c24dd336527c
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
7 years agoReplace target/ by ${project.build.directory}/ for target-ide/ 77/57677/1
Michael Vorburger [Tue, 23 May 2017 12:00:03 +0000 (14:00 +0200)]
Replace target/ by ${project.build.directory}/ for target-ide/

This makes openflowjava work e.g. in Eclipse IDE out-of-the-box (using
https://github.com/vorburger/opendaylight-eclipse-setup configuration),
without any red (after a "mvn -Pide clean generate-sources").

This is how all other projects do it; I just copy/pasted from elsewhere.

Change-Id: I908357974a930d249f3c37d3cb9591dbffb8f5bb
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoRemove <prerequisites> from pom.xml to avoid WARNING 13/56813/2
David Suarez [Wed, 10 May 2017 22:48:27 +0000 (00:48 +0200)]
Remove <prerequisites> from pom.xml to avoid WARNING

[WARNING] The project ... uses prerequisites which is only intended for
maven-plugin projects but not for non maven-plugin projects. For such
purposes you should use the maven-enforcer-plugin. See
https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html

This is already done in odlparent.

Change-Id: Iaefcd3729d5600aef49f3c3c653676ad962d9838
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
7 years agoMerge "Fix logging of exception in HandshakeListenerImpl"
Jozef Bacigal [Thu, 18 May 2017 11:43:10 +0000 (11:43 +0000)]
Merge "Fix logging of exception in HandshakeListenerImpl"

7 years agoAdding Reason Attribute to FlowCapableNodeConnector 98/51498/7
GauravBhagwani [Tue, 7 Feb 2017 08:29:25 +0000 (13:59 +0530)]
Adding Reason Attribute to FlowCapableNodeConnector

-The reason attribute is added to the FlowCapableNodeConnector Yang
Modelling.
-The PortStatus contains reason when notification comes from Switch such
as ADD, UPDATE, DELETE.
-This reason flied will help in distinguishing between different
PortStatusMessages
-Also changed TestCase File to include Reason for test cases

Change-Id: If61fc1ba0afbe56cbf5382ab3997c67166989819
Signed-off-by: GauravBhagwani <gaurav.bhagwani@ericsson.com>
7 years agoRemove lifecycle service from tx chain manager 40/57240/2
Jozef Bacigal [Wed, 17 May 2017 07:51:46 +0000 (09:51 +0200)]
Remove lifecycle service from tx chain manager

Change-Id: I6e9f1d7dbdfbdcca5cd52c368985ba7d37310a74
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
7 years agoFix logging of exception in HandshakeListenerImpl 58/57158/3
Tomas Slusny [Tue, 16 May 2017 15:09:29 +0000 (17:09 +0200)]
Fix logging of exception in HandshakeListenerImpl

Exception was not logged, so in case initial processing failed and
thrown exception, there was no exception actually shown in log. To
properly log exception, it needs to be either passed as second parameter
or inserted into message via logger string interpolation ({}).

Change-Id: Ic76f6d20588e34837994b50509603d994009b705
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoWrite port statistics when needed 68/55868/18
Tomas Slusny [Mon, 24 Apr 2017 07:15:36 +0000 (09:15 +0200)]
Write port statistics when needed

When we receive port statistics reply, sometimes in OF 1.0 we do not
have parent node written to datastore, so now when OpenFlow version is
1.0 then write those port statistics with parents if needed.
Replace gathering missing port statuses with PORT_DESC with registry
that will collect missed port statuses when on MASTER.

Resolves: bug 8239, bug 6908

Change-Id: I47468cb37fa59a68cfa89efeb7e5c4191e07039d
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoMerge "Remove device without master from DS."
Anil Vishnoi [Mon, 15 May 2017 22:56:51 +0000 (22:56 +0000)]
Merge "Remove device without master from DS."

7 years agoMerge "Add timeout for device initialization"
Anil Vishnoi [Mon, 15 May 2017 22:52:59 +0000 (22:52 +0000)]
Merge "Add timeout for device initialization"

7 years agoMerge "Bug 8408 - Deserialization exception in logs when NAT flows are added."
Tomas Slusny [Mon, 15 May 2017 13:22:57 +0000 (13:22 +0000)]
Merge "Bug 8408 - Deserialization exception in logs when NAT flows are added."

7 years agoBug 8408 - Deserialization exception in logs when NAT flows are added. 31/56731/2
Aswin Suryanarayanan [Tue, 9 May 2017 14:41:42 +0000 (20:11 +0530)]
Bug 8408 - Deserialization exception in logs when NAT flows are added.

The code is modified to fix the issues with multiple CT actions.

The logic skip padded bit is added during Deserialization

Change-Id: Ic5574f0a877228d966ca92eacfa22c751fa14b3c
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
7 years agoAdd timeout for device initialization 38/56838/4
Tomas Slusny [Thu, 11 May 2017 08:57:09 +0000 (10:57 +0200)]
Add timeout for device initialization

Sometimes during device initialization, switch starts ignoring all
messages from plugin, and so we ended up with Future that waited
indefinitely for switch response until Karaf was restarted.
Add timeout that will prevent happening of above issue.

See also: bug 8401

Change-Id: I90c6c8b53f6a6e879b6d9f93c259a2cbf09f71d3
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoMerge "Though shall not use org.eclipse.tycho's osgi.. you don't even need it!"
Anil Vishnoi [Sun, 14 May 2017 08:51:48 +0000 (08:51 +0000)]
Merge "Though shall not use org.eclipse.tycho's osgi.. you don't even need it!"

7 years agoThough shall not use org.eclipse.tycho's osgi.. you don't even need it! 93/51593/4
Michael Vorburger [Thu, 9 Feb 2017 00:24:41 +0000 (01:24 +0100)]
Though shall not use org.eclipse.tycho's osgi.. you don't even need it!

see https://git.opendaylight.org/gerrit/#/c/51592/
see https://git.opendaylight.org/gerrit/#/c/51520/

There are 2 remaining use of org.eclipse.tycho in openflowplugin's
drop-test and test-provider, something related to console commands...
could we ask you if you would mind to change that to use
the Karaf Console API instead?  Or delete those? ;)

I'll like to block use of dependency tycho in odlparent ASAP.

Change-Id: Ifccbd7f6ec463487e83aa546701cdffd1c7accb4
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoAdd Nicira extension support for matching IPv6 Src/Dst 69/56969/1
Sridhar Gaddam [Fri, 12 May 2017 15:29:07 +0000 (20:59 +0530)]
Add Nicira extension support for matching IPv6 Src/Dst

This patch implements the necessary support for programming a reg_move action
(i.e., move:NXM_NX_IPV6_SRC[]->NXM_NX_IPV6_DST[]) with IPv6 source/destination
headers. It will be used while constructing OVS flows that auto-respond to ping6
requests addressed to a router-interface.

Change-Id: I64757f55ed1d30a12217c4a5aadaa3f56572ab0e
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
7 years agoFix queue and xid issue 18/56918/1
Jozef Bacigal [Fri, 12 May 2017 08:41:37 +0000 (10:41 +0200)]
Fix queue and xid issue

Change-Id: Idef52a9243d9b2b9ac7028386422f0acc580c07d
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
7 years agoFix no reserved xid 44/56844/2
Jozef Bacigal [Thu, 11 May 2017 11:10:25 +0000 (13:10 +0200)]
Fix no reserved xid

Change-Id: I153df3f1d3df895e2780a77dd6ed04e43bbc9599
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
7 years agoMerge "Remove unused method"
Tomas Slusny [Thu, 11 May 2017 13:46:30 +0000 (13:46 +0000)]
Merge "Remove unused method"

7 years agoRemove unused method 46/56846/1
Jozef Bacigal [Thu, 11 May 2017 11:32:19 +0000 (13:32 +0200)]
Remove unused method

Change-Id: I02e3d48f2ccca528995b18cb159700ab08449862
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
7 years agoMerge "Bug 8293: Add table writer to bulk-o-matic"
Anil Vishnoi [Wed, 10 May 2017 18:24:46 +0000 (18:24 +0000)]
Merge "Bug 8293: Add table writer to bulk-o-matic"

7 years agoHandle missing converters for match extensions 92/56792/2
Tomas Slusny [Wed, 10 May 2017 14:12:48 +0000 (16:12 +0200)]
Handle missing converters for match extensions

Prevent throwing NullPointerException when converter for match
entry extension is missing, instead throw warning and allow process
to continue (like it was before single-layer-serialization).

See also: bug 8401

Change-Id: If006eef401da4b9bf61911c183e76876fac0dfcf
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
7 years agoMerge "Remove unnecessary method from abstract class."
Tomas Slusny [Fri, 5 May 2017 15:05:36 +0000 (15:05 +0000)]
Merge "Remove unnecessary method from abstract class."

7 years agoRemove unnecessary method from abstract class. 01/56601/1
Jozef Bacigal [Fri, 5 May 2017 12:55:39 +0000 (14:55 +0200)]
Remove unnecessary method from abstract class.

Change-Id: I23de0d1973418854c6fce039f6e694ed13c1d04b
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
7 years agoChange sal bundle yang model 82/51682/19
miroslav.macko [Fri, 10 Feb 2017 13:23:43 +0000 (14:23 +0100)]
Change sal bundle yang model

- Put messages to message container

Change-Id: Ie86d70bf070ca16659f02ba536655c6e6f1682af
Signed-off-by: miroslav.macko <miroslav.macko@pantheon.tech>
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>