[Proposal] Add `Optional` (default `None`) to Node classes
未关闭
api: compute
proposal / rfc
- 主要语言
- Python
- 星标
- 2.1k
- 派生
- 931
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 4
描述
## Proposal
Some classes have attributes that are not required for building a Node.
For example, we don't need the `NodeSize.bandwidth` argument to create a new node. Only the `id` is necessary. But we still have to instanciate the `NodeSize` class with `bandwidth=None` since it's a required argument.
It could be possible to add a default `None` value to each optional argument to make things simpler when using Sizes/Images/Locations.
贡献指南
调研方向
首先检查 Node 类,尤其是 NodeSize,以及提案中提到的 Sizes、Images 和 Locations 类。确定哪些构造函数参数是可选的,并验证无需显式传入这些值即可实例化节点,同时 id 等必需属性仍然是必要的。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- cloud
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100