You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dsc/src/args.rs
+59-59Lines changed: 59 additions & 59 deletions
Original file line number
Diff line number
Diff line change
@@ -76,32 +76,32 @@ pub enum SubCommand {
76
76
pubenumConfigSubCommand{
77
77
#[clap(name = "get", about = "Retrieve the current configuration")]
78
78
Get{
79
-
#[clap(short = 'd', long, help = "The document to pass to the configuration or resource", conflicts_with = "path")]
80
-
document:Option<String>,
81
-
#[clap(short = 'p', long, help = "The path to a file used as input to the configuration or resource", conflicts_with = "document")]
82
-
path:Option<String>,
83
-
#[clap(short = 'f', long, help = "The output format to use")]
84
-
format:Option<OutputFormat>,
79
+
#[clap(short = 'i', long, help = "The input document as JSON or YAML to pass to the configuration or resource", conflicts_with = "file")]
80
+
input:Option<String>,
81
+
#[clap(short = 'f', long, help = "The path to a file used as input to the configuration or resource. Use '-' for the file to read from STDIN.", conflicts_with = "input")]
82
+
file:Option<String>,
83
+
#[clap(short = 'o', long, help = "The output format to use")]
84
+
output_format:Option<OutputFormat>,
85
85
},
86
86
#[clap(name = "set", about = "Set the current configuration")]
87
87
Set{
88
-
#[clap(short = 'd', long, help = "The document to pass to the configuration or resource", conflicts_with = "path")]
89
-
document:Option<String>,
90
-
#[clap(short = 'p', long, help = "The path to a file used as input to the configuration or resource", conflicts_with = "document")]
91
-
path:Option<String>,
92
-
#[clap(short = 'f', long, help = "The output format to use")]
93
-
format:Option<OutputFormat>,
88
+
#[clap(short = 'i', long, help = "The input document as JSON or YAML to pass to the configuration or resource", conflicts_with = "file")]
89
+
input:Option<String>,
90
+
#[clap(short = 'f', long, help = "The path to a file used as input to the configuration or resource. Use '-' for the file to read from STDIN.", conflicts_with = "input")]
91
+
file:Option<String>,
92
+
#[clap(short = 'o', long, help = "The output format to use")]
93
+
output_format:Option<OutputFormat>,
94
94
#[clap(short = 'w', long, help = "Run as a what-if operation instead of executing the configuration or resource")]
95
95
what_if:bool,
96
96
},
97
97
#[clap(name = "test", about = "Test the current configuration")]
98
98
Test{
99
-
#[clap(short = 'd', long, help = "The document to pass to the configuration or resource", conflicts_with = "path")]
100
-
document:Option<String>,
101
-
#[clap(short = 'p', long, help = "The path to a file used as input to the configuration or resource", conflicts_with = "document")]
102
-
path:Option<String>,
103
-
#[clap(short = 'f', long, help = "The output format to use")]
104
-
format:Option<OutputFormat>,
99
+
#[clap(short = 'i', long, help = "The input document as JSON or YAML to pass to the configuration or resource", conflicts_with = "file")]
100
+
input:Option<String>,
101
+
#[clap(short = 'f', long, help = "The path to a file used as input to the configuration or resource. Use '-' for the file to read from STDIN.", conflicts_with = "input")]
102
+
file:Option<String>,
103
+
#[clap(short = 'o', long, help = "The output format to use")]
104
+
output_format:Option<OutputFormat>,
105
105
// Used by Assertion resource to return `test` result as a `get` result
106
106
#[clap(long, hide = true)]
107
107
as_get:bool,
@@ -111,30 +111,30 @@ pub enum ConfigSubCommand {
111
111
},
112
112
#[clap(name = "validate", about = "Validate the current configuration", hide = true)]
113
113
Validate{
114
-
#[clap(short = 'd', long, help = "The document to pass to the configuration or resource", conflicts_with = "path")]
115
-
document:Option<String>,
116
-
#[clap(short = 'p', long, help = "The path to a file used as input to the configuration or resource", conflicts_with = "document")]
117
-
path:Option<String>,
118
-
#[clap(short = 'f', long, help = "The output format to use")]
119
-
format:Option<OutputFormat>,
114
+
#[clap(short = 'i', long, help = "The document to pass to the configuration or resource", conflicts_with = "file")]
115
+
input:Option<String>,
116
+
#[clap(short = 'f', long, help = "The path to a file used as input to the configuration or resource. Use '-' for the file to read from STDIN.", conflicts_with = "input")]
117
+
file:Option<String>,
118
+
#[clap(short = 'o', long, help = "The output format to use")]
119
+
output_format:Option<OutputFormat>,
120
120
},
121
121
#[clap(name = "export", about = "Export the current configuration")]
122
122
Export{
123
-
#[clap(short = 'd', long, help = "The document to pass to the configuration or resource", conflicts_with = "path")]
124
-
document:Option<String>,
125
-
#[clap(short = 'p', long, help = "The path to a file used as input to the configuration or resource", conflicts_with = "document")]
126
-
path:Option<String>,
127
-
#[clap(short = 'f', long, help = "The output format to use")]
128
-
format:Option<OutputFormat>,
123
+
#[clap(short = 'i', long, help = "The document to pass to the configuration or resource", conflicts_with = "file")]
124
+
input:Option<String>,
125
+
#[clap(short = 'f', long, help = "The path to a file used as input to the configuration or resource. Use '-' for the file to read from STDIN.", conflicts_with = "input")]
126
+
file:Option<String>,
127
+
#[clap(short = 'o', long, help = "The output format to use")]
128
+
output_format:Option<OutputFormat>,
129
129
},
130
130
#[clap(name = "resolve", about = "Resolve the current configuration", hide = true)]
131
131
Resolve{
132
-
#[clap(short = 'd', long, help = "The document to pass to the configuration or resource", conflicts_with = "path")]
133
-
document:Option<String>,
134
-
#[clap(short = 'p', long, help = "The path to a file used as input to the configuration or resource", conflicts_with = "document")]
135
-
path:Option<String>,
136
-
#[clap(short = 'f', long, help = "The output format to use")]
137
-
format:Option<OutputFormat>,
132
+
#[clap(short = 'i', long, help = "The document to pass to the configuration or resource", conflicts_with = "file")]
133
+
input:Option<String>,
134
+
#[clap(short = 'f', long, help = "The path to a file used as input to the configuration or resource. Use '-' for the file to read from STDIN.", conflicts_with = "input")]
135
+
file:Option<String>,
136
+
#[clap(short = 'o', long, help = "The output format to use")]
#[clap(short, long, help = "Tag to search for in the resource tags")]
153
153
tags:Option<Vec<String>>,
154
-
#[clap(short = 'f', long, help = "The output format to use")]
155
-
format:Option<OutputFormat>,
154
+
#[clap(short = 'o', long, help = "The output format to use")]
155
+
output_format:Option<OutputFormat>,
156
156
},
157
157
#[clap(name = "get", about = "Invoke the get operation to a resource", arg_required_else_help = true)]
158
158
Get{
159
159
#[clap(short, long, help = "Get all instances of the resource")]
160
160
all:bool,
161
161
#[clap(short, long, help = "The name or DscResource JSON of the resource to invoke `get` on")]
162
162
resource:String,
163
-
#[clap(short, long, help = "The input to pass to the resource as JSON or YAML", conflicts_with = "path")]
163
+
#[clap(short, long, help = "The input to pass to the resource as JSON or YAML", conflicts_with = "file")]
164
164
input:Option<String>,
165
-
#[clap(short = 'p', long, help = "The path to a JSON or YAML file used as input to the configuration or resource", conflicts_with = "input")]
166
-
path:Option<String>,
167
-
#[clap(short = 'f', long, help = "The output format to use")]
168
-
format:Option<OutputFormat>,
165
+
#[clap(short = 'f', long, help = "The path to a JSON or YAML file used as input to the configuration or resource. Use '-' as the file to read from STDIN.", conflicts_with = "input")]
166
+
file:Option<String>,
167
+
#[clap(short = 'o', long, help = "The output format to use")]
168
+
output_format:Option<OutputFormat>,
169
169
},
170
170
#[clap(name = "set", about = "Invoke the set operation to a resource", arg_required_else_help = true)]
171
171
Set{
172
172
#[clap(short, long, help = "The name or DscResource JSON of the resource to invoke `set` on")]
173
173
resource:String,
174
-
#[clap(short, long, help = "The input to pass to the resource as JSON or YAML", conflicts_with = "path")]
174
+
#[clap(short, long, help = "The input to pass to the resource as JSON or YAML", conflicts_with = "file")]
175
175
input:Option<String>,
176
-
#[clap(short = 'p', long, help = "The path to a JSON or YAML file used as input to the configuration or resource", conflicts_with = "input")]
177
-
path:Option<String>,
178
-
#[clap(short = 'f', long, help = "The output format to use")]
179
-
format:Option<OutputFormat>,
176
+
#[clap(short = 'f', long, help = "The path to a JSON or YAML file used as input to the configuration or resource. Use '-' for the file to read from STDIN.", conflicts_with = "input")]
177
+
file:Option<String>,
178
+
#[clap(short = 'o', long, help = "The output format to use")]
179
+
output_format:Option<OutputFormat>,
180
180
},
181
181
#[clap(name = "test", about = "Invoke the test operation to a resource", arg_required_else_help = true)]
182
182
Test{
183
183
#[clap(short, long, help = "The name or DscResource JSON of the resource to invoke `test` on")]
184
184
resource:String,
185
-
#[clap(short, long, help = "The input to pass to the resource as JSON or YAML", conflicts_with = "path")]
185
+
#[clap(short, long, help = "The input to pass to the resource as JSON or YAML", conflicts_with = "file")]
186
186
input:Option<String>,
187
-
#[clap(short = 'p', long, help = "The path to a JSON or YAML file used as input to the configuration or resource", conflicts_with = "input")]
188
-
path:Option<String>,
187
+
#[clap(short = 'p', long, help = "The path to a JSON or YAML file used as input to the configuration or resource. Use '-' for the file to read from STDIN.", conflicts_with = "input")]
188
+
file:Option<String>,
189
189
#[clap(short = 'f', long, help = "The output format to use")]
190
-
format:Option<OutputFormat>,
190
+
output_format:Option<OutputFormat>,
191
191
},
192
192
#[clap(name = "delete", about = "Invoke the delete operation to a resource", arg_required_else_help = true)]
193
193
Delete{
194
194
#[clap(short, long, help = "The name or DscResource JSON of the resource to invoke `delete` on")]
195
195
resource:String,
196
-
#[clap(short, long, help = "The input to pass to the resource as JSON or YAML", conflicts_with = "path")]
196
+
#[clap(short, long, help = "The input to pass to the resource as JSON or YAML", conflicts_with = "file")]
197
197
input:Option<String>,
198
-
#[clap(short = 'p', long, help = "The path to a JSON or YAML file used as input to the configuration or resource", conflicts_with = "input")]
199
-
path:Option<String>,
198
+
#[clap(short = 'p', long, help = "The path to a JSON or YAML file used as input to the configuration or resource. Use '-' for the file to read from STDIN.", conflicts_with = "input")]
199
+
file:Option<String>,
200
200
},
201
201
#[clap(name = "schema", about = "Get the JSON schema for a resource", arg_required_else_help = true)]
202
202
Schema{
203
203
#[clap(short, long, help = "The name of the resource to get the JSON schema")]
204
204
resource:String,
205
-
#[clap(short = 'f', long, help = "The output format to use")]
206
-
format:Option<OutputFormat>,
205
+
#[clap(short = 'o', long, help = "The output format to use")]
206
+
output_format:Option<OutputFormat>,
207
207
},
208
208
#[clap(name = "export", about = "Retrieve all resource instances", arg_required_else_help = true)]
209
209
Export{
210
210
#[clap(short, long, help = "The name or DscResource JSON of the resource to invoke `export` on")]
211
211
resource:String,
212
-
#[clap(short = 'f', long, help = "The output format to use")]
213
-
format:Option<OutputFormat>,
212
+
#[clap(short = 'o', long, help = "The output format to use")]
0 commit comments