mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
add more comment
This commit is contained in:
@@ -172,10 +172,15 @@ func (self *SRegion) GetImageByName(name string) (*SImage, error) {
|
||||
return &images[0], nil
|
||||
}
|
||||
|
||||
// https://support.huaweicloud.com/api-ims/zh-cn_topic_0020092109.html
|
||||
// os version 取值范围: https://support.huaweicloud.com/api-ims/zh-cn_topic_0031617666.html
|
||||
// todo: 考虑使用镜像快速导入。 https://support.huaweicloud.com/api-ims/zh-cn_topic_0133188204.html
|
||||
// 使用OBS文件创建镜像
|
||||
/* https://support.huaweicloud.com/api-ims/zh-cn_topic_0020092109.html
|
||||
os version 取值范围: https://support.huaweicloud.com/api-ims/zh-cn_topic_0031617666.html
|
||||
用于创建私有镜像的源云服务器系统盘大小大于等于40GB且不超过1024GB。
|
||||
目前支持vhd,zvhd、raw,qcow2
|
||||
todo: 考虑使用镜像快速导入。 https://support.huaweicloud.com/api-ims/zh-cn_topic_0133188204.html
|
||||
使用OBS文件创建镜像
|
||||
|
||||
* openstack原生接口支持的格式:https://support.huaweicloud.com/api-ims/zh-cn_topic_0031615566.html
|
||||
*/
|
||||
func (self *SRegion) ImportImageJob(name string, osDist string, osVersion string, osArch string, bucket string, key string, minDiskGB int64) (string, error) {
|
||||
os_version, err := stdVersion(osDist, osVersion, osArch)
|
||||
log.Debugf("%s %s %s: %s", osDist, osVersion, osArch, os_version)
|
||||
|
||||
@@ -867,6 +867,7 @@ func (self *SRegion) ChangeRoot(ctx context.Context, instanceId, imageId, passwd
|
||||
|
||||
// https://support.huaweicloud.com/api-ecs/zh-cn_topic_0020212692.html
|
||||
// https://support.huaweicloud.com/api-ecs/zh-cn_topic_0110109377.html
|
||||
// 一键式重置密码 需要安装安装一键式重置密码插件 https://support.huaweicloud.com/usermanual-ecs/zh-cn_topic_0068095385.html
|
||||
// 目前不支持直接重置密钥
|
||||
func (self *SRegion) DeployVM(instanceId string, name string, password string, keypairName string, deleteKeypair bool, description string) error {
|
||||
serverObj := jsonutils.NewDict()
|
||||
|
||||
@@ -108,6 +108,7 @@ func (self *SStoragecache) GetManagerId() string {
|
||||
|
||||
// 目前支持使用vhd、zvhd、vmdk、qcow2、raw、zvhd2、vhdx、qcow、vdi或qed格式镜像文件创建私有镜像。
|
||||
// 快速通道功能可快速完成镜像制作,但镜像文件需转换为raw或zvhd2格式并完成镜像优化。
|
||||
// https://support.huaweicloud.com/api-ims/zh-cn_topic_0083905788.html
|
||||
func (self *SStoragecache) CreateIImage(snapshotId, imageName, osType, imageDesc string) (cloudprovider.ICloudImage, error) {
|
||||
if imageId, err := self.region.createIImage(snapshotId, imageName, imageDesc); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user