Martin Vitez [Mon, 2 Sep 2013 06:57:28 +0000 (08:57 +0200)]
Removed duplicate code in TypeUtils class.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Mon, 2 Sep 2013 06:45:06 +0000 (06:45 +0000)]
Merge "Added InstanceIdentifier to code generation"
Martin Vitez [Mon, 2 Sep 2013 06:43:46 +0000 (06:43 +0000)]
Merge "Added compilation of model for YANG extension"
Tony Tkacik [Fri, 30 Aug 2013 20:30:49 +0000 (13:30 -0700)]
Added InstanceIdentifier to code generation
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 29 Aug 2013 23:43:57 +0000 (23:43 +0000)]
Merge "Added Layer 2 Types model"
Tony Tkacik [Thu, 29 Aug 2013 20:56:18 +0000 (13:56 -0700)]
Added compilation of model for YANG extension
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 29 Aug 2013 20:45:18 +0000 (13:45 -0700)]
Added Layer 2 Types model
Change-Id: Ib250b44bea812a1d1b7900a2cf2567adeecd917b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Jozef Gloncak [Fri, 23 Aug 2013 12:36:41 +0000 (14:36 +0200)]
Comments added to a source codes.
The missing comments in the interfaces of project yang-model-api were
added.
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Tony Tkacik [Mon, 26 Aug 2013 16:46:09 +0000 (18:46 +0200)]
Added javadoc to generated types
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Fri, 23 Aug 2013 14:30:53 +0000 (16:30 +0200)]
Added NotificationListener interfaces
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Vitez [Fri, 23 Aug 2013 12:43:47 +0000 (14:43 +0200)]
Fixed resolving of leafref types with relative xpath.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Fri, 23 Aug 2013 07:30:57 +0000 (09:30 +0200)]
Updated binding model
- Added properties to GeneratedType
- Cleaned up implementation of Type Builders
- renamed getExtends to getSuperType
Change-Id: I8c20747e346fb7b81c196b6405bc63ee28a86f08
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 22 Aug 2013 16:21:52 +0000 (18:21 +0200)]
Updated code generation
- Clean up of templates
- Added generation of copy constructors and parent class constructors
Change-Id: I92f72d68d8d417b991c5f40204a58ff6492cf1c8
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Jozef Gloncak [Thu, 22 Aug 2013 12:46:24 +0000 (14:46 +0200)]
Test for nested union in typedef and leaf added.
- BitAndUnionTOEnclosingTest class was rewritten
- MethodSignaturePattern renamed to NameTypePattern
- bit_and_union_in_leaf.yang was changed and renamed to bit_and_union.yang
Change-Id: Ib5b158d90ab2f2f5e5b121484cb7aad07b271e46
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Tony Tkacik [Thu, 22 Aug 2013 13:51:37 +0000 (15:51 +0200)]
Added Augmentable interface to RPC inputs / outputs
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 22 Aug 2013 10:44:52 +0000 (12:44 +0200)]
Reduced cyclomatic complexity by using Preconditions
Change-Id: Id267a876829d28f3359c1f2c3209d43ccbaa81bc
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 22 Aug 2013 10:02:25 +0000 (10:02 +0000)]
Merge "Code refactoring"
Jozef Gloncak [Tue, 20 Aug 2013 14:06:31 +0000 (16:06 +0200)]
Code refactoring
-> the method provideGeneratedTOBuildersForUnionTypeDef in
TypeProviderImpl.java was refactored. New code wrapping methods were
addded:
--> resolveUnionSubtypeAsUnion
--> resolveExtendedSubtypeAsUnion
--> findGenTO
--> storeGenTO
and helper method
--> provideAvailableNameForGenTOBuilder
-> the method updateEnumPairsFromEnumTypeDef (next as new method) was added to
EnumerationBuilderImpl.java
-> the method updateEnumPairsFromEnumTypeDef in TypeProviderImpl was
replaced with new method
-> piece of code in method resolveInnerEnumFromTypeDefinition in
BindingGeneratorImpl with new method
Change-Id: Iea389ac83d3eb2252cf4789b356c65d272a4a9ad
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Martin Vitez [Wed, 21 Aug 2013 15:51:44 +0000 (17:51 +0200)]
Added 'excludeFiles' option to yang-maven-plugin configuration.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Wed, 21 Aug 2013 13:48:18 +0000 (15:48 +0200)]
Attached source code to generated artifacts.
Replaced slf4j implementation in yang-maven-plugin from slf4j-simple to slf4j-maven-plugin-log to enable printing error logs during maven build.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Wed, 21 Aug 2013 12:56:55 +0000 (14:56 +0200)]
Refactored base yang-java types.
Updated types resolving in parser. Removed unused methods. Updated tests.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Jozef Gloncak [Thu, 15 Aug 2013 14:03:34 +0000 (16:03 +0200)]
Comments of source code.
Comments were added to files:
- BindingGeneratorImpl.java
- BaseYangTypes.java
- GroupingDefinitionDependencySort.java
- NodeWrappedType.java
- TypeProviderImpl.java
- UnionDependencySort.java
- AbstractBaseType.java
- BindingGeneratorUtil.java
- ReferencedTypeImpl.java
- TypeConstants.java
- Types.java
- EnumerationBuilderImpl.java
- BuilderGenerator.java
- BuilderTemplate.xtend
- ClassTemplate.xtend
- Constants.java
- EnumGenerator.java
- EnumTemplate.xtend
- GeneratorJavaFile.java
- GeneratorUtil.java
- InterfaceGenerator.java
- InterfaceTemplate.xtend
- TOGenerator.java
- CodeGenerator.java
- Enumeration.java
- WildcardType.java
-> new class NodeWrappedType was created instead of GroupingDefinitionNode a
UnionNode
-> the method resolveListTypeBuilder of BindingGeneratorImpl was removed and
its using was replaced with method addDefaultInterfaceDefinition
Change-Id: Iea6317aea75bc37883cf0f2fbf094cb8d4f02f00
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Tony Tkacik [Tue, 20 Aug 2013 16:58:31 +0000 (18:58 +0200)]
Added builder generation for augmentations
Added support for named augmentations
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Vitez [Tue, 20 Aug 2013 12:45:49 +0000 (14:45 +0200)]
Updated parser to check if unknown node is defined as language extension.
Fixed NPE in GroupingDefinitionDependencySort.
Change-Id: Ic7f89fa203c9d408f270baf9d518dc2961fac22e
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Tue, 20 Aug 2013 10:17:14 +0000 (12:17 +0200)]
Fixed path correction process of nodes defined by uses statement.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Tue, 20 Aug 2013 10:00:32 +0000 (10:00 +0000)]
Merge "Fixed bug with field starting with number"
Tony Tkacik [Tue, 20 Aug 2013 09:56:30 +0000 (11:56 +0200)]
Fixed bug with field starting with number
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Vitez [Tue, 20 Aug 2013 09:37:07 +0000 (09:37 +0000)]
Merge "Added iana-if-type and iana-afn-safi models."
Tony Tkacik [Tue, 20 Aug 2013 09:13:16 +0000 (09:13 +0000)]
Merge "Fixed bug in uses statement resolving."
Tony Tkacik [Mon, 19 Aug 2013 19:43:52 +0000 (21:43 +0200)]
Added iana-if-type and iana-afn-safi models.
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Mon, 19 Aug 2013 19:38:08 +0000 (21:38 +0200)]
Fixed bug with mapping YANG identifiers starting with number to Java.
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Mon, 19 Aug 2013 16:59:58 +0000 (18:59 +0200)]
Added support for named augmentations
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Vitez [Mon, 19 Aug 2013 11:01:10 +0000 (13:01 +0200)]
Fixed bug in uses statement resolving.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Mon, 19 Aug 2013 10:50:11 +0000 (12:50 +0200)]
Added instance identifier support.
- Added Identifiable and Identifier concepts to YANG binding
- Updated binding generator to use Identifiable and Identifier for list statements.
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Vitez [Fri, 16 Aug 2013 11:45:51 +0000 (13:45 +0200)]
Fixed types range validation.
Change-Id: Ife21296868c198f6c78eb189da651eb2872c77cc
Signed-off-by: Martin Vitez <mvitez@cisco.com>
msunal [Wed, 7 Aug 2013 15:00:08 +0000 (17:00 +0200)]
Changed interface sal.binding.model.api.CodeGenerator
- changed return type of method signature to "String generate(Type type)"
- added method "String getUnitName(Type type)" which return name of generated unit
- refactored GeneratorJavaFile with focusing on code generators
Signed-off-by: Martin Sunal <msunal@cisco.com>
Martin Vitez [Wed, 14 Aug 2013 09:37:51 +0000 (09:37 +0000)]
Merge "Comment to binding-generator source code (partially) + bug fixing"
Jozef Gloncak [Tue, 13 Aug 2013 07:46:38 +0000 (09:46 +0200)]
Comment to binding-generator source code (partially) + bug fixing
Bug fix:
- in method allNotificationsToGenType was changed implemented type
from javax.management.Notification
to org.opendaylight.yangtools.yang.binding.Notification
- if typedef contain as type other typedef from other module it wasn't
generated with input parameter in constructor (now fixed)
Change-Id: I8182abc649eef43035acdf5d934917756ab2562d
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Robert Varga [Wed, 14 Aug 2013 09:10:30 +0000 (09:10 +0000)]
Merge "Changed logging level from debug to trace in YangParserListenerImpl."
Martin Vitez [Tue, 13 Aug 2013 14:08:29 +0000 (16:08 +0200)]
Changed logging level from debug to trace in YangParserListenerImpl.
Change-Id: I455aa8382f954409180cb2ddf69ecd3f18f3ccb2
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Tue, 13 Aug 2013 15:12:29 +0000 (17:12 +0200)]
Changed yang-binding and yang-common to OSGi bundles
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Change-Id: I1c819ae1b9eee06790146a422144f79689da22c8
Martin Vitez [Tue, 13 Aug 2013 12:57:02 +0000 (14:57 +0200)]
Fixed bug in equals method generation.
Refactored CopyUtils class, expanded UsesAugmentTest.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Mon, 12 Aug 2013 16:43:31 +0000 (18:43 +0200)]
Refactored parsing of uses and augment statements.
Updated tests.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Thu, 8 Aug 2013 13:56:22 +0000 (15:56 +0200)]
Added model generation from ietf-topology models
- Moved precompilation of reusable models to
org.opendaylight.yangtools.yang group
- Added topology models from
draft-clemm-netmod-yang-network-topo-00
- Fixed bug in grouping resolving
- Disabled generation of uncessary files for some models
Change-Id: I5eafae1fda0e854e60851725921bc8844c2f14e0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Wed, 7 Aug 2013 14:49:53 +0000 (16:49 +0200)]
Fixed bug in DataNodeIterator
- Added support to DataNodeIterator to scan notifications and rpcs
for common types.
This fix is part of the fix of
https://bugs.opendaylight.org/show_bug.cgi?id=34
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Vitez [Wed, 7 Aug 2013 11:33:59 +0000 (13:33 +0200)]
Increased version of yang and code-generator to 0.5.7-SNAPSHOT.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Wed, 7 Aug 2013 09:22:40 +0000 (11:22 +0200)]
Fixed NPE when dealing with union and identityref types.
Change-Id: Ib866d9d6deb300345741fd36702af8cb3c8f043c
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Tue, 6 Aug 2013 14:34:55 +0000 (16:34 +0200)]
Updated binding-generator-impl to support more extensible logic.
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
msunal [Tue, 6 Aug 2013 14:15:10 +0000 (16:15 +0200)]
Java builder pattern is not generated for rcp and grouping elements
- added method for checking whether generated type implements Augmentable interface.
If generated type is from rcp or grouping element then the generated type does not implement
Augmentable and java builder pattern is not generated.
- added test way that a generated type implements Augmentable into GeneratorJavaFileTest
- bugfix:
bug - javax.management.Notification import was used in generated interfaces extending Notification.
consequences - Therefore generated interfaces contained errors. javax.management.
fix - Notification was replaced by org.opendaylight.yangtools.yang.binding.Notification
Signed-off-by: Martin Sunal <msunal@cisco.com>
Martin Vitez [Tue, 6 Aug 2013 11:58:29 +0000 (13:58 +0200)]
Renamed base package names from org.opendaylight.controller to org.opendaylight.yangtools.
Updated imports.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Tue, 6 Aug 2013 07:20:14 +0000 (09:20 +0200)]
Updated yangtools version to 0.5.6-SNAPSHOT.
Moved all yang-* modules under yang directory. Updated poms.
Fixed bug in yang uses processing.
Change-Id: I4b65a92d4e827bf05aa95ef234394c0eed49c0a9
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Mon, 5 Aug 2013 18:23:25 +0000 (20:23 +0200)]
Added 'code-generator' and 'model' projects from controller project.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Mon, 5 Aug 2013 07:28:50 +0000 (09:28 +0200)]
Fixed qname of nodes defined by uses statement.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Thu, 1 Aug 2013 15:11:39 +0000 (17:11 +0200)]
Refactored parsing of yang uses statement.
Added more tests.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Thu, 1 Aug 2013 08:50:12 +0000 (10:50 +0200)]
Version increased to 0.5.5-SNAPSHOT.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Wed, 31 Jul 2013 14:43:08 +0000 (16:43 +0200)]
Fixed build problems with yang-maven-plugin.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Wed, 31 Jul 2013 09:36:51 +0000 (11:36 +0200)]
Added more tests. Fixed javadocs.
Changed antlr generated code directory from org.opendaylight.controller to org.opendaylight.yangtools.
Change-Id: Ief5b41b6c0200df3f6085e01d5d0060270eefc9e
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Tue, 30 Jul 2013 15:55:25 +0000 (17:55 +0200)]
Replaced 'controller' with 'yangtools' in all package names.
Changed groupId in poms from org.opendaylight.yang to org.opendaylight.yangtools.
Added more tests.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Tue, 30 Jul 2013 09:56:56 +0000 (11:56 +0200)]
Fixed bugs in antlr lexer and parser. Fixed distributionManagement section in pom.xml.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Mon, 29 Jul 2013 11:30:06 +0000 (13:30 +0200)]
Replaced package names from org.opendaylight.controller to org.opendaylight.yangtools in yang-parser-api, yang-parser-impl and yang-model-api.
Change-Id: Ie07ccb5d41c37874a3c4551e7a584e3cf34caa51
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Mon, 29 Jul 2013 10:01:00 +0000 (12:01 +0200)]
Renamed yang-model-parser-api -> yang-parser-api.
Renamed yang-model-parser-impl -> yang-parser-impl.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Mon, 29 Jul 2013 09:36:26 +0000 (11:36 +0200)]
Renamed maven-yang-plugin -> yang-maven-plugin.
Renamed maven-yang -> yang-maven-plugin-spi.
Renamed maven-yang-plugin-it -> yang-maven-plugin-it.
Updated '.gitignore'.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Wed, 24 Jul 2013 13:43:08 +0000 (15:43 +0200)]
Fixed poms. Updated '.gitignore'.
YangToSourcesPluginTestIT temporary ignored.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Wed, 24 Jul 2013 08:15:59 +0000 (10:15 +0200)]
Update parent pom. Add '.gitignore'.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Fri, 19 Jul 2013 09:15:10 +0000 (11:15 +0200)]
Projects moved under correct parent.
Moved code-generator/maven-yang -> yang/.
Moved code-generator/maven-yang-plugin -> yang/.
Moved code-generator/maven-yang-plugin-it -> yang/.
Moved code-generator/yang-model-parser-api -> yang/.
Moved code-generator/yang-model-parser-impl -> yang/.
Configured site plugin for project. Fixed some javadocs.
Fixed bug in ParserUtils causing NullPointerException.
Fixed bug in resolving uses statement.
Improved tests.
Change-Id: Ia7567544fbe006f0cf87055c6633c04b5ce2c50e
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Michal Rehak [Mon, 24 Jun 2013 06:31:00 +0000 (08:31 +0200)]
groovy node-tree integration
logging
fixing groovy tree generating
added params for surefire
lazy node2node map fixing
changed api according to dom usage
added lazy implementation of dom
added unit tests of this dom
changed abstract implementation in yang-data-util according to new api
improved groovy generated tree and testing
removed large testing files
added copyright comments
removed maven-surefire-plugin jConsole argument (plugin fails to start, if property not defined)
Change-Id: I00b9fcbc20ce5d120128940b7b569d7a14628a6e
Signed-off-by: Michal Rehak <mirehak@cisco.com>
Jozef Gloncak [Thu, 11 Jul 2013 08:49:23 +0000 (10:49 +0200)]
YANG typedefs generation as class with extends key word
In case that YANG typedef isn't specified as base type then corresponding
class will be generated with EXTENDS key word and corresponding extended
class.
Change-Id: I36143f485b8e68f471e2a3021ceb7ddc4ad9df2f
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Martin Vitez [Wed, 10 Jul 2013 12:01:19 +0000 (14:01 +0200)]
Bumped version of yang-prototype to 0.5.4-SNAPSHOT.
Change-Id: Idacefac91a2d86606debf8a75f6cab2cf1303b98
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Tue, 9 Jul 2013 15:22:53 +0000 (17:22 +0200)]
Added YANG extensions module
- Added YANG extensions module which defines
- Context-aware RPCs
- Named Augmentations
Change-Id: I7b6cb7f579c519dfa726f966df466ad6c9e6aee1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Vitez [Tue, 9 Jul 2013 15:10:20 +0000 (17:10 +0200)]
Minor code refactoring and improvements.
Change-Id: Ifdc5b45e610037ef14eed6c97885deb1075aa884
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Michal Rehak [Thu, 27 Jun 2013 14:01:29 +0000 (16:01 +0200)]
first implementation of yang-data-api
created maven project
added basic implementations of api
added unit tests
changed api according to implementation
Change-Id: I888371d5a7afc46c843f882bee9bfcaa19d5ccbc
Signed-off-by: Michal Rehak <mirehak@cisco.com>
Martin Vitez [Thu, 4 Jul 2013 11:50:25 +0000 (13:50 +0200)]
Added more tests for yang parser. Updated current tests.
Improved parsing of deviation statement. Added getDataChildByName method to DataNodeContainerBuilder.
Fixed resolving of pattern constraint.
Renamed YangModelBuilderUtil -> ParserListenerUtils.
Renamed some test files.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
lsedlak [Wed, 3 Jul 2013 15:37:59 +0000 (17:37 +0200)]
Added support to generate types from Choices and Cases added by augmentation.
Added implementation into BindingGeneratorImpl to suppor of generating Generated Types for Choices and Cases from augmentations;
Extended ChoiceNode API and ChoiceNodeBuilder to getCaseNodeByName methods;
Fixed findSchemaNodeForGivenPath in SchemaContextUtil to support of traversal through Choice and Case nodes in data schema tree;
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Martin Vitez [Tue, 2 Jul 2013 12:13:48 +0000 (14:13 +0200)]
Implemented ordering of yang module data nodes. Added Comparators utility class.
Added checking for duplicate nodes. Added getParent() method to Builder interface.
Removed unused TypeDefinitionAwareBuilder interface.
Fixed bug in processing augmentation of choice node.
Added more logs, javadocs, tests.
Change-Id: I6d7a504cdb516c267d42b99091120649027b453d
Signed-off-by: Martin Vitez <mvitez@cisco.com>
lsedlak [Mon, 1 Jul 2013 15:47:09 +0000 (17:47 +0200)]
Added support to generate interfaces from Choices and Cases.
Added implementation to support generation of generated types from Choice and Case schema nodes from yang models into BindingGeneratorImpl;
Added test case and test files for test of generation of Generated Types;
Fixed bug in GeneratorUtil when imports were generated wrongly if the name of type was same as the name of interface/class.
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Martin Vitez [Thu, 27 Jun 2013 14:26:12 +0000 (16:26 +0200)]
Refactored parsing of YANG uses statement.
Uses statement now add nodes from referenced grouping to context where uses is defined. Added GroupingMember interface as marker interface for nodes defined in grouping.
Fixed parsing of config statement: when config is not specified, the default is same as parent schema node. If top node does not specify config, default is true.
Added ConfigNode as marker interface for nodes which can contains 'config' statement.
Added AbstractSchemaNodeBuilder as base class for builders of SchemaNode nodes.
Updated tests.
Change-Id: Ibabcf590608bdf482258826fa250692507a71c01
Signed-off-by: Martin Vitez <mvitez@cisco.com>
lsedlak [Thu, 27 Jun 2013 14:26:15 +0000 (16:26 +0200)]
Fixed bug in GeneratedPropertyBuilderImpl.
Default value for GeneratedProperty is set to true;
Added extends of AbstractBaseType for EnumerationBuilderImpl, AnnotationTypeBuilderImpl, AbstractGeneratedTypeBuilder and AbstractGeneratedType;
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Tony Tkacik [Thu, 27 Jun 2013 10:56:15 +0000 (12:56 +0200)]
Bumped version of YANG tools to 0.5.3-SNAPSHOT
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Vitez [Mon, 24 Jun 2013 09:48:14 +0000 (11:48 +0200)]
Added support for parsing yang models with already resolved context.
Added rebuild method to AugmentationTargetBuilder interface to support augmentation of resolved context.
Refactored YangParserImpl to improve readability, internal utility methods moved to ParserUtils class.
Added test to check parsing with context.
Added YangErrorListener to redirect antlr4 error messages from standard error output to logger.
Added more javadocs.
Change-Id: I838646cc4b3593a03420c1b578ee39c043f89e3d
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Mon, 17 Jun 2013 13:04:54 +0000 (15:04 +0200)]
Added validation of range and length constraints.
Fixed base range constraints of yang uint built-in types. Made rpc input and output statement optional.
Changed formatting of files to conform new sun_coding_style template. Added more tests.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Fri, 14 Jun 2013 12:29:39 +0000 (14:29 +0200)]
Bumped version of YANG tools to 0.5.2-SNAPSHOT
Change-Id: I4151e59cfb51ff934ce3c3c18090a30fb4a4179e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Vitez [Thu, 13 Jun 2013 15:25:18 +0000 (17:25 +0200)]
Added support for source code generation from identity statement, grouping statement and identityref type statement.
Introduce new BaseIdentity class as base for all classes generated from identity statements.
Introduce new WildcardType interface to add possibility to generate wildcard java type parameters in generated code.
Updated tests.
Change-Id: I99de20dc4268be43ec9966461aeb75521fe5dd6c
Signed-off-by: Martin Vitez <mvitez@cisco.com>
lsedlak [Tue, 11 Jun 2013 15:08:25 +0000 (17:08 +0200)]
Added Support for Union Type def resolving and bug fixes.
Added implementation into TypeProviderImpl to proper resolve union type definitions;
Added UnionDependencySort for correct resolution of multiple unions in same yang model;
Added support for resolving of imported union types from multiple modules;
Added tests for Union Type def resolving;
Fixed Resolving of typedef Enumerations - now the Enumeration is resolved as standalone enum typedef name .java;
Fixed resolving of Inner Enumerations;
Fixed resolving of referenced Inner Enumerations through leafref definition;
Added EnumGenerator class for generating of Enum definitions and inner Enum definitions;
Fixed generation of Enumeration type through code writer;
Fixed generation of Enumeration package name in case of inner enum definition in Class and Generated Transfer Objects;
Added capability to generate inner enums into ClassCodeGenerator and InterfaceGenerator;
Fixed of missing apostrophe in createToString method in GeneratorUtil.java in case when more than one property should be generated in toString method;
Fixed platform specific bug in maven-yang-plugin incorrect retieval of maven dependency in YangToSourcesProcessor.java;
Fixed platform specific bug in maven-yang-plugin-it - hard coded resource paths replaced for getClass().getResource calls;
Added support into BindingGenerator API to suppor of generation of Types with restriction of specified modules that will be generated;
Added implementation of generateTypes in BindingGeneratorImpl;
Added tests and test resources for testing Enumeration gen. types
Added test resources for augment relative xpath testing;
Fixed improper implementation of hashCode and equals in ExtendedType in yang-model-util;
Fixed findParentModule method in SchemaContextUtil in yang-model-util project;
Change-Id: I144acbeec9ce547da856e2979d27b2c072174a52
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Martin Vitez [Tue, 11 Jun 2013 09:55:29 +0000 (11:55 +0200)]
Fixed parsing of typedef statement. Refactored YangParserImpl to improve code readability.
Added methods to LeafSchemaNode interface. Updated tests.
Change-Id: I63c84a5c0c3c4f6c68b8c2dabdcbb66266496000
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Wed, 5 Jun 2013 14:18:01 +0000 (16:18 +0200)]
Modified construction of built-in yang types.
Base yang types can not be restricted now. Every restriction causes creation of new ExtendedType with default yang type as base type.
Updated tests.
Change-Id: I04b2a0a069dcf4f7b3a3d1220c742fed047cba3a
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Thu, 30 May 2013 14:03:54 +0000 (16:03 +0200)]
Refactored SchemaPath for yang java types. Fixed SchemaPath for augmented nodes types.
Updated yang java types constructors. Updated tests accordingly.
Change-Id: Ifeb1ddc96c89350579c837414dceeab624ef17ab
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Tue, 28 May 2013 14:44:41 +0000 (16:44 +0200)]
Bumped version of Maven YANG tools to 0.5.1-SNAPSHOT
- Removed unnecessary dependencies from YANG Maven Tools integration tests.
- Added Attach Sources and Javadoc to deploy phase
Change-Id: I456c06538c944ae53d4f12827be4a64726b8233b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
lsedlak [Tue, 28 May 2013 14:44:41 +0000 (16:44 +0200)]
Fixed dependency management.
Fixed dependency management for Binding Generator and Yang projects.
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Martin Vitez [Mon, 20 May 2013 11:20:54 +0000 (13:20 +0200)]
More javadocs added to yang-model-api.
Deleted not used KeyDefinition class.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
lsedlak [Mon, 20 May 2013 16:35:22 +0000 (18:35 +0200)]
Added support for resolving augmentations.
Added implementation into BindingGeneratorImpl to support generation of augmentati statements from yang models.
Added AugmentedTypeTest and augmented-test-models for testing of agumentation functionality.
Added ability to generate Java Interfaces that extends generic types.
Added Augmentation and Augmentable interfaces into yang-binding project.
Fixed bug in bad equals resolving in AbstractBaseType in binding-generator-util;
Added ReferencedTypeImpl into binding-generator-util;
Added findParentModule static method into SchemaContextUtil for resolving Module from SchemaNode in Schema Tree;
Added DATA_OBJECT, augmentableTypeFor and augmentationTypeFor into Types for referencing of Augmentable<T>, Augmentation<T> and DataObject interfaces defined in yang-binding;
Fixed incorrect resolving of namespaces and package names during generation of interfaces from yang lists;
Fixed bug in TypeProvider in resolving of extended types extended from multiple extended types;
Added ControllerTest and controller-models as test resources;
Changed position of revision date during package generation -> Now revision date comes after namespace;
Change-Id: I687925a622853bb6c9a809f17efd980c2960ae39
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Vitez [Fri, 17 May 2013 15:48:08 +0000 (17:48 +0200)]
Fixed tests. Added javadocs to yang-model-api.
Minor formatting changes performed in yang-model-parser-impl.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Tue, 7 May 2013 14:05:24 +0000 (16:05 +0200)]
Fixed augment schema path resolving.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
lsedlak [Tue, 7 May 2013 11:11:59 +0000 (13:11 +0200)]
Added support for implements and extends of GeneratedType;
Added functionality to store List of implementing Generation Types into
GeneratedType and GeneratedTypeBuilder;
Added functionality to store Extending Transfer Object for
GeneratedTransferObject and GeneratedTOBuilder;
Fixed:
DataNodeIterator no longer returns augmented containers, lists, leafs
and leaflists - only non augmented module schema tree;
Added findDataSchemaNode for given SchemaPath into SchemaContextUtil;
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Martin Vitez [Mon, 6 May 2013 07:12:46 +0000 (09:12 +0200)]
Added line number to error messages.
Change-Id: I180438f8e617ca910b16d524576e88650d966bbd
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Fri, 3 May 2013 13:45:49 +0000 (15:45 +0200)]
Updated POM files and versions to SNAPSHOT
Change-Id: I28b16eb8811d928440a18eb2e16df9253cc92562
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
lsedlak [Thu, 2 May 2013 13:06:12 +0000 (15:06 +0200)]
Added generate To File for specified directory.
Added overloading method generateToFile with File as input parameter and
List of Files as result;
Removed unused import in BaseTypeProvider test and BaseYangTypes;
Changed binding-generator, yang and sal maven pom files to use java 1.7;
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Martin Vitez [Tue, 30 Apr 2013 14:02:15 +0000 (16:02 +0200)]
Expanded UnknownSchemaNode implementation, refactored java source code generation.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Fri, 26 Apr 2013 09:42:59 +0000 (11:42 +0200)]
Fixed SchemaPath resolution for base YANG types.
Refactored refine statement parsing.
Change-Id: Ic00b86c611f1f56b69d9e09bf197d9ddb79da145
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Thu, 25 Apr 2013 11:54:16 +0000 (13:54 +0200)]
Fixed bugs in parsing enumeration, augment, identity.
Refactored SchemaPath construction for int, uint, decimal64, string and union types.
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Wed, 24 Apr 2013 15:34:56 +0000 (17:34 +0200)]
Implemented YANG identityref type parsing.
Refactored augmentation parsing. Added tests.
Signed-off-by: Martin Vitez <mvitez@cisco.com>