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

Function newGuestsRestartCmd

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

Source from the content-addressed store, hash-verified

295}
296
297func newGuestsRestartCmd() *cobra.Command {
298 return &cobra.Command{
299 Use: "restart <vmid>",
300 Short: "Restart a guest",
301 Long: "Request a graceful restart of a running VM or container.",
302 Example: ` pvetui guests restart 100`,
303 Args: cobra.ExactArgs(1),
304 ValidArgsFunction: completeVMIDs,
305 RunE: makeLifecycleCmd("restart", func(client *api.Client, vm *api.VM) (string, error) {
306 return client.RestartVM(vm)
307 }),
308 }
309}
310
311func newGuestsDeleteCmd() *cobra.Command {
312 cmd := &cobra.Command{

Callers 1

newGuestsCmdFunction · 0.85

Calls 2

makeLifecycleCmdFunction · 0.85
RestartVMMethod · 0.80

Tested by

no test coverage detected