#!/usr/bin/env python

import sys
import argparse

sys.path.append('..')
from kvminstall import kvminstall

__author__ = 'Jason Callaway'
__email__ = 'jason@jasoncallaway.com'
__license__ = 'Apache License Version 2.0'
__version__ = '0.1'
__status__ = 'alpha'

# Note that we want all of the arguments to be parsed as Strings.
# This makes building the virsh and virt-install commands easier.
parser = argparse.ArgumentParser()
parser.add_argument('-c', '--clone',
                    help='name of the source logical volume to be cloned')
parser.add_argument('-i', '--image',
                    help='image file to duplicate')
parser.add_argument('-v', '--vcpus',
                    help='number of virtual CPUs')
parser.add_argument('-r', '--ram',
                    help='amount of RAM in MB')
parser.add_argument('-d', '--disk',
                    help='disk size in GB')
parser.add_argument('-D', '--domain',
                    help='domainname for dhcp / dnsmasq')
parser.add_argument('-N', '--network',
                    help='libvirt network')
parser.add_argument('--type',
                    help='os type, i.e., linux')
parser.add_argument('--variant',
                    help='os variant, i.e., rhel7')
parser.add_argument('-f', '--configfile',
                    help='specify an alternate config file, ' +
                         'default=~/.config/kvminstall/config.yaml')
parser.add_argument('--verbose', dest='verbose', action='store_true',
                    help='verbose output')
parser.add_argument('name',
                    help='name of the new virtual machine')
parser.set_defaults(verbose=False)

kvminstall.KVMInstall(parser.parse_args())
