apache / apache/cloudstack

remove instanceof checks and use reflection for admin cmd invocations

未关闭
#6,966 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
no-issue-activity status:needs-work status:stale type:technical-debt
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
32

描述

##### ISSUE TYPE
* cleanup

##### COMPONENT NAME

~~~
API
~~~

##### CLOUDSTACK VERSION

~~~
4.17
~~~

##### CONFIGURATION

##### OS / ENVIRONMENT

##### SUMMARY

the API classes have instances that are for root admin only, these are checked for using `instanceof` in the service layer. This should be cleaned up in favour for reflection invocations as in #6951. It would be better to do all in one go but the fix in #6951 really needs it and is for a point release, so postponing.

##### STEPS TO REPRODUCE

~~~

~~~

##### EXPECTED RESULTS

~~~

~~~

##### ACTUAL RESULTS

~~~

~~~

贡献指南

打开贡献指南

调研方向

从处理 admin 命令调用的 API 类和服务层入手,然后对比 #6951 中描述的 reflection 方法。跟踪针对仅限 root admin 实例的现有 instanceof 检查,并确定受影响的调用路径。当这些检查使用预期的 reflection 方法,同时保留仅限 admin 的行为时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
api, cloud
Issue 类型
重构
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。