
PowerTools Documentation: Index | Other DSP components
Table of contents |
1 DSP Logo
DSP sources should include a logo image. Name of the file should be <DSP-NAME>.gif
eg. mediawiki.gif
2 include.mk
When adding a new DSP, you need to create a makefile include.mk for the DSP. This file should generally need seven lines as described below. The directory variable is simply the name of the current directory, and will be included as part of the name of the RPM generated for this DSP.
The name and version variables are used in the RPM summary and description. shortname variable is used as common name of DSP.
The next four lines declare what files you want made part of the DSP RPM.
- lib_files
- lib_files should give utility files that need some form of pre-processing before they are ready for inclusion. Examples of lib_files are the dsp.xml, dsp.msgs, and any .po files included with this DSP.
- raw_lib_files
- raw_lib_files and source_files are copied directly over.
- themes
- themes lists the theme XSL stylesheets specific to this DSP.
- source_files
- This is the DSP source archive.
3 msgs.list
The msgs.list file contains Error declarations and is used by the build scripts to build '/usr/lib/ensim/deployables/TOOLNAME-VERSION/msgs.py' module.
This file should always begin with the line -
#include "common_msgs.list"
This line imports the common msg list into the msgs.py module at build time. This line may be followed by custom messages which would be specified with following syntax -
<ERROR_TYPE>( <Error_Number>, <Short_Name> , <Error String to be displayed>) Error Type can be any one from the -
- ERROR - ???
- WARNING - ???
- NOTICE - ???
The Error_Number has be a unique number (throughout the msgs.list file) and greater than 1000.
e.g.
ERROR(1001, ADMIN_EMPTY, "The Username of tool administrator can not be empty.") ERROR(1005, CHECK_FAILED, "The Check failed on conf. file - %s.")
These errors can now be used in dAPI as -
if not instance_conf.get('instance_admin'): msgs.append((ERROR, ADMIN_EMPTY, None))
msgs appends to itself tuples, which has first value as the Error_Type, second a short name for the error and third (dictionary/string of ) argument(s) to be passed to the error string.