B Generated Skeleton Base Cartridge Source Files
This appendix describes the generated base cartridge source files.
About the Generated Skeleton Base Cartridge Source Files
The directory, SDK_home\samples\baseCartridge\sdk_global_cartridgeName \skeleton.properties, contains the list of editable properties that control base cartridge construction. For example, SDK_home\samples\baseCartridge\cisco\skeleton.properties contains the list of editable properties that control the base cartridge construction for the sample Cisco base Cartridge. This skeleton.properties file is fully populated and can be used to construct a Cisco demonstration cartridge.
To generate the sample base cartridge source files using the data from the skeleton properties file:
-
Go to the SDK directory:
cd SDK_home
-
Do one of the following:
-
Run the included batch file to run the cartridge generator script:
genbc samples\baseCartridge\cisco\skeleton.properties
or
-
Type in the command to run the cartridge generator script:
ant -DtemplateType=baseCartridge -DpropFile=SDK_home\samples\baseCartridge\cisco\skeleton.properties
-
Note:
to use the batch file, you must first add SDK_home\bin to your PATH variable where SDK_home is the directory where the SDK was installed (typically C:\Program Files\Oracle Communications\IP Service Activator\ipsaSDK).
This results in the following directory structure:
SDK_home logs generator.log baseCartridges sdk_global_cartridgeName build.xml src synonyms.xml <sdk_global_package> (com) <sdk_global_package> (.metasolv) <sdk_global_package> (..serviceactivator) <sdk_global_package> (...cartridges) <sdk_global_package> (....cisco) audit auditTemplate.xml capabilities empty_caps.xml messages errorMessages.xml successMessages.xml warningMessages.xml options options.xsd schema devicemodel.xsd test devicetests DeviceAccessTests.java DeviceTests.properties models sampleServiceModel.xml upgradeFrom sampleDeviceModel.xml DMUpgradeTests.java transformUnitTests.java transforms annotatedDm2Cli.xq dm2cli-precheck.xq dm-validation.xq restoreTemplate.xml sm2dm.xq xquerylib dm2cli-common.xq dmUpgrade.xq dm-version.xq sm2dm-common.xq precheck-cfg-version.xq auditLogging.properties Customization.xml Registry.xml
Generated Skeleton Base Cartridge Source File Details
Table B-1 shows the details for the generated skeleton base cartridge source file.
Table B-1 Generated Base Cartridge Source File Details
Component File | Description |
---|---|
synonyms.xml |
This file is used to identify the synonyms for configuration commands that are displayed in a different manner after coming back from a device. Specifying a synonym for a command enables the audit functionality to correctly determine if a configuration command sent to the device is equivalent to the command coming back from the device. This file is coordinated with content in auditTemplate.xml. |
auditTemplate.xml |
This file is used to identify each and every command pattern that could be sent to the device. This file is used by the audit mechanism to filter out commands that are not administered by the cartridge. |
auditLogging.properties |
This file is used to control the following attributes of the cartridge auditTrail log:
|
Registry.xml |
This file is used to register cartridges with the Network Processor. When the Network Processor executes a configuration change on a particular device, it finds the cartridge that administers the device in question through the registration process. |
Customization.xml |
This file is used to override the Registry.xml and serves as a sample. |
empty_caps.xml |
This file is a aample capabilities file. Capabilities provide privileges to the device and its subordinate interfaces to support various policies. The sample, being empty, will provide no capabilities to the device and it subordinate interfaces. The user needs to provide capability entries in order to provide privileges to the device during the IP Service Activator device discovery process. |
errorMessages.xml |
This file contains error patterns for commands generated by the base cartridge. If the response from the device matches one of the known error patterns, then a fault ( |
warningMessages.xml |
This file contains warning patterns (blocking or non-blocking) for commands generated by the base cartridge. If the response from the device matches a non-blocking warning pattern, a fault ( |
successMessages.xml |
This file contains success patterns for commands generated by the base cartridge. If the device response to sending a command matches a success pattern, or there is no response at all (only a prompt), then the command is considered successful. |
options.xsd |
This file is a XML schema file that defines the base options elements and types. The cartridge developer must extend this schema with their own cartridge specific options schema. A sample options document is provided when the cartridge generation tool executed. |
deviceModel.xsd |
This file is an extension of the base_deviceModel.xsd owned by the network processor framework. The deviceModel.xsd is owned by the cartridge and can be edited to add content to enable the support of new services that the cartridge will be administering. |
DeviceTest.properties |
This file contains properties used by the device tests. This file can be edited after the generation of skeleton file. |
DeviceAccessTests.java |
This file is a java class that tests the device connectivity. |
sampleServiceModel.xml |
This file is a sample service model used for JUnit testing by TransformUnitTesting.java and is an instance of a run time service model. |
sampleDeviceModel.xml |
This file is a sample device model used by DMUpgradeTests.java. |
TransformUnitTests.java |
|
DMUpgradeTests.java |
This file is used for testing cartridge upgrade scenarios. |
sm2dm.xq |
This file contains the XQuery source code that transforms a service model to a device model. |
annotatedDM2Cli.xq |
This file contains the XQuery source code that transforms an annotated device model to a CLI document. |
dm2cli-precheck.xq |
This file contains the XQuery source code that performs pre-check functionality, which is used by the annotatedDM2Cli.xq. |
dmValidation.xq |
This file contains the XQuery source code providing the ability to raise fault to the system console. |
sm2dm-common.xq |
This file contains the XQuery source code used to support sm2dm.xq. |
dm2cli-common.xq |
This file contains the XQuery source code used to support annoatedDM2Cli.xq. |
dmUpgrade.xq |
This file contains the XQuery source code used to support executing a DM upgrade if cartridge DM has been enhanced. |
dm-version.xq |
This file contains the XQuery source code used to identify which cartridge version is in use. |
precheck-cfg-version.xq |
This file contains the XQuery source code used to write version information to the device in order to ensure that the network processor device model is in sync with the device. |