Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GroupCmd = &cobra.Command{
Use: "recovery",
Short: "Recovery mode management",
Long: `Initiate or stop recovery mode to perform system rescue operations. This category enables you to boot a virtual machine into a state suitable for repairing file systems or recovering data.`,
}
View Source
var StartCmd = &cobra.Command{ Use: "start <virtual machine ID>", Short: "Start recovery mode", Long: `This endpoint initiates the recovery mode for a specified virtual machine. Recovery mode is a special state that allows users to perform system rescue operations, such as repairing file systems, recovering data, or troubleshooting issues that prevent the virtual machine from booting normally. Virtual machine will boot recovery disk image and original disk image will be mounted in /mnt directory.`, Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().VPSStartRecoveryModeV1WithResponse(context.TODO(), utils.StringToInt(args[0]), startRequestParameters(cmd)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var StopCmd = &cobra.Command{ Use: "stop <virtual machine ID>", Short: "Stop recovery mode", Long: `This endpoint stops the recovery mode for a specified virtual machine. If virtual machine is not in recovery mode, this operation will fail.`, Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().VPSStopRecoveryModeV1WithResponse(context.TODO(), utils.StringToInt(args[0])) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.