避免因大小写不一致导致同步时删除原有的数据

This commit is contained in:
屈轩
2018-10-16 19:40:20 +08:00
parent c61f18d88e
commit e6d4050904
9 changed files with 14 additions and 9 deletions
+2 -1
View File
@@ -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 -1
View File
@@ -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 -1
View File
@@ -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 {
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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 {
+2 -1
View File
@@ -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 {
+1 -1
View File
@@ -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 {
+2 -1
View File
@@ -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 {