()
| 281 | } |
| 282 | |
| 283 | func newGuestsShutdownCmd() *cobra.Command { |
| 284 | return &cobra.Command{ |
| 285 | Use: "shutdown <vmid>", |
| 286 | Short: "Gracefully shut down a guest", |
| 287 | Long: "Request a graceful ACPI shutdown of a running VM or container.", |
| 288 | Example: ` pvetui guests shutdown 100`, |
| 289 | Args: cobra.ExactArgs(1), |
| 290 | ValidArgsFunction: completeVMIDs, |
| 291 | RunE: makeLifecycleCmd("shutdown", func(client *api.Client, vm *api.VM) (string, error) { |
| 292 | return client.ShutdownVM(vm) |
| 293 | }), |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | func newGuestsRestartCmd() *cobra.Command { |
| 298 | return &cobra.Command{ |
no test coverage detected