MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / newGuestsShutdownCmd

Function newGuestsShutdownCmd

internal/cli/guests.go:283–295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

281}
282
283func 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
297func newGuestsRestartCmd() *cobra.Command {
298 return &cobra.Command{

Callers 1

newGuestsCmdFunction · 0.85

Calls 2

makeLifecycleCmdFunction · 0.85
ShutdownVMMethod · 0.80

Tested by

no test coverage detected