mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
prepay vm bugfix
This commit is contained in:
@@ -754,7 +754,7 @@ func (self *SRegion) CreateInstance(name string, imageId string, instanceType st
|
||||
ids, err = self.GetAllSubTaskEntityIDs(self.ecsClient.Servers.ServiceType(), _id, "server_id")
|
||||
} else {
|
||||
// 包年包月
|
||||
err = cloudprovider.WaitCreated(10*time.Second, 180*time.Second, func() bool {
|
||||
err = cloudprovider.WaitCreated(10*time.Second, 300*time.Second, func() bool {
|
||||
log.Debugf("WaitCreated %s", _id)
|
||||
order, e := self.GetOrder(_id)
|
||||
if e != nil {
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"yunion.io/x/log"
|
||||
"yunion.io/x/onecloud/pkg/cloudprovider"
|
||||
)
|
||||
|
||||
@@ -138,6 +139,8 @@ func (self *SRegion) GetAllResByOrderId(orderId string) ([]SResource, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
log.Debugf("GetAllResByOrderId %s", order.Resources)
|
||||
return order.Resources, nil
|
||||
}
|
||||
|
||||
@@ -166,7 +169,9 @@ func (self *SRegion) getAllResIdsByType(orderId string, resourceType string) ([]
|
||||
|
||||
ids := make([]string, 0)
|
||||
for _, r := range res {
|
||||
ids = append(ids, r.ResourceID)
|
||||
if len(r.ResourceID) > 0 {
|
||||
ids = append(ids, r.ResourceID)
|
||||
}
|
||||
}
|
||||
|
||||
return ids, nil
|
||||
|
||||
Reference in New Issue
Block a user