diff --git a/pkg/util/aws/instance.go b/pkg/util/aws/instance.go index 7bde39d10e..1ceef457f2 100644 --- a/pkg/util/aws/instance.go +++ b/pkg/util/aws/instance.go @@ -326,7 +326,6 @@ func (self *SInstance) DeleteVM() error { for { err := self.host.zone.region.DeleteVM(self.InstanceId) if err != nil { - // todo: implement me return err } else { break @@ -337,8 +336,7 @@ func (self *SInstance) DeleteVM() error { } func (self *SInstance) UpdateVM(name string) error { - // todo :implement me - return nil + return self.host.zone.region.UpdateVM(self.InstanceId, name) } func (self *SInstance) RebuildRoot(imageId string, passwd string, publicKey string, sysSizeGB int) (string, error) { @@ -690,12 +688,11 @@ func (self *SRegion) DeployVM(instanceId string, name string, password string, k } func (self *SRegion) UpdateVM(instanceId string, hostname string) error { - // todo : implement me - return nil + // https://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/set-hostname.html + return fmt.Errorf("aws not support change hostname.") } func (self *SRegion) ReplaceSystemDisk(instanceId string, imageId string, passwd string, keypairName string, sysDiskSizeGB int) (string, error) { - return "", cloudprovider.ErrNotSupported } diff --git a/pkg/util/aws/instancetype.go b/pkg/util/aws/instancetype.go index a1ae366f64..2e728bf2b0 100644 --- a/pkg/util/aws/instancetype.go +++ b/pkg/util/aws/instancetype.go @@ -83,6 +83,8 @@ func (self *SRegion) GetMatchInstanceTypes(cpu int, memMB int, gpu int, zoneId s } // 实例类型顺序: 微型实例 -> 通用型 -> 计算优化型 ... + // todo:部分实例类型 需要启用ena才能正常启动。需要过滤掉。 + // https://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/enhanced-networking-ena.html ret := []SInstanceType{} for _, t := range types { // cpu & mem & disk & ena 都匹配才行