7 About Design Studio Extension
This chapter provides scenarios for the extensibility of NETCONF Network Discovery and UIM Integration cartridge using Oracle Communications Service Catalog and Design - Design Studio.
Adding a New Device Type under Generic
To discover and model a new device type:
-
Collect all the YANG files supported by the device and place them in the YANG directory path set in Design Studio preferences.
-
Generate netconf-yang-model-8.0.0.jar with new YANG models using yang_sources_generator project and update jar in Netconf_Network_Discovery_Cartridge/lib folder.
For more information about generating netconf-yang-model, see About the NETCONF YANG Model.
- Create a new processor of the type yangprocessor. Select all attributes that you want to be discovered from device.
- Create a new discoveryprocessor which accepts yangprocessor output as input. Refer to the VendorNetconfDataDiscoveryProcessorImpl class to collect response from device and generate java objects.
- Update the Netconf Logical Device Modeler and Netconf Physical Device Modeler implementations to support modeling of the new device.
For more information regarding extensibility of cartridges, see Network Integrity Developer's Guide.
Fixing Known Issues in the NETCONF Network Discovery Cartridge
This section provides information about known issues in the NETCONF Network Discovery and UIM Integration cartridge.
Issues Occurring During Cartridge Runtime
Generation of Duplicate Class Names in a YANG File
During cartridge runtime, the binding generator may generate classes with the same name in one YANG file.
Example:
The generator creates the same Java class for two similar containers in a YANG file: Cisco-ios-xe-native:mac-address-table/learning and Cisco-ios-xe-native:mac/address-table/learning. This happens because the binding generator treats both "-" and "/" in the paths as valid for creating packages, which results in the same class being genrated for both:
org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xe._native.rev180522._native.mac.address.table.Learning
The duplication causes a conflict during creation of the runtime context and generates the following error:
Caused by: com.google.common.base.VerifyException: Conflict on runtime type mapping of org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xe._native.rev180522._native.mac.address.table.Learning
Fix: To fix this issue, delete any one of the similar containers in the YANG file and re-generate the bindings JAR file.
To apply the fix for the above described example.
- Identify the statement in the error that appears. The Java classes generated will be the same for both the statements. In this example, the statements are statement=EmptyContainerEffectiveStatement{argument=(http://cisco.com/ns/yang/Cisco-IOS-XE-native?revision=2018-05-22)learning}} and statement=EmptyContainerEffectiveStatement{argument=(http://cisco.com/ns/yang/Cisco-IOS-XE-native?revision=2018-05-22)learning}}
- Go to the reported module where the error originates, which is Cisco-IOS-XE-native and find statements with "learning" in them.
- Examine the absolute path of each node that contain "learning" and delete containers with matching paths so that only one of the matching nodes remains.
- Re-generate the binding JAR files.
- Use the regenerated JAR file in the NETCONF Network Discovery and UIM Integration cartridge.
YANG Files with Deviation Statements May Not Be Processed
YANG files of a device may include deviation statements to define any features not supported by the device, or to describe how device implementation differs from the standard YANG model implementation. In some cases, the generator does not apply the changes specified in the deviation statements. This mismatch causes errors during runtime.
Even if the deviation removes support for a particular data path, the generator still creates Java classes for those nodes. This mismatch causes errors during runtime.
For example, if a schema correctly excludes the "Neighbor" node (as defined in the deviation statement), but the binding generator still creates a class for it, you will see an error like the following:
<Failure in Processor Restconf Logical Data Modeller of Action DiscoverRestconfDevices (Exception: ProcessorException, Base Exception: IncorrectNestingException)>
<Jul 1, 2025, 9:58:02,354 AM Greenwich Mean Time>
<Error>
<oracle.communications.integrity.scanCartridges.sdk.BaseController> <BEA-000000>
<Action failure: Node DefaultContainerRuntimeType{javaType=org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv4, statement=EmptyContainerEffectiveStatement{argument=(urn:ietf:params:xml:ns:yang:ietf-ip?revision=2014-06-16)ipv4}} does not have child named interface org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.Neighbor>This error is caused because the schema generator honors the YANG file's deviation statement, but the binding generator does not. This inconsistency leads to conflicts when the generated classes have the fields that the deviation statement has disabled but the schema has not.
Fix: To fix this issue, you must delete the deviation statement for the particular node and re-generate the bindings JAR file.
To apply the fix for the example:
-
Open the relevant deviation YANG file, which is cisco-xe-ietf-ip-deviation.yang in this example.
-
Locate the deviation statement for the node that is being disabled or modified which is:
deviation /if:interfaces/if:interface/ip:ipv6/ip:neighbor { deviate not-supported; description "Not supported in IOS-XE 3.17 release."; } -
Delete the deviation statement.
- Re-generate the binding JAR files.
- Use the regenerated JAR file in the NETCONF Network Discovery and UIM Integration cartridge.
Issues Occuring During Binding Generation
Class and Package Names Are Case-Sensitive and Do Not Work in Microsoft Windows
The generator sometimes creates classes for containers that have the same fully qualified name but use different cases (for example, ContainerA and containera). On Windows, file and folder names are treated as case-insensitive which leads to conflicts. As a result, some generated classes overwrite others, causing compilation errors when building the JAR file.
When this happens, you will see an error message like the following when compiling the JAR file:
Compilation fails during binding JAT files generation due to unable to resolve Type:
ClassNameFix: To fix this error:
- Navigate to the parent folder where this error is observed.
- Remove all the generated artifacts.
- Run this command as an administrator in
Windows:
fsutil.exe file setCaseSensitiveInfo path enablewhere path is the path of the parent folder.
- Re-generate the binding JAR files.
- Use the regenerated JAR file in the NETCONF Network Discovery and UIM Integration cartridge.
Errors Resulting from Unsupported Use of XPATH 2.0
Some YANG files might use XPATH 2.0 which causes syntax errors.
Syntax Error: compare() function
Note:
This issue may occur during binding generation and cartridge runtime.Use of the compare() function can generate an error like the following:
org.opendaylight.yangtools.yang.parser.spi.source.SourceException: Argument "not (/ios:native/ios:router/ios-ospf:ospf/ios-ospf:vrf) or compare(/ios:native/ios:vrf/ios:definition/ios:name, /ios:native/ios:router/ios-ospf:ospf/ios-ospf:vrf) = 0 and /ios:native/ios:vrf/ios:definition/ios:rd" is not valid XPath string [at C:\cisco xe
1691\Cisco-IOS-XE-ospf.yang:1999:7]Fix: To fix this error, use "=" instead of the compare() function and ensure that each expression is enclosed in parentheses.
To fix this error:
- Open the YANG file mentioned in the error, which in this example is Cisco-IOS-XE-ospf.yang. The 1999:7 indicates the line number and column number where the syntax error occurs.
- Rewrite the argument by using the equals sign, for
example:
(/ios:native/ios:vrf/ios:definition/ios:name = /ios:native/ios:router/ios-ospf:ospf/ios-ospf:vrf)
Ensure that the revised argument is enclosed in parentheses as shown.
- Re-generate the binding JAR files.
- Use the regenerated JAR file in the NETCONF Network Discovery and UIM Integration cartridge.
Syntax Error: Use of Square Brackets
org.opendaylight.yangtools.yang.parser.spi.source.SourceException: Argument "(count(..[pce]) = 1)" is not valid XPath string [at C:\cisco xe
1691\Cisco-IOS-XE-mpls.yang:698:7]Fix: To fix this syntax error, rewrite the container name without square brackets preceded by a forward slash.
when "(count(..[pce]) = 1)";as
when "(count(../pce) = 1)";
Once the syntax error is resolved, regenerate the binding JAR files and use them in the NETCONF Network Discovery and UIM Integration cartridge.