[libvirt] [PATCH 1/2] iscsi: Adjust error message for findStorageSources backend
Martin Kletzander
mkletzan at redhat.com
Mon Mar 2 14:52:22 UTC 2015
On Thu, Feb 26, 2015 at 04:43:53PM -0500, John Ferlan wrote:
>The virStorageBackendISCSIFindPoolSources API only needs the 'host' name
>in order to discover iSCSI pools, it returns the various device paths.
>On input, it's also possible to further restrict a search by providing the
>port attribute for the host element and the (undocumented) initiator element.
>
>For example:
>
>$ virsh find-storage-pool-sources-as iscsi
>error: Failed to find any iscsi pool sources
>error: invalid argument: hostname and device path must be specified for iscsi sources
>
>$ virsh find-storage-pool-sources-as iscsi 192.168.122.1
><sources>
> <source>
> <host name='192.168.122.1' port='3260'/>
> <device path='iqn.2013-12.com.example:iscsi-chap-lclpool'/>
> </source>
></sources>
>
>Signed-off-by: John Ferlan <jferlan at redhat.com>
>---
> src/storage/storage_backend_iscsi.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
ACK
>diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c
>index 1d0cf73..079c767 100644
>--- a/src/storage/storage_backend_iscsi.c
>+++ b/src/storage/storage_backend_iscsi.c
>@@ -178,9 +178,8 @@ virStorageBackendISCSIFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
> virCheckFlags(0, NULL);
>
> if (!srcSpec) {
>- virReportError(VIR_ERR_INVALID_ARG,
>- "%s", _("hostname and device path "
>- "must be specified for iscsi sources"));
>+ virReportError(VIR_ERR_INVALID_ARG, "%s",
>+ _("hostname must be specified for iscsi sources"));
> return NULL;
> }
>
>--
>2.1.0
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150302/c8a96cfe/attachment-0001.sig>
More information about the libvir-list
mailing list