]> xenbits.xensource.com Git - libvirt.git/commitdiff
hyperv_driver: Set remoteOnly member of virConnectDriver
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>
Tue, 10 Jul 2018 23:31:01 +0000 (20:31 -0300)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 11 Jul 2018 11:16:22 +0000 (13:16 +0200)
HyperV driver can't function without a server being informed, so this flag
makes libvirt to check for a valid server before calling connectOpen.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/hyperv/hyperv_driver.c

index 95496bdf7311248f627cf38d7fd969c99fece3ef..a85943668c200d83239f54c544cd962020f40dd8 100644 (file)
@@ -128,13 +128,6 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
 
     virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
 
-    /* Require server part */
-    if (conn->uri->server == NULL) {
-        virReportError(VIR_ERR_INVALID_ARG, "%s",
-                       _("URI is missing the server part"));
-        return VIR_DRV_OPEN_ERROR;
-    }
-
     /* Require auth */
     if (auth == NULL || auth->cb == NULL) {
         virReportError(VIR_ERR_INVALID_ARG, "%s",
@@ -1662,6 +1655,7 @@ hypervDebugHandler(const char *message, debug_level_e level,
 
 
 static virConnectDriver hypervConnectDriver = {
+    .remoteOnly = true,
     .uriSchemes = (const char *[]){ "hyperv", NULL },
     .hypervisorDriver = &hypervHypervisorDriver,
 };