yangtools.git
10 years agoFixed resolving of schema path and qname for nodes added by augmentation. 81/1181/3
Martin Vitez [Fri, 13 Sep 2013 12:08:04 +0000 (14:08 +0200)]
Fixed resolving of schema path and qname for nodes added by augmentation.

Change-Id: If3e0cc567bf2d280a93843b4c08eb11abe4549ba
Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoTests for class BindingGeneratorUtil 54/1154/2
Jozef Gloncak [Wed, 11 Sep 2013 10:39:35 +0000 (12:39 +0200)]
Tests for class BindingGeneratorUtil

+ methods with prefix 'parseTo' in class BindingGeneratorUtil were
refactored.

Change-Id: I7d93a3e73423305af6055d2e3cf5cd1266b073bb
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoMerge "Add cause and errorType to RpcError"
Tony Tkacik [Wed, 11 Sep 2013 04:25:42 +0000 (04:25 +0000)]
Merge "Add cause and errorType to RpcError"

10 years agoAdd cause and errorType to RpcError 40/1140/2
Michal Rehak [Tue, 10 Sep 2013 03:28:07 +0000 (05:28 +0200)]
Add cause and errorType to RpcError

Signed-off-by: Michal Rehak <mirehak@cisco.com>
Change-Id: If2289524870ae9ca9f12a4b0ecf3bb3c5260ac38

10 years agoMerge "changed builder generator"
Tony Tkacik [Wed, 11 Sep 2013 03:55:41 +0000 (03:55 +0000)]
Merge "changed builder generator"

10 years agoFixing sonar issues 4 44/1144/3
Jozef Gloncak [Tue, 10 Sep 2013 06:23:14 +0000 (08:23 +0200)]
Fixing sonar issues 4

+ unit test Int8Test.java for Int8.java was added

Change-Id: Ia89f741fd46be332a8e212352798eff47eb6215c
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agochanged builder generator 43/1143/1
Michal Rehak [Tue, 10 Sep 2013 05:14:15 +0000 (07:14 +0200)]
changed builder generator

now the private constructor of inner class accesses properties of wrapping class through getters

Signed-off-by: Michal Rehak <mirehak@cisco.com>
10 years agoMerge "Updated context references in yang-ext"
Tony Tkacik [Mon, 9 Sep 2013 23:17:21 +0000 (23:17 +0000)]
Merge "Updated context references in yang-ext"

10 years agoUpdated context references in yang-ext 38/1138/1
Tony Tkacik [Mon, 9 Sep 2013 23:02:55 +0000 (16:02 -0700)]
Updated context references in yang-ext

Change-Id: Ie4675d143a739f8cb8bac3be11496737f3a97dc2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoFixing sonar issues 3 13/1113/2
Jozef Gloncak [Wed, 4 Sep 2013 12:54:03 +0000 (14:54 +0200)]
Fixing sonar issues 3

Change-Id: I4331f6a3374dbb54e7bfa0856d8a3c166dff42a5
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoFixed bug in Decimal64 constructor. 12/1112/2
Martin Vitez [Fri, 6 Sep 2013 09:20:26 +0000 (11:20 +0200)]
Fixed bug in Decimal64 constructor.

Change-Id: I2a756cc413346d071ae9f9170cbd66bf805833f0
Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoFixing sonar issues 2 80/1080/3
Jozef Gloncak [Tue, 3 Sep 2013 13:25:13 +0000 (15:25 +0200)]
Fixing sonar issues 2

Change-Id: Iaec2a3f7a268eb446cd113d2a369786a68c9c48e
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoFixed resolution problems in Code Generator 85/1085/1
Tony Tkacik [Tue, 3 Sep 2013 22:05:38 +0000 (15:05 -0700)]
Fixed resolution problems in Code Generator

Added sorting of modules by dependencies for code generator
Fixed search for parent modules

Change-Id: I9017e03937050487476eed73dafc72376b8bc4e5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoFixed NPE regresion in augmentation handling. 83/1083/2
Tony Tkacik [Tue, 3 Sep 2013 17:16:49 +0000 (10:16 -0700)]
Fixed NPE regresion in augmentation handling.

Added rollback to original handling if the class of augmentation
target is not already generated or registered in newly introduced
mapping between yang types and generated java binding specs.

Change-Id: I9d05e8ed0f6d6f2f3230a320e6eceb4463130ab0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoFixing sonar issues 78/1078/3
Jozef Gloncak [Tue, 3 Sep 2013 06:25:53 +0000 (08:25 +0200)]
Fixing sonar issues

