From ed118dfd6ebe06a095620e93f4318c4e7ac9cfed Mon Sep 17 00:00:00 2001 From: Renuka Apte Date: Mon, 4 Jun 2012 13:48:34 -0700 Subject: Boot from volume for Xen Implements bp xenapi-boot-from-volume Ensure boot from volume works for XenAPI (tested using XenServer). 1. Add strip_prefix to block_device to make the command mountpoint agnostic. 2. Pass block device and delete on terminate information to driver layer. 3. Add ability to recognize and boot from the specified nova volume. Change-Id: If117087086eab809217d2b173f921bf9319a52c7 --- nova/tests/test_block_device.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/test_block_device.py b/nova/tests/test_block_device.py index b8e9b35e2..6a77d98ae 100644 --- a/nova/tests/test_block_device.py +++ b/nova/tests/test_block_device.py @@ -85,3 +85,9 @@ class BlockDeviceTestCase(test.TestCase): def test_strip_dev(self): self.assertEqual(block_device.strip_dev('/dev/sda'), 'sda') self.assertEqual(block_device.strip_dev('sda'), 'sda') + + def test_strip_prefix(self): + self.assertEqual(block_device.strip_prefix('/dev/sda'), 'a') + self.assertEqual(block_device.strip_prefix('a'), 'a') + self.assertEqual(block_device.strip_prefix('xvda'), 'a') + self.assertEqual(block_device.strip_prefix('vda'), 'a') -- cgit