From 2fa6e23e9cefb8e45bd5a6cec36b1ac6b7ac65c3 Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Tue, 28 Feb 2012 16:18:53 -0800 Subject: Allow xvd* to be supplied for volume in xenapi * Fixes bug 942880 Change-Id: I7d0817051b837e3ba17f4edd8c47fd2c730c9822 --- nova/virt/xenapi/volume_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/virt') diff --git a/nova/virt/xenapi/volume_utils.py b/nova/virt/xenapi/volume_utils.py index e8124f7ef..da1921bad 100644 --- a/nova/virt/xenapi/volume_utils.py +++ b/nova/virt/xenapi/volume_utils.py @@ -357,8 +357,8 @@ class VolumeHelper(HelperBase): mountpoint = mountpoint[5:] if re.match('^[hs]d[a-p]$', mountpoint): return (ord(mountpoint[2:3]) - ord('a')) - elif re.match('^vd[a-p]$', mountpoint): - return (ord(mountpoint[2:3]) - ord('a')) + elif re.match('^x?vd[a-p]$', mountpoint): + return (ord(mountpoint[-1]) - ord('a')) elif re.match('^[0-9]+$', mountpoint): return string.atoi(mountpoint, 10) else: -- cgit