mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
feat(region,host): create disk from existing path (#14677)
Server create disk from existing path. Usage: climc server-create --disk storage=<storage>:existing_path=<path> ... climc disk-create storage=<storage>:existing_path=<path> DISKNAME Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
This commit is contained in:
@@ -185,6 +185,8 @@ func ParseDiskConfig(diskStr string, idx int) (*compute.DiskConfig, error) {
|
||||
diskConfig.Storage = str
|
||||
case "image", "image_id":
|
||||
diskConfig.ImageId = str
|
||||
case "existing_path":
|
||||
diskConfig.ExistingPath = str
|
||||
default:
|
||||
return nil, errors.Errorf("invalid disk description %s", p)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user