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

Function newGuestsStartCmd

internal/cli/guests.go:251–264  ·  view source on GitHub ↗

── guests lifecycle ─────────────────────────────────────────────────────────

()

Source from the content-addressed store, hash-verified

249// ── guests lifecycle ─────────────────────────────────────────────────────────
250
251func newGuestsStartCmd() *cobra.Command {
252 return &cobra.Command{
253 Use: "start <vmid>",
254 Short: "Start a guest",
255 Long: "Start a stopped VM or container.",
256 Example: ` pvetui guests start 100
257 pvetui --profile prod guests start 100`,
258 Args: cobra.ExactArgs(1),
259 ValidArgsFunction: completeVMIDs,
260 RunE: makeLifecycleCmd("start", func(client *api.Client, vm *api.VM) (string, error) {
261 return client.StartVM(vm)
262 }),
263 }
264}
265
266func newGuestsStopCmd() *cobra.Command {
267 return &cobra.Command{

Callers 1

newGuestsCmdFunction · 0.85

Calls 2

makeLifecycleCmdFunction · 0.85
StartVMMethod · 0.80

Tested by

no test coverage detected