mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
vm clone
This commit is contained in:
@@ -152,6 +152,16 @@ func init() {
|
||||
return nil
|
||||
})
|
||||
|
||||
R(&options.ServerCloneOptions{}, "server-clone", "Clone a server", func(s *mcclient.ClientSession, opts *options.ServerCloneOptions) error {
|
||||
params := jsonutils.Marshal(opts).(*jsonutils.JSONDict)
|
||||
res, err := modules.Servers.PerformAction(s, opts.SOURCE, "clone", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(res)
|
||||
return nil
|
||||
})
|
||||
|
||||
R(&options.ServerLoginInfoOptions{}, "server-logininfo", "Get login info of a server", func(s *mcclient.ClientSession, opts *options.ServerLoginInfoOptions) error {
|
||||
srvid, e := modules.Servers.GetId(s, opts.ID, nil)
|
||||
if e != nil {
|
||||
|
||||
Reference in New Issue
Block a user