add elastic cache purge fix

This commit is contained in:
TangBin
2019-08-06 14:57:52 +08:00
parent 25836b22b3
commit 10ae4b4bf8
2 changed files with 8 additions and 2 deletions
@@ -18,7 +18,7 @@ func NewElasticcacheManager(regionId string, projectId string, signer auth.Signe
Region: regionId,
ProjectId: projectId,
version: "v1.0",
Keyword: "instance",
Keyword: "",
KeywordPlural: "instances",
ResourceKeyword: "instances",
@@ -155,7 +155,13 @@ func (self *SElasticcache) GetVpcId() string {
func (self *SElasticcache) GetZoneId() string {
if len(self.AvailableZones) > 0 {
return self.AvailableZones[0]
zone, err := self.region.getZoneById(self.AvailableZones[0])
if err != nil {
log.Errorf("elasticcache.GetZoneId %s", err)
return ""
}
return zone.GetGlobalId()
}
return ""