[libvirt] [PATCH] test_driver: implement virDomainSetUserPassword

Ilias Stamatis posted 1 patch 14 weeks ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20190709161343.17695-1-stamatis.iliass@gmail.com
src/test/test_driver.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

[libvirt] [PATCH] test_driver: implement virDomainSetUserPassword

Posted by Ilias Stamatis 14 weeks ago
Signed-off-by: Ilias Stamatis <stamatis.iliass@gmail.com>
---
 src/test/test_driver.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 49d7030d21..891a398a92 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -2602,6 +2602,31 @@ testDomainSetVcpusFlags(virDomainPtr domain, unsigned int nrCpus,
     return ret;
 }

+
+static int
+testDomainSetUserPassword(virDomainPtr dom,
+                          const char *user ATTRIBUTE_UNUSED,
+                          const char *password ATTRIBUTE_UNUSED,
+                          unsigned int flags)
+{
+    int ret = -1;
+    virDomainObjPtr vm;
+
+    virCheckFlags(VIR_DOMAIN_PASSWORD_ENCRYPTED, -1);
+
+    if (!(vm = testDomObjFromDomain(dom)))
+        return -1;
+
+    if (virDomainObjCheckActive(vm) < 0)
+        goto cleanup;
+
+    ret = 0;
+ cleanup:
+    virDomainObjEndAPI(&vm);
+    return ret;
+}
+
+
 static int
 testDomainSetVcpus(virDomainPtr domain, unsigned int nrCpus)
 {
@@ -7628,6 +7653,7 @@ static virHypervisorDriver testHypervisorDriver = {
     .domainSaveImageGetXMLDesc = testDomainSaveImageGetXMLDesc, /* 5.5.0 */
     .domainCoreDump = testDomainCoreDump, /* 0.3.2 */
     .domainCoreDumpWithFormat = testDomainCoreDumpWithFormat, /* 1.2.3 */
+    .domainSetUserPassword = testDomainSetUserPassword, /* 5.6.0 */
     .domainSetVcpus = testDomainSetVcpus, /* 0.1.4 */
     .domainSetVcpusFlags = testDomainSetVcpusFlags, /* 0.8.5 */
     .domainGetVcpusFlags = testDomainGetVcpusFlags, /* 0.8.5 */
--
2.22.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] test_driver: implement virDomainSetUserPassword

Posted by Erik Skultety 13 weeks ago
On Tue, Jul 09, 2019 at 06:13:44PM +0200, Ilias Stamatis wrote:
> Signed-off-by: Ilias Stamatis <stamatis.iliass@gmail.com>
> ---
Reviewed-by: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list