mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-29 17:58:36 +08:00
pkg/{aws,azure,qcloud}: fix compilation
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package shell
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
|
||||
@@ -134,7 +135,7 @@ func init() {
|
||||
}
|
||||
|
||||
shellutils.R(&InstanceRebuildRootOptions{}, "instance-rebuild-root", "Reinstall virtual server system image", func(cli *aws.SRegion, args *InstanceRebuildRootOptions) error {
|
||||
diskID, err := cli.ReplaceSystemDisk(args.ID, args.Image, args.Size)
|
||||
diskID, err := cli.ReplaceSystemDisk(context.Background(), args.ID, args.Image, args.Size)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package shell
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/util/azure"
|
||||
@@ -138,7 +139,7 @@ func init() {
|
||||
}
|
||||
|
||||
shellutils.R(&InstanceConfigOptions{}, "instance-change-conf", "Attach a disk to intance", func(cli *azure.SRegion, args *InstanceConfigOptions) error {
|
||||
return cli.ChangeVMConfig(args.ID, args.NCPU, args.MEMERY)
|
||||
return cli.ChangeVMConfig(context.Background(), args.ID, args.NCPU, args.MEMERY)
|
||||
})
|
||||
|
||||
type InstanceDeployOptions struct {
|
||||
@@ -148,7 +149,7 @@ func init() {
|
||||
}
|
||||
|
||||
shellutils.R(&InstanceDeployOptions{}, "instance-reset-password", "Reset intance password", func(cli *azure.SRegion, args *InstanceDeployOptions) error {
|
||||
return cli.DeployVM(args.ID, "", args.Password, args.PublicKey, false, "")
|
||||
return cli.DeployVM(context.Background(), args.ID, "", args.Password, args.PublicKey, false, "")
|
||||
})
|
||||
|
||||
type InstanceSecurityGroupOptions struct {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package shell
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/util/qcloud"
|
||||
@@ -64,7 +65,7 @@ func init() {
|
||||
SIZE int64 `help:"Disk Size GB"`
|
||||
}
|
||||
shellutils.R(&DiskResizeOptions{}, "disk-resize", "Resize disk", func(cli *qcloud.SRegion, args *DiskResizeOptions) error {
|
||||
return cli.ResizeDisk(args.ID, args.SIZE)
|
||||
return cli.ResizeDisk(context.Background(), args.ID, args.SIZE)
|
||||
})
|
||||
|
||||
type DiskResetOptions struct {
|
||||
|
||||
@@ -12,7 +12,7 @@ func init() {
|
||||
Limit int `help:"List limit"`
|
||||
}
|
||||
shellutils.R(&EipListOptions{}, "eip-list", "List eips", func(cli *qcloud.SRegion, args *EipListOptions) error {
|
||||
eips, total, err := cli.GetEips(args.Eip, args.Offset, args.Limit)
|
||||
eips, total, err := cli.GetEips(args.Eip, "", args.Offset, args.Limit)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user