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

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
Jian Qiu
2026-04-23 13:52:12 +08:00
committed by GitHub
parent b7fe16e629
commit a47d46602b
2 changed files with 5 additions and 0 deletions

View File

@@ -1318,6 +1318,8 @@ type ServerChangeIpaddrInput struct {
Reserve *bool `json:"reserve"`
RestartNetwork *bool `json:"restart_network"`
NoSync *bool `json:"no_sync"`
}
type ServerChangeBandwidthInput struct {

View File

@@ -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)
}