[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH 2/2] tests: move the storage pool under /dev.

On 07/25/2013 10:06 PM, Giuseppe Scrivano wrote:
> The commit efab27afbf02743a3a2582e9a111eb1b7d985b26 in libvirt uses
> /dev/%s for logical pools, change the tests to accommodate it.

Most of this looks like a 'sed' run, except the last bit:

> diff --git a/virtinst/cli.py b/virtinst/cli.py
> index 7af3ac3..a027614 100644
> --- a/virtinst/cli.py
> +++ b/virtinst/cli.py
> @@ -1428,7 +1428,8 @@ def _parse_disk_source(guest, path, pool, vol, size, fmt, sparse):
>              raise ValueError(_("Storage volume must be specified as "
>                                 "vol=poolname/volname"))
>          vollist = vol.split("/")
> -        voltuple = (vollist[0], vollist[1])
> +        voltuple = (vollist[-2], vollist[-1])
> +
>          logging.debug("Parsed volume: as pool='%s' vol='%s'",
>                        voltuple[0], voltuple[1])
>          if voltuple[0] == DEFAULT_POOL_NAME:

Why is this needed? This should only be when people specify a poolname/volname
combo and I don't think your change should affect that.

I've pushed your patch, minus the above bit, and added one minor bit to make
it work on F19 libvirt as well, thanks Giuseppe.

For the future, if you ever submit a patch that is mostly an automated change
but not automated in a few places, it's useful to point those few places out
in the commit message. And possibly list the sed command if you used one.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]