[lxc-devel] [nova-lxd/master] Sync with compute driver

zulcss on Github lxc-bot at linuxcontainers.org
Thu May 12 19:31:58 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 430 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160512/54f7f502/attachment.bin>
-------------- next part --------------
From 74ac72c7e648ba1b3564b1eb66a915612512ce5b Mon Sep 17 00:00:00 2001
From: Chuck Short <chuck.short at canonical.com>
Date: Thu, 12 May 2016 15:08:58 -0400
Subject: [PATCH] Sync with compute driver

Add check for driver compatibility for
'supports_attach_interface'

Signed-off-by: Chuck Short <chuck.short at canonical.com>
---
 nova/tests/unit/virt/lxd/test_driver_api.py | 2 ++
 nova/virt/lxd/driver.py                     | 1 +
 2 files changed, 3 insertions(+)

diff --git a/nova/tests/unit/virt/lxd/test_driver_api.py b/nova/tests/unit/virt/lxd/test_driver_api.py
index 7b6ad58..ff5fdd5 100644
--- a/nova/tests/unit/virt/lxd/test_driver_api.py
+++ b/nova/tests/unit/virt/lxd/test_driver_api.py
@@ -73,6 +73,8 @@ def test_capabilities(self):
         self.assertFalse(self.connection.capabilities['supports_recreate'])
         self.assertFalse(
             self.connection.capabilities['supports_migrate_to_same_host'])
+        self.assertTrue(
+            self.connection.capabilities['supports_attach_interface'])
 
     def test_init_host(self):
         self.assertEqual(
diff --git a/nova/virt/lxd/driver.py b/nova/virt/lxd/driver.py
index 5778f06..e56fc6c 100644
--- a/nova/virt/lxd/driver.py
+++ b/nova/virt/lxd/driver.py
@@ -60,6 +60,7 @@ class LXDDriver(driver.ComputeDriver):
         "has_imagecache": False,
         "supports_recreate": False,
         "supports_migrate_to_same_host": False,
+        "supports_attach_interface": True
     }
 
     def __init__(self, virtapi):


More information about the lxc-devel mailing list