fix: guest change ipaddr no-sync option (#24715)

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
Jian Qiu
2026-04-23 13:51:52 +08:00
committed by GitHub
co-authored by Qiu Jian
parent 07d26676d2
commit 43f0a542cf
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -1459,6 +1459,8 @@ type ServerChangeIpaddrInput struct {
Reserve *bool `json:"reserve"`
RestartNetwork *bool `json:"restart_network"`
NoSync *bool `json:"no_sync"`
}
type ServerChangeBandwidthInput struct {
+3
View File
@@ -3018,6 +3018,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)
}