[Kimchi-devel] [PATCH] API.json: allow scsi storage devices
Royce Lv
lvroyce at linux.vnet.ibm.com
Tue Sep 16 03:07:46 UTC 2014
On 2014年09月16日 10:47, Daniel Henrique Barboza wrote:
> Kimchi does not allow scsi devices to be attached in a VM (devices
> with names sdb,sdc ...). A simple change in API.json regex of
> vmstorages_create fixes it.
>
> Signed-off-by: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>
> ---
> src/kimchi/API.json | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/kimchi/API.json b/src/kimchi/API.json
> index 1319531..4a3cd03 100644
> --- a/src/kimchi/API.json
> +++ b/src/kimchi/API.json
> @@ -489,7 +489,7 @@
> "dev": {
> "description": "The storage device name",
> "type": "string",
> - "pattern": "^h|vd[b-z]$",
> + "pattern": "^h|s|vd[b-z]$",
> "error": "KCHVMSTOR0001E"
> },
> "type": {
I'm good with this change itself.
As I commented in bugzilla, if we consider this case:
pass "hda" as name while platform does not support IDE bus,
disk is actually created as SCSI disk but named as "hda"
it may course confusion about why scsi disk accept name start with 'hd'.
So allow all patterns have problem too. I suggest we add logic to check
what bus are accepted to decide if a name convention is right.
I guess refer to "_get_storage_device_name()" and make some changes will do.
More information about the Kimchi-devel
mailing list