Re: [virt-bootstrap] [PATCH 1/9] sources: Set default format with a constant

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

 



On Fri, 2017-07-28 at 10:21 +0100, Radostin Stoyanov wrote:
> ---
>  src/virtBootstrap/utils.py          | 2 ++
>  src/virtBootstrap/virt_bootstrap.py | 4 ++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/virtBootstrap/utils.py b/src/virtBootstrap/utils.py
> index 2c79d6b..dbe4677 100644
> --- a/src/virtBootstrap/utils.py
> +++ b/src/virtBootstrap/utils.py
> @@ -38,6 +38,8 @@ import passlib.hosts
>  # pylint: disable=invalid-name
>  # Create logger
>  logger = logging.getLogger(__name__)
> +
> +DEFAULT_OUTPUT_FORMAT = 'dir'
>  # Default virtual size of qcow2 image
>  DEF_QCOW2_SIZE = '5G'
>  if os.geteuid() == 0:
> diff --git a/src/virtBootstrap/virt_bootstrap.py b/src/virtBootstrap/virt_bootstrap.py
> index c9bf1c8..ddc5456 100755
> --- a/src/virtBootstrap/virt_bootstrap.py
> +++ b/src/virtBootstrap/virt_bootstrap.py
> @@ -165,7 +165,7 @@ def mapping_uid_gid(dest, uid_map, gid_map):
>  
>  # pylint: disable=too-many-arguments
>  def bootstrap(uri, dest,
> -              fmt='dir',
> +              fmt=utils.DEFAULT_OUTPUT_FORMAT,
>                username=None,
>                password=None,
>                root_password=None,
> @@ -267,7 +267,7 @@ def main():
>                          help=_("Map both UIDs/GIDs"))
>      parser.add_argument("--no-cache", action="store_true",
>                          help=_("Do not store downloaded Docker images"))
> -    parser.add_argument("-f", "--format", default='dir',
> +    parser.add_argument("-f", "--format", default=utils.DEFAULT_OUTPUT_FORMAT,
>                          choices=['dir', 'qcow2'],
>                          help=_("Format to be used for the root filesystem"))
>      parser.add_argument("-d", "--debug", action="store_const", dest="loglevel",

ACK

--
Cedric

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux