mdsal.git
8 years agoRemoved ReadWriteTransaction concept from APIs. 45/27345/4
Tony Tkacik [Wed, 23 Sep 2015 12:21:23 +0000 (14:21 +0200)]
Removed ReadWriteTransaction concept from APIs.

Change-Id: I0cdbb4b67806eb0374acd679ded07e57b436b724
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoAdded type-safe DataObjectModification#getModifiedChildren 52/27352/5
Tony Tkacik [Wed, 23 Sep 2015 13:00:14 +0000 (15:00 +0200)]
Added type-safe DataObjectModification#getModifiedChildren

Change-Id: I0489a1dd41c825f74f9fc1f9c8af38ab8c5d8830
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4301: Incorrect union generated code when using decimal64 75/27275/2
Martin Ciglan [Tue, 22 Sep 2015 12:51:25 +0000 (14:51 +0200)]
Bug 4301: Incorrect union generated code when using decimal64

Binding Java API Generator shouldn't generate getValue() method
for java.math BigDecimal & BigInteger types, representing
YANG decimal64 & uint64 types.

This is just a port from yangtools.

Change-Id: I8f50003296d1004f9799c96950f49b4a38732137
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
8 years agoAdded create method to DataTreeIdentifier 43/27343/2
Tony Tkacik [Wed, 23 Sep 2015 12:00:49 +0000 (14:00 +0200)]
Added create method to DataTreeIdentifier

Change-Id: I96799fefa432392d5dfd441603d36cab922e2460
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4327 - Fixed DataTreeChangeListener registration in PingPongDataBroker 64/27164/3
Michal Polkorab [Fri, 18 Sep 2015 14:10:59 +0000 (16:10 +0200)]
Bug 4327 - Fixed DataTreeChangeListener registration in PingPongDataBroker

 - delegate broker was incorrectly queried for DOMDataTreeChangeService
 - it must ask for supported extensions instead of instanceof

Change-Id: I0310926893fc517bb1e1dca48d4966d6ffc18c74
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
8 years agoBUG-2399: handle APPEARED/DISAPPEARED modification types 15/27215/1
Robert Varga [Mon, 21 Sep 2015 15:32:53 +0000 (17:32 +0200)]
BUG-2399: handle APPEARED/DISAPPEARED modification types

This adds support for handling the appeared/disappeared modification
types when instantiating a lazy data object.

Change-Id: I7a00d2c31dcc382b8b90d4a1125ec932e3075281
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-2399: take into account new ModificationTypes 08/27108/2
Robert Varga [Thu, 17 Sep 2015 03:39:35 +0000 (05:39 +0200)]
BUG-2399: take into account new ModificationTypes

APPEARED/DISAPPEARED changes may occur when structural containers come
and go. These should be treated as WRITE and DELETE for change
resolution purposes.

Change-Id: I22d7c76f149b8f72decb1c81ce960cd60ba8dc6c
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-865: remove the use of ModificationType.MERGE 06/27106/1
Robert Varga [Thu, 17 Sep 2015 03:33:45 +0000 (05:33 +0200)]
BUG-865: remove the use of ModificationType.MERGE

Change-Id: I5209acc1ec3165dc2d4e25851cfea50f91df524c
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-4309: package iana-afn-safi 00/27100/1
Robert Varga [Thu, 17 Sep 2015 01:40:22 +0000 (03:40 +0200)]
BUG-4309: package iana-afn-safi

This fixes a failure to package iana-afn-safi.

Change-Id: I325561606a3f48e0e337f67c639011cf15cd63b7
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-865: remove use of deprecated APIs 99/26999/1
Robert Varga [Tue, 15 Sep 2015 04:56:12 +0000 (06:56 +0200)]
BUG-865: remove use of deprecated APIs

YANG parser is going to lose these, do not use them.

Change-Id: Id33e324ee0661902addb9537af34504b28d762e5
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoRemove duplicate dependency 98/26998/1
Robert Varga [Tue, 15 Sep 2015 04:55:55 +0000 (06:55 +0200)]
Remove duplicate dependency

Maven warns about it, remove it.

Change-Id: I6823d825a74679c66c7d2cdc08425ae8572ca6a8
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoUse odlparent configuration for jacoco 99/26299/3
Thanh Ha [Wed, 2 Sep 2015 02:58:42 +0000 (22:58 -0400)]
Use odlparent configuration for jacoco

Change-Id: Ic8c5e9730ea5f50e6b7ad1f345840de20cae7738
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoStore DOMDataTreeProducer in ShardingTable 44/26244/5
Tony Tkacik [Mon, 31 Aug 2015 16:11:22 +0000 (18:11 +0200)]
Store DOMDataTreeProducer in ShardingTable

Change-Id: I785c10c68eb5b5ce09d103685488c2965340d3d5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoGeneralized ShardingTableEntry into generic 43/26243/5
Tony Tkacik [Mon, 31 Aug 2015 15:57:11 +0000 (17:57 +0200)]
Generalized ShardingTableEntry into generic

