From nobody Sat May 4 16:03:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573821685; cv=none; d=zoho.com; s=zohoarc; b=iMPcf31b1u0HCHWbMAGLcT/E+nemCeKayRkmvniALaub/4nJo0/fJQgbx/hQB7DOKbM0FwIdCC4Qi8CJJ0Bpr9cAWsQ0lPnByDOfCxAWP9dbelBM3SNW6YZsBuaOsXLNnMPuppKXHOXmi9V4b75r/yGPSDtEVJgrsr8glkkibe8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573821685; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mhbp7twquJIyQ+w+PuyvFmf0CjZXu+ZfpeanGdyvXlM=; b=MO9xwY88rZjKmEYhdl3NNumCd9Ct4uopcizu7thGLRyRy5GZYLuSVQaI2i9B8C3JkWMQ3dTcr8R6HcMJ+a2A2oeIKQ1U+EpHYlI2pMaKnNGDtgWISidMwrSmLIk2n4m6YFcqwWHqZnd9a+3ckcUZiE7BgKtxLeQBS2vzh5RXqSQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1573821685691530.7544271098097; Fri, 15 Nov 2019 04:41:25 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-115-j35wfe3uOtCj2gRI8Vaq0w-1; Fri, 15 Nov 2019 07:41:21 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE4F481A334; Fri, 15 Nov 2019 12:41:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8924875E45; Fri, 15 Nov 2019 12:41:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 48DEB18089D6; Fri, 15 Nov 2019 12:41:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAFCexhJ026953 for ; Fri, 15 Nov 2019 07:40:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9984B5DC1B; Fri, 15 Nov 2019 12:40:59 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 242475E262 for ; Fri, 15 Nov 2019 12:40:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573821684; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=mhbp7twquJIyQ+w+PuyvFmf0CjZXu+ZfpeanGdyvXlM=; b=MvRD/8i2bE7NNtfoEjbx871aBP9/VOVOtZwjaB/7bvT03wb2gNSYmyaTNCIqrJTuZfvpf3 qv3rRpa8QqmOubhgXyvlPTUUu/PXTzj5RZnKJqYACD28fzWFJBOfSIcpi/hczcSskhfVxD eIeGeE7hlOivMrhH8WKfDryZhLyubPQ= From: Pino Toscano To: libvir-list@redhat.com Date: Fri, 15 Nov 2019 13:40:40 +0100 Message-Id: <20191115124051.989-2-ptoscano@redhat.com> In-Reply-To: <20191115124051.989-1-ptoscano@redhat.com> References: <20191115124051.989-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 01/12] esx: split datastoreToStoragePoolPtr helper X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: j35wfe3uOtCj2gRI8Vaq0w-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Move the creation of a virStoragePtr object from the esxVI_ObjectContent object of a datastore out of esxStoragePoolLookupByName in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano Reviewed-by: J=C3=A1n Tomko --- src/esx/esx_storage_backend_vmfs.c | 45 ++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backe= nd_vmfs.c index 5f25f80072..78fe2b598d 100644 --- a/src/esx/esx_storage_backend_vmfs.c +++ b/src/esx/esx_storage_backend_vmfs.c @@ -195,26 +195,16 @@ esxConnectListStoragePools(virConnectPtr conn, char *= *const names, =20 =20 static virStoragePoolPtr -esxStoragePoolLookupByName(virConnectPtr conn, - const char *name) +datastoreToStoragePoolPtr(virConnectPtr conn, + const char *name, + esxVI_ObjectContent *datastore) { esxPrivate *priv =3D conn->privateData; - esxVI_ObjectContent *datastore =3D NULL; esxVI_DatastoreHostMount *hostMount =3D NULL; /* VIR_CRYPTO_HASH_SIZE_MD5 =3D VIR_UUID_BUFLEN =3D 16 */ unsigned char md5[VIR_CRYPTO_HASH_SIZE_MD5]; virStoragePoolPtr pool =3D NULL; =20 - if (esxVI_LookupDatastoreByName(priv->primary, name, NULL, &datastore, - esxVI_Occurrence_OptionalItem) < 0) { - goto cleanup; - } - - if (!datastore) { - /* Not found, let the base storage driver handle error reporting */ - goto cleanup; - } - /* * Datastores don't have a UUID, but we can use the 'host.mountInfo.pa= th' * property as source for a UUID. The mount path is unique per host and @@ -239,7 +229,6 @@ esxStoragePoolLookupByName(virConnectPtr conn, pool =3D virGetStoragePool(conn, name, md5, &esxStorageBackendVMFS, NU= LL); =20 cleanup: - esxVI_ObjectContent_Free(&datastore); esxVI_DatastoreHostMount_Free(&hostMount); =20 return pool; @@ -247,6 +236,34 @@ esxStoragePoolLookupByName(virConnectPtr conn, =20 =20 =20 +static virStoragePoolPtr +esxStoragePoolLookupByName(virConnectPtr conn, + const char *name) +{ + esxPrivate *priv =3D conn->privateData; + esxVI_ObjectContent *datastore =3D NULL; + virStoragePoolPtr pool =3D NULL; + + if (esxVI_LookupDatastoreByName(priv->primary, name, NULL, &datastore, + esxVI_Occurrence_OptionalItem) < 0) { + goto cleanup; + } + + if (!datastore) { + /* Not found, let the base storage driver handle error reporting */ + goto cleanup; + } + + pool =3D datastoreToStoragePoolPtr(conn, name, datastore); + + cleanup: + esxVI_ObjectContent_Free(&datastore); + + return pool; +} + + + static virStoragePoolPtr esxStoragePoolLookupByUUID(virConnectPtr conn, const unsigned char *uuid) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 16:03:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573821673; cv=none; d=zoho.com; s=zohoarc; b=kktcAKSNoOByEVBG/O8bQpNB5Ls1VJptZQtmt+BUa8Lf7kO0dOT8IyLwxdZODmAN1XNDqZej8YLcT8Xl+3gFLbN51VU89hqG5y2WlLd8z3sQJTj1XgnW5zaL5d6L/UkH7fXMBRmh/rkDERmKqiwlm7okq4ncatFDmWZ9iMGBthA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573821673; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qWyCvZo30Tz14M0OHWt1raon5MG5mHY+TKrSNXjCUj0=; b=fsKCd+UnMspgsQ4FmuNcj5o0Fn+UyFib3+4EK2oxccfmT9O7Wryu5QnyCdFYxKupRVvzVHzgfxMoF189r19lkszScSz7i7qu2fhy5j4eTpGQoCfpbanN14jjFlZiPcoNBQQfEVmfYvl93TPFzANb4e4DlB6ptbu0NE70PevCDgs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1573821673257693.1710483428001; Fri, 15 Nov 2019 04:41:13 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-101-Kmb6R417M9mi5EkV0dkAbQ-1; Fri, 15 Nov 2019 07:41:09 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BB95091267; Fri, 15 Nov 2019 12:41:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8DE4B5ED36; Fri, 15 Nov 2019 12:41:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EB5431809567; Fri, 15 Nov 2019 12:41:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAFCf09m026958 for ; Fri, 15 Nov 2019 07:41:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id 676725E262; Fri, 15 Nov 2019 12:41:00 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E4B465DC1B for ; Fri, 15 Nov 2019 12:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573821672; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qWyCvZo30Tz14M0OHWt1raon5MG5mHY+TKrSNXjCUj0=; b=LqxOra6MzlWEHaHJqBYvUucw1m6xO/DEntDva0izH3N/WJ2Bd/vUfs7KO3y9dnBMHkZ86w XIaFXiNO3e8oKlNzRm5EymIbVSexFk6Q88PIDnO6GED93JIJ3DsVjPNdvARIkNbsKEGB5l /XGHPO0CxWEVQ4n2iE27zFAUUJpyXmc= From: Pino Toscano To: libvir-list@redhat.com Date: Fri, 15 Nov 2019 13:40:41 +0100 Message-Id: <20191115124051.989-3-ptoscano@redhat.com> In-Reply-To: <20191115124051.989-1-ptoscano@redhat.com> References: <20191115124051.989-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 02/12] esx: split datastorePoolType helper X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: Kmb6R417M9mi5EkV0dkAbQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Move the detection of the type of a vmfs pool out of esxLookupVMFSStoragePoolType in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano Reviewed-by: J=C3=A1n Tomko --- src/esx/esx_storage_backend_vmfs.c | 49 ++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backe= nd_vmfs.c index 78fe2b598d..b890825a40 100644 --- a/src/esx/esx_storage_backend_vmfs.c +++ b/src/esx/esx_storage_backend_vmfs.c @@ -54,26 +54,12 @@ verify(VIR_CRYPTO_HASH_SIZE_MD5 =3D=3D VIR_UUID_BUFLEN); =20 =20 static int -esxLookupVMFSStoragePoolType(esxVI_Context *ctx, const char *poolName, - int *poolType) +datastorePoolType(esxVI_ObjectContent *datastore, int *poolType) { int result =3D -1; - esxVI_String *propertyNameList =3D NULL; - esxVI_ObjectContent *datastore =3D NULL; esxVI_DynamicProperty *dynamicProperty =3D NULL; esxVI_DatastoreInfo *datastoreInfo =3D NULL; =20 - if (esxVI_String_AppendValueToList(&propertyNameList, "info") < 0 || - esxVI_LookupDatastoreByName(ctx, poolName, propertyNameList, &data= store, - esxVI_Occurrence_OptionalItem) < 0) { - goto cleanup; - } - - if (!datastore) { - /* Not found, let the base storage driver handle error reporting */ - goto cleanup; - } - for (dynamicProperty =3D datastore->propSet; dynamicProperty; dynamicProperty =3D dynamicProperty->_next) { if (STREQ(dynamicProperty->name, "info")) { @@ -100,10 +86,41 @@ esxLookupVMFSStoragePoolType(esxVI_Context *ctx, const= char *poolName, =20 result =3D 0; =20 + cleanup: + esxVI_DatastoreInfo_Free(&datastoreInfo); + + return result; +} + + + +static int +esxLookupVMFSStoragePoolType(esxVI_Context *ctx, const char *poolName, + int *poolType) +{ + int result =3D -1; + esxVI_String *propertyNameList =3D NULL; + esxVI_ObjectContent *datastore =3D NULL; + + if (esxVI_String_AppendValueToList(&propertyNameList, "info") < 0 || + esxVI_LookupDatastoreByName(ctx, poolName, propertyNameList, &data= store, + esxVI_Occurrence_OptionalItem) < 0) { + goto cleanup; + } + + if (!datastore) { + /* Not found, let the base storage driver handle error reporting */ + goto cleanup; + } + + if (datastorePoolType(datastore, poolType) < 0) + goto cleanup; + + result =3D 0; + cleanup: esxVI_String_Free(&propertyNameList); esxVI_ObjectContent_Free(&datastore); - esxVI_DatastoreInfo_Free(&datastoreInfo); =20 return result; } --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 16:03:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573821687; cv=none; d=zoho.com; s=zohoarc; b=An/NtCgLlgTLbxSH7neLuOUo1BltgEx+18YPIn3LpAJX1Cg+bCnyt7FXe9tqjiT/X5N9lTnsI4rSUH1vH+UKPXmK+Q7MQ7pj2XEmtmyWNDnVi4BC/Ziry1BYXY2P0hVq5H50EUgOZ5famyXvJFAssGlo7syYbnxYzAB6jpYL9Ug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573821687; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EL4lpPSNQzg02kjXbrFeq6rWxhQOQomVHXWwxYS1FjQ=; b=ibQ7Zz2Yx7z5ZY/FWF0Jxj3+/BHNFPCSKD/LJkmTFUF2fsAIjBxHags5bmhmDsNwCjfAB46aa8aQZrP0GhhUAoVJ120t2b2qkMF24EjpekH+0tifrNfx/ui68YoK8iKC+HwtDlv2FL75lr9Sc3I7WqcJg8fEEvtoL9FDcIC8ezw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1573821687265219.66833389052226; Fri, 15 Nov 2019 04:41:27 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-313-PaW9Mn-hO0-QL7zaPkW2-w-1; Fri, 15 Nov 2019 07:41:23 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B7B8B1800DFD; Fri, 15 Nov 2019 12:41:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8982869193; Fri, 15 Nov 2019 12:41:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 48A1918089D5; Fri, 15 Nov 2019 12:41:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAFCf10B026965 for ; Fri, 15 Nov 2019 07:41:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id 321935DC1B; Fri, 15 Nov 2019 12:41:01 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B21555E262 for ; Fri, 15 Nov 2019 12:41:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573821686; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=EL4lpPSNQzg02kjXbrFeq6rWxhQOQomVHXWwxYS1FjQ=; b=dw4aieKqkyOcb2vqEh0XtEHkoJBsiYp9vJkCSZc/GbqRcc05dwe8FVBjq7V2K51zzj0JLu O2U0G+vAUUsgXAQg6dCBqHyU0TEgw8Bx2Fa/JhnCSssmZg+HGhGb7Uj9S3NIclmT21FZd0 aJdYqpxD8UQL8qHIq4D5I+OoDiTP3Zw= From: Pino Toscano To: libvir-list@redhat.com Date: Fri, 15 Nov 2019 13:40:42 +0100 Message-Id: <20191115124051.989-4-ptoscano@redhat.com> In-Reply-To: <20191115124051.989-1-ptoscano@redhat.com> References: <20191115124051.989-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 03/12] esx: split targetToStoragePool helper X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: PaW9Mn-hO0-QL7zaPkW2-w-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Move the creation of a virStoragePtr object from the esxVI_HostInternetScsiHbaStaticTarget object of a target out of esxStoragePoolLookupByName in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano Reviewed-by: J=C3=A1n Tomko --- src/esx/esx_storage_backend_iscsi.c | 32 +++++++++++++++++++---------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/esx/esx_storage_backend_iscsi.c b/src/esx/esx_storage_back= end_iscsi.c index 61354a6938..72ab0d3cb0 100644 --- a/src/esx/esx_storage_backend_iscsi.c +++ b/src/esx/esx_storage_backend_iscsi.c @@ -147,14 +147,32 @@ esxConnectListStoragePools(virConnectPtr conn, char *= *const names, =20 =20 =20 +static virStoragePoolPtr +targetToStoragePool(virConnectPtr conn, + const char *name, + esxVI_HostInternetScsiHbaStaticTarget *target) +{ + /* VIR_CRYPTO_HASH_SIZE_MD5 =3D VIR_UUID_BUFLEN =3D 16 */ + unsigned char md5[VIR_CRYPTO_HASH_SIZE_MD5]; + + /* + * HostInternetScsiHbaStaticTarget does not provide a uuid field, + * but iScsiName (or widely known as IQN) is unique across the multiple + * hosts, using it to compute key + */ + if (virCryptoHashBuf(VIR_CRYPTO_HASH_MD5, target->iScsiName, md5) < 0) + return NULL; + + return virGetStoragePool(conn, name, md5, &esxStorageBackendISCSI, NUL= L); +} + + static virStoragePoolPtr esxStoragePoolLookupByName(virConnectPtr conn, const char *name) { esxPrivate *priv =3D conn->privateData; esxVI_HostInternetScsiHbaStaticTarget *target =3D NULL; - /* VIR_CRYPTO_HASH_SIZE_MD5 =3D VIR_UUID_BUFLEN =3D 16 */ - unsigned char md5[VIR_CRYPTO_HASH_SIZE_MD5]; virStoragePoolPtr pool =3D NULL; =20 /* @@ -172,15 +190,7 @@ esxStoragePoolLookupByName(virConnectPtr conn, goto cleanup; } =20 - /* - * HostInternetScsiHbaStaticTarget does not provide a uuid field, - * but iScsiName (or widely known as IQN) is unique across the multiple - * hosts, using it to compute key - */ - if (virCryptoHashBuf(VIR_CRYPTO_HASH_MD5, target->iScsiName, md5) < 0) - goto cleanup; - - pool =3D virGetStoragePool(conn, name, md5, &esxStorageBackendISCSI, N= ULL); + pool =3D targetToStoragePool(conn, name, target); =20 cleanup: esxVI_HostInternetScsiHbaStaticTarget_Free(&target); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 16:03:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573821786; cv=none; d=zoho.com; s=zohoarc; b=mnqLJ39o22MogJcbKO2oOElVT9mtkCV5wwdhbReO7sJqEof0+yXtalEClW/60gfF1S1dgniT2ZOgtfCjm+IXam1Oca4Bf5eCeHuTtmkFBCCgxAwYreakYeJ9iG9yY1oFutZoXfyakr+bDDvWIMb8dPVjjsNbJzxKMfnktQZarKk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573821786; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AvJdwRImq+HNxu6jNtmqUrktkqLVDSxXXeCyTrbilSQ=; b=JVtpvpQSJCSJnLywYwqG5KXjxSD4fZ7sCBGpqixpRTMc/aODiCp+5o8GYI+lodaAKBfkmcg4sBNWm2MdDeWWeQmWng+IgXsVZO5QIn8wuQ9iHThgYSBIMxm2Hbpv9TgBhi4V33RA66OmrwtXXQb9qeaXvNYJOhG0XxY6EBXMxlc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1573821786423238.91470757507318; Fri, 15 Nov 2019 04:43:06 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-8-uHXG1LgrPAis4N84rI5_cw-1; Fri, 15 Nov 2019 07:41:26 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9B122107ACFA; Fri, 15 Nov 2019 12:41:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6302C5F78C; Fri, 15 Nov 2019 12:41:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1F8D84E56C; Fri, 15 Nov 2019 12:41:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAFCf2Sn026974 for ; Fri, 15 Nov 2019 07:41:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2563C5ED2D; Fri, 15 Nov 2019 12:41:02 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7EC9B5DC1B for ; Fri, 15 Nov 2019 12:41:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573821785; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=AvJdwRImq+HNxu6jNtmqUrktkqLVDSxXXeCyTrbilSQ=; b=YNrIHGKfP4uIgTNiCrlIwhYP24d1Q6F+V0ArydlPxduqAOrPhISjhPSD6bmcb3/9QkhPo1 P8fqsb7Qe40WzVtyBm8lbFmBNZTQcCUKAnM9kHdivXfDO/w75Kvsa5Os7as4le2jVr5WYp 6YbaUdaNj7qbtfLuQoQCPWrzj0GmaFQ= From: Pino Toscano To: libvir-list@redhat.com Date: Fri, 15 Nov 2019 13:40:43 +0100 Message-Id: <20191115124051.989-5-ptoscano@redhat.com> In-Reply-To: <20191115124051.989-1-ptoscano@redhat.com> References: <20191115124051.989-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 04/12] esx: implement connectListAllStoragePools X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: uHXG1LgrPAis4N84rI5_cw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Implement the .connectListAllStoragePools storage API in the esx storage driver, and in all its subdrivers. Signed-off-by: Pino Toscano Reviewed-by: J=C3=A1n Tomko --- src/esx/esx_storage_backend_iscsi.c | 72 +++++++++++++++++++++ src/esx/esx_storage_backend_vmfs.c | 98 +++++++++++++++++++++++++++++ src/esx/esx_storage_driver.c | 68 ++++++++++++++++++++ 3 files changed, 238 insertions(+) diff --git a/src/esx/esx_storage_backend_iscsi.c b/src/esx/esx_storage_back= end_iscsi.c index 72ab0d3cb0..4f5d8e5e24 100644 --- a/src/esx/esx_storage_backend_iscsi.c +++ b/src/esx/esx_storage_backend_iscsi.c @@ -779,6 +779,77 @@ esxStorageVolGetPath(virStorageVolPtr volume) =20 =20 =20 +#define MATCH(FLAG) (flags & (FLAG)) +static int +esxConnectListAllStoragePools(virConnectPtr conn, + virStoragePoolPtr **pools, + unsigned int flags) +{ + bool success =3D false; + size_t count =3D 0; + esxPrivate *priv =3D conn->privateData; + esxVI_HostInternetScsiHba *hostInternetScsiHba =3D NULL; + esxVI_HostInternetScsiHbaStaticTarget *target; + size_t i; + + /* this driver provides only iSCSI pools */ + if (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_POOL_TYPE) && + !(MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI))) + return 0; + + if (esxVI_LookupHostInternetScsiHba(priv->primary, + &hostInternetScsiHba) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Unable to obtain iSCSI adapter")); + goto cleanup; + } + + /* FIXME: code looks for software iSCSI adapter only */ + if (!hostInternetScsiHba) { + /* iSCSI adapter may not be enabled for this host */ + return 0; + } + + /* + * ESX has two kind of targets: + * 1. staticIscsiTargets + * 2. dynamicIscsiTargets + * For each dynamic target if its reachable a static target is added. + * return iSCSI names for all static targets to avoid duplicate names. + */ + for (target =3D hostInternetScsiHba->configuredStaticTarget; + target; target =3D target->_next) { + virStoragePoolPtr pool; + + pool =3D targetToStoragePool(conn, target->iScsiName, target); + if (!pool) + goto cleanup; + + if (VIR_APPEND_ELEMENT(*pools, count, pool) < 0) + goto cleanup; + } + + success =3D true; + + cleanup: + if (! success) { + if (*pools) { + for (i =3D 0; i < count; ++i) + VIR_FREE((*pools)[i]); + VIR_FREE(*pools); + } + + count =3D -1; + } + + esxVI_HostInternetScsiHba_Free(&hostInternetScsiHba); + + return count; +} +#undef MATCH + + + virStorageDriver esxStorageBackendISCSI =3D { .connectNumOfStoragePools =3D esxConnectNumOfStoragePools, /* 1.0.1 */ .connectListStoragePools =3D esxConnectListStoragePools, /* 1.0.1 */ @@ -799,4 +870,5 @@ virStorageDriver esxStorageBackendISCSI =3D { .storageVolDelete =3D esxStorageVolDelete, /* 1.0.1 */ .storageVolWipe =3D esxStorageVolWipe, /* 1.0.1 */ .storageVolGetPath =3D esxStorageVolGetPath, /* 1.0.1 */ + .connectListAllStoragePools =3D esxConnectListAllStoragePools, /* 5.10= .0 */ }; diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backe= nd_vmfs.c index b890825a40..05b273aed7 100644 --- a/src/esx/esx_storage_backend_vmfs.c +++ b/src/esx/esx_storage_backend_vmfs.c @@ -1460,6 +1460,103 @@ esxStorageVolGetPath(virStorageVolPtr volume) =20 =20 =20 +#define MATCH(FLAG) (flags & (FLAG)) +static int +esxConnectListAllStoragePools(virConnectPtr conn, + virStoragePoolPtr **pools, + unsigned int flags) +{ + bool success =3D false; + esxPrivate *priv =3D conn->privateData; + esxVI_String *propertyNameList =3D NULL; + esxVI_DynamicProperty *dynamicProperty =3D NULL; + esxVI_ObjectContent *datastoreList =3D NULL; + esxVI_ObjectContent *datastore =3D NULL; + size_t count =3D 0; + size_t i; + virStoragePoolPtr pool; + const bool checkPoolType =3D MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILT= ERS_POOL_TYPE); + + if (esxVI_String_AppendValueToList(&propertyNameList, + "summary.name") < 0) { + goto cleanup; + } + + if (checkPoolType && + esxVI_String_AppendValueToList(&propertyNameList, + "info") < 0) { + goto cleanup; + } + + if (esxVI_LookupDatastoreList(priv->primary, propertyNameList, + &datastoreList) < 0) { + goto cleanup; + } + + for (datastore =3D datastoreList; datastore; + datastore =3D datastore->_next) { + const char *name =3D NULL; + + for (dynamicProperty =3D datastore->propSet; dynamicProperty; + dynamicProperty =3D dynamicProperty->_next) { + if (STREQ(dynamicProperty->name, "summary.name")) { + if (esxVI_AnyType_ExpectType(dynamicProperty->val, + esxVI_Type_String) < 0) { + goto cleanup; + } + + name =3D dynamicProperty->val->string; + } + } + + if (!name) + goto cleanup; + + if (checkPoolType) { + int poolType; + + if (datastorePoolType(datastore, &poolType) < 0) + goto cleanup; + + if (!((MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_DIR) && + (poolType =3D=3D VIR_STORAGE_POOL_DIR)) || + (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FS) && + (poolType =3D=3D VIR_STORAGE_POOL_FS)) || + (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_NETFS) && + (poolType =3D=3D VIR_STORAGE_POOL_NETFS)))) + continue; + } + + pool =3D datastoreToStoragePoolPtr(conn, name, datastore); + if (!pool) + goto cleanup; + + if (VIR_APPEND_ELEMENT(*pools, count, pool) < 0) + goto cleanup; + } + + success =3D true; + + cleanup: + if (! success) { + if (*pools) { + for (i =3D 0; i < count; ++i) + VIR_FREE((*pools)[i]); + VIR_FREE(*pools); + } + + count =3D -1; + } + + esxVI_String_Free(&propertyNameList); + esxVI_ObjectContent_Free(&datastoreList); + + return count; +} +#undef MATCH + + + virStorageDriver esxStorageBackendVMFS =3D { .connectNumOfStoragePools =3D esxConnectNumOfStoragePools, /* 0.8.2 */ .connectListStoragePools =3D esxConnectListStoragePools, /* 0.8.2 */ @@ -1480,4 +1577,5 @@ virStorageDriver esxStorageBackendVMFS =3D { .storageVolGetInfo =3D esxStorageVolGetInfo, /* 0.8.4 */ .storageVolGetXMLDesc =3D esxStorageVolGetXMLDesc, /* 0.8.4 */ .storageVolGetPath =3D esxStorageVolGetPath, /* 0.8.4 */ + .connectListAllStoragePools =3D esxConnectListAllStoragePools, /* 5.10= .0 */ }; diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c index 8a34732b45..6d17ac28ea 100644 --- a/src/esx/esx_storage_driver.c +++ b/src/esx/esx_storage_driver.c @@ -517,6 +517,73 @@ esxStoragePoolIsPersistent(virStoragePoolPtr pool G_GN= UC_UNUSED) =20 =20 =20 +#define MATCH(FLAG) (flags & (FLAG)) +static int +esxConnectListAllStoragePools(virConnectPtr conn, + virStoragePoolPtr **pools, + unsigned int flags) +{ + bool success =3D false; + esxPrivate *priv =3D conn->privateData; + size_t count =3D 0; + size_t i, j; + int tmp; + + virCheckFlags(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ALL, -1); + + /* + * ESX storage pools are always active, persistent, and + * autostarted, so return zero elements in case we are asked + * for pools different than that. + * + * Filtering by type will be done by each backend. + */ + if (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) && + !(MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE))) + return 0; + if (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_PERSISTENT) && + !(MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT))) + return 0; + if (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_AUTOSTART) && + !(MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART))) + return 0; + + if (esxVI_EnsureSession(priv->primary) < 0) + return -1; + + for (i =3D 0; i < LAST_BACKEND; ++i) { + virStoragePoolPtr *new_pools =3D 0; + tmp =3D backends[i]->connectListAllStoragePools(conn, &new_pools, = flags); + + if (tmp < 0) + goto cleanup; + + for (j =3D 0; j < tmp; ++j) { + if (VIR_APPEND_ELEMENT(*pools, count, new_pools[j]) < 0) + goto cleanup; + } + VIR_FREE(new_pools); + } + + success =3D true; + + cleanup: + if (! success) { + if (*pools) { + for (i =3D 0; i < count; ++i) + VIR_FREE((*pools)[i]); + VIR_FREE(*pools); + } + + count =3D -1; + } + + return count; +} +#undef MATCH + + + virStorageDriver esxStorageDriver =3D { .connectNumOfStoragePools =3D esxConnectNumOfStoragePools, /* 0.8.2 */ .connectListStoragePools =3D esxConnectListStoragePools, /* 0.8.2 */ @@ -544,4 +611,5 @@ virStorageDriver esxStorageDriver =3D { .storageVolGetPath =3D esxStorageVolGetPath, /* 0.8.4 */ .storagePoolIsActive =3D esxStoragePoolIsActive, /* 0.8.2 */ .storagePoolIsPersistent =3D esxStoragePoolIsPersistent, /* 0.8.2 */ + .connectListAllStoragePools =3D esxConnectListAllStoragePools, /* 5.10= .0 */ }; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 16:03:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573821723; cv=none; d=zoho.com; s=zohoarc; b=GLTtXGrTiTZFs3rlBfzA3AZfuxH6MHT4jtQT6CyhKydi/rpVeiIiHI6OGfDYMRfgn3YV/qcXIdXBajLn8g/XuZWQFOSh9ClsIr5DJFggAScannPYLW0lcMzznEMnU0A5jFtdyfmGwPZmlWtsj6FchHCRWVXUxW2GJqbIXU6L5hA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573821723; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/Na3teNhdSQJmQ3AyBpE93dX1qIgVQTh73GOfdObx4U=; b=XoFrVIdm9qHiqvJGlM4ZfAq9Gsrq4dU3W5O/2w5P3gyMdzfvKDsNqYt6mvl1zfBH4cvr2N9YCsllx0K6V1huSYkg1Lv04mQuojfv0Zmvkh1CwWNbtP2wybaa9o0HKXvpllQMxIdC0Av+76didRtkTfw/vrVBoEGBW61s4LSo/xU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1573821723335808.6763745178732; Fri, 15 Nov 2019 04:42:03 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-87-1ade8mDhNWGa9hkCPEOA_w-1; Fri, 15 Nov 2019 07:41:26 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9185D107ACE8; Fri, 15 Nov 2019 12:41:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 61CA05ED37; Fri, 15 Nov 2019 12:41:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1EE0C4E567; Fri, 15 Nov 2019 12:41:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAFCf5HC026998 for ; Fri, 15 Nov 2019 07:41:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id 128885DC1B; Fri, 15 Nov 2019 12:41:05 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 90F815ED35 for ; Fri, 15 Nov 2019 12:41:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573821722; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=/Na3teNhdSQJmQ3AyBpE93dX1qIgVQTh73GOfdObx4U=; b=MqqDZkFewP26Gy/O3Qzt2pxVcHUF7Z3gaywetj1C9HI9TCpYzzBluRf+t/aSYuGd+QX13l 31sFoj/SnUmoEBWfcsYtQKwY6VBeLE73aiYTIT+zu4Q5L5rjyZI787wvG+E8nh9QfLtdwi H2uhK+x72DIh5g+nbGyIGNL0IWjdVN4= From: Pino Toscano To: libvir-list@redhat.com Date: Fri, 15 Nov 2019 13:40:44 +0100 Message-Id: <20191115124051.989-6-ptoscano@redhat.com> In-Reply-To: <20191115124051.989-1-ptoscano@redhat.com> References: <20191115124051.989-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 05/12] esx: split virtualswitchToNetwork helper X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: 1ade8mDhNWGa9hkCPEOA_w-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Move the creation of a virNetworkPtr object from the esxVI_HostVirtualSwitch object of a virtual switch out of esxNetworkLookupByName in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano Reviewed-by: Cole Robinson --- src/esx/esx_network_driver.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c index b5dcfe0a80..4f359c61e2 100644 --- a/src/esx/esx_network_driver.c +++ b/src/esx/esx_network_driver.c @@ -167,20 +167,11 @@ esxNetworkLookupByUUID(virConnectPtr conn, const unsi= gned char *uuid) =20 =20 static virNetworkPtr -esxNetworkLookupByName(virConnectPtr conn, const char *name) +virtualswitchToNetwork(virConnectPtr conn, + esxVI_HostVirtualSwitch *hostVirtualSwitch) { - virNetworkPtr network =3D NULL; - esxPrivate *priv =3D conn->privateData; - esxVI_HostVirtualSwitch *hostVirtualSwitch =3D NULL; unsigned char md5[VIR_CRYPTO_HASH_SIZE_MD5]; /* VIR_CRYPTO_HASH_SIZE_M= D5 =3D VIR_UUID_BUFLEN =3D 16 */ =20 - if (esxVI_EnsureSession(priv->primary) < 0 || - esxVI_LookupHostVirtualSwitchByName(priv->primary, name, - &hostVirtualSwitch, - esxVI_Occurrence_RequiredItem)= < 0) { - return NULL; - } - /* * HostVirtualSwitch doesn't have a UUID, but we can use the key prope= rty * as source for a UUID. The key is unique per host and cannot change @@ -192,7 +183,26 @@ esxNetworkLookupByName(virConnectPtr conn, const char = *name) if (virCryptoHashBuf(VIR_CRYPTO_HASH_MD5, hostVirtualSwitch->key, md5)= < 0) return NULL; =20 - network =3D virGetNetwork(conn, hostVirtualSwitch->name, md5); + return virGetNetwork(conn, hostVirtualSwitch->name, md5); +} + + + +static virNetworkPtr +esxNetworkLookupByName(virConnectPtr conn, const char *name) +{ + virNetworkPtr network =3D NULL; + esxPrivate *priv =3D conn->privateData; + esxVI_HostVirtualSwitch *hostVirtualSwitch =3D NULL; + + if (esxVI_EnsureSession(priv->primary) < 0 || + esxVI_LookupHostVirtualSwitchByName(priv->primary, name, + &hostVirtualSwitch, + esxVI_Occurrence_RequiredItem)= < 0) { + return NULL; + } + + network =3D virtualswitchToNetwork(conn, hostVirtualSwitch); =20 esxVI_HostVirtualSwitch_Free(&hostVirtualSwitch); =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 16:03:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573821677; cv=none; d=zoho.com; s=zohoarc; b=YRSkUEPVYPdp/pgC77OxMd0n2jfe97+NE8kx1/yC3wplPfWHoOTMqijD8iTLPNEdRiUQdAngr+Uv9GScXTXaQXFaF3y57z+Hwo3TO8YrLZXcQEQ0qqcXTD0Xl3XsdBgKEH2zuL+CHr5CSbiuZ2mIQq3jviinzgdVqqTP4AImF5A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573821677; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2EjYZlCzIyIGFNSzTJpAQUusV3edi065BPZSK/xults=; b=kywVKrCuma4N5qRdczHna2UZzJWQaJbTTdP8eph9fSpqIigAeKb0HYvzG6bXwz63bASU6C/bGum+7F1SY+RlKHka1AhyZUvJSVFHJFUzbu7gYWI+MVyfhBHtIthzoQDea8fF8nD7ZQGszE8Q6XugwN/1XywCa9CiF0UW4hhVwdI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1573821677686759.5709698534775; Fri, 15 Nov 2019 04:41:17 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-190-Wuh93VAyP527E9ak6d9T2A-1; Fri, 15 Nov 2019 07:41:15 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4A5C58026A6; Fri, 15 Nov 2019 12:41:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC1C25D6BE; Fri, 15 Nov 2019 12:41:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A30D04A460; Fri, 15 Nov 2019 12:41:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAFCf5Ij027004 for ; Fri, 15 Nov 2019 07:41:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id D1E645E262; Fri, 15 Nov 2019 12:41:05 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D73F5DC1B for ; Fri, 15 Nov 2019 12:41:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573821676; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=2EjYZlCzIyIGFNSzTJpAQUusV3edi065BPZSK/xults=; b=ViK4JhGy/UhsRHnGD8ZwP7mgaayPp+SPpajOo5lNq6KqfwDT9eMQsMPxE4I1lpDedUP3AQ lEqUY+Ag50uyF0zN8Of61KW8l0TFZDGMM3ofY7jeMmgcX42ISKRqTwszHzXSZ/3poQC/yZ 1G1J90tdAEh7zXVeRc2aN5JlwUZBVWk= From: Pino Toscano To: libvir-list@redhat.com Date: Fri, 15 Nov 2019 13:40:45 +0100 Message-Id: <20191115124051.989-7-ptoscano@redhat.com> In-Reply-To: <20191115124051.989-1-ptoscano@redhat.com> References: <20191115124051.989-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 06/12] esx: implement connectListAllNetworks X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: Wuh93VAyP527E9ak6d9T2A-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Implement the .connectListAllNetworks networks API in the esx network driver. Signed-off-by: Pino Toscano Reviewed-by: Cole Robinson --- src/esx/esx_network_driver.c | 66 ++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c index 4f359c61e2..79a7ecae5f 100644 --- a/src/esx/esx_network_driver.c +++ b/src/esx/esx_network_driver.c @@ -863,6 +863,71 @@ esxNetworkIsPersistent(virNetworkPtr network G_GNUC_UN= USED) =20 =20 =20 +#define MATCH(FLAG) (flags & (FLAG)) +static int +esxConnectListAllNetworks(virConnectPtr conn, + virNetworkPtr **nets, + unsigned int flags) +{ + bool success =3D false; + esxPrivate *priv =3D conn->privateData; + esxVI_HostVirtualSwitch *hostVirtualSwitchList =3D NULL; + esxVI_HostVirtualSwitch *hostVirtualSwitch =3D NULL; + size_t count =3D 0; + size_t i; + + virCheckFlags(VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL, -1); + + /* + * ESX networks are always active, persistent, and + * autostarted, so return zero elements in case we are asked + * for networks different than that. + */ + if (MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE) && + !(MATCH(VIR_CONNECT_LIST_NETWORKS_ACTIVE))) + return 0; + if (MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_PERSISTENT) && + !(MATCH(VIR_CONNECT_LIST_NETWORKS_PERSISTENT))) + return 0; + if (MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART) && + !(MATCH(VIR_CONNECT_LIST_NETWORKS_AUTOSTART))) + return 0; + + if (esxVI_EnsureSession(priv->primary) < 0 || + esxVI_LookupHostVirtualSwitchList(priv->primary, + &hostVirtualSwitchList) < 0) { + return -1; + } + + for (hostVirtualSwitch =3D hostVirtualSwitchList; hostVirtualSwitch; + hostVirtualSwitch =3D hostVirtualSwitch->_next) { + virNetworkPtr net =3D virtualswitchToNetwork(conn, hostVirtualSwit= ch); + + if (VIR_APPEND_ELEMENT(*nets, count, net) < 0) + goto cleanup; + } + + success =3D true; + + cleanup: + if (! success) { + if (*nets) { + for (i =3D 0; i < count; ++i) + VIR_FREE((*nets)[i]); + VIR_FREE(*nets); + } + + count =3D -1; + } + + esxVI_HostVirtualSwitch_Free(&hostVirtualSwitchList); + + return count; +} +#undef MATCH + + + virNetworkDriver esxNetworkDriver =3D { .connectNumOfNetworks =3D esxConnectNumOfNetworks, /* 0.10.0 */ .connectListNetworks =3D esxConnectListNetworks, /* 0.10.0 */ @@ -877,4 +942,5 @@ virNetworkDriver esxNetworkDriver =3D { .networkSetAutostart =3D esxNetworkSetAutostart, /* 0.10.0 */ .networkIsActive =3D esxNetworkIsActive, /* 0.10.0 */ .networkIsPersistent =3D esxNetworkIsPersistent, /* 0.10.0 */ + .connectListAllNetworks =3D esxConnectListAllNetworks, /* 5.10.0 */ }; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 16:03:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573821691; cv=none; d=zoho.com; s=zohoarc; b=O+ShiVmNxjIIFhVM1ch/HHx2lDHUgdHWiyPMWS/e5ZTO/89WOMKRttdXK6Kw0LyITdqh/FCFzsGARylAUzSGzUBpKql79U64h8vFo8rH6okk9iue7Qh0bxqVqWTTTQQEYjSD6LFhW7mryngbUX+HDXLKU5jX+v/VmkLlNosHTac= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573821691; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/HFtlhfP9eMF5B+4zqXPCx+6hbz7bCu2Xtu0noh45mI=; b=ienKsXudwq1nRenWJVpZOzrobueTXlplbfONBqcMPavFda+FGCqEEPs907jLqmG/LDyr7rdkuJPZSUz9EqrhIvbtKllNDFk7TyNVan3kTehENR4nObsKUvGJjsIXcNEoy45U6gbUuLmmV6dMoiopH27hXRSvPWjnH+nWPSkpG6Q= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1573821691742438.05948382457075; Fri, 15 Nov 2019 04:41:31 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-_-X9L0jwOUiB_J3VZs4FTQ-1; Fri, 15 Nov 2019 07:41:29 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3F402107ACFC; Fri, 15 Nov 2019 12:41:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 12EE360519; Fri, 15 Nov 2019 12:41:23 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C5A5218089CD; Fri, 15 Nov 2019 12:41:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAFCf6qq027010 for ; Fri, 15 Nov 2019 07:41:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9FD0A5E262; Fri, 15 Nov 2019 12:41:06 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 29E735DC1B for ; Fri, 15 Nov 2019 12:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573821690; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=/HFtlhfP9eMF5B+4zqXPCx+6hbz7bCu2Xtu0noh45mI=; b=OxFVeJgXSPQtO0a1aVljSRmpV4EWV7OQ8Xq9GcJ3csmA0wanq+oH19Acb7UTqrc4XgiJdP KXzcWmZmXNM24vzwiIcAq81IJbVvfgsmFg0yMjp0S+Bv5aU0PwoLP0KQEHuINiPqHnjUXy oLUGFSzMTuS/WCNdFNfJA2K+UHdvqd8= From: Pino Toscano To: libvir-list@redhat.com Date: Fri, 15 Nov 2019 13:40:46 +0100 Message-Id: <20191115124051.989-8-ptoscano@redhat.com> In-Reply-To: <20191115124051.989-1-ptoscano@redhat.com> References: <20191115124051.989-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 07/12] storage: add vmfs filesystem type X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: _-X9L0jwOUiB_J3VZs4FTQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" It will be used to represent the type of a filesystem pool in ESXi. Signed-off-by: Pino Toscano Reviewed-by: Cole Robinson --- docs/schemas/storagepool.rng | 1 + docs/schemas/storagevol.rng | 1 + docs/storage.html.in | 3 +++ src/conf/storage_conf.c | 1 + src/conf/storage_conf.h | 1 + tests/storagepoolcapsschemadata/poolcaps-fs.xml | 1 + tests/storagepoolcapsschemadata/poolcaps-full.xml | 1 + 7 files changed, 9 insertions(+) diff --git a/docs/schemas/storagepool.rng b/docs/schemas/storagepool.rng index 976a02baeb..ff0d3c836c 100644 --- a/docs/schemas/storagepool.rng +++ b/docs/schemas/storagepool.rng @@ -451,6 +451,7 @@ hfs+ xfs ocfs2 + vmfs diff --git a/docs/schemas/storagevol.rng b/docs/schemas/storagevol.rng index 32aaa2784d..382cd121ad 100644 --- a/docs/schemas/storagevol.rng +++ b/docs/schemas/storagevol.rng @@ -194,6 +194,7 @@ hfs+ xfs ocfs2 + vmfs =20 diff --git a/docs/storage.html.in b/docs/storage.html.in index e0e4edec1e..72fa13944a 100644 --- a/docs/storage.html.in +++ b/docs/storage.html.in @@ -202,6 +202,9 @@
  • ocfs2
  • +
  • + vmfs +
  • =20

    Valid volume format types

    diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index fd640bfa2b..252d28cbfb 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -67,6 +67,7 @@ VIR_ENUM_IMPL(virStoragePoolFormatFileSystem, "auto", "ext2", "ext3", "ext4", "ufs", "iso9660", "udf", "gfs", "gfs2", "vfat", "hfs+", "xfs", "ocfs2", + "vmfs", ); =20 VIR_ENUM_IMPL(virStoragePoolFormatFileSystemNet, diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index d2600efff0..c0baeffc1c 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -362,6 +362,7 @@ typedef enum { VIR_STORAGE_POOL_FS_HFSPLUS, VIR_STORAGE_POOL_FS_XFS, VIR_STORAGE_POOL_FS_OCFS2, + VIR_STORAGE_POOL_FS_VMFS, VIR_STORAGE_POOL_FS_LAST, } virStoragePoolFormatFileSystem; VIR_ENUM_DECL(virStoragePoolFormatFileSystem); diff --git a/tests/storagepoolcapsschemadata/poolcaps-fs.xml b/tests/storag= epoolcapsschemadata/poolcaps-fs.xml index 182fa398f5..eee75af746 100644 --- a/tests/storagepoolcapsschemadata/poolcaps-fs.xml +++ b/tests/storagepoolcapsschemadata/poolcaps-fs.xml @@ -40,6 +40,7 @@ hfs+ xfs ocfs2 + vmfs diff --git a/tests/storagepoolcapsschemadata/poolcaps-full.xml b/tests/stor= agepoolcapsschemadata/poolcaps-full.xml index 980c6d210e..805950a937 100644 --- a/tests/storagepoolcapsschemadata/poolcaps-full.xml +++ b/tests/storagepoolcapsschemadata/poolcaps-full.xml @@ -40,6 +40,7 @@ hfs+ xfs ocfs2 + vmfs --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 16:03:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573821691; cv=none; d=zoho.com; s=zohoarc; b=PKU5nOLxJu9xok804Zowh/KPFGY9ND5ekn3HrPYi8ZgXVYucsErH8XOlPkzIAdxcFVKCMXfhM5tfJXNAze1r9y7pPRYk4ZUnjwp09mudLn/5q96XU3rtW6vpNHDNmwF9vjJSs1QfoetBP/OWvc0/JE959OKzDL468+a6YUadGEA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573821691; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1awNW51Q1Ij41YIy3Mf7fIDeyiIb6PQ4xes1oiNRifE=; b=ioitDZP/PKRV08zg77NuSfa9owRsI59Q1S+YapmtayxN5LNz/7OyMrjPEfbYDxlhS/v0CwPyn2btifp7r/o7/5YuaCCAc6l9ZB6pbq3+RJV7HV/eF9MGD3dsrUzflDosKg85h3FXiOZG57EkDrr4cfkc1UmtDlkfHXbl/NjjiQw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1573821691221526.6273119756889; Fri, 15 Nov 2019 04:41:31 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-398-0G-e0Yh5NfuMNAfuFZjrYg-1; Fri, 15 Nov 2019 07:41:28 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 55643104FB63; Fri, 15 Nov 2019 12:41:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 25E5260BE1; Fri, 15 Nov 2019 12:41:23 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DB21B18089CF; Fri, 15 Nov 2019 12:41:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAFCf7UY027019 for ; Fri, 15 Nov 2019 07:41:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6B5BD5DC1B; Fri, 15 Nov 2019 12:41:07 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA6445E262 for ; Fri, 15 Nov 2019 12:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573821690; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=1awNW51Q1Ij41YIy3Mf7fIDeyiIb6PQ4xes1oiNRifE=; b=Fzk5EWMISoTvHQcdx2/+xJ1MXcPfJXsYjyGWLfbibwUzCBQSiwJF1KOOSVIzkKD+fAJKJU aNp98anT+2JzYGVi+gcEq6cfpgWpF0ZWFilBPPqMC184zRfOEGthPVZq5NFqeXZRdsabO/ euFRlQgf8wU1T8Xj41+9NBEaCMP2/No= From: Pino Toscano To: libvir-list@redhat.com Date: Fri, 15 Nov 2019 13:40:47 +0100 Message-Id: <20191115124051.989-9-ptoscano@redhat.com> In-Reply-To: <20191115124051.989-1-ptoscano@redhat.com> References: <20191115124051.989-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 08/12] esx: set vmfs fs type for vmfs-based datastores X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: 0G-e0Yh5NfuMNAfuFZjrYg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This way they are correctly represented: ... instead of 'auto'. Signed-off-by: Pino Toscano Reviewed-by: Cole Robinson --- src/esx/esx_storage_backend_vmfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backe= nd_vmfs.c index 05b273aed7..1270c21e00 100644 --- a/src/esx/esx_storage_backend_vmfs.c +++ b/src/esx/esx_storage_backend_vmfs.c @@ -531,6 +531,7 @@ esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsign= ed int flags) } } else if (esxVI_VmfsDatastoreInfo_DynamicCast(info)) { def.type =3D VIR_STORAGE_POOL_FS; + def.source.format =3D VIR_STORAGE_POOL_FS_VMFS; /* * FIXME: I'm not sure how to represent the source and target of a * VMFS based datastore in libvirt terms --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 16:03:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573821695; cv=none; d=zoho.com; s=zohoarc; b=IM6SiiMhqf4UpB/Z6qrOmozl5Y07d3yLdBvxhRCiv2hcsZHWDTGsymIWtoYk/PcgOBAj7ZlammGC8TKa/O0VmGxmB52E2P5QfC9r6l9i6jG6q/47ZejfYVMvumbA5wdYoG2GFJd/UYeFBWcKMXsRbjpoT2d9ktDloOyhoCWHIx8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573821695; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=g5dSAbDArcFJI+BXDJmISi1mNtaVFYFkeL72lYQffGc=; b=Rw0CE3AMzqAm/YmyKHMEZHLT+gclqLVuvjRbQkxghFs9i29rozgNRUDOV5DKAizHhjD8lWICxFy0jQKUVlwLkbPib7zF3gSuFJX74dDL3eA588rqPGMqzIcZi62r9dQFM7m2mCd6SwhabxDrlP8o2Rf2Ob4FpFssKFLUYlhVjkw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1573821695491801.5678866661669; Fri, 15 Nov 2019 04:41:35 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-375-aWbT7C1VPwe0McMl8PbzFA-1; Fri, 15 Nov 2019 07:41:32 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C86C7804F97; Fri, 15 Nov 2019 12:41:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9C40F5ED37; Fri, 15 Nov 2019 12:41:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 58FAC4E56C; Fri, 15 Nov 2019 12:41:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAFCfAxF027037 for ; Fri, 15 Nov 2019 07:41:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7679B5ED32; Fri, 15 Nov 2019 12:41:10 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 01DA85E263 for ; Fri, 15 Nov 2019 12:41:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573821694; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=g5dSAbDArcFJI+BXDJmISi1mNtaVFYFkeL72lYQffGc=; b=AAExR2F+nsks5aA9OqLgmE6sqg0th4RMY1ZFCa/3EtLO+7tUUBiwLMc6Y1S3ETw0K2WZlP C3AwRkF9lR39s6K3Qs38v9dK9I17j+oUQJ94PT1vaYG0TTN2StsxqYaYUyOSmfGQFqXOL+ +aCAU4DIuQrnof1nCb+kr7jsqDK9YVs= From: Pino Toscano To: libvir-list@redhat.com Date: Fri, 15 Nov 2019 13:40:48 +0100 Message-Id: <20191115124051.989-10-ptoscano@redhat.com> In-Reply-To: <20191115124051.989-1-ptoscano@redhat.com> References: <20191115124051.989-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 09/12] esx: split datastorePathToStorageVol helper X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: aWbT7C1VPwe0McMl8PbzFA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Move the creation of a virStorageVolPtr object by lookup out of esxStorageVolLookupByPath in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano Reviewed-by: Cole Robinson --- src/esx/esx_storage_backend_vmfs.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backe= nd_vmfs.c index 1270c21e00..ab47a4c272 100644 --- a/src/esx/esx_storage_backend_vmfs.c +++ b/src/esx/esx_storage_backend_vmfs.c @@ -695,32 +695,40 @@ esxStorageVolLookupByName(virStoragePoolPtr pool, =20 =20 =20 +static virStorageVolPtr +datastorePathToStorageVol(virConnectPtr conn, const char *pool, + const char *path) +{ + esxPrivate *priv =3D conn->privateData; + g_autofree char *key =3D NULL; + + if (esxVI_LookupStorageVolumeKeyByDatastorePath(priv->primary, path, + &key) < 0) { + return NULL; + } + + return virGetStorageVol(conn, pool, path, key, + &esxStorageBackendVMFS, NULL); +} + + static virStorageVolPtr esxStorageVolLookupByPath(virConnectPtr conn, const char *path) { virStorageVolPtr volume =3D NULL; - esxPrivate *priv =3D conn->privateData; char *datastoreName =3D NULL; char *directoryAndFileName =3D NULL; - char *key =3D NULL; =20 if (esxUtil_ParseDatastorePath(path, &datastoreName, NULL, &directoryAndFileName) < 0) { goto cleanup; } =20 - if (esxVI_LookupStorageVolumeKeyByDatastorePath(priv->primary, path, - &key) < 0) { - goto cleanup; - } - - volume =3D virGetStorageVol(conn, datastoreName, directoryAndFileName,= key, - &esxStorageBackendVMFS, NULL); + volume =3D datastorePathToStorageVol(conn, datastoreName, directoryAnd= FileName); =20 cleanup: VIR_FREE(datastoreName); VIR_FREE(directoryAndFileName); - VIR_FREE(key); =20 return volume; } --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 16:03:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573821694; cv=none; d=zoho.com; s=zohoarc; b=aksAflpqNYnoxH6nc+izR2lJkV+jCHkuQDH8r6zlCKKHjlXUTl1CICMGQeYh2DY9zAmxMty2quFsyzGoKSkBIY0mjEbMMIsMjo702jGFN8GHYrqncArAzNOG5Zrg6LCFiYFNfQAWLT7R4ky28DSWHateGoK/wkg6z7Ez7RWQRd4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573821694; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+DPnjpxaRfCtcy4p7YDu/dTAGSktaGBw+S/U2PsoeZw=; b=eO8BmvoBQ5MdfN9UEOIwF7iXq8Ia+sNho++M4eQ5PjdyLGuE1Rv87Zsv8dY8PBjwKzSN0HuWvONcY1doA2v1MTp9MqCU4k+XJ7HCfPWtpPqluyFSSEYnTpRlhbkhgwm2nolOZu8HPb9gz56FeU4Hv/ZKq1mdVEoK2tCAruRZWzU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1573821694513159.53193008545918; Fri, 15 Nov 2019 04:41:34 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-160-4YB-dbYKOa2FR-qBKkhJyg-1; Fri, 15 Nov 2019 07:41:31 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9D4F7DB2A; Fri, 15 Nov 2019 12:41:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7508B5F78C; Fri, 15 Nov 2019 12:41:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 36EA81808855; Fri, 15 Nov 2019 12:41:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAFCfGtj027052 for ; Fri, 15 Nov 2019 07:41:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0A7AC5E263; Fri, 15 Nov 2019 12:41:16 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8A1C65ED37 for ; Fri, 15 Nov 2019 12:41:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573821693; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=+DPnjpxaRfCtcy4p7YDu/dTAGSktaGBw+S/U2PsoeZw=; b=IAm/vsl19bQc2rt5KiAgMKTCPfT9RbotInGA6AVsWsnWKwbM3Fp3R3IeHkGoI6ztDWdkCs Lr1OZbR7aS7J4jopngGWLrCbh0RQEhy8pB0ZQai3zdU5uB3QLtahqN2VjtBEvhKccY/hYi X9rQxkIkIQHpyUTYT5HX14oyJO6dlWM= From: Pino Toscano To: libvir-list@redhat.com Date: Fri, 15 Nov 2019 13:40:49 +0100 Message-Id: <20191115124051.989-11-ptoscano@redhat.com> In-Reply-To: <20191115124051.989-1-ptoscano@redhat.com> References: <20191115124051.989-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 10/12] esx: split scsilunToStorageVol helper X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: 4YB-dbYKOa2FR-qBKkhJyg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Move the creation of a virStorageVolPtr object from the esxVI_ScsiLun object of a SCSI lun out of esxStorageVolLookupByName and esxStorageVolLookupByPath in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano Reviewed-by: Cole Robinson --- src/esx/esx_storage_backend_iscsi.c | 60 +++++++++++++++-------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/src/esx/esx_storage_backend_iscsi.c b/src/esx/esx_storage_back= end_iscsi.c index 4f5d8e5e24..34760a837e 100644 --- a/src/esx/esx_storage_backend_iscsi.c +++ b/src/esx/esx_storage_backend_iscsi.c @@ -440,6 +440,35 @@ esxStoragePoolListVolumes(virStoragePoolPtr pool, char= **const names, =20 =20 =20 +static virStorageVolPtr +scsilunToStorageVol(virConnectPtr conn, esxVI_ScsiLun *scsiLun, + const char *pool) +{ + /* VIR_CRYPTO_HASH_SIZE_MD5 =3D VIR_UUID_BUFLEN =3D 16 */ + unsigned char md5[VIR_CRYPTO_HASH_SIZE_MD5]; + char uuid_string[VIR_UUID_STRING_BUFLEN] =3D ""; + + /* + * ScsiLun provides a UUID field that is unique across + * multiple servers. But this field length is ~55 characters + * compute MD5 hash to transform it to an acceptable + * libvirt format + */ + if (virCryptoHashBuf(VIR_CRYPTO_HASH_MD5, scsiLun->uuid, md5) < 0) + return NULL; + virUUIDFormat(md5, uuid_string); + + /* + * ScsiLun provides displayName and canonicalName but both are + * optional and its observed that they can be NULL, using + * deviceName to create volume. + */ + return virGetStorageVol(conn, pool, scsiLun->deviceName, uuid_string, + &esxStorageBackendISCSI, NULL); +} + + + static virStorageVolPtr esxStorageVolLookupByName(virStoragePoolPtr pool, const char *name) @@ -448,9 +477,6 @@ esxStorageVolLookupByName(virStoragePoolPtr pool, esxPrivate *priv =3D pool->conn->privateData; esxVI_ScsiLun *scsiLunList =3D NULL; esxVI_ScsiLun *scsiLun; - /* VIR_CRYPTO_HASH_SIZE_MD5 =3D VIR_UUID_BUFLEN =3D 16 */ - unsigned char md5[VIR_CRYPTO_HASH_SIZE_MD5]; - char uuid_string[VIR_UUID_STRING_BUFLEN] =3D ""; =20 if (esxVI_LookupScsiLunList(priv->primary, &scsiLunList) < 0) goto cleanup; @@ -458,23 +484,7 @@ esxStorageVolLookupByName(virStoragePoolPtr pool, for (scsiLun =3D scsiLunList; scsiLun; scsiLun =3D scsiLun->_next) { if (STREQ(scsiLun->deviceName, name)) { - /* - * ScsiLun provides a UUID field that is unique across - * multiple servers. But this field length is ~55 characters - * compute MD5 hash to transform it to an acceptable - * libvirt format - */ - if (virCryptoHashBuf(VIR_CRYPTO_HASH_MD5, scsiLun->uuid, md5) = < 0) - goto cleanup; - virUUIDFormat(md5, uuid_string); - - /* - * ScsiLun provides displayName and canonicalName but both are - * optional and its observed that they can be NULL, using - * deviceName to create volume. - */ - volume =3D virGetStorageVol(pool->conn, pool->name, name, uuid= _string, - &esxStorageBackendISCSI, NULL); + volume =3D scsilunToStorageVol(pool->conn, scsiLun, pool->name= ); break; } } @@ -496,9 +506,6 @@ esxStorageVolLookupByPath(virConnectPtr conn, const cha= r *path) esxVI_ScsiLun *scsiLun; esxVI_HostScsiDisk *hostScsiDisk =3D NULL; char *poolName =3D NULL; - /* VIR_CRYPTO_HASH_SIZE_MD5 =3D VIR_UUID_BUFLEN =3D 16 */ - unsigned char md5[VIR_CRYPTO_HASH_SIZE_MD5]; - char uuid_string[VIR_UUID_STRING_BUFLEN] =3D ""; =20 if (esxVI_LookupScsiLunList(priv->primary, &scsiLunList) < 0) goto cleanup; @@ -516,12 +523,7 @@ esxStorageVolLookupByPath(virConnectPtr conn, const ch= ar *path) goto cleanup; } =20 - if (virCryptoHashBuf(VIR_CRYPTO_HASH_MD5, scsiLun->uuid, md5) = < 0) - goto cleanup; - virUUIDFormat(md5, uuid_string); - - volume =3D virGetStorageVol(conn, poolName, path, uuid_string, - &esxStorageBackendISCSI, NULL); + volume =3D scsilunToStorageVol(conn, scsiLun, poolName); break; } } --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 16:03:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573821700; cv=none; d=zoho.com; s=zohoarc; b=Vs8uy4pBlbBbDVHB5OKeyCleP5rW1FnT38MqboDmL4kXpgzAcPQsIDiVhwNRaVqCsmM1OAaySsk+zIm2Je4g4oac9gzIAXMOW3y/mxRTZzr1K84opb7/wC6BID8Dz8WuwT76iAFT3WYwnwFnrzqS9n/U/RYRpzpaFjiDZ5OJLIs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573821700; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=M2IzGUBbdGfToULQAZbqdU+pDo6oEb0K8RLUeUI/NoY=; b=X7gNZ7OQ6Me8A1HoYweQl4My9RbJoB5yiH9EaF8WcWKbxdAASZ7GrIiV9W4O8Kui62z5F5uEhJZ1fyuF/fFOof5K6fHc3gn4daQstaO1ctU3Ad6VOB6HBalv/9vO6+ZN8VHTZdvjZ4s7UntQ7wqxkI/SRux8VS46JpVxcJo82fk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1573821700025242.09977692399752; Fri, 15 Nov 2019 04:41:40 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-218-dH6Z0g0RMQaZDr77Sh90sg-1; Fri, 15 Nov 2019 07:41:36 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 958B4802687; Fri, 15 Nov 2019 12:41:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6D0D328DDD; Fri, 15 Nov 2019 12:41:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2A8494E570; Fri, 15 Nov 2019 12:41:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAFCfIXg027062 for ; Fri, 15 Nov 2019 07:41:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id A4E5F5ED35; Fri, 15 Nov 2019 12:41:18 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F5115E263 for ; Fri, 15 Nov 2019 12:41:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573821697; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=M2IzGUBbdGfToULQAZbqdU+pDo6oEb0K8RLUeUI/NoY=; b=gOUOTf/w5uJikC5c7FWfUGpMYLkszGBxgg6518SnLp/yWgBQiTtWrYG6eHQkZRrKRQngbt VD+virPMt9FagjfV2jBfmAzKe7nAPyCI0XM1DMUd5JduwTcIydgP1JCQvBScPyg99nx3KF aI5D89uSK/N9VBluW6dgNA/GlEy8jZ0= From: Pino Toscano To: libvir-list@redhat.com Date: Fri, 15 Nov 2019 13:40:50 +0100 Message-Id: <20191115124051.989-12-ptoscano@redhat.com> In-Reply-To: <20191115124051.989-1-ptoscano@redhat.com> References: <20191115124051.989-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 11/12] esx: implement storagePoolListAllVolumes X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: dH6Z0g0RMQaZDr77Sh90sg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Implement the .storagePoolListAllVolumes storage API in the esx storage driver, and in all its subdrivers. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_iscsi.c | 70 ++++++++++++++++++++++++ src/esx/esx_storage_backend_vmfs.c | 85 +++++++++++++++++++++++++++++ src/esx/esx_storage_driver.c | 19 +++++++ 3 files changed, 174 insertions(+) diff --git a/src/esx/esx_storage_backend_iscsi.c b/src/esx/esx_storage_back= end_iscsi.c index 34760a837e..2f189a92cf 100644 --- a/src/esx/esx_storage_backend_iscsi.c +++ b/src/esx/esx_storage_backend_iscsi.c @@ -852,6 +852,75 @@ esxConnectListAllStoragePools(virConnectPtr conn, =20 =20 =20 +static int +esxStoragePoolListAllVolumes(virStoragePoolPtr pool, + virStorageVolPtr **vols, + unsigned int flags) +{ + bool success =3D false; + size_t count =3D 0; + esxPrivate *priv =3D pool->conn->privateData; + esxVI_HostScsiTopologyLun *hostScsiTopologyLunList =3D NULL; + esxVI_HostScsiTopologyLun *hostScsiTopologyLun; + esxVI_ScsiLun *scsiLunList =3D NULL; + esxVI_ScsiLun *scsiLun =3D NULL; + size_t i; + + virCheckFlags(0, -1); + + if (esxVI_LookupHostScsiTopologyLunListByTargetName + (priv->primary, pool->name, &hostScsiTopologyLunList) < 0) { + goto cleanup; + } + + if (!hostScsiTopologyLunList) { + /* iSCSI adapter may not be enabled on ESX host */ + return 0; + } + + if (esxVI_LookupScsiLunList(priv->primary, &scsiLunList) < 0) + goto cleanup; + + for (scsiLun =3D scsiLunList; scsiLun; + scsiLun =3D scsiLun->_next) { + for (hostScsiTopologyLun =3D hostScsiTopologyLunList; + hostScsiTopologyLun; + hostScsiTopologyLun =3D hostScsiTopologyLun->_next) { + if (STREQ(hostScsiTopologyLun->scsiLun, scsiLun->key)) { + virStorageVolPtr volume; + + volume =3D scsilunToStorageVol(pool->conn, scsiLun, pool->= name); + if (!volume) + goto cleanup; + + if (VIR_APPEND_ELEMENT(*vols, count, volume) < 0) + goto cleanup; + } + + } + } + + success =3D true; + + cleanup: + if (! success) { + if (*vols) { + for (i =3D 0; i < count; ++i) + VIR_FREE((*vols)[i]); + VIR_FREE(*vols); + } + + count =3D -1; + } + + esxVI_HostScsiTopologyLun_Free(&hostScsiTopologyLunList); + esxVI_ScsiLun_Free(&scsiLunList); + + return count; +} + + + virStorageDriver esxStorageBackendISCSI =3D { .connectNumOfStoragePools =3D esxConnectNumOfStoragePools, /* 1.0.1 */ .connectListStoragePools =3D esxConnectListStoragePools, /* 1.0.1 */ @@ -873,4 +942,5 @@ virStorageDriver esxStorageBackendISCSI =3D { .storageVolWipe =3D esxStorageVolWipe, /* 1.0.1 */ .storageVolGetPath =3D esxStorageVolGetPath, /* 1.0.1 */ .connectListAllStoragePools =3D esxConnectListAllStoragePools, /* 5.10= .0 */ + .storagePoolListAllVolumes =3D esxStoragePoolListAllVolumes, /* 5.10.0= */ }; diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backe= nd_vmfs.c index ab47a4c272..27f8b17e06 100644 --- a/src/esx/esx_storage_backend_vmfs.c +++ b/src/esx/esx_storage_backend_vmfs.c @@ -1566,6 +1566,90 @@ esxConnectListAllStoragePools(virConnectPtr conn, =20 =20 =20 +static int +esxStoragePoolListAllVolumes(virStoragePoolPtr pool, + virStorageVolPtr **vols, + unsigned int flags) +{ + bool success =3D false; + esxPrivate *priv =3D pool->conn->privateData; + esxVI_HostDatastoreBrowserSearchResults *searchResultsList =3D NULL; + esxVI_HostDatastoreBrowserSearchResults *searchResults =3D NULL; + esxVI_FileInfo *fileInfo =3D NULL; + char *directoryAndFileName =3D NULL; + size_t length; + size_t count =3D 0; + size_t i; + + virCheckFlags(0, -1); + + if (esxVI_LookupDatastoreContentByDatastoreName(priv->primary, pool->n= ame, + &searchResultsList) < = 0) { + goto cleanup; + } + + /* Interpret search result */ + for (searchResults =3D searchResultsList; searchResults; + searchResults =3D searchResults->_next) { + VIR_FREE(directoryAndFileName); + + if (esxUtil_ParseDatastorePath(searchResults->folderPath, NULL, NU= LL, + &directoryAndFileName) < 0) { + goto cleanup; + } + + /* Strip trailing separators */ + length =3D strlen(directoryAndFileName); + + while (length > 0 && directoryAndFileName[length - 1] =3D=3D '/') { + directoryAndFileName[length - 1] =3D '\0'; + --length; + } + + /* Build volume names */ + for (fileInfo =3D searchResults->file; fileInfo; + fileInfo =3D fileInfo->_next) { + g_autofree char *datastorePath =3D NULL; + virStorageVolPtr volume; + + if (length < 1) { + datastorePath =3D g_strdup(fileInfo->path); + } else { + datastorePath =3D g_strdup_printf("%s/%s", + directoryAndFileName, + fileInfo->path); + } + + volume =3D datastorePathToStorageVol(pool->conn, pool->name, d= atastorePath); + if (!volume) + goto cleanup; + + if (VIR_APPEND_ELEMENT(*vols, count, volume) < 0) + goto cleanup; + } + } + + success =3D true; + + cleanup: + if (! success) { + if (*vols) { + for (i =3D 0; i < count; ++i) + VIR_FREE((*vols)[i]); + VIR_FREE(*vols); + } + + count =3D -1; + } + + esxVI_HostDatastoreBrowserSearchResults_Free(&searchResultsList); + VIR_FREE(directoryAndFileName); + + return count; +} + + + virStorageDriver esxStorageBackendVMFS =3D { .connectNumOfStoragePools =3D esxConnectNumOfStoragePools, /* 0.8.2 */ .connectListStoragePools =3D esxConnectListStoragePools, /* 0.8.2 */ @@ -1587,4 +1671,5 @@ virStorageDriver esxStorageBackendVMFS =3D { .storageVolGetXMLDesc =3D esxStorageVolGetXMLDesc, /* 0.8.4 */ .storageVolGetPath =3D esxStorageVolGetPath, /* 0.8.4 */ .connectListAllStoragePools =3D esxConnectListAllStoragePools, /* 5.10= .0 */ + .storagePoolListAllVolumes =3D esxStoragePoolListAllVolumes, /* 5.10.0= */ }; diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c index 6d17ac28ea..ba72a0e5b5 100644 --- a/src/esx/esx_storage_driver.c +++ b/src/esx/esx_storage_driver.c @@ -584,6 +584,24 @@ esxConnectListAllStoragePools(virConnectPtr conn, =20 =20 =20 +static int +esxStoragePoolListAllVolumes(virStoragePoolPtr pool, + virStorageVolPtr **vols, + unsigned int flags) +{ + esxPrivate *priv =3D pool->conn->privateData; + virStorageDriverPtr backend =3D pool->privateData; + + virCheckNonNullArgReturn(pool->privateData, -1); + + if (esxVI_EnsureSession(priv->primary) < 0) + return -1; + + return backend->storagePoolListAllVolumes(pool, vols, flags); +} + + + virStorageDriver esxStorageDriver =3D { .connectNumOfStoragePools =3D esxConnectNumOfStoragePools, /* 0.8.2 */ .connectListStoragePools =3D esxConnectListStoragePools, /* 0.8.2 */ @@ -612,4 +630,5 @@ virStorageDriver esxStorageDriver =3D { .storagePoolIsActive =3D esxStoragePoolIsActive, /* 0.8.2 */ .storagePoolIsPersistent =3D esxStoragePoolIsPersistent, /* 0.8.2 */ .connectListAllStoragePools =3D esxConnectListAllStoragePools, /* 5.10= .0 */ + .storagePoolListAllVolumes =3D esxStoragePoolListAllVolumes, /* 5.10.0= */ }; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 16:03:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573821844; cv=none; d=zoho.com; s=zohoarc; b=jdpl5GZoGGtzPaH3oqunc6mFrPEMp15kA73ZuPCbTdmv+XW+UvxmymFjVxTCUKeLqLYZbKnoWwbaX7hJ5yW81EMg5jYZed18y8jUL99yz6fceVtggTdsU/KgOYuisMTodGMFF0frzqbWw8wdwbVj5Je/VoE+NmhLu9ZXgonBmto= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573821844; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qERo3r8UdvaZpXnH39FSiPN7cNlfpKFFr7KHK5P88I4=; b=nyGZphqUHvYjLbOT6sdfn78DM+UtjAq9e+v/5omHF0sehDob0SVqOy46ShIYQbvZe5akrUuq0ra+Hmj4VCcCPCQkPoD+pXdPXNDqZCebXNIS6GR5KRBGmwrN9JN771s/gVtTnPPsqAyNxoCygpKZ4x+jhc8C4gl/Jruuw8ssIZo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1573821844402731.5169365885098; Fri, 15 Nov 2019 04:44:04 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-AIIYiDw5M8etXcey5KgVbA-1; Fri, 15 Nov 2019 07:41:42 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44492477; Fri, 15 Nov 2019 12:41:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BF5952D1A4; Fri, 15 Nov 2019 12:41:34 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 824FF180880C; Fri, 15 Nov 2019 12:41:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAFCfLsT027077 for ; Fri, 15 Nov 2019 07:41:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id 55EA95ED38; Fri, 15 Nov 2019 12:41:21 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D556F5ED37 for ; Fri, 15 Nov 2019 12:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573821843; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qERo3r8UdvaZpXnH39FSiPN7cNlfpKFFr7KHK5P88I4=; b=Qp4mfCWuPg+JDN1NEfQ7mO0xug0xTBQ1wObfyftkXPbnzkrXcs/hDQGH6UqMtxXJZTyYpi A7UdGxkA3EIPNOzBwU9c2bkuERy7B96clhdkwIEK4TIt6OMqtw4TWCmpxt5ujpNGLlKIeK G+woA7O65k0p0xLP249JR6afbZyumBE= From: Pino Toscano To: libvir-list@redhat.com Date: Fri, 15 Nov 2019 13:40:51 +0100 Message-Id: <20191115124051.989-13-ptoscano@redhat.com> In-Reply-To: <20191115124051.989-1-ptoscano@redhat.com> References: <20191115124051.989-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 12/12] docs: document implemented APIs in esx X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: AIIYiDw5M8etXcey5KgVbA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pino Toscano --- docs/news.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index c362bf3a15..1718a686ce 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -55,6 +55,17 @@
    + + + esx: implement various APIs + + + The virConnectListAllStoragePools(), + virConnectListAllNetworks() and + virStoragePoolListAllVolumes() APIs were implemented + in the esx driver. + +
    --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list