restore image: add tiptorrent transfer method

Makes --type optional, defaults to tiptorrent when option
is missing.
master
Jose M. Guisado 2022-05-10 16:51:55 +02:00
parent fca68171b6
commit eb5091d374
1 changed files with 4 additions and 3 deletions

View File

@ -35,9 +35,10 @@ class OgImage():
help='Image id to be restored')
parser.add_argument('--type',
nargs='?',
required=True,
choices=['unicast', 'unicast-direct'],
help='Image id to be restored')
required=False,
choices=['unicast', 'unicast-direct', 'tiptorrent'],
default='tiptorrent',
help='Transfer method. (Default: tiptorrent)')
parser.add_argument('--repo',
nargs='?',
default=urlparse(rest.URL).netloc.split(':')[0],