Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GroupCmd = &cobra.Command{
Use: "recovery",
Short: "Recovery commands",
}
View Source
var StartCmd = &cobra.Command{ Use: "start <virtual-machine-id>", Short: "Start recovery mode", Long: "Initiate recovery mode for a specified virtual machine.\n\nRecovery mode is a special state that allows users to perform system rescue operations, \nsuch as repairing file systems, recovering data, or troubleshooting issues that prevent the virtual machine \nfrom booting normally. \n\nVirtual machine will boot recovery disk image and original disk image will be mounted in `/mnt` directory.\n\nUse this endpoint to enable system rescue operations on VPS instances.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { payload, err := json.Marshal(startBody(cmd)) if err != nil { log.Fatal(err) } r, err := api.Request().VPSStartRecoveryModeV1WithBodyWithResponse(context.TODO(), utils.StringToInt(args[0]), "application/json", bytes.NewReader(payload)) 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: "Stop recovery mode for a specified virtual machine.\n\nIf virtual machine is not in recovery mode, this operation will fail.\n\nUse this endpoint to exit system rescue mode and return VPS to normal operation.", 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.