Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit c59c498

Browse files
committed
readme update
1 parent decfdd7 commit c59c498

1 file changed

Lines changed: 94 additions & 17 deletions

File tree

README.md

Lines changed: 94 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,27 @@ The `--export-file-path` / `-e` parameter can be used to specify the path locati
5050
Examples:
5151

5252
```shell
53-
dvtf-pingctl generate --export-file-path /path/to/my/export.json
54-
dvtf-pingctl generate -e /path/to/my/export.json
55-
dvtf-pingctl generate --export-file-path /path/to/my/main_flow_export.json --export-file-path /path/to/my/sub_flow_export.json
56-
dvtf-pingctl generate -e /path/to/my/main_flow_export.json -e /path/to/my/sub_flow_export.json
57-
dvtf-pingctl validate --export-file-path /path/to/my/export.json --export-file-path /path/to/my/sub_flow_export.json
53+
dvtf-pingctl generate \
54+
--export-file-path /path/to/my/export.json
55+
```
56+
```shell
57+
dvtf-pingctl generate \
58+
-e /path/to/my/export.json
59+
```
60+
```shell
61+
dvtf-pingctl generate \
62+
--export-file-path /path/to/my/main_flow_export.json \
63+
--export-file-path /path/to/my/sub_flow_export.json
64+
```
65+
```shell
66+
dvtf-pingctl generate \
67+
-e /path/to/my/main_flow_export.json \
68+
-e /path/to/my/sub_flow_export.json
69+
```
70+
```shell
71+
dvtf-pingctl validate \
72+
--export-file-path /path/to/my/export.json \
73+
--export-file-path /path/to/my/sub_flow_export.json
5874
```
5975

6076
### Providing the Export JSON through Pipe
@@ -65,7 +81,11 @@ Examples:
6581

6682
```shell
6783
cat /path/to/my/export.json | dvtf-pingctl generate
84+
```
85+
```shell
6886
jq '.name = "abcde"' ./path/to/my/export.json | dvtf-pingctl generate
87+
```
88+
```shell
6989
jq '.name = "abcde"' ./path/to/my/export.json | dvtf-pingctl validate
7090
```
7191

@@ -82,16 +102,34 @@ If the output directory already exists and the `--overwrite` parameter is not se
82102
Examples:
83103

84104
```shell
85-
dvtf-pingctl generate --export-file-path /path/to/my/export.json -o ./my/output/dir
86-
dvtf-pingctl generate -e /path/to/my/export.json -o ./my/output/dir
87-
dvtf-pingctl generate --export-file-path /path/to/my/export.json -o ./my/output/dir --overwrite
88-
dvtf-pingctl generate -e /path/to/my/export.json -o ./my/output/dir --overwrite
105+
dvtf-pingctl generate \
106+
--export-file-path /path/to/my/export.json \
107+
-o ./my/output/dir
108+
```
109+
```shell
110+
dvtf-pingctl generate \
111+
-e /path/to/my/export.json \
112+
-o ./my/output/dir
113+
```
114+
```shell
115+
dvtf-pingctl generate \
116+
--export-file-path /path/to/my/export.json \
117+
-o ./my/output/dir \
118+
--overwrite
119+
```
120+
```shell
121+
dvtf-pingctl generate \
122+
-e /path/to/my/export.json \
123+
-o ./my/output/dir \
124+
--overwrite
89125
```
90126

91127
Examples where the JSON payload is provided via pipe:
92128

93129
```shell
94130
cat /path/to/my/export.json | dvtf-pingctl generate -o ./my/output/dir
131+
```
132+
```shell
95133
cat /path/to/my/export.json | dvtf-pingctl generate -o ./my/output/dir --overwrite
96134
```
97135

@@ -104,17 +142,31 @@ Individual resources can be selected for generation using the `--resource` flag
104142
Examples where the JSON is provided as a parameter:
105143

106144
```shell
107-
dvtf-pingctl generate --export-file-path /path/to/my/export.json -o ./my/output/dir
108-
dvtf-pingctl generate -e /path/to/my/export.json -o ./my/output/dir
109-
dvtf-pingctl generate --export-file-path /path/to/my/export.json -o ./my/output/dir --resource davinci_flow --resource davinci_variable --resource davinci_connector
110-
dvtf-pingctl generate -e /path/to/my/export.json -o ./my/output/dir -r davinci_flow -r davinci_variable -r davinci_connector
145+
dvtf-pingctl generate \
146+
--export-file-path /path/to/my/export.json \
147+
-o ./my/output/dir \
148+
--resource davinci_flow \
149+
--resource davinci_variable \
150+
--resource davinci_connector
151+
```
152+
```shell
153+
dvtf-pingctl generate \
154+
-e /path/to/my/export.json \
155+
-o ./my/output/dir \
156+
-r davinci_flow \
157+
-r davinci_variable \
158+
-r davinci_connector
111159
```
112160

113161
Examples where the JSON payload is provided via pipe:
114162

115163
```shell
116164
cat /path/to/my/export.json | dvtf-pingctl generate -o ./my/output/dir
165+
```
166+
```shell
117167
cat /path/to/my/export.json | dvtf-pingctl generate -o ./my/output/dir --resource davinci_flow --resource davinci_variable --resource davinci_connector
168+
```
169+
```shell
118170
cat /path/to/my/export.json | dvtf-pingctl generate -o ./my/output/dir -r davinci_flow -r davinci_variable -r davinci_connector
119171
```
120172

@@ -127,8 +179,12 @@ The Terraform provider expects single flows only, and this command contains a va
127179
Examples where the JSON is provided as a parameter:
128180

129181
```shell
130-
dvtf-pingctl validate --export-file-path /path/to/my/export.json
131-
dvtf-pingctl validate -e /path/to/my/export.json
182+
dvtf-pingctl validate \
183+
--export-file-path /path/to/my/export.json
184+
```
185+
```shell
186+
dvtf-pingctl validate \
187+
-e /path/to/my/export.json
132188
```
133189

134190
Example where the JSON is provided via pipe:
@@ -144,14 +200,22 @@ To validate the JSON input for a specific `davinci_flow` field in the case of de
144200
Examples where the JSON is provided as a parameter:
145201

146202
```shell
147-
dvtf-pingctl validate --export-file-path /path/to/my/export.json --field flow_configuration_json
148-
dvtf-pingctl validate -e /path/to/my/export.json -f flow_configuration_json
203+
dvtf-pingctl validate \
204+
--export-file-path /path/to/my/export.json \
205+
--field flow_configuration_json
206+
```
207+
```shell
208+
dvtf-pingctl validate \
209+
-e /path/to/my/export.json \
210+
-f flow_configuration_json
149211
```
150212

151213
Example where the JSON is provided via pipe:
152214

153215
```shell
154216
cat /path/to/my/export.json | dvtf-pingctl validate --field flow_configuration_json
217+
```
218+
```shell
155219
cat /path/to/my/export.json | dvtf-pingctl validate -f flow_configuration_json
156220
```
157221

@@ -163,6 +227,19 @@ The `dvtf-pingctl validate ...` command will return the following return status
163227
- `1` - Unsuccessful validation
164228
- `2` - Successful validation, with warnings
165229

230+
## Logging
231+
232+
The logging level can be set using the `DVTF_LOG` environment variable. The possible values that can be set are `DEBUG`, `INFO`, `WARN`, `ERROR` and `NOLEVEL`. By default, extra log output is disabled.
233+
234+
A log file can be created using the `DVTF_PATH` environment variable. This redirects the log output to a file of choice. If not set, the debug output will be printed alongside the command output (stdout).
235+
236+
The following example logs debug output to the file called `dvtf.log`:
237+
```shell
238+
DVTF_LOG=DEBUG DVTF_PATH=`pwd`/dvtf.log dvtf-pingctl validate \
239+
--export-file-path /path/to/my/export.json \
240+
--field flow_configuration_json
241+
```
242+
166243
## Configuration File
167244

168245
The parameters described above can be configured in a static configuration file, expected to be named `.dvtf-pingctl.yaml` in the same directory that the CLI tool is run. The following describe the properties that can be set, and an example can be found at [./dvtf-pingctl.yaml.example](./blob/main/.dvtf-pingctl.yaml.example)

0 commit comments

Comments
 (0)