-
Bug
-
Resolution: Won't Do
-
Lowest
-
None
-
None
-
None
-
Linux Platform:
Model: opeconfig (https://github.com/openconfig/public/tree/master/release/models)
Yangtool:
<plugins>
<plugin>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-maven-plugin</artifactId>
<version>11.0.4</version>
<dependencies>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-java-api-generator</artifactId>
<version>12.0.3</version>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>openconfig-model-api</artifactId>
<version>11.0.4</version>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>openconfig-parser-support</artifactId>
<version>11.0.4</version>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-runtime-api</artifactId>
<version>12.0.3</version>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>yang-binding</artifactId>
<version>12.0.3</version>
</dependency>compiled Plugin support used:
<plugins>
<plugin>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<ignoredUnusedDeclaredDependencies combine.children="append">
<!-- Binding uses SpotBugs only for some constructs (RPCs) methods -->
<ignoredUnusedDeclaredDependency>com.github.spotbugs:spotbugs-annotations</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>Linux Platform: Model: opeconfig ( https://github.com/openconfig/public/tree/master/release/models) Yangtool: <plugins> <plugin> <groupId>org.opendaylight.yangtools</groupId> <artifactId>yang-maven-plugin</artifactId> <version>11.0.4</version> <dependencies> <dependency> <groupId>org.opendaylight.mdsal</groupId> <artifactId>mdsal-binding-java-api-generator</artifactId> <version>12.0.3</version> </dependency> <dependency> <groupId>org.opendaylight.yangtools</groupId> <artifactId>openconfig-model-api</artifactId> <version>11.0.4</version> </dependency> <dependency> <groupId>org.opendaylight.yangtools</groupId> <artifactId>openconfig-parser-support</artifactId> <version>11.0.4</version> </dependency> <dependency> <groupId>org.opendaylight.mdsal</groupId> <artifactId>mdsal-binding-runtime-api</artifactId> <version>12.0.3</version> </dependency> <dependency> <groupId>org.opendaylight.mdsal</groupId> <artifactId>yang-binding</artifactId> <version>12.0.3</version> </dependency> compiled Plugin support used: <plugins> <plugin> <groupId>org.opendaylight.yangtools</groupId> <artifactId>yang-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> </plugin> <plugin> <artifactId>maven-dependency-plugin</artifactId> <configuration> <ignoredUnusedDeclaredDependencies combine.children="append"> <!-- Binding uses SpotBugs only for some constructs (RPCs) methods --> <ignoredUnusedDeclaredDependency>com.github.spotbugs:spotbugs-annotations</ignoredUnusedDeclaredDependency> </ignoredUnusedDeclaredDependencies>
-
Highest
Dear Robert,
As part of openconfig yang model compilation (https://github.com/openconfig/public/tree/master/release/models), the generated source code is not carrying augmentation support.
For example, components -> component -> Does not carry augmentation of LINECARD, OpticalLinePort, etc. It provides augmentation of Component.class only and it does not support " Class<? extends Augmentation" feature"...
As a result of augmentation support, we are not able to augment and construct the openconfig model tree to start with platform itself.
Actuals:
public ComponentsBuilder addAugmentation(Augmentation<Components> augmentation) {
if (!(this.augmentation instanceof HashMap))
this.augmentation.put(augmentation.implementedInterface(), augmentation);
return this;
}
// It does not carry
Expected ones:
public ComponentsBuilder addAugmentation(Class<? extends Augmentation<Components>> augmentationType) {
if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); }
this.augmentation.put(augmentation.implementedInterface(), augmentation);
return this;
}
// Component reference
/**
* Add an augmentation to this builder's product.
*
* @param augmentation augmentation to be added
* @return this builder
* @throws NullPointerException if {@code augmentation} is null
*/
public ComponentBuilder addAugmentation(Augmentation<Component> augmentation) {
if (!(this.augmentation instanceof HashMap))
this.augmentation.put(augmentation.implementedInterface(), augmentation);
return this;
}
// Expectation -> additional ask. Since the Parent is not support all the methods of augmentations.
/**
* Add an augmentation to this builder's product.
*
* @param augmentation augmentation to be added
* @return this builder
* @throws NullPointerException if {@code augmentation} is null
*/
public ComponentBuilder addAugmentation(Class<? extends Augmentation<Component>> augmentationType ** ) {
if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); }
this.augmentation.put(augmentation.implementedInterface(), augmentation);
return this;
}