mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-06 21:52:54 +08:00
fix: guest change ipaddr no-sync option (#24713)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -1318,6 +1318,8 @@ type ServerChangeIpaddrInput struct {
|
||||
Reserve *bool `json:"reserve"`
|
||||
|
||||
RestartNetwork *bool `json:"restart_network"`
|
||||
|
||||
NoSync *bool `json:"no_sync"`
|
||||
}
|
||||
|
||||
type ServerChangeBandwidthInput struct {
|
||||
|
||||
@@ -2913,6 +2913,9 @@ func (self *SGuest) PerformChangeIpaddr(
|
||||
}
|
||||
self.SetStatus(ctx, userCred, api.VM_RESTART_NETWORK, "restart network")
|
||||
}
|
||||
if input.NoSync != nil && *input.NoSync {
|
||||
return nil, nil
|
||||
}
|
||||
return nil, self.startSyncTask(ctx, userCred, false, "", taskData)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user