ShardingTableEntry was generalized into generic structure
which is indexed by YangInstanceIdentifier and may
store any arbitrary structure.

This allows for tree-base index not only of shards,
but also producers and listeners, which may be useful
during resharding operations.

Change-Id: Idde0cca1b0f4292bab0c06a0fede67fb25992e83
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 3868: Added support for bounding producers 36/26236/5
Tony Tkacik [Mon, 31 Aug 2015 14:01:29 +0000 (16:01 +0200)]
Bug 3868: Added support for bounding producers

ShardedDOMDataTree and ShardedDOMDataTreeProducer are updated
to support bounding of producers to listeners.

- Added simple loop detection for listener to not directly
listen on subtrees it is bound to.y

Change-Id: I1328a01a9629d4c7e7cab36acaf6082ba4bacb3d
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 3868: Added support for DOMDataTreeListener 31/26231/5
Tony Tkacik [Mon, 31 Aug 2015 12:10:27 +0000 (14:10 +0200)]
Bug 3868: Added support for DOMDataTreeListener

Added really simplistic and naive implementation
for DOMDataTreeListener, which is just enough
to listen on underlying data store and capture
current state.

Implementation is synchronized and does not
survive resharding currently.

Added simple base unit test to test registration
fo listener and receiving data change events.

Change-Id: I07eded569207e93bb4bb311236261b5cb7982903
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 3869: Fixed ShardedDOMDataTree to adhere to API 18/26218/4
Tony Tkacik [Mon, 31 Aug 2015 08:59:12 +0000 (10:59 +0200)]
Bug 3869: Fixed ShardedDOMDataTree to adhere to API

ShardingTableEntry:
 - Replaced emptyMap with HashMap to allow to populate
   table entry
 - Fixed #remove(Iterator) to remove registration

ShardedDOMWriteTransaction:
 - Checks if writen path is delegated to other child
   producer.
 - submit() invokes DOMDataTreeProducer in order
   to notify when transaction is submitted.

ShardedDOMDataTreeProducer
 - #transactionSubmitted() clears openTx field
   in order to allow to allocate next transaction
   or close producer.

Added unit tests which tests ShardedDOMDataTree
to adhere to Shard & Producer API contracts defined
in DOMDataTreeService and DOMDataTreeProducerService

Change-Id: I39fae5f40e5b8a1cd07fcbe183c937b5c5bda348
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBug 3866: Introduced Binding Adapters for DataTreeProducer 19/25919/2
Tony Tkacik [Mon, 24 Aug 2015 19:26:52 +0000 (21:26 +0200)]
Bug 3866: Introduced Binding Adapters for DataTreeProducer

Change-Id: I55518ce6de7edaf8bd68d6d2fccd217684b48536
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 3867: Introduced Binding APIs for Data Tree Producer. 92/25892/6
Tony Tkacik [Mon, 24 Aug 2015 14:53:16 +0000 (16:53 +0200)]
Bug 3867: Introduced Binding APIs for Data Tree Producer.

Change-Id: I234581af7704446b0a3af64723528647b58505f0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoMerge "Fix duplicate artifact inclusion"
Tony Tkacik [Mon, 14 Sep 2015 07:51:03 +0000 (07:51 +0000)]
Merge "Fix duplicate artifact inclusion"

8 years agoMerge changes I4b3820fd,Ib225745c
Tony Tkacik [Mon, 14 Sep 2015 07:50:25 +0000 (07:50 +0000)]
Merge changes I4b3820fd,Ib225745c

* changes:
  BUG-4264: deprecate packageNameForTypeDefinition()
  BUG-4264: do not duplicate strings needlessly

8 years agoFix a deprecation warning 89/26889/1
Robert Varga [Mon, 24 Aug 2015 15:43:36 +0000 (17:43 +0200)]
Fix a deprecation warning

SchemaNode.getPath() is deprecated, this is a simple migration.

Change-Id: Ic7b16a6aace06eaddd2562709c48d74ceab6191c
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoAdd mdsal-model-artifacts to binding-parent 78/26778/2
Florin Coras [Thu, 10 Sep 2015 16:33:44 +0000 (18:33 +0200)]
Add mdsal-model-artifacts to binding-parent

Given the migration to use the MD-SAL project, dependencies like
ietf-inet-types and ietf-yang-types are now imported via
org.opendaylight.mdsal.model instead of org.opendaylight.yangtools.model
groupId. However, the dependency management section of the
binding-parent does not include mdsal-model-artifacts, where the
previously mentioned artifacts are declared. This breaks imports in
bundles inheriting from binding-parent.

Change-Id: Id19c36862f8ab8bbfa70f8a538619070cf8814d7
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoBug 4145: Issue augmenting choice inside a list 03/26503/3
Peter Kajsa [Fri, 4 Sep 2015 07:50:42 +0000 (09:50 +0200)]
Bug 4145: Issue augmenting choice inside a list

The problem occurs when target node of uses-augment statement
is added by uses from another grouping and the uses statement
is not directly inside the grouping, but it is nested below
other elements (e.g. list, container etc.) in the grouping.
In this case the original of the target node is not found and
the IllegalStateException is thrown.

Change-Id: I1b0329d5da754251040894c0ccfe920bf8190aa4
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
8 years agoFix duplicate artifact inclusion 06/26606/1
Robert Varga [Mon, 7 Sep 2015 12:17:27 +0000 (14:17 +0200)]
Fix duplicate artifact inclusion

Duplicate dependency is triggering a maven warning, remove it.

Change-Id: Ia38455e648f8fd8fc8eb98aec5e5313be11ebbdf
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-4264: deprecate packageNameForTypeDefinition() 56/26556/3
Robert Varga [Sat, 5 Sep 2015 19:21:58 +0000 (21:21 +0200)]
BUG-4264: deprecate packageNameForTypeDefinition()

This method is only used in tests and is broken, schedule it for
removal.

Change-Id: I4b3820fd9e02d4903087271e2982390e8c2573a2
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-4264: do not duplicate strings needlessly 55/26555/3
Robert Varga [Sat, 5 Sep 2015 19:10:54 +0000 (21:10 +0200)]
BUG-4264: do not duplicate strings needlessly

This patch adds safeguards for string transformation methods to check if
the result is the same as input. This should address the string
duplication issues.

Change-Id: Ib225745ce35b492997edc60abd1abb3e41032795
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoUse NodeIdentifier.create() 49/26549/1
Robert Varga [Fri, 4 Sep 2015 00:01:38 +0000 (02:01 +0200)]
Use NodeIdentifier.create()

Using create() results in reused instances, thus lowering memory
footprint.

Change-Id: If1a1a3c3c74567374093a76df6e00ed7110b4f1c
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoMerge changes from topic 'be/migration/mdsal'
Robert Varga [Fri, 4 Sep 2015 13:54:41 +0000 (13:54 +0000)]
Merge changes from topic 'be/migration/mdsal'

* changes:
  Removed not-building code.
  Removed left-over dependencies to YANGTools models.

8 years agoRemoved not-building code. 75/26475/1
Tony Tkacik [Thu, 3 Sep 2015 17:29:02 +0000 (19:29 +0200)]
Removed not-building code.

Change-Id: Id89947a47aa2e5de19ac967013892a1e6a132fd3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoRemoved left-over dependencies to YANGTools models. 50/26450/4
Tony Tkacik [Thu, 3 Sep 2015 10:09:04 +0000 (12:09 +0200)]
Removed left-over dependencies to YANGTools models.

Change-Id: I71a5e1a50038629abb627d1d5cf28a5d794918c8
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoMerge "Added .gitreview"
Robert Varga [Wed, 2 Sep 2015 22:17:21 +0000 (22:17 +0000)]
Merge "Added .gitreview"

8 years agoProvide a single-argument variant of firstKeyOf() 72/25872/2
Stephen Kitt [Mon, 24 Aug 2015 13:28:22 +0000 (15:28 +0200)]
Provide a single-argument variant of firstKeyOf()

InstanceIdentifier::firstKeyOf() doesn't seem to need its second
argument, even for generic type resolution (even in Java 7). This
patch adds a variant with only the component type argument.

I'm not sure what the deprecation practices are so I haven't
deprecated the two-argument version.

Change-Id: I6d4822472db627519600f5f0828f3ebe632fc00b
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoFixed export package in mdsal-binding-generator-impl 85/26085/2
Tony Tkacik [Thu, 27 Aug 2015 13:58:58 +0000 (15:58 +0200)]
Fixed export package in mdsal-binding-generator-impl

Change-Id: Ib28bcec5674635bea781d89d97535afb195f99af
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoAdded mdsal-model Karaf feature. 82/26082/1
Tony Tkacik [Thu, 27 Aug 2015 12:28:09 +0000 (14:28 +0200)]
Added mdsal-model Karaf feature.

Change-Id: I08e12fb9f9db7f872cffec4b82f7e22d9414716e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoIntroduced MD-SAL Karaf Features 21/26021/4
Tony Tkacik [Wed, 26 Aug 2015 12:56:26 +0000 (14:56 +0200)]
Introduced MD-SAL Karaf Features

Introduced new MD-SAL Karaf features, which allows
customized inclusion only of subset of functionality
such as Java Binding without Brokers, or DOM Broker
without Binding Broker.

Change-Id: I4ddb447b7b430e004023362d91fa286f6515c225
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoMaterialized project.groupId in -artifacts. 81/26081/2
Tony Tkacik [Thu, 27 Aug 2015 12:07:55 +0000 (14:07 +0200)]
Materialized project.groupId in -artifacts.

