Optional templateid param fails for KVM VM import
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 1.4k
- 平均合并
- 6 天 19 小时
- 30 天内合并 PR
- 32
描述
### problem
When importing a KVM VM via API and if a template is not specified, import fails with error,
**Template is needed and unable to use default template for hypervisor KVM**
Even though templateid parameter is specified as optional in the API documentation:
https://cloudstack.apache.org/api/apidocs-4.22/apis/importUnmanagedInstance.html
In UI, template is a required field though.
Documentation doesn't talk about this restriction on KVM
https://docs.cloudstack.apache.org/en/4.22.0.0/adminguide/virtual_machines/importing_unmanaging_vms.html
This is more of a documentation issue if the following block can not be updated:
https://github.com/apache/cloudstack/blob/4.22.0.0/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java#L1605-L1607
### versions
4.22; Maybe other versions as well
Import VM
### The steps to reproduce the bug
_No response_
### What to do about it?
Either update the documentation or remove the restriction to use default dummy template.
贡献指南
调研方向
先查看已记录的 importUnmanagedInstance API 和 docs/en/4.22.0.0/adminguide/virtual_machines/importing_unmanaging_vms.html,然后检查 UnmanagedVMsManagerImpl.java 中 1605-1607 行附近的内容,以确认 KVM 限制。与维护者确认预期结果是仅修改文档还是修改代码;当 API 文档和管理员文档准确描述 templateid 的行为时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100