From 6762eb60b5b033ea3fedb6b483decf2b4ab57316 Mon Sep 17 00:00:00 2001 From: Dmitry Litvintsev Date: Wed, 8 Nov 2023 01:19:29 -0600 Subject: [PATCH] indent code block --- docs/enstore2cta_config.rst | 2 +- docs/enstore2cta_script.rst | 66 ++++++++++++++++++------------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/docs/enstore2cta_config.rst b/docs/enstore2cta_config.rst index d5387a9..147737f 100644 --- a/docs/enstore2cta_config.rst +++ b/docs/enstore2cta_config.rst @@ -4,4 +4,4 @@ Configuration Script expects configuration file ``enstore2cta.yaml`` in the current directory or pointed to by environment variable ``MIGRATION_CONFIG``. The yaml file has to have "0600" permission bits and has to have the following parameters defned: -.. include:: ../etc/enstore2cta.yaml +.. literalinclude:: ../etc/enstore2cta.yaml diff --git a/docs/enstore2cta_script.rst b/docs/enstore2cta_script.rst index 11d7ceb..94db241 100644 --- a/docs/enstore2cta_script.rst +++ b/docs/enstore2cta_script.rst @@ -10,42 +10,42 @@ Script works both with python2 and python3 and requires ``psycopg2`` module be i Invocation ---------- To run the script a config file ``enstore2cta.yaml`` *must* exist in -the current directory or be pointed at by MIGRATION_CONFIG environment variable. -Look for example in enstore2cta/etc. It must have "0600" permission +the current directory or be pointed at by ``MIGRATION_CONFIG`` environment variable. +Look for example in ``enstore2cta/etc``. It must have "0600" permission (to protect database passwords if any). :: -$ python enstore2cta.py -usage: enstore2cta.py [-h] [--label LABEL] [--all] [--skip_locations] [--add] - [--storage_class STORAGE_CLASS] [--vo VO] - [--cpu_count CPU_COUNT] - -This script converts Enstore metadata to CTA metadata. It looks for YAML -configuration file pointed to by MIGRATION_CONFIG environment variable or, if -it is not defined, it looks for file enstore2cta.yaml in current directory. -Script will quit if configuration YAML is not found. - -optional arguments: - -h, --help show this help message and exit - --label LABEL comma separated list of labels (default: None) - --all do all labels (default: False) - --skip_locations skip filling chimera locations (good for testing) - (default: False) - --add add volume(s) to existing system, do not create vos, - pools, archive_routes etc. These need to pre-exist in - CTA db (default: False) - --storage_class STORAGE_CLASS - Add storage class corresponding to volume. Needed when - adding single volume to existing system using --add - option (default: None) - --vo VO vo corresponding to storage_class. Needed when adding - single volume to existing system using --add option - (default: None) - --cpu_count CPU_COUNT - override cpu count - number of simulateously processed - labels (default: 8) - single volume to existing system using --add option -``` + $ python enstore2cta.py + usage: enstore2cta.py [-h] [--label LABEL] [--all] [--skip_locations] [--add] + [--storage_class STORAGE_CLASS] [--vo VO] + [--cpu_count CPU_COUNT] + + This script converts Enstore metadata to CTA metadata. It looks for YAML + configuration file pointed to by MIGRATION_CONFIG environment variable or, if + it is not defined, it looks for file enstore2cta.yaml in current directory. + Script will quit if configuration YAML is not found. + + optional arguments: + -h, --help show this help message and exit + --label LABEL comma separated list of labels (default: None) + --all do all labels (default: False) + --skip_locations skip filling chimera locations (good for testing) + (default: False) + --add add volume(s) to existing system, do not create vos, + pools, archive_routes etc. These need to pre-exist in + CTA db (default: False) + --storage_class STORAGE_CLASS + Add storage class corresponding to volume. Needed when + adding single volume to existing system using --add + option (default: None) + --vo VO vo corresponding to storage_class. Needed when adding + single volume to existing system using --add option + (default: None) + --cpu_count CPU_COUNT + override cpu count - number of simulateously processed + labels (default: 8) + single volume to existing system using --add option + (default cpu_count is equal to ``multiprocessing.cpu_count()``)