mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-16 15:07:59 +08:00
fix(region): keypair filter (#25774)
This commit is contained in:
@@ -140,6 +140,9 @@ type ServerListInput struct {
|
||||
BindingSnapshotpolicy *bool `json:"binding_snapshotpolicy"`
|
||||
// 根据虚机关联的磁盘是否绑定快照策略过滤
|
||||
BindingDisksSnapshotpolicy *bool `json:"binding_disks_snapshotpolicy"`
|
||||
|
||||
// 根据秘钥对ID过滤
|
||||
KeypairId []string `json:"keypair_id"`
|
||||
}
|
||||
|
||||
// 主机快照策略绑定/设置接口入参
|
||||
|
||||
@@ -765,6 +765,10 @@ func (manager *SGuestManager) ListItemFilter(
|
||||
}
|
||||
}
|
||||
|
||||
if len(query.KeypairId) > 0 {
|
||||
q = q.In("keypair_id", query.KeypairId)
|
||||
}
|
||||
|
||||
return q, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user