mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
避免因大小写不一致导致同步时删除原有的数据
This commit is contained in:
@@ -3,6 +3,7 @@ package azure
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
@@ -225,7 +226,7 @@ func (self *SDisk) GetName() string {
|
||||
}
|
||||
|
||||
func (self *SDisk) GetGlobalId() string {
|
||||
return self.ID
|
||||
return strings.ToLower(self.ID)
|
||||
}
|
||||
|
||||
func (self *SDisk) IsEmulated() bool {
|
||||
|
||||
@@ -2,6 +2,7 @@ package azure
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-06-01/network"
|
||||
"yunion.io/x/jsonutils"
|
||||
@@ -276,7 +277,7 @@ func (self *SEipAddress) GetBandwidth() int {
|
||||
}
|
||||
|
||||
func (self *SEipAddress) GetGlobalId() string {
|
||||
return self.ID
|
||||
return strings.ToLower(self.ID)
|
||||
}
|
||||
|
||||
func (self *SEipAddress) GetId() string {
|
||||
|
||||
@@ -2,6 +2,7 @@ package azure
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute"
|
||||
"yunion.io/x/jsonutils"
|
||||
@@ -86,7 +87,7 @@ func (self *SImage) IsEmulated() bool {
|
||||
}
|
||||
|
||||
func (self *SImage) GetGlobalId() string {
|
||||
return self.ID
|
||||
return strings.ToLower(self.ID)
|
||||
}
|
||||
|
||||
func (self *SImage) GetStatus() string {
|
||||
|
||||
@@ -627,7 +627,7 @@ func (self *SInstance) GetName() string {
|
||||
}
|
||||
|
||||
func (self *SInstance) GetGlobalId() string {
|
||||
return self.ID
|
||||
return strings.ToLower(self.ID)
|
||||
}
|
||||
|
||||
func (self *SRegion) GetInstanceStatus(instanceId string) (string, error) {
|
||||
|
||||
@@ -35,7 +35,7 @@ func (self *SNetwork) GetName() string {
|
||||
}
|
||||
|
||||
func (self *SNetwork) GetGlobalId() string {
|
||||
return self.ID
|
||||
return strings.ToLower(self.ID)
|
||||
}
|
||||
|
||||
func (self *SNetwork) IsEmulated() bool {
|
||||
|
||||
@@ -157,7 +157,7 @@ func (self *SSecurityGroup) GetId() string {
|
||||
}
|
||||
|
||||
func (self *SSecurityGroup) GetGlobalId() string {
|
||||
return self.ID
|
||||
return strings.ToLower(self.ID)
|
||||
}
|
||||
|
||||
func (self *SSecurityGroup) GetDescription() string {
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute"
|
||||
"yunion.io/x/jsonutils"
|
||||
@@ -31,7 +32,7 @@ func (self *SSnapshot) GetId() string {
|
||||
}
|
||||
|
||||
func (self *SSnapshot) GetGlobalId() string {
|
||||
return self.ID
|
||||
return strings.ToLower(self.ID)
|
||||
}
|
||||
|
||||
func (self *SSnapshot) GetMetadata() *jsonutils.JSONDict {
|
||||
|
||||
@@ -65,7 +65,7 @@ func (self *SVpc) GetName() string {
|
||||
}
|
||||
|
||||
func (self *SVpc) GetGlobalId() string {
|
||||
return self.ID
|
||||
return strings.ToLower(self.ID)
|
||||
}
|
||||
|
||||
func (self *SVpc) IsEmulated() bool {
|
||||
|
||||
@@ -3,6 +3,7 @@ package azure
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-06-01/network"
|
||||
"yunion.io/x/jsonutils"
|
||||
@@ -25,7 +26,7 @@ func (self *SWire) GetId() string {
|
||||
}
|
||||
|
||||
func (self *SWire) GetGlobalId() string {
|
||||
return self.GetId()
|
||||
return strings.ToLower(self.GetId())
|
||||
}
|
||||
|
||||
func (self *SWire) GetName() string {
|
||||
|
||||
Reference in New Issue
Block a user