groupId must be materialized in -artifacts type of POM file
otherwise Maven resolves it against of groupId of project
which imported such POM file.

Change-Id: Ibd7c78957c1286836b47aaed0d0ed825b74b331a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoFixed Export-Package sections after rename. 39/26039/1
Tony Tkacik [Wed, 26 Aug 2015 16:18:23 +0000 (18:18 +0200)]
Fixed Export-Package sections after rename.

Change-Id: I6b7fc00f53167d398bac35010fb03a81aa1f5912
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoConverted model packaging from jar to bundle 20/26020/1
Tony Tkacik [Wed, 26 Aug 2015 13:06:18 +0000 (15:06 +0200)]
Converted model packaging from jar to bundle

Change-Id: I0a6dae4ca90296b92a56c97cc5de2c6b081eed3f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoRenamed test packages to use org.opendaylight.mdsal 07/26007/3
Tony Tkacik [Wed, 26 Aug 2015 09:40:24 +0000 (11:40 +0200)]
Renamed test packages to use org.opendaylight.mdsal

Change-Id: Ie3272a21a39328c363a8f278cd734cdd927c995b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoRenamed controller.md.sal.dom.store.impl -> mdsal.dom.store.inmemory 06/26006/2
Tony Tkacik [Wed, 26 Aug 2015 09:18:36 +0000 (11:18 +0200)]
Renamed controller.md.sal.dom.store.impl -> mdsal.dom.store.inmemory

Change-Id: Ibe14d77f1279c8dba40d93e7ccc6acb67dc907a1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoCleaned up mdsal-common-api and mdsal-dom-spi 04/26004/2
Tony Tkacik [Wed, 26 Aug 2015 09:03:22 +0000 (11:03 +0200)]
Cleaned up mdsal-common-api and mdsal-dom-spi

Renamed mdsal-dom-spi packages to mdsal.dom.spi
Renamed .controller.md.sal.common.api to mdsal.common.api
Removed legacy concepts

Change-Id: Ib2626444f6d1beb14b757c309237c20826440006
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoRemoved legacy binding-api concepts. 78/25978/3
Tony Tkacik [Tue, 25 Aug 2015 15:53:13 +0000 (17:53 +0200)]
Removed legacy binding-api concepts.

Removed concepts, which were copied from Hydrogen APIs
and needs rework in Beryllium. These concepts are still
present in controller project and will be supported
in Beryllium.

Change-Id: Ie1b9ac0a725decf33b1d742ebbbc53493bae1ff7
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoMerge "Cleaned up dom-api and dom-broker from legacy concepts."
Robert Varga [Wed, 26 Aug 2015 06:41:03 +0000 (06:41 +0000)]
Merge "Cleaned up dom-api and dom-broker from legacy concepts."

8 years agoCleaned up dom-api and dom-broker from legacy concepts. 57/25957/2
Tony Tkacik [Tue, 25 Aug 2015 11:56:04 +0000 (13:56 +0200)]
Cleaned up dom-api and dom-broker from legacy concepts.

Change-Id: I68d188cf43b7137caa8a3a1f9b49c37c9e4b3376
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoRenamed yangtools.binding.data.codec.api to mdsal.binding.data.codec.api 42/25942/1
Tony Tkacik [Tue, 25 Aug 2015 10:47:56 +0000 (12:47 +0200)]
Renamed yangtools.binding.data.codec.api to mdsal.binding.data.codec.api

Change-Id: I071879001c0cdfb6040714ed7b5d6309b7961204
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoAdded .gitreview 38/25938/1
Tony Tkacik [Tue, 25 Aug 2015 09:57:45 +0000 (11:57 +0200)]
Added .gitreview

Change-Id: I2e63bb982082518b7c2e33c4d908993b25c99139
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoRenamed controller.md.sal.dom.broker.impl to mdsal.dom.broker 89/25889/2
Tony Tkacik [Mon, 24 Aug 2015 14:45:08 +0000 (16:45 +0200)]
Renamed controller.md.sal.dom.broker.impl to mdsal.dom.broker

Change-Id: I185b2803a4c5933c8372996ced0a01bdffdb5ee4
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoRenamed controller.md.sal.dom.api to mdsal.dom.api 88/25888/2
Tony Tkacik [Mon, 24 Aug 2015 14:40:14 +0000 (16:40 +0200)]
Renamed controller.md.sal.dom.api to mdsal.dom.api

Change-Id: Ib6e9f962e0d8555567a64aa62ef7a6f9264abab4
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoRenamed controller.md.sal.binding.api to mdsal.binding.api 87/25887/2
Tony Tkacik [Mon, 24 Aug 2015 14:38:43 +0000 (16:38 +0200)]
Renamed controller.md.sal.binding.api to mdsal.binding.api

