mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
update vm
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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 都匹配才行
|
||||
|
||||
Reference in New Issue
Block a user