Overview
Code Block | ||
---|---|---|
| ||
$ configdb -h
usage: configdb [-h] [--url URL] [--root ROOT] {cat,rm,cp,mv,history,rollback,ls} ...
configuration database CLI
positional arguments:
{cat,rm,cp,mv,history,rollback,ls}
cat print a configuration
rm remove a configuration
cp copy a configuration (EXAMPLE: configdb cp --create --write tmo/BEAM/timing_0 newhutch/BEAM/timing_0)
mv rename a configuration (EXAMPLE: configdb mv --write tst/BEAM/timing_45 timing_46)
history get history of a configuration
rollback rollback configuration to a specific key
ls list directory contents
optional arguments:
-h, --help show this help message and exit
--url URL configuration database connection
--root ROOT configuration database root (default: configDB) |
Copy timing_0 Configuration from TMO to RIX
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
(ps-4.3.2) -bash-4.2$ configdb --url https://pswww.slac.stanford.edu/ws/configdb/ws ls -h usage: configdb ls [-h] [src] positional arguments: src source: <hutch>[/<alias>] optional arguments: -h, --help show this help message and exit (ps-4.3.2) -bash-4.2$ (ps-4.3.2) -bash-4.2$ configdb --url https://pswww.slac.stanford.edu/ws/configdb/ws ls tmo NOBEAM CALIB XPM TEST BEAM (ps-4.3.2) -bash-4.2$ (ps-4.3.2) -bash-4.2$ configdb --url https://pswww.slac.stanford.edu/ws/configdb/ws ls tmo/BEAM hsd_0 hsd_1 hsd_10 hsd_11 hsd_12 hsd_13 hsd_14 hsd_15 hsd_2 hsd_3 hsd_4 hsd_5 hsd_6 hsd_7 hsd_8 hsd_9 timing_0 tmo_atmopal_0 tmo_fim0_0 tmo_fim1_0 tmo_opal1_0 tmo_opal2_0 tmoopal2_0 tmoopal_0 trigger_0 (ps-4.3.2) -bash-4.2$ |
Create a New Configuration Alias By Copying a BEAM Configuration
Code Block | ||||
---|---|---|---|---|
| ||||
$ configdb --url https://pswww.slac.stanford.edu/ws-auth/configdb/ws ls tmo
BEAM
ALIGN
$ configdb --url https://pswww.slac.stanford.edu/ws-auth/configdb/ws cp --user tmoopr --password **** --create --write tmo/BEAM/tmo_atmopal_0 tmo/MRCO/tmo_atmopal_0
$
$ configdb --url https://pswww.slac.stanford.edu/ws-auth/configdb/ws ls tmo
BEAM
ALIGN
MRCO
$ configdb --url https://pswww.slac.stanford.edu/ws-auth/configdb/ws ls tmo/MRCO
tmo_atmopal_0
$ |
Dump XPM:0 Configuration
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
(ps-4.5.16) -bash-4.2$ configdb --url https://pswww.slac.stanford.edu/ws-auth/configdb/ws ls tmo/XPM DAQ:NEH:XPM:0 DAQ:NEH:XPM:2 DAQ:NEH:XPM:3 (ps-4.5.16) -bash-4.2$ (ps-4.5.16) -bash-4.2$ configdb --url https://pswww.slac.stanford.edu/ws-auth/configdb/ws cat tmo/XPM/DAQ:NEH:XPM:0 {':types:': {'PART': {'L0Delay': ['UINT32', 8]}, 'XTPG': {'CuBeamCode': 'UINT8', 'CuDelay': 'UINT32', 'CuInput': 'UINT8'}, 'alg:RO': {'alg:RO': 'CHARSTR', 'doc:RO': 'CHARSTR', 'version:RO': ['INT32', 3]}, 'detId:RO': 'CHARSTR', 'detName:RO': 'CHARSTR', 'detType:RO': 'CHARSTR', 'doc:RO': 'CHARSTR'}, 'PART': {'L0Delay': [99, 99, 99, 99, 99, 99, 99, 99]}, 'XTPG': {'CuBeamCode': 140, 'CuDelay': 160000, 'CuInput': 3}, 'alg:RO': {'alg:RO': 'config', 'doc:RO': '', 'version:RO': [0, 0, 0]}, 'detId:RO': 'serial1234', 'detName:RO': 'DAQ:NEH:XPM:0', 'detType:RO': 'xpm', 'doc:RO': 'No comment'} (ps-4.5.16) -bash-4.2$ |
...