[PATCH v3 04/12] test_driver: Implement virDomainDetachDeviceAlias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As we already implement testDomainChgDevice for both DetachDeviceFlags
and DetachDeviceAlias, so it's simple to implement this API by
changing the parameter.

Signed-off-by: Luke Yue <lukedyue@xxxxxxxxx>
---
 src/test/test_driver.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 6a7eb12f77..9843340fec 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -10252,6 +10252,15 @@ testDomainDetachDeviceFlags(virDomainPtr dom,
                                xml, NULL, flags);
 }
 
+static int
+testDomainDetachDeviceAlias(virDomainPtr dom,
+                            const char *alias,
+                            unsigned int flags)
+{
+    return testDomainChgDevice(dom, VIR_DOMAIN_DEVICE_ACTION_DETACH,
+                               NULL, alias, flags);
+}
+
 /*
  * Test driver
  */
@@ -10349,6 +10358,7 @@ static virHypervisorDriver testHypervisorDriver = {
     .domainFSFreeze = testDomainFSFreeze, /* 5.7.0 */
     .domainFSThaw = testDomainFSThaw, /* 5.7.0 */
     .domainFSTrim = testDomainFSTrim, /* 5.7.0 */
+    .domainDetachDeviceAlias = testDomainDetachDeviceAlias, /* 7.10.0 */
     .domainDetachDeviceFlags = testDomainDetachDeviceFlags, /* 7.10.0 */
     .domainGetAutostart = testDomainGetAutostart, /* 0.3.2 */
     .domainSetAutostart = testDomainSetAutostart, /* 0.3.2 */
-- 
2.33.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux