Task #7228
closed
Make ucloud-{api,cli} to take specs from command line instead of json file
Added by Ahmed Bilal about 5 years ago.
Updated about 5 years ago.
Description
This behavior occurs in
- Creation of VM
- Creation of Host
ucloud-{file-scanner, image-scanner} Show Graceful messages if some required component is missing.
For Example,
qemu-img
must be installed.
setfattr
must be present.
getfattr
must be present.
Done.
pipenv run python ucloud.py vm create --vm-name cat --cpu 2 --ram 1gb --os-ssd 10gb --image-uuid 86bdedfb-c76e-420b-a4b4-f7b3c30d9da0 --hdd 100GB --hdd 200GB
Resulting JSON
/v1/vm/f2651c891aaf4629946ca01a95ce14f9
{"hostname": "", "storage_attachment": [], "name": "cat", "log": [], "image_uuid": "86bdedfb-c76e-420b-a4b4-f7b3c30d9da0", "owner": "admin", "specs": {"ram": "1.0 GB", "hdd": ["100.0 GB", "200.0 GB"], "cpu": 2, "os-ssd": "10.0 GB"}, "status": "", "vnc_socket": ""}
- % Done changed from 0 to 50
- Status changed from In Progress to Closed
Also available in: Atom
PDF