Change-Id: Iec42b3e33e64ce84c7d667d29409266158c98137
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoRenamed controller.md.sal.binding.impl to mdsal.binding.dom.adapter 86/25886/2
Tony Tkacik [Mon, 24 Aug 2015 14:29:48 +0000 (16:29 +0200)]
Renamed controller.md.sal.binding.impl to mdsal.binding.dom.adapter

Change-Id: Ie6ad34615f89c84b3ff0b7a5bfc51703eb758db9
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoMoved binding MD-SAL APIs to binding folder 84/25884/2
Tony Tkacik [Fri, 21 Aug 2015 10:40:27 +0000 (12:40 +0200)]
Moved binding MD-SAL APIs to binding folder

Renamed artefacts:
  sal-binding-api to mdsal-binding-api
  sal-binding-broker to mdsal-binding-dom-adapter
  sal-binding-util to mdsal-binding-util

Removed deprecated Hydrogen and Helium interfaces
and adapters, since they still can be provided from
original location.

Change-Id: I0ebbfc2e927aa6c036e9be7ed216a48d970e66d0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoCleaned up sal-dom-* packages and removed legacy interfaces 00/25900/1
Tony Tkacik [Fri, 21 Aug 2015 10:45:19 +0000 (12:45 +0200)]
Cleaned up sal-dom-* packages and removed legacy interfaces

 - Removed deprecated interfaces from mdsal-common-api,
   some of this interfaces will be present in controller
   for backwards compatibility

 - Changed groupId to org.opendaylight.mdsal
 - Changed artifactId from sal-core to msdal-dom

Change-Id: I222bee07e5fd13fe10d19f01ba4f9bdf102bf3e5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoCleaned up sal-common-* to common folder 79/25579/2
Tony Tkacik [Fri, 21 Aug 2015 10:41:17 +0000 (12:41 +0200)]
Cleaned up  sal-common-* to common folder

- Added mdsal- prefix
- Updated groupId to org.opendaylight.mdsal

Change-Id: I4daef4cf6c341a4f3029f3b88a17856bdd17c009
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoMigrated models to use MD-SAL provided code. 76/25576/2
Tony Tkacik [Fri, 21 Aug 2015 10:38:02 +0000 (12:38 +0200)]
Migrated models to use MD-SAL provided code.

Change-Id: Ia92933803e133604b5a54b1b2c82210480ae3ffc
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoCleaned up Java Binding code from YANG Tools 61/25561/2
Tony Tkacik [Thu, 20 Aug 2015 09:16:17 +0000 (11:16 +0200)]
Cleaned up Java Binding code from YANG Tools

- Introduced artifacts pom
- Updated groupId from .yangtools to .mdsal
- Renamed code-generator to binding folder which
  makes more sense since it contains also codecs
  and other functionality not directly related
  to code generation.
- added mdsal- prefix to artifact id to make
  it more distinguishable from YANGTools
- joined binding-model-api, binding-generator-api,
  binding-generator spi into mdsal-binding-generator-api
- joined binding-type-provider and binding-generator-impl
  into mdsal-binding-generator-impl

Change-Id: I7edb96eff81900b90b0f6195b009a412152c2b8f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoIntroduce top-level pom file. 14/25514/3
Tony Tkacik [Thu, 20 Aug 2015 08:37:45 +0000 (10:37 +0200)]
Introduce top-level pom file.

Change-Id: Ic6ba1ee2963ee0db8ba041a46025dc994976428b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoMerge branch 'split-mdsal' of ../controller
Andrew Grimberg [Wed, 19 Aug 2015 20:35:44 +0000 (13:35 -0700)]
Merge branch 'split-mdsal' of ../controller

8 years agoBug 4035: Fixed some sonar warnings in md.sal.binding.impl
Tony Tkacik [Tue, 28 Apr 2015 13:41:05 +0000 (15:41 +0200)]
Bug 4035: Fixed some sonar warnings in md.sal.binding.impl

Change-Id: I7b850b65a7bfc40ef757115ae37a031fa88bebeb
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4035: Remove unused implementations from sal-common-impl
Tony Tkacik [Thu, 23 Jul 2015 12:23:26 +0000 (14:23 +0200)]
Bug 4035: Remove unused implementations from sal-common-impl

Removed  left-overs from Hydrogen and Helium which are
not used anymore in Lithium codebase and will be unnecessary
in Beryllium codebase.

Removed classes were never part of public API contracts
outside of MD-SAL.

Change-Id: I2d19373b270e539598fe31b7e493db494b017100
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4035: Removed sal-common which is unused since Helium.
Tony Tkacik [Thu, 23 Jul 2015 11:26:08 +0000 (13:26 +0200)]
Bug 4035: Removed sal-common which is unused since Helium.

