mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
* feat(region): add guest rescue api && download initrd from baremetal tftp server && add baremetal agent ip finder & update pic address & support ip kernel config. * feat(host-deployer): use qemu-kvm as default deploy dirver --------- Co-authored-by: boironic@gmail.com <boironic@gmail.com>
This commit is contained in:
@@ -123,6 +123,8 @@ func init() {
|
||||
cmd.Perform("set-nic-traffic-limit", &options.ServerNicTrafficLimitOptions{})
|
||||
cmd.Perform("add-sub-ips", &options.ServerAddSubIpsOptions{})
|
||||
cmd.BatchPerform("set-os-info", &options.ServerSetOSInfoOptions{})
|
||||
cmd.BatchPerform("start-rescue", &options.ServerStartOptions{})
|
||||
cmd.BatchPerform("stop-rescue", &options.ServerStartOptions{})
|
||||
|
||||
cmd.Get("vnc", new(options.ServerVncOptions))
|
||||
cmd.Get("desc", new(options.ServerIdOptions))
|
||||
@@ -953,46 +955,4 @@ func init() {
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
// ServerStartRescueOptions is used to start a rescue os.
|
||||
type ServerStartRescueOptions struct {
|
||||
ID string `help:"ID of server" json:"-"`
|
||||
QemuVersion string `help:"prefer qemu version" json:"qemu_version"`
|
||||
}
|
||||
R(&ServerStartRescueOptions{}, "server-start-rescue ", "Start rescu e a guest server", func(s *mcclient.ClientSession, opts *ServerStartRescueOptions) error {
|
||||
params, err := baseoptions.StructToParams(opts)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
result, err := modules.Servers.PerformAction(s, opts.ID, "start-rescue", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
printObject(result)
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
// ServerStopRescueOptions is used to stop a rescue os.
|
||||
type ServerStopRescueOptions struct {
|
||||
ID string `help:"ID of server" json:"-"`
|
||||
QemuVersion string `help:"prefer qemu version" json:"qemu_version"`
|
||||
}
|
||||
R(&ServerStopRescueOptions{}, "server-stop-rescue", "Stop rescue a guest server", func(s *mcclient.ClientSession, opts *ServerStopRescueOptions) error {
|
||||
params, err := baseoptions.StructToParams(opts)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
result, err := modules.Servers.PerformAction(s, opts.ID, "stop-rescue", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
printObject(result)
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user