forked from uncloud/uncloud
refactored vm.py to create a VM
This commit is contained in:
parent
b5409552d8
commit
58daf8191e
3 changed files with 73 additions and 49 deletions
|
|
@ -22,6 +22,10 @@ arg_parser.add_argument('--vni', help="VXLAN ID (decimal)", type=int)
|
|||
arg_parser.add_argument('--run-dns-ra', action='store_true',
|
||||
help="Provide router advertisements and DNS resolution via dnsmasq")
|
||||
arg_parser.add_argument('--use-sudo', help="Use sudo for command requiring root!", action='store_true')
|
||||
arg_parser.add_argument('--memory', help="Size of memory (GB)", type=int)
|
||||
arg_parser.add_argument('--cores', help="Amount of CPU cores", type=int)
|
||||
arg_parser.add_argument('--no-db', help="Disable connection to etcd. For local testing only!", action='store_true')
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
@ -33,7 +37,7 @@ def main(arguments):
|
|||
if arguments['create_vm']:
|
||||
print("Creating VM")
|
||||
vm = VM(config)
|
||||
vm.create()
|
||||
vm.commandline()
|
||||
|
||||
if arguments['last_used_mac']:
|
||||
m = MAC(config)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue