Add -4 and -6 params to force IPv4, IPv6 addresses respectively.

This commit is contained in:
Darko Poljak 2018-02-15 20:33:36 +01:00
commit 4d39b6af51
4 changed files with 53 additions and 11 deletions

View file

@ -224,6 +224,16 @@ def get_parsers():
# Config
parser['config_args'] = argparse.ArgumentParser(add_help=False)
parser['config_args'].add_argument(
'-4', '--force-ipv4',
help=('Force to use IPv4 addresses only. No influence for custom'
' remote commands.'),
action='store_const', dest='force_ipv', const=4)
parser['config_args'].add_argument(
'-6', '--force-ipv6',
help=('Force to use IPv6 addresses only. No influence for custom'
' remote commands.'),
action='store_const', dest='force_ipv', const=6)
parser['config_args'].add_argument(
'-A', '--all-tagged',
help=('Use all hosts present in tags db. Currently in beta.'),