Project

General

Profile

Actions

Task #7228

closed

Make ucloud-{api,cli} to take specs from command line instead of json file

Added by Ahmed Bilal over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
10/14/2019
Due date:
% Done:

50%

Estimated time:
PM Check date:

Description

This behavior occurs in
  • Creation of VM
  • Creation of Host
Actions #1

Updated by Ahmed Bilal over 4 years ago

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.
Actions #2

Updated by Ahmed Bilal over 4 years ago

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": ""}

Actions #3

Updated by Ahmed Bilal over 4 years ago

  • % Done changed from 0 to 50
Actions #4

Updated by Ahmed Bilal over 4 years ago

  • Status changed from In Progress to Closed

ucloud-cli now takes specs from command line instead of json file.

https://asciinema.org/a/Fgubl6N0Zco1yRv6BydMzLPef

Actions

Also available in: Atom PDF