fix(region): keypair filter (#25774)

This commit is contained in:
屈轩
2026-09-30 13:59:56 +08:00
committed by GitHub
parent c8ec8ce214
commit 06f89b19a0
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -140,6 +140,9 @@ type ServerListInput struct {
BindingSnapshotpolicy *bool `json:"binding_snapshotpolicy"`
// 根据虚机关联的磁盘是否绑定快照策略过滤
BindingDisksSnapshotpolicy *bool `json:"binding_disks_snapshotpolicy"`
// 根据秘钥对ID过滤
KeypairId []string `json:"keypair_id"`
}
// 主机快照策略绑定/设置接口入参
+4
View File
@@ -765,6 +765,10 @@ func (manager *SGuestManager) ListItemFilter(
}
}
if len(query.KeypairId) > 0 {
q = q.In("keypair_id", query.KeypairId)
}
return q, nil
}