Remove CSS code JIRA: TSC-111 Change-Id: Ib74c1d3dfc029c2472b8834ae55ce05c8231d225 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Fix compilation after mdsal implementation movement MDSAL's generator has moved its implementation classes and interfaces, fix this up. Change-Id: Ie2607800b67affda966cd0fafb05437263ee9379 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bug 6859 - Binding generator v1 refactoring Based on transfer of Binding generator v1 from Yangtools project to MDSAL in past, we need to finalize this process by refactoring package naming: org.opendaylight.yangtools -> org.mdsal.binding org.opendaylight.yangtools.sal -> org.mdsal.binding Refactoring changes in MDSAL, see: https://git.opendaylight.org/gerrit/#/c/52107 By using of Binding generator v1, this change needs to be addressed in Controller project. - refactoring itself - add META-INF to gitignore Change-Id: Ib7ec1b39466c0c814459bcbc2adce437b2a0ca64 Signed-off-by: Jakub Toth <jatoth@cisco.com> Signed-off-by: Robert Varga <rovarga@cisco.com>
Cleanup equals() template Missing a space in 'if(' and has explicit comparison to false, which is not needed. Clean that up. Change-Id: I55f748935070378eab58dd11cf2fb91e8cc9628b Signed-off-by: Robert Varga <rovarga@cisco.com>
Rework MethodSerializer (+ fallout) The main aim of this patch is to avoid instanceof-determined behaviour (between MethodDeclaration and MethodDefinition): * move getThrowsExceptions() and getBody() to Method; * make getVisibility() and getBody() Optional; * method declarations can specify thrown exceptions (which are separated by commas, not spaces). In addition, use Java 8 lambdas where appropriate in MethodSerializer and a few places elsewhere, and use Modifier instead of String for modifiers. Some clean-up: * drop inferrable type parameters; * use new ArrayList<>() instead of Lists.newArrayList(); * use Collections.singletonList() where appropriate. Change-Id: I9ec10bf64d366056afacce3fd4038ba92d3c4e6e Signed-off-by: Stephen Kitt <skitt@redhat.com>
Bug 5444: Allow null value in config module list setter Change-Id: Ibdd8f93d7d8bf213892c1af8632f3ec0989cd617 Signed-off-by: Andrej Mak <andmak@cisco.com>
BUG-4329: switch to javaparser Instead of using Eclipse JDT, which has not been published in ages, use comgithub.javaparser, which supports Java 8 and is quite convenient. Change-Id: I30d3975679b6b24952eabe5488fbce2db49ab0e6 Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
Yang code generator cleanup Two axes: * make the generated code slightly better * make the generator code slightly better Fixes in generator code: * fields which can be local variables * map overwrite detection using put()'s return value * logging with exceptions * using File's parent/child handling instead of concatenating strings * if (condition) { return true; } else { return false; } simplification * if (... == false) -> if (!...) * interface method declarations are public by default * Collections.singletonList() instead of Arrays.asList() for single-item collections * StringBuilder instead of StringBuffer * String concatenation instead of straight-forward StringBuilder (i.e. non-conditional append() calls) * typos: hierarchchical -> hierarchical, intends -> indents * drop unused parameter from AbstractAttributesProcessor::processAttributes() * when processing only values in a map, use .values() rather than .entrySet() * split StringBuilder::append(a + b) into two ::append() calls * clean up the method parameter construction in MethodSerializer (to avoid deleting the ", " at the end) Fixes in generated code: * use { } as requested the Checkstyle rules * handle empty service interface sets explicitly It would be nice to use the <> operator without specifying the type where possible, but the Eclipse AST parser used in the unit tests is too old for this (so the generated code is correct and works elsewhere, but fails the unit tests). Change-Id: I725ce8d98f9ee389d394772733663ecacaccf8fa Signed-off-by: Stephen Kitt <skitt@redhat.com>
BUG-2976 Generate hash/equals for config generated DTOs The DTOs generated by config subsystem did not have hashCode and equals methods This caused the canReuse instance to return false even if the old module could be reused. Change-Id: I11392c2947f570a05d1a5b84fdaaee9e6b89a717 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Migrate JMX plugin's use of BindingGeneratorUtil The functionality was moved to BindingMapping, so migrate this user. Change-Id: I23581636182b1e63a82d8b50595c5aba5e5ffc5a Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-2283 Fix close order when reconfiguring config modules. Close is called from top(dependency source) to bottom(dependency target) while createInstance is called in opposite direction. This commit changes API and SPI of config subsystem and thus breaks runtime compatibility. Change-Id: I5b03f0673c5ecb95efbfccad7fa6ed7a490ff61b Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Fix checkstyle if-statements must use braces yang-jmx-generator-plugin Change-Id: Ic3411f453bea29817e0c637423059efa6d398e93 Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Fix checkstyle warnings in yang-jmx-generator-plugin Change-Id: I2c1d564b8ddbc04beaa0f2a1914fb6c64bfc2dfb Signed-off-by: Marian Dubai <mdubai@cisco.com>
Fix checkstyle warnings in opendaylight/config Change-Id: Ie82918d2888b6271850e371340b46825079ad485 Signed-off-by: Robert Varga <rovarga@cisco.com>
Issue fix for config subsystem Change-Id: I73d02158accb65c92dabc76eb8b353b052ac2d05 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Resolve Bug:445 Remove freemarker from config code generator. Change-Id: Idf834620cb7e12e10e7fca1ce8ea0172ca730a3d Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
Add support for identity-ref config attributes to config/netconf subsystem Change-Id: I79d5147f1d6bb1acd6b5a374bb76f48b6a3aaf55 Signed-off-by: Maros Marsalek <mmarsale@cisco.com> Signed-off-by: Tomas Olvecky <tolvecky@cisco.com> Signed-off-by: Robert Varga <rovarga@cisco.com>
Fix method isSame in generated Abstract Modules. When dealing with list of dependencies, == cannot be used. Instead, both lists must be equal, and each dependency must be == to the old one. Change-Id: I42d489d99ff7addc9d492f4878e7a13be8d9584a Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
Add Set<String> getAvailableModuleFactoryQNames() to config-api. Allow querying Config Registry and each transaction for set of qnames belonging to ModuleFactory classes. This is helpful for netconf - allows checking for race conditions between yang store and config-manager. Modify config code generator to add @ModuleQName annotation to each abstract factory class. Change-Id: I6e8f972708883137610c09d274d52aedb1380120 Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
Improved support for default yang statements in configuration subsystem Generated code for configuration contains default values with correct constructor if specified for leaves Fixed binary type (de)serialization Change-Id: Ia1338013f8aacab38074e6c7af2de351c6b73835 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>