Change-Id: I228cead40f53adcf2f25785bb56b3bbd63a7b168
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoConverted BindingGenerator and ParserUtils to xtend 77/1077/2
Tony Tkacik [Tue, 3 Sep 2013 04:23:28 +0000 (21:23 -0700)]
Converted BindingGenerator and ParserUtils to xtend

  - Fixed bug in findNode implementation methods,
    which lead to ignoring rpcs and notifications

Change-Id: Ifb16c9911a0d0dfb4a62e2986b8c1d2ae84e4b17
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoAdded more javadocs. 75/1075/1
Martin Vitez [Mon, 2 Sep 2013 14:38:59 +0000 (16:38 +0200)]
Added more javadocs.

Removed unused methods from UsesNodeBuilder.

Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoMinor code refactoring in YangParserImpl. 73/1073/1
Martin Vitez [Mon, 2 Sep 2013 11:46:03 +0000 (13:46 +0200)]
Minor code refactoring in YangParserImpl.

Removed setGroupingPath method from UsesNodeBuilder.
Fixed overriding managed version warning in yang-parser-impl/pom.xml
Un-ignored test in GeneratorJavaFileTest.

Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoRemoved duplicate code in TypeUtils class. 71/1071/1
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>
10 years agoMerge "Added InstanceIdentifier to code generation"
Martin Vitez [Mon, 2 Sep 2013 06:45:06 +0000 (06:45 +0000)]
Merge "Added InstanceIdentifier to code generation"

10 years agoMerge "Added compilation of model for YANG extension"
Martin Vitez [Mon, 2 Sep 2013 06:43:46 +0000 (06:43 +0000)]
Merge "Added compilation of model for YANG extension"

10 years agoAdded InstanceIdentifier to code generation 64/1064/1
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>
10 years agoMerge "Added Layer 2 Types model"
Tony Tkacik [Thu, 29 Aug 2013 23:43:57 +0000 (23:43 +0000)]
Merge "Added Layer 2 Types model"

10 years agoAdded compilation of model for YANG extension 53/1053/1
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>
10 years agoAdded Layer 2 Types model 50/1050/2
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>
10 years agoComments added to a source codes. 30/1030/1
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>
10 years agoAdded javadoc to generated types 97/997/1
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>
10 years agoAdded NotificationListener interfaces 96/996/1
Tony Tkacik [Fri, 23 Aug 2013 14:30:53 +0000 (16:30 +0200)]
Added NotificationListener interfaces

Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoFixed resolving of leafref types with relative xpath. 79/979/1
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>
10 years agoUpdated binding model 74/974/2
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>
10 years agoUpdated code generation 68/968/2
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>
10 years agoTest for nested union in typedef and leaf added. 62/962/2
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>
10 years agoAdded Augmentable interface to RPC inputs / outputs 63/963/1
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>
10 years agoReduced cyclomatic complexity by using Preconditions 57/957/3
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>
10 years agoMerge "Code refactoring"
Tony Tkacik [Thu, 22 Aug 2013 10:02:25 +0000 (10:02 +0000)]
Merge "Code refactoring"

10 years agoCode refactoring 41/941/2
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>
10 years agoAdded 'excludeFiles' option to yang-maven-plugin configuration. 43/943/1
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>
10 years agoAttached source code to generated artifacts. 36/936/1
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>
10 years agoRefactored base yang-java types. 35/935/1
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>
10 years agoComments of source code. 22/922/3
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>
10 years agoAdded builder generation for augmentations 27/927/1
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>
10 years agoUpdated parser to check if unknown node is defined as language extension. 23/923/3
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>
10 years agoFixed path correction process of nodes defined by uses statement. 21/921/1
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>
10 years agoMerge "Fixed bug with field starting with number"
Martin Vitez [Tue, 20 Aug 2013 10:00:32 +0000 (10:00 +0000)]
Merge "Fixed bug with field starting with number"

10 years agoFixed bug with field starting with number 20/920/1
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>
10 years agoMerge "Added iana-if-type and iana-afn-safi models."
Martin Vitez [Tue, 20 Aug 2013 09:37:07 +0000 (09:37 +0000)]
Merge "Added iana-if-type and iana-afn-safi models."

10 years agoMerge "Fixed bug in uses statement resolving."
Tony Tkacik [Tue, 20 Aug 2013 09:13:16 +0000 (09:13 +0000)]
Merge "Fixed bug in uses statement resolving."

