This commit is contained in:
wanyaoqi
2019-03-28 23:06:20 +08:00
committed by Yousong Zhou
parent a5774f4fd1
commit a759f34819
11 changed files with 287 additions and 35 deletions
+10
View File
@@ -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 {