Change-Id: Ia6e15cc1e94fcf5794a56fbf61d260644dcb457b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4035: Fixed some sonar / findbugs issues in DOM MD-SAL.
Tony Tkacik [Thu, 23 Jul 2015 11:11:08 +0000 (13:11 +0200)]
Bug 4035: Fixed some sonar / findbugs issues in DOM MD-SAL.

Change-Id: Id0ab9f65e4f1663f9e6cd85a6235a0a5fdee6f88
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4035: Remove references to not present artefacts.
Tony Tkacik [Thu, 23 Jul 2015 09:13:27 +0000 (11:13 +0200)]
Bug 4035: Remove references to not present artefacts.

Change-Id: Id0308a4b544572df16bf01b1742eed60246dde54
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4035: Extract dom-config from core-api and broker-impl
Tony Tkacik [Wed, 22 Jul 2015 12:59:20 +0000 (14:59 +0200)]
Bug 4035: Extract dom-config from core-api and broker-impl

This patch introduces two new artefacts sal-dom-config
and sal-dom-broker-config which hosts all config subsystem
related MD-SAL DOM Broker implementation.

This patch is required for MD-SAL split in order to
not have cyclic dependency between controller and md-sal
project.

Change-Id: Ic93c583c07ae3e088dcf0e74cbdaaf627a8e79f6
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoEnabling Data Change Notifications for all nodes in cluster.
Harman Singh [Fri, 24 Jul 2015 01:32:46 +0000 (18:32 -0700)]
Enabling Data Change Notifications for all nodes in cluster.

Two new interfaces are introduced ClusteredDataChangeListener and ClusteredDOMDataChangeListener and external applications will have to implement any of that interface,
if those applications want to listen to remote data change notifications.

Datastore registers listeners, which are instance of that interface, even on followers.

Change-Id: I0e29cdf2a08a2051de5fc8ce73b9ec8ac408e45b
Signed-off-by: Harman Singh <harmasin@cisco.com>
8 years agoDecouple message bus from netconf connector
Tomas Cere [Thu, 13 Aug 2015 09:06:22 +0000 (11:06 +0200)]
Decouple message bus from netconf connector

Change-Id: I6a143e868adc1e5c7a9b114798e7009bb6ef8675
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Tomas Cere <tcere@cisco.com>
8 years agoDecouple config and netconf subsystems.
Tomas Cere [Thu, 13 Aug 2015 09:06:54 +0000 (11:06 +0200)]
Decouple config and netconf subsystems.

Extract a common mapping for config pusher and config subsystem netconf
Add a ConfigPersisterFacade for XML that allows reads/writes from/to config
subsystem using XML format
Push notifications from YangStoreService to NetconfNotificationManager instead
of using custom listeners
Migrate netconf features from controller features, untangle features

Change-Id: I71e4ca6e0258e0b1f0d6c19119f93eb9d68b7bca
Signed-off-by: Tomas Cere <tcere@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
8 years agoFix license header violations in binding-data-codec
Thanh Ha [Thu, 6 Aug 2015 03:24:47 +0000 (23:24 -0400)]
Fix license header violations in binding-data-codec

Change-Id: I797ac93efabe9eea6d2ae161ec39f3028ca78807
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in binding-generator-impl
Thanh Ha [Thu, 6 Aug 2015 03:19:46 +0000 (23:19 -0400)]
Fix license header violations in binding-generator-impl

Change-Id: If155761c145d7b6db8c4378343733a7be256ba98
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in binding-type-provider
Thanh Ha [Thu, 6 Aug 2015 03:11:52 +0000 (23:11 -0400)]
Fix license header violations in binding-type-provider

Change-Id: Ib00d5625f834a9de12d10f8c3d9cbaaa7e70eb05
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-binding-broker
Thanh Ha [Sat, 8 Aug 2015 06:00:33 +0000 (02:00 -0400)]
Fix license header violations in sal-binding-broker

Change-Id: If6b75f466f97149ce4f0290135a754ca6cba1034
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-dom-broker
Thanh Ha [Sat, 8 Aug 2015 05:53:27 +0000 (01:53 -0400)]
Fix license header violations in sal-dom-broker

Change-Id: I78a5b836b7ea5053ede25a31e8a40319d365fe60
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-inmemory-datastore
Thanh Ha [Sat, 8 Aug 2015 05:45:08 +0000 (01:45 -0400)]
Fix license header violations in sal-inmemory-datastore

Change-Id: I160d107a813c28ac75f1e5e21121068de9ccc7b8
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-binding-api
Thanh Ha [Sat, 8 Aug 2015 05:43:04 +0000 (01:43 -0400)]
Fix license header violations in sal-binding-api

Change-Id: I877608c114bf4479c760f5b5dafed5d100d12cf5
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-dom-spi
Thanh Ha [Sat, 8 Aug 2015 05:41:23 +0000 (01:41 -0400)]
Fix license header violations in sal-dom-spi

