[ ESO ]

+

DICB DID Repository
ESO DFS Software

HOME

SEARCH

HELP


Introduction

The purpose of the DICB DID Repository (DidRep) is to provide an online repository of the Data Interface Dictionaries (DIDs) used around ESO. The DIDs are stored in a Sybase relational DB. The DIDs are updated from the CMM (the configuration control system used by Technical Division Software Dep.). I.e., when new versions become available in CMM, these are ingested into the DidRep by the DidRep tools. In this way it is possible to have an on-line, up-to-date repository of the DIDs used at ESO. This is practicle since not everybody has access to the CMM repository. In addition, the DidRep makes it possible to make queries e.g. all DIDs simultaneously to get an overview of how parameters are defined in the various DIDs, to compare new DIDs with earlier versions, and to make other statistics.

The DidRep provides a keyword query engine. It is also possible to download DIDs from the DidRep. If needed, it is possible to replicate the central DidRep to other locations if a local, complete set of DIDs are needed.

Structure of the DidRep DB

The structure of the DidRep DB is quite simple. It consists of two tables "did_dictionaries" which hold the information about the DIDs ingested, and "did_parameters" which holds the information for the parameter records for the DIDs.

The did_dictionaries table has the following columns:

Column Name Type Explanation
name varchar(100) The name of the DID, e.g. "VLT-ESO-DIC.CCDDCS".
scope varchar(255) The scope as defined in the header of the DID, e.g. "NAOS OS".
source varchar(255) Source as set in the DID header.
version varchar(100) The version number as set by the version control system (normally CMM).
revision varchar(100)

This and the next three fields constitute one Revision Record from the DID header. The revision is the revision code allocated to this release (allocated by DICB).

date datetime The timestamp for the Revision Record from the DID header.
status varchar(255) The status illustrating the current state of the DID (e.g. draft, released).
description text Description of this release/revision of the DID.
ingestion_date datetime Date the DID was ingested into the DidRep.
editable tinyint Indicates if the DID can be edited directly in the DidRep (0 = cannot be edited, 1 = edit). This feature is not yet supported by the DidRep.

code

