mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): azure disk status
This commit is contained in:
@@ -172,6 +172,10 @@ func (self *SDisk) GetTags() (map[string]string, error) {
|
||||
}
|
||||
|
||||
func (self *SDisk) GetStatus() string {
|
||||
// 为了不统计这种磁盘挂载率, 单独设置一个状态
|
||||
if self.Properties.DiskState == "ActiveSAS" {
|
||||
return self.Properties.DiskState
|
||||
}
|
||||
status := self.Properties.ProvisioningState
|
||||
switch status {
|
||||
case "Updating":
|
||||
|
||||
@@ -185,7 +185,7 @@ func (self *SEipAddress) GetAssociationType() string {
|
||||
return ""
|
||||
}
|
||||
if info := strings.Split(self.Properties.IPConfiguration.ID, "/"); len(info) > 7 {
|
||||
resType := strings.ToLower(info[6])
|
||||
resType := strings.ToLower(info[7])
|
||||
if utils.IsInStringArray(resType, []string{"networkinterfaces"}) {
|
||||
return api.EIP_ASSOCIATE_TYPE_SERVER
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user