summaryrefslogtreecommitdiffstats
path: root/infra/translate-api/src
AgeCommit message (Collapse)AuthorFilesLines
2017-11-23Fix method/modifiers ordering to comply with JLSMarek Gradzki1-2/+2
Change-Id: I2b886a118ff5167df89a2922802b343ce5978c95 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-11-22Make fields of UpdateFailedException transientMarek Gradzki1-2/+5
Exceptions are Serializable. Fields of Serializable class must be either Serializable or transient. But DataObjects are not serializable, and there is really no reason to serialize UpdateFailedException. This patch excludes fields of the UpdateFailedException from serialization process to fix Sonar warnings. Change-Id: I1eb9408289241bb4fe6f712ed9208f8460eef317 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-11-22Add serialVersionUID to UpdateFailedExceptionMarek Gradzki1-0/+1
Serializable classes should have serialVersionUID defined. Change-Id: I0ad79f6d82ed72bcea521c4cafc53219ff82a7fa Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-11-03HONEYCOMB-359 - Wildcarded writersJan Srnicek2-4/+31
Adds option to specify subtree writer that can handle whole subtree of nodes without having whole subtree specified. Its checking if node is children at runtime, rather than having pre-computed tree Change-Id: Ic46f2bd6de84f0dd14865825399f5a90a1f80859 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
2017-10-23HONEYCOMB-405 - Revert fix for indirect updatesJan Srnicek4-255/+68
If indirect update(delete+create) fails in a way, that delete passed, but update part failed, delete part must be reverted Moves reverter creation to MDTG and test cases related too it to ModifiableDataTreeDelegatorRevertTest Fixes tracking of allready processed changes by tracking them from perspective of processModifications() method Introduces UpdateFailedException as replacement for BulkUpdateException(now thrown also for single updates) Separates ReverterImpl from FlatWriterRegistry and ads unit tests Change-Id: If0066d0716d9476be89b1d99985b6745becac15e Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
2017-08-16HONEYCOMB-386 - Make update optionalJan Srnicek2-9/+22
If customizer does not support update directly, updates for its handled nodes are broken up to delete + create pairs. Change-Id: I2929109e8c9a1db0bef108367cf7d839135ce173 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
2017-02-27HONEYCOMB-344 - structural reader for listJan Srnicek1-0/+10
Change-Id: Ia02ed73daaeea547d49c9ec2d4d7d10f4db85b5e Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
2017-01-10HONEYCOMB-331: unify initialization handlingMarek Gradzki1-1/+1
Due to incorrect instance of check, InitSubtreeReader was never created in CompositeReaderRegistryBuilder.getSubtreeHandler(). As a consequence, initializers registered by subtreeAdd*, were not invoked. The patch: - fixes mentioned check, - makes readers implement InitReader instead of directly implementing Initializer - includes missing unit tests for GenericReaders. Change-Id: I93be59fafddb60dce00191958b5c8c62e7c2d289 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-11-23HONEYCOMB-170 Add more information to RevertFailedExMaros Marsalek3-22/+61
Change-Id: I6b24a1d061c94d57730b20cde4c5b3c39444b119 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-11-08HONEYCOMB-270 Add isPresent() to Readers/CustomizersMaros Marsalek1-0/+15
So that they can influence whether empty data is to be considered as present + Move registries implementations from util to impl + Introduce DelegatingReader trait + Extend GenericReader where possible to reduce duplication Change-Id: I5a416acd0c4eab1fbc30fcbe585719991dbe9215 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-10-28Honeycomb-73 Extensible initializers frameworkMaros Marsalek7-2/+174
Change-Id: Ib23453d4040d59a512686315995a5cf9e532cefc Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-10-24HONEYCOMB-255 - Cutting identifiers to prevent failing of revertsJan Srnicek2-5/+39
Mapping allready processes changes for reverting by InstanceIdentifier instead of using KeyedInstanceIdentifier(to prevent failing to identify handleable nodes) Modified logging to prevent double/triple logging of detailed cause of failed bulk update Reusing WriteContext for revert(removed try with resource to prevent closing of write context before revert) Change-Id: Ie939ebe443629f9cdad5b5b449aa8c5dac40ea67 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com> Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-09-23HONEYCOMB-145 - Utility Class RefactoringJan Srnicek1-0/+1
problematic mockito-all changed to mockito-core( https://github.com/mockito/mockito/issues/324) Translate Utils Splitted to multiple Trait Interfaces Ipv4Translator - Logic for translation of ipv4-based data Ipv6Translator - Logic for translation of ipv6-based data MacTranslator - Logic for translation of mac-based data AddressTranslator - Aggregation trait for Ipv4/Ipv6/Mac JvppReplyConsumer - Logic for extracting replies from jvpp calls ByteDataTranslator - any byte-based conversions Plus some existing utility classes changed to traits Change-Id: I342b625954223966802e65dca0fabf8456c89345 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
2016-09-13HONEYCOMB-194 Raise test coverage for translate-api to 80%Maros Marsalek8-8/+356
Change-Id: I6f055ae926aaf876863adb7eddadde0abefdda91 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-09-07Cleanup TODOs and FIXMEsMaros Marsalek3-3/+3
- Fix minor ones - Report bigger and include issue number in comment - Pull common dependencies into dependency management of common/parents Change-Id: I06a6ac37c52b603fd73ed42023d6b2e7fa18010f Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-09-05Fix ReaderFactory: remove AutoClosable from listMarek Gradzki1-6/+1
of implemented interfaces. Reader factories do not need to be AutoClosable. Change-Id: I779e87eb0b03750e264df52e14eee58467ca799a Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-09-05Fix Writer Factory: remove AutoClosable from listMarek Gradzki1-5/+1
of implemented interfaces. WriterFactories do not need to be AutoClosable. Change-Id: I1947489b7eac2ccf4c34b3212c93ed76922a595f Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-08-31Fixing sonar issues #1Maros Marsalek3-7/+7
Change-Id: I4c27d0ad2fd1655db2237ae914361f029093084c Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-08-31HONEYCOMB-144 - Make dump cache manager thread-saveJan Srnicek1-5/+8
Modified to be thread save and generic to be usable in all plugins Change-Id: I26c90e8c8aa13c07fa389d86a9784e92e9532bcd Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
2016-08-19HONEYCOMB-22: Remove karaf based distribution and wiringMaros Marsalek1-52/+0
Change-Id: I48aafb726de53b6ad3fb9b97c202f712dfa4a540 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-07-29HONEYCOMB-130: Rename infra packages(remove vpp/v3po)Maros Marsalek26-53/+53
Change-Id: Ic5b90e397e3743623d01b206bc60bc5c7df6b981 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-07-29HONEYCOMB-130: Separate v3po plugin from HC infraMaros Marsalek26-0/+1554
Creating folders: - common/ - infra/ - v3po/ - vpp-common/ Change-Id: I2c39e1b17e39e7c0f0628f44aa5fe08563fa06e4 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>