From c5a643d4fdf7a3631e415aeec4a18711a433958e Mon Sep 17 00:00:00 2001 From: TangBin Date: Tue, 20 Nov 2018 16:07:51 +0800 Subject: [PATCH] remove useless method --- pkg/compute/hostdrivers/aws.go | 16 ---------------- pkg/util/aws/snapshot.go | 5 ----- 2 files changed, 21 deletions(-) diff --git a/pkg/compute/hostdrivers/aws.go b/pkg/compute/hostdrivers/aws.go index 255282bcc7..b4022ab211 100644 --- a/pkg/compute/hostdrivers/aws.go +++ b/pkg/compute/hostdrivers/aws.go @@ -188,22 +188,6 @@ func (self *SAwsHostDriver) RequestResizeDiskOnHost(host *models.SHost, storage return nil } -func (self *SAwsHostDriver) RequestResetDisk(ctx context.Context, host *models.SHost, disk *models.SDisk, params *jsonutils.JSONDict, task taskman.ITask) error { - iDisk, err := disk.GetIDisk() - if err != nil { - return err - } - snapshotId, err := params.GetString("snapshot_id") - if err != nil { - return err - } - taskman.LocalTaskRun(task, func() (jsonutils.JSONObject, error) { - err := iDisk.Reset(snapshotId) - return nil, err - }) - return nil -} - func init() { driver := SAwsHostDriver{} models.RegisterHostDriver(&driver) diff --git a/pkg/util/aws/snapshot.go b/pkg/util/aws/snapshot.go index c69816ecb4..eb61b9c38a 100644 --- a/pkg/util/aws/snapshot.go +++ b/pkg/util/aws/snapshot.go @@ -94,11 +94,6 @@ func (self *SSnapshot) Delete() error { return self.region.DeleteSnapshot(self.SnapshotId) } -func (self *SSnapshot) GetRegionId() string { - // 这里特别注意:aws没有有uuid形式的region id - return self.region.GetId() -} - func (self *SRegion) GetSnapshots(instanceId string, diskId string, snapshotName string, snapshotIds []string, offset int, limit int) ([]SSnapshot, int, error) { params := &ec2.DescribeSnapshotsInput{} filters := make([]*ec2.Filter, 0)