forked from oVirt/otopi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.dialog
185 lines (136 loc) · 3.85 KB
/
README.dialog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
otopi -- Dialog
===============
ABOUT
-----
The dialog is the interface used to interact with manager.
This document outlines the 'machine' dialog which is design to interact
with software.
The interface is designed to be semi-human dialog to enable human
interaction.
The interface can be selected using the following environment:
DIALOG/dialect=str:machine
COMMAND LINE
------------
The command line interface is prompted by using the following environment:
DIALOG/customization=bool:True
List:
abort - Abort process
env-get - Get environment variable
env-query - Query environment variable
env-query-multi - Get multi string environment variable
env-set - Set environment variable
env-show - Display environment
exception-show - show exception information
help - Display available commands
install - Install software
log - Retrieve log file
noop - No operation
quit - Quit
Usage: env-get [options]
Options:
-h, --help This text
-k KEY, --key=KEY Environment key
Usage: env-query [options]
Options:
-h, --help This text
-k KEY, --key=KEY Environment key
Usage: env-query-multi [options]
Options:
-h, --help This text
-k KEY, --key=KEY Environment key
Usage: env-set [options]
Options:
-h, --help This text
-k KEY, --key=KEY Environment key
-t TYPE, --type=TYPE Variable type ('bool', 'int', 'str'), default 'str'
-v VALUE, --value=VALUE
Variable value
ITERATIVE DIALOG VARIABLES
--------------------------
CUSTOMIZATION_COMMAND
Query customization command.
TERMINATION_COMMAND
Query termination command.
TIME
Query current time.
INTERACTIVE CONFIRMATIONS
-------------------------
GPG_KEY
Confirm trust of GPG key.
MACHINE DIALECT
---------------
Note
^#+ (.*)\n$
Group1 - message.
Every line that begins with '#' is ignored by manager. Notes are
used to interact with humans.
Terminate
^***TERMINATE\n$
Terminate dialog.
Log
^\*\*\*L:INFO (.*)\n$
^\*\*\*L:WARNING (.*)\n$
^\*\*\*L:ERROR (.*)\n$
Group1 - message.
Query
Each query is framed between
^\*\*\%QStart: (?P<NAME>.*)\n
and
^\*\*\%QEnd: (?P<NAME>.*)\n
The query frame will always include:
^\*\*\*Q:(?P<TYPE>STRING|MULTI-STRING|VALUE) (?P=NAME)\s?(?P<BOUNDARY>.*)\s?(?P<ABOUNDARY>.*)\n$
NAME: Variable name
TYPE: Query type
The query frame can contain additional query options like:
^\*\*\%QDefault: (?P<DValue>.*)\n$
DValue: default value as string
^\*\*\%QValidValues: (?P<ValidValues>.*)\n$
ValidValues: valid value list. '\\' in each value is replaced with '\\\\',
'|' is replaced with '\\|', and values are separated with '|'.
^\*\*\%QHidden: (?P<Hidden>.*)\n$
Hidden: TRUE or FALSE. If TRUE, the reply should be hidden.
^\*\*\*Q:STRING (.*)\n$
Group1: variable name.
Single line response.
^\*\*\*Q:MULTI-STRING (.*) (.*) (.*)\n$
Group1: variable name.
Group2: boundary.
Group3: abort boundary.
Multiple line response.
Boundary at own line marks end.
^\*\*\*Q:VALUE (.*)\n$
Group1: variable name.
Response:
^VALUE (.*)=(.*):(.*)\n$
Group1: variable name.
Group2: variable type.
Group3: variable value.
Response:
^ABORT (.*)\n$
Group1: variable name.
The query frame may include other output, including a note to the user.
In practice, relevant notes to the user may also be output prior to the
query frame.
Confirm
^\*\*\*CONFIRM (.*) (.*)$
Group1: id.
Group2: description.
Response:
^CONFIRM (.*)=(yes|no)\n$
Group1: id
Group2: response
Response:
^ABORT (.*)\n$
Group1: variable name.
Display
^\*\*\*D:VALUE (.*)=(.*):(.*)\n$
Group1: variable name.
Group2: type.
Group3: value.
^\*\*\*D:MULTI-STRING (.*) (.*)\n$
(^.*\n$)*
^(.*)\n$
Group1: variable name.
Group2: boundary.
Group3: content.
Group4: boundary.