Change-Id: I82f4796c933a6cec89950d4c474a0053637b2646
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-dom-api
Thanh Ha [Sat, 8 Aug 2015 05:39:55 +0000 (01:39 -0400)]
Fix license header violations in sal-dom-api

Change-Id: I08a3d973bb56d6ee267576b691a32bfe27db6820
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-common-impl
Thanh Ha [Sat, 8 Aug 2015 05:19:29 +0000 (01:19 -0400)]
Fix license header violations in sal-common-impl

Change-Id: I0702d7954d59f92ab62f6887a780db8a80f42ffa
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-common-api
Thanh Ha [Sat, 8 Aug 2015 05:17:07 +0000 (01:17 -0400)]
Fix license header violations in sal-common-api

Change-Id: I58fdef120495514ef94f2e9681790786ba4e0841
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in yang-binding
Thanh Ha [Thu, 6 Aug 2015 02:26:03 +0000 (22:26 -0400)]
Fix license header violations in yang-binding

Change-Id: I3c3fcd27c50ef3aa3c79ddaccddf8dfcf8bad4d8
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoBug 4035: Invert dependency binding-impl -> binding-config
Tony Tkacik [Wed, 22 Jul 2015 09:24:03 +0000 (11:24 +0200)]
Bug 4035: Invert dependency binding-impl -> binding-config

Dependency between sal-binding-broker-impl and sal-binding-config
was inverted in order to ease split-off and to provide config
wiring outside of implementation.

This is required for separation of MD-SAL Binding implementation
into MD-SAL Project.

Change-Id: Id18567b2c51045461ed12500fe5cb2f324f55b0c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoFixed wrong format in ShardedDOMDataTree
Tony Tkacik [Thu, 23 Apr 2015 14:09:28 +0000 (16:09 +0200)]
Fixed wrong format in ShardedDOMDataTree

Change-Id: Ie32ff9ad72e4bbae9a5ef1290ff63d5780c92313
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBUG-1485: remove deprecated range methods
Robert Varga [Fri, 5 Jun 2015 21:20:55 +0000 (23:20 +0200)]
BUG-1485: remove deprecated range methods

This Be-cycle patch removes the methods which have been removed in
Lithium, improving class size and not leaking the enforcement details.

Change-Id: I629df675eecac10c0aad1ed212123dca0f6d81d8
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoMake more mathods static
Robert Varga [Mon, 29 Jun 2015 20:22:54 +0000 (22:22 +0200)]
Make more mathods static

Private methods not touching object state can be made static, make it
so. Also remove an open-coded version of Strings.isNullOrEmpty().

Change-Id: I6e62ce1a4eb4b1556654172554eb69542df60403
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoFix some minor sonar warnings
Robert Varga [Sun, 21 Jun 2015 20:56:35 +0000 (22:56 +0200)]
Fix some minor sonar warnings

Mostly misplaced 'final' modifiers.

Change-Id: I5197b844e73db00467f7ebb852677c39176e5c94
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBug 3821 - Augmentation codecs may be loaded after codec creation.
Tony Tkacik [Fri, 19 Jun 2015 09:29:40 +0000 (11:29 +0200)]
Bug 3821 - Augmentation codecs may be loaded after codec creation.

In some scenarios - where schema context already contained
schema for introduced augmentation, but class was not known
at time codec creation was triggered - codec for augmenation
was not created and any subsequent uses of codec (class is
already known) failed with IncorrectNestingException.

This patch introduces

  - new exception MissingClassInLoadingStrategy
    which is subclass used by MD-SAL to retry after context update
    or timeout
  - supports loading of  augmentation codec after parent codec
    was created and augmentation is part of schema codec

Change-Id: If85f8e2be614a139947abc5daaa1e141b3c9b22c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit acf8e80b0747bd0aa724e978288bb83f6ca338ad)

8 years agoFix features-netconf-connector not being included
Robert Varga [Mon, 22 Jun 2015 15:27:31 +0000 (17:27 +0200)]
Fix features-netconf-connector not being included

mdsal-artifacts should be listing the features it needs, so users can
pick up their versions. This was not true for
features-netconf-connector.

Change-Id: I4d53d8cf3d6ff1bce57e9de223126fea5269419d
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoTypeDefinition is a generic type
Robert Varga [Thu, 11 Jun 2015 11:15:54 +0000 (13:15 +0200)]
TypeDefinition is a generic type

Do not use it in raw format, eliminating warnings.

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

8 years agoBug 2583 - illegal escape character if generated files
Peter Kajsa [Fri, 16 Jan 2015 12:48:44 +0000 (13:48 +0100)]
Bug 2583 - illegal escape character if generated files

When a module file name starts with 'u' character, YangTools generates
comments in file containing '\u...' character sequences which java compiler
interprets as illegal escape character.
Problem is related most probably to windows builds only.

Change-Id: I81329b754710a68ada4e9c034c8980a1acd8a1b7
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
8 years agoBug 2721: StackOverflowError for leafref FIX
Martin Ciglan [Tue, 16 Jun 2015 14:12:51 +0000 (16:12 +0200)]
Bug 2721: StackOverflowError for leafref FIX

Leafref XPath needs to be checked whether it references itself
in order to detect incoming StackOverflowError
and throw appropriate exception if necessary.

Change-Id: Iacfa1a9f9d85f947e590b1d6412c9c482b417dbf
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
8 years agoSonar: remove unused modifiers
Robert Varga [Tue, 16 Jun 2015 18:59:27 +0000 (20:59 +0200)]
Sonar: remove unused modifiers

public/static/final modifies are implied by the context, e.g. by being
declared in an interface.

Change-Id: Ic2f97172595d7cdb2119510c077eabac55fa0798
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years ago[RFC][Fix] Fix for connection in pom.xml.
Jan-Simon Möller [Wed, 3 Jun 2015 13:41:22 +0000 (15:41 +0200)]
[RFC][Fix] Fix for connection in pom.xml.

The connection value was wrong.
Apply values proposed by zxiiro.

Also fix sal-dom-xsql (wrong developerConnection).

This allows me to run  mvn site
w/o failing due to the wrong entry.

Change-Id: I15d953647a40dde4b37246a78bae120552efb15b
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
8 years agoMake methods static
Robert Varga [Thu, 11 Jun 2015 10:40:28 +0000 (12:40 +0200)]
Make methods static

All these can be made static, so improve their efficiency.

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

8 years agoMake BaseYangTypes.TYPE_MAP immutable
Robert Varga [Thu, 11 Jun 2015 10:32:44 +0000 (12:32 +0200)]
Make BaseYangTypes.TYPE_MAP immutable

The lookup map is expected to be immutable.

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

8 years agoThrow an exception from private constructor
Robert Varga [Tue, 9 Jun 2015 22:58:12 +0000 (00:58 +0200)]
Throw an exception from private constructor

This is a utility class, it should never be instantiated.

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

8 years agoBug 3336 - Binding DTOs: fix binary-derived constructor
Jan Hajnar [Mon, 1 Jun 2015 14:40:16 +0000 (16:40 +0200)]
Bug 3336 - Binding DTOs: fix binary-derived constructor

* added condition to only check for null in value assignmet if class has
one property (because then CheckNull is generated before assgnment)

Change-Id: I3bd18ec60347b3d1d5dec32e7bcafa432c56b5ad
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
(cherry picked from commit 0c58b4c45c1caedd1e3ecdfa056c0c4f98185c63)

8 years agoBug 3669 - ietf-restconf binding is incomplete
Peter Kajsa [Mon, 15 Jun 2015 09:36:29 +0000 (11:36 +0200)]
Bug 3669 - ietf-restconf binding is incomplete

- added implementation of ModuleRevisionBuilder.java

Change-Id: If50041c1b0befcb5fb8678cf95f915ef4b079bfb
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
8 years agoBug 3687 - StreamWriterGenerator emits UNKNOWN_SIZE
Tony Tkacik [Fri, 12 Jun 2015 10:28:04 +0000 (12:28 +0200)]
Bug 3687 - StreamWriterGenerator emits UNKNOWN_SIZE

StreamWriterGenerator always emitted sizing hint
for fully-completed data and sometimes even
counting all availble augmentations, which actually
lead-up to larger sizes of collections then needed.

Fix changes the SIZE HINT for "constant" max-sized
types (containers, augmentations, list entries)
to -1 so underlaying implementation could size
them based on actual data.

Change-Id: Ibd446f71c4b066f4dab4a7d73b1bc851d9e62c99
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit b6fdf49d349662ffa82ae6477f99bac405799a3f)

8 years agoMake methods static
Robert Varga [Sat, 6 Jun 2015 13:34:44 +0000 (15:34 +0200)]
Make methods static

These methods can be made static, make them such. Also fix raw types.

Change-Id: I4b697026857aae8579f0545e7e1284a7b8d00d04
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-3641: cache hashCode value
Robert Varga [Tue, 9 Jun 2015 23:09:51 +0000 (01:09 +0200)]
BUG-3641: cache hashCode value

Builder-derived classes can be used as HashMap keys, which means they
can see their hashcode computed multiple times. Since this is a
recursive operation, the cost of it can be quite high, so dedicate two
fields for caching the hashcode result.

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

8 years agoBug 1485: Invoke lengthCheck only on non-null object.
Tony Tkacik [Tue, 9 Jun 2015 12:59:25 +0000 (14:59 +0200)]
Bug 1485: Invoke lengthCheck only on non-null object.

Change-Id: Iec3cf2fe08fbdac4e5139acab7865cd4c4b6224f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit 8dfd02dec37d796ce7a51866416675b021e85b7c)