Skip to content
Snippets Groups Projects
Commit ec90cb2b authored by Mikhail Mineev's avatar Mikhail Mineev
Browse files

command list updated

parent 308bbf0d
No related branches found
No related tags found
1 merge request!10Upd15
Pipeline #10190800 passed
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- [I. Description](#i-description) - [I. Description](#i-description)
- [II. Technical Questions](#ii-technical-questions) - [II. Technical Questions](#ii-technical-questions)
- [Appendix 1: Supported Commands](#appendix-1-supported-commands) - [Appendix 1: Supported Commands](#appendix-1-supported-commands)
- [Appendix 2: The crestImport and crestExport Utilities](#appendix-2-the-crestimport-and-crestexport-utilities) - [Appendix 2: The Utilities](#appendix-2-the-crestimport-and-crestexport-utilities)
--- ---
...@@ -48,7 +48,7 @@ crestCmd get commands ...@@ -48,7 +48,7 @@ crestCmd get commands
You can create an object in three ways: You can create an object in three ways:
- **Using command line parameters**: - **Using command line parameters**:
```bash ```bash
crestCmd test createTag -n test_MvG5 -d description -t time crestCmd create tag -n test_MvG8f -d "test" -t "time" -o "test"
``` ```
- **Using JSON from a file**: - **Using JSON from a file**:
```bash ```bash
...@@ -112,37 +112,126 @@ Use `crestCmd get commands` to list available commands. ...@@ -112,37 +112,126 @@ Use `crestCmd get commands` to list available commands.
1. **Get List Methods** 1. **Get List Methods**
- `crestCmd get tagList [OPTIONS]` - `crestCmd get tagList [OPTIONS]`
- `crestCmd get globalTagList [OPTIONS]` - `crestCmd get globalTagList [OPTIONS]`
- `crestCmd get globalTagMap [OPTIONS]`
- `crestCmd get iovList [OPTIONS]`
2. **Get Methods** 2. **Get Methods**
- `crestCmd get tag [OPTIONS]` - `crestCmd get tag [OPTIONS]`
- `crestCmd get tagMetaInfo [OPTIONS]`
- `crestCmd get globalTag [OPTIONS]` - `crestCmd get globalTag [OPTIONS]`
- `crestCmd get payload [OPTIONS]`
- `crestCmd get payloadMetaInfo [OPTIONS]`
- `crestCmd get payloadTagInfo [OPTIONS]`
- `crestCmd get tagSize [OPTIONS]`
3. **Create Methods** 3. **Create Methods**
- `crestCmd create tag [OPTIONS]` - `crestCmd create tag [OPTIONS]`
- `crestCmd create tagMetaInfo [OPTIONS]`
- `crestCmd create globalTag [OPTIONS]` - `crestCmd create globalTag [OPTIONS]`
- `crestCmd create globalTagMap [OPTIONS]`
- `crestCmd create iovAndPayload [OPTIONS]`
4. **Remove Methods** 4. **Remove Methods**
- `crestCmd remove tag [OPTIONS]` - `crestCmd remove tag [OPTIONS]`
- `crestCmd remove globalTag [OPTIONS]` - `crestCmd remove globalTag [OPTIONS]`
- `crestCmd remove tagFromGlobalTagMap [OPTIONS]`
5. **Software version methods**
- `crestCmd version server`
- `crestCmd version client`
--- ---
## Appendix 2. The crestImport and crestExport Utilities
Below we use `CREST_SERVER` as an environment variable with the server URL, like `http://crest-04.cern.ch:80` for example. ## Appendix 2. Utilities
You should carefully select the server you are going to use.
### a) crestExport The crest-cmd package has several utilities.
Fetches data for a specific tag from the CREST server: To get a short help for the each utility you can use the flag -h or --help. For example:
```bash
./copyGlobalTag -h
```
### 1) crestExport
crestExport is an utility to make a dump of a tag and the tag data (i.e. the tag meta info, IOVs and payloads) from the CREST server to the file storage.
Example:
```bash
crestExport -n test_MvG8f -l /tmp/crest_data_01 -s $CREST_SERVER
```
The tag test_MvG8f form the server will be dumped to the directory /tmp/crest_data_01.
### 2) crestImport
crestImport is an utility to write a tag and the tag data (i.e. the tag meta info, IOVs and payloads) from the file storage to the CREST server.
Example:
```bash
crestImport -n test_MvG8g -l /tmp/crest_data_03 -s $CREST_SERVER
```
The tag test_MvG8g will be stored from the directory /tmp/crest_data_03 to the CREST server http://crest-03.cern.ch:8090/api-v5.0.
### 3) crestCopy
crestCopy is an utility to copy a tag with the data (i.e. the tag meta info, IOVs and payloads) from the CREST server to the same CREST server with a new name.
You can choose the time interval of IOVs which will be copied.
Example:
```bash
crestCopy -n test_MvG8g -o test_MvG8g2 -s $CREST_SERVER
```
Here:
test_MvG8g - the old tag,
test_MvG8g2 - the new tag.
### 4) copyGlobalTag
copyGlobalTag is an utility to create a copy of a global tag with new name:
Example:
```bash ```bash
crestExport -n test_MvG_15 -s $CREST_SERVER copyGlobalTag -n TEST_MVG_03 -o TEST_MVG_03a -s $CREST_SERVER
``` ```
### b) crestImport Here:
Writes data from local storage to the CREST server: TEST_MVG_03 - the old global tag,
TEST_MVG_03a - the new global tag,
$CREST_SERVER - the CREST server URL.
### 5) tag_creation
tag_creation is an utility to create the dummy data: a tag, a tag meta info, several IOVs with payloads.
The payloads are randomly generated.
The user can choose the number of IOVs/payloads (parameter keys: -s, --size), and the payload length in Mb (parameter keys: -l, --length) and
the directory, where this tag will be created (parameter keys: -p, --path)
Example:
```bash ```bash
crestImport -n test_MvG_15 -s $CREST_SERVER tag_creation -n test_MvG8f -s 10 -l 1 -p /tmp/crest_data_02/
``` ```
### c) tag_creation The tag with the name test_MvG8f with 10 IOVs will be created in the directory /tmp/crest_data_02/.
Creates dummy data with the specified tag name and IOVs:
### 6) deleteTag
deleteTag is an utility to delete a tag which is included in the several global tags.
To delete such tag it is necessary to remove it from all global tags, otherwise it cannot be deleted.
This utility prints all global tags where this tag is included and ask for the deletion confirmation.
If user confirm, the tag will be deleted and a log with the global tag map will be created (the global
tag list in global tag map format, where this tag was included)
Example:
```bash ```bash
tag_creation -n test_MvG_15 -s 12 -p /tmp/crest_dump3 deleteTag -n test_MvG8b -s $CREST_SERVER
``` ```
**End of Document** A log will be created in the current directory with the name deleted-test_MvG9b.txt.
### 7) insertTag
insertTag is an utility to insert a tag in a several global tags using a global tag map (file deleted-test_MvG9f.txt) saved as a log by the deleteTag utility.
The tag name is test_MvG9f, it will be read from the log.
Example:
```bash
insertTag -f ./deleted-test_MvG9f.txt -s $CREST_SERVER
```
### 8) removeTagList
removeTagList is an utility to remove a global tag with all its tags.
Example:
```bash
removeTagList -n TEST_MVG_03 -s $CREST_SERVER
```
**End of Document**
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment