[libvirt] [PATCH 25/38] conf: Don't encode matrix of storage protocols supporting TLS in the parser

Peter Krempa posted 38 patches 6 years, 11 months ago
[libvirt] [PATCH 25/38] conf: Don't encode matrix of storage protocols supporting TLS in the parser
Posted by Peter Krempa 6 years, 11 months ago
Always parse the 'tls' source field and let the drivers decide whether
they support it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/conf/domain_conf.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 544f63a2a9..51e3d47930 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8682,17 +8682,11 @@ virDomainDiskSourceNetworkParse(xmlNodePtr node,
         goto cleanup;
     }

-    /* Check tls=yes|no domain setting for the block device
-     * At present only VxHS. Other block devices may be added later */
-    if (src->protocol == VIR_STORAGE_NET_PROTOCOL_VXHS &&
-        (haveTLS = virXMLPropString(node, "tls"))) {
-        if ((src->haveTLS =
-            virTristateBoolTypeFromString(haveTLS)) <= 0) {
-            virReportError(VIR_ERR_XML_ERROR,
-                       _("unknown disk source 'tls' setting '%s'"),
-                       haveTLS);
+    if ((haveTLS = virXMLPropString(node, "tls")) &&
+        (src->haveTLS = virTristateBoolTypeFromString(haveTLS)) <= 0) {
+        virReportError(VIR_ERR_XML_ERROR,
+                   _("unknown disk source 'tls' setting '%s'"), haveTLS);
             goto cleanup;
-        }
     }

     if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) &&
-- 
2.16.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 25/38] conf: Don't encode matrix of storage protocols supporting TLS in the parser
Posted by Ján Tomko 6 years, 11 months ago
On Wed, May 30, 2018 at 02:41:21PM +0200, Peter Krempa wrote:
>Always parse the 'tls' source field and let the drivers decide whether
>they support it.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> src/conf/domain_conf.c | 14 ++++----------
> 1 file changed, 4 insertions(+), 10 deletions(-)

Reviewed-by: Ján Tomko <jtomko@redhat.com>

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