Commit d6fe448
authored
Feat/vm batch operation support (#29)
* feat(vm): add --all, --status, --with-volumes flags to shortcut commands
* feat(vm): add batch validation, fetching, confirmation, and result display
* feat(vm): implement batch execution for all actions including delete
* feat(vm): --status filters interactive picker when --all is not set
* feat(vm): add batch integration tests and help examples
* feat(vm): interactive multi-select for shortcut commands
When running shortcut commands (stop, start, hibernate, delete) without
an instance ID, use MultiSelect picker instead of single Select. Users
can filter by typing, select all with ctrl+a, and pick multiple instances
to batch-operate on.
Single selection continues the existing single-instance flow.
Multiple selections route to the batch execution path.
* fix(vm): remove hint text from multi-select prompt
The hint bar already shows keyboard shortcuts, no need to duplicate
them in the prompt text.
* feat(volume): add delete shortcut with multi-select batch support
* feat(vm): add stop command to help and --hostname glob filter for batch
- Make `stop` a standalone shortcut command visible in `verda vm --help`
(previously hidden as alias of `shutdown`)
- Add `--hostname` flag to all shortcut commands accepting a glob pattern
(e.g., "test-*") that implies batch mode without requiring `--all`
- Hostname filter combines with `--status` as AND logic
- Add filterByHostname helper using filepath.Match for glob matching
* feat(vm): add --location filter to vm list
Client-side filtering since the API doesn't support location as a
query parameter. Case-insensitive match.
* deps: upgrade verdagostack to v1.2.0
MultiSelect now supports text filtering and ctrl+a select all,
enabling interactive batch operations in vm and volume commands.
* fix(vm): use verda.ActionDelete constant instead of string literal
Fixes goconst lint error for repeated "delete" string.
* refactor(vm): use SDK action constants instead of string literals
Replace hardcoded action strings with verda.ActionStart,
verda.ActionShutdown, verda.ActionDelete, etc. throughout
shortcuts, action map, and batch code.1 parent c5f9cdd commit d6fe448
10 files changed
Lines changed: 1554 additions & 37 deletions
File tree
- internal/verda-cli/cmd
- vm
- volume
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
| 107 | + | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
105 | 109 | | |
106 | 110 | | |
107 | 111 | | |
| |||
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
151 | | - | |
| 155 | + | |
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
| |||
159 | 163 | | |
160 | 164 | | |
161 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
162 | 171 | | |
163 | 172 | | |
164 | 173 | | |
| |||
167 | 176 | | |
168 | 177 | | |
169 | 178 | | |
170 | | - | |
| 179 | + | |
171 | 180 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
181 | 184 | | |
182 | | - | |
183 | | - | |
| 185 | + | |
| 186 | + | |
184 | 187 | | |
185 | | - | |
| 188 | + | |
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
| |||
307 | 310 | | |
308 | 311 | | |
309 | 312 | | |
310 | | - | |
| 313 | + | |
311 | 314 | | |
312 | 315 | | |
313 | 316 | | |
| |||
327 | 330 | | |
328 | 331 | | |
329 | 332 | | |
330 | | - | |
| 333 | + | |
331 | 334 | | |
332 | 335 | | |
333 | 336 | | |
334 | 337 | | |
335 | 338 | | |
336 | 339 | | |
337 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
338 | 373 | | |
339 | 374 | | |
340 | 375 | | |
| |||
0 commit comments