10 years agoAdded iana-if-type and iana-afn-safi models. 16/916/1
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>
10 years agoFixed bug with mapping YANG identifiers starting with number to Java. 14/914/1
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>
10 years agoAdded support for named augmentations 10/910/1
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>
10 years agoFixed bug in uses statement resolving. 01/901/1
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>
10 years agoAdded instance identifier support. 00/900/1
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>
10 years agoFixed types range validation. 91/891/2
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>
10 years agoChanged interface sal.binding.model.api.CodeGenerator 21/821/2
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>
10 years agoMerge "Comment to binding-generator source code (partially) + bug fixing"
Martin Vitez [Wed, 14 Aug 2013 09:37:51 +0000 (09:37 +0000)]
Merge "Comment to binding-generator source code (partially) + bug fixing"

10 years agoComment to binding-generator source code (partially) + bug fixing 71/871/2
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>
10 years agoMerge "Changed logging level from debug to trace in YangParserListenerImpl."
Robert Varga [Wed, 14 Aug 2013 09:10:30 +0000 (09:10 +0000)]
Merge "Changed logging level from debug to trace in YangParserListenerImpl."

10 years agoChanged logging level from debug to trace in YangParserListenerImpl. 61/861/2
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>
10 years agoChanged yang-binding and yang-common to OSGi bundles 63/863/3
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

10 years agoFixed bug in equals method generation. 60/860/1
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>
10 years agoRefactored parsing of uses and augment statements. 57/857/1
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>
10 years agoAdded model generation from ietf-topology models 30/830/3
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>
10 years agoFixed bug in DataNodeIterator 18/818/2
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>
10 years agoIncreased version of yang and code-generator to 0.5.7-SNAPSHOT. 15/815/1
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>
10 years agoFixed NPE when dealing with union and identityref types. 14/814/2
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>
10 years agoUpdated binding-generator-impl to support more extensible logic. 08/808/1
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>
10 years agoJava builder pattern is not generated for rcp and grouping elements 06/806/1
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>
10 years agoRenamed base package names from org.opendaylight.controller to org.opendaylight.yangt... 02/802/1
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>
10 years agoUpdated yangtools version to 0.5.6-SNAPSHOT. 99/799/4
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>
10 years agoAdded 'code-generator' and 'model' projects from controller project. 98/798/1
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>
10 years agoFixed qname of nodes defined by uses statement. 86/786/1
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>
10 years agoRefactored parsing of yang uses statement. 67/767/1
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>
10 years agoVersion increased to 0.5.5-SNAPSHOT. 65/765/1
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>
10 years agoFixed build problems with yang-maven-plugin. 61/761/1
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>
10 years agoAdded more tests. Fixed javadocs. 58/758/6
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>
10 years agoReplaced 'controller' with 'yangtools' in all package names. 44/744/1
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>
10 years agoFixed bugs in antlr lexer and parser. Fixed distributionManagement section in pom... 42/742/1
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>
10 years agoReplaced package names from org.opendaylight.controller to org.opendaylight.yangtools... 32/732/4
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>
10 years agoRenamed yang-model-parser-api -> yang-parser-api. 31/731/1
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>
10 years agoRenamed maven-yang-plugin -> yang-maven-plugin. 30/730/1
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>
10 years agoFixed poms. Updated '.gitignore'. 95/695/1
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>
10 years agoUpdate parent pom. Add '.gitignore'. 68/668/1
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>
10 years agoProjects moved under correct parent. 93/693/1
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>
10 years agogroovy node-tree integration 92/692/1
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>
10 years agoYANG typedefs generation as class with extends key word 91/691/1
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>
10 years agoBumped version of yang-prototype to 0.5.4-SNAPSHOT. 90/690/1
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>
10 years agoAdded YANG extensions module 89/689/1
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>
10 years agoMinor code refactoring and improvements. 88/688/1
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>
10 years agofirst implementation of yang-data-api 87/687/1
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>
10 years agoAdded more tests for yang parser. Updated current tests. 67/667/1
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>
10 years agoAdded support to generate types from Choices and Cases added by augmentation. 66/666/1
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>
10 years agoImplemented ordering of yang module data nodes. Added Comparators utility class. 86/686/1
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>
10 years agoAdded support to generate interfaces from Choices and Cases. 65/665/1
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>
10 years agoRefactored parsing of YANG uses statement. 85/685/1
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>
10 years agoFixed bug in GeneratedPropertyBuilderImpl. 64/664/1
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>
10 years agoBumped version of YANG tools to 0.5.3-SNAPSHOT 63/663/1
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>
10 years agoAdded support for parsing yang models with already resolved context. 84/684/1
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>
10 years agoAdded validation of range and length constraints. 62/662/1
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>
10 years agoBumped version of YANG tools to 0.5.2-SNAPSHOT 83/683/1
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>
10 years agoAdded support for source code generation from identity statement, grouping statement... 82/682/1
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>