mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-03 06:21:39 +08:00
fix(region): azure created time sync
This commit is contained in:
@@ -433,7 +433,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"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
@@ -1020,7 +1021,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 {
|
||||
|
||||
Reference in New Issue
Block a user