numeric(10,0) A unique code which is used to link the DID parameter records in the did_parameters table to each DID.
illegal_format tinyint Indicates if descrepancies were found in the DID while parsing it (0 = no descrepancies found, 1 = descrepancies found). The format of the DID may still be good enough to extract the information about the parameters. Maybe this is only due to minor format errors in the header.
skipped tinyint Indicates if this DID was skipped during the ingestion. A DID is skipped e.g. if the format is deviating too much from the defined format. There will be no parameter records stored in connection with a DID marked as skipped (0 = not skipped, 1 = skipped).
reference varchar(100) A reference to where the source of the DID is located, e.g. "CMM/dicASM", means that the DID is stored under CMM and in the CMM module "dicASM".
ignore tinyint Indicates if this DID should be ignored by the DidRep query tools. If a DID should be ignored it is not taken into account during the queries (0 = don't ignore, 1 = ignore).

*: Unique index created on column "code".

The did_parameters table has the following columns:

Column Name Type Explanation
code(*) numeric(10,0) Code which links the parameters records to the DIDs to which they belong.
parameter(*) varchar(100) Name of the parameter, e.g. "DET WIN NX".
class varchar(100) Class as defined in the DID for each parameter, e.g. "setup|header".
context varchar(32) Context as defined in the DID parameter record, e.g. "ISAAC OS".
type varchar(16) Type of key as defined in the DID parameter record (string, logical, integer, double).
format varchar(8) Format as defined in the DID, e.g. "%.4E".
unit varchar(16) Unit as defined in the DID for the parameter, e.g. "s".
comment varchar(100) Comment as defined in the DID.
description text Description as stored in the DID for the parameter record.

*: Unique index created on conjunction of columns "parameter" and "code".

The DidRep Software + Requirements

The SW developed for the DidRep is contained in Sniff project didRep with the followning sub-projects:

The DidRep SW is written in Python and requires thus an installation of the Python environment. For accessing Sybase, the Python module with the same name must be installed. Also a Sybase DB must be installed and accessible. The DidRep SW is using the services provided by the PCC (Python Component Platform). For querying the DIDs from CMM the VLT SW must be installed (NOCCS is enough - in principle it should be enough to install the CMM SW). For using CMM it will also be necessary to get an account with CMM.

Ingestion of DIDs

The ingestion of DIDs from CMM or directly from a DID in an ASCII file, is done using the DidRepIngest tool. The tool takes the following input parameters (output from DidRepIngest tool when invoking without input parameters):

> python DidRepIngest.py

% DidRepIngest   [-v] [-h] [-d]
                 [-e (email)] [-subscribers (emails)]
                 {-w (working dir) -l (DID list) |
                  -did (DID name)}
                 {[-dbUser (DB user)] [-dbName (DB name)
                  [-dbPassword (password)]}


-v                 Run in verbose mode.
-h                 Print this help text.
-d                 Run in debug mode.

-e                 E-mail address to which a report will be
                   sent in case of problems and stating which
                   DIDs have been ingested.

-subscribers       Comma separated list of e-mail recipients
                   who want to be informed about ingestion of
                   new DIDs. No error message are sent to these
                   recipients.

-w (working dir)   Working directory which will be used by
                   the tool during the updating. If not
                   existing the directory will be created.
-did (DID name)    Name of a DID to ingest 'manually'. The name
                   should contain the necessary path informa-
                   tion to enable the tool to locate the DID.
-l (DID list)      File containing a list of DIDs to be checked
                   for update. The format of this file is the
                   following:

   DIDREP.NAME     "(DID name)/(archive)/(module/project code)"

   - where (DID name) is the name of the DID e.g.
   "ESO-VLT-DIC.ISAAC_OS", (archive) is the version control 
   system (for now only "CMM"), (module/...) is the code name
   for the module project, e.g. "dicNAOS"

   Comments can be written initiated by a hash sign.


-dbUser (DB user)  Name of DB user for the DidRep DB.
-dbName (DB name)  Name of the DidRep DB instance.
-dbPasswd (passwd) Password to use to connect to the DidRep DB. 

DidRep WEB Query Interface

The WEB query interface provides a CGI script names DidRepWebQuery. The behavior of the tool in connection with the HTTP parameters given are as follows:

Parameter Combination Corresponding Action

No Parameters

Generate overview of all DIDs in the DidRep.

Example: DidRepWebQuery

keyword

Generate the Global keyword Search WEB page.

Example: DidRepWebQuery?keyword=DET+CHIP*

did

Generate overview about the available versions of a specific DID.

Example: DidRepWebQuery?did=ESO-VLT-DIC.IRACE

did + version

Generate detailed information about a specific version of a DID + list all keywords contained in this version.

Example: DidRepWebQuery?did=ESO-VLT-DIC.IRACE&version=1.11

did + version + keyword

Generate HTML page with specific information from one version of a DID filtering out the keywords specified.

Example: DidRepWebQuery?keyword=AOS+OCS+C*&did=ESO-VLT-DIC.NAOS_OS&version=1.32

download + did + version

Download a specific DID via the WEB browser.

Example: DidRepWebQuery?download=T&did=ESO-VLT-DIC.ISS&version=1.5

The exact path for the invocation of the DidRepWebQuery CGI script are not shown above. This is depending on the installation of the HTTP server.

Central/Main Repository

The main/central DICB DidRep repository is available from the URL:

http://archive.eso.org/dicb/bin/DidRep/DidRepWebQuery

It is possible though, to make local (private) installations if relevant or needed. In the following it is explained briefly how to set up such a DidRep service. The explanation is based on the set-up for the Central DidRep. Apart from installing the DidRep and PCC SW in the bin directory for the HTTP server for the site above, and installing the Python + Sybase module, a cron job is defined which is executed every night at 01:00am if new DIDs are available for update. The cron job is defined as:

> crontab -l

00 01 * * * /home/archeso/DidRep/DidRepExec ESOECF

The script DidRepExec is contained in the DFS Sniff module didRep/didRepIngest and must be adopted to the individual installation. Note, that it is often necessary to set a number of environment variables 'manually' when executing a process as a cron job, as these are not set within the shell spawned by the cron job. In this case, these environment variables are set by the DidRepExec tool. The DIDs to be updated is contained in a PAF file named DidList which is used as input parameter for the DidRepIngest tool (invoked internally in the DidRepExec script). The format of the DidList file is (example):

############################################################################
# This file contains a list of DIDs to be ingested by the DidRepAutoUpdate.
############################################################################

DIDREP.NAME     "ESO-VLT-DIC.ASM/CMM/dicASM"
DIDREP.NAME     "ESO-VLT-DIC.BOSS/CMM/dicBOSS"
DIDREP.NAME     "ESO-VLT-DIC.CCDDCS/CMM/dicCCD"
DIDREP.NAME     "ESO-VLT-DIC.COU/CMM/dicCOU"
DIDREP.NAME     "ESO-VLT-DIC.DEL/CMM/dicDEL"
DIDREP.NAME     "ESO-VLT-DIC.DPR/CMM/dicDPR"
DIDREP.NAME     "ESO-VLT-DIC.FCDDCS/CMM/dicFCD"
DIDREP.NAME     "ESO-VLT-DIC.PRIMARY-FITS/CMM/dicFITS"
DIDREP.NAME     "ESO-VLT-DIC.XXXX_ICS/CMM/dicXXXX"
DIDREP.NAME     "ESO-VLT-DIC.FLAMES_ICS/CMM/dicFLAMES"
DIDREP.NAME     "ESO-VLT-DIC.FLAMES_CFG/CMM/dicFLAMES"
DIDREP.NAME     "ESO-VLT-DIC.FP_CFG/CMM/dicFP"
DIDREP.NAME     "ESO-VLT-DIC.FP_ICS/CMM/dicFP"
DIDREP.NAME     "ESO-VLT-DIC.FP_OS/CMM/dicFP"
DIDREP.NAME     "ESO-VLT-DIC.GIRAFFE_ICS/CMM/dicGIRAFFE"
DIDREP.NAME     "ESO-VLT-DIC.GIRAFFE_CFG/CMM/dicGIRAFFE"
DIDREP.NAME     "ESO-VLT-DIC.GIRAFFE_OS/CMM/dicGIRAFFE"
DIDREP.NAME     "ESO-VLT-DIC.IRACE/CMM/dicIRACE"
DIDREP.NAME     "ESO-VLT-DIC.ISS/CMM/dicISS"
DIDREP.NAME     "ESO-VLT-DIC.NAOS_OS/CMM/dicNAOS"
DIDREP.NAME     "ESO-VLT-DIC.NAOS_IR/CMM/dicNAOS"
DIDREP.NAME     "ESO-VLT-DIC.NAOS_RTC/CMM/dicNAOS"
DIDREP.NAME     "ESO-VLT-DIC.NAOS_VIS/CMM/dicNAOS"
DIDREP.NAME     "ESO-VLT-DIC.NAOS_ICS/CMM/dicNAOS"
DIDREP.NAME     "ESO-VLT-DIC.NAOS_PS/CMM/dicNAOS"
DIDREP.NAME     "ESO-VLT-DIC.OBS/CMM/dicOBS"
DIDREP.NAME     "ESO-VLT-DIC.PAF/CMM/dicPAF"
DIDREP.NAME     "ESO-VLT-DIC.TCS/CMM/dicTCS"
DIDREP.NAME     "ESO-VLT-DIC.TPL/CMM/dicTPL"
DIDREP.NAME     "ESO-VLT-DIC.UVES_ICS/CMM/dicUVES"
DIDREP.NAME     "ESO-VLT-DIC.UVES_OS/CMM/dicUVES"
DIDREP.NAME     "ESO-VLT-DIC.UVES_MS/CMM/dicUVES"
DIDREP.NAME     "ESO-VLT-DIC.UVES_PL/CMM/dicUVES"
DIDREP.NAME     "ESO-VLT-DIC.VNCI_ICS/CMM/dicVNCI"
DIDREP.NAME     "ESO-VLT-DIC.VNCI_OS/CMM/dicVNCI"
DIDREP.NAME     "ESO-VLT-DIC.VNCI_CFG/CMM/dicVNCI"
DIDREP.NAME     "ESO-VLT-DIC.VNCI_DCS/CMM/dicVNCI"
DIDREP.NAME     "ESO-VLT-DIC.XOS_ICS/CMM/dicXOS"
DIDREP.NAME     "ESO-VLT-DIC.PRO/CMM/dicPRO"
DIDREP.NAME     "ESO-VLT-DIC.FORS/CMM/dicFORS"

# --- oOo ---

Send comments to <Jens.Knudstrup@eso.org>
Last update: Mar 15, 2001

 [ESO]  [Search]  [Help]