fix(region): azure created time sync

This commit is contained in:
ioito
2022-04-15 17:33:54 +08:00
parent b641b485b6
commit 1fc005397c
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -443,7 +443,7 @@ func (self *SAzureClient) _apiVersion(resource string, params url.Values) string
return "2020-06-01"
}
if utils.IsInStringArray("virtualmachines", info) {
return "2018-04-01"
return "2021-11-01"
}
if utils.IsInStringArray("skus", info) {
return "2019-04-01"
+2 -2
View File
@@ -59,7 +59,7 @@ func (ai TAzureInt32) Int32() int32 {
}
type DiskProperties struct {
//TimeCreated time.Time //??? 序列化出错?
TimeCreated time.Time `json:"timeCreated,omitempty"`
OsType string `json:"osType,omitempty"`
CreationData CreationData `json:"creationData,omitempty"`
DiskSizeGB TAzureInt32 `json:"diskSizeGB,omitempty"`
@@ -297,7 +297,7 @@ func (self *SDisk) GetBillingType() string {
}
func (self *SDisk) GetCreatedAt() time.Time {
return time.Time{}
return self.Properties.TimeCreated
}
func (self *SDisk) GetExpiredAt() time.Time {
+2 -1
View File
@@ -155,6 +155,7 @@ type VirtualMachineProperties struct {
DebugProfile *DebugProfile `json:"debugProfile,omitempty"`
OsProfile OsProfile `json:"osProfile,omitempty"`
VmId string `json:"vmId,omitempty"`
TimeCreated time.Time `json:"timeCreated,omitempty"`
}
type SExtensionResourceProperties struct {
@@ -1023,7 +1024,7 @@ func (self *SInstance) GetBillingType() string {
}
func (self *SInstance) GetCreatedAt() time.Time {
return time.Time{}
return self.Properties.TimeCreated
}
func (self *SInstance) GetExpiredAt() time.Time {