def add_known_arguments(self, parser):

        parser.add_argument(
            '--dpd',
            metavar="action=ACTION,interval=INTERVAL,timeout=TIMEOUT",
            type=utils.str2dict,
            help=vpn_utils.dpd_help("IPsec connection."))
    def add_known_arguments(self, parser):

        parser.add_argument(
            '--dpd',
            metavar="action=ACTION,interval=INTERVAL,timeout=TIMEOUT",
            type=utils.str2dict,
            help=vpn_utils.dpd_help("IPsec connection."))
 def add_known_arguments(self, parser):
     parser.add_argument(
         '--admin-state-down',
         default=True, action='store_false',
         help=_('Set admin state up to false.'))
     parser.add_argument(
         '--name',
         help=_('Set friendly name for the connection.'))
     parser.add_argument(
         '--description',
         help=_('Set a description for the connection.'))
     parser.add_argument(
         '--mtu',
         default='1500',
         help=_('MTU size for the connection, default:1500'))
     parser.add_argument(
         '--initiator',
         default='bi-directional', choices=['bi-directional',
                                            'response-only'],
         help=_('Initiator state in lowercase, default:bi-directional'))
     parser.add_argument(
         '--dpd',
         metavar="action=ACTION,interval=INTERVAL,timeout=TIMEOUT",
         type=utils.str2dict,
         help=vpn_utils.dpd_help("IPsec connection."))
     parser.add_argument(
         '--vpnservice-id', metavar='VPNSERVICE',
         required=True,
         help=_('VPN service instance ID associated with this connection.'))
     parser.add_argument(
         '--ikepolicy-id', metavar='IKEPOLICY',
         required=True,
         help=_('IKE policy ID associated with this connection.'))
     parser.add_argument(
         '--ipsecpolicy-id', metavar='IPSECPOLICY',
         required=True,
         help=_('IPsec policy ID associated with this connection.'))
     parser.add_argument(
         '--peer-address',
         required=True,
         help=_('Peer gateway public IPv4/IPv6 address or FQDN.'))
     parser.add_argument(
         '--peer-id',
         required=True,
         help=_('Peer router identity for authentication. Can be '
                'IPv4/IPv6 address, e-mail address, key id, or FQDN.'))
     parser.add_argument(
         '--peer-cidr',
         action='append', dest='peer_cidrs',
         required=True,
         help=_('Remote subnet(s) in CIDR format.'))
     parser.add_argument(
         '--psk',
         required=True,
         help=_('Pre-shared key string.'))
 def add_known_arguments(self, parser):
     parser.add_argument('--admin-state-down',
                         default=True,
                         action='store_false',
                         help=_('Set admin state up to false.'))
     parser.add_argument('--name',
                         help=_('Set friendly name for the connection.'))
     parser.add_argument('--description',
                         help=_('Set a description for the connection.'))
     parser.add_argument(
         '--mtu',
         default='1500',
         help=_('MTU size for the connection, default:1500'))
     parser.add_argument(
         '--initiator',
         default='bi-directional',
         choices=['bi-directional', 'response-only'],
         help=_('Initiator state in lowercase, default:bi-directional'))
     parser.add_argument(
         '--dpd',
         metavar="action=ACTION,interval=INTERVAL,timeout=TIMEOUT",
         type=utils.str2dict,
         help=vpn_utils.dpd_help("IPsec connection."))
     parser.add_argument(
         '--vpnservice-id',
         metavar='VPNSERVICE',
         required=True,
         help=_('VPN service instance ID associated with this connection.'))
     parser.add_argument(
         '--ikepolicy-id',
         metavar='IKEPOLICY',
         required=True,
         help=_('IKE policy ID associated with this connection.'))
     parser.add_argument(
         '--ipsecpolicy-id',
         metavar='IPSECPOLICY',
         required=True,
         help=_('IPsec policy ID associated with this connection.'))
     parser.add_argument(
         '--peer-address',
         required=True,
         help=_('Peer gateway public IPv4/IPv6 address or FQDN.'))
     parser.add_argument(
         '--peer-id',
         required=True,
         help=_('Peer router identity for authentication. Can be '
                'IPv4/IPv6 address, e-mail address, key id, or FQDN.'))
     parser.add_argument('--peer-cidr',
                         action='append',
                         dest='peer_cidrs',
                         required=True,
                         help=_('Remote subnet(s) in CIDR format.'))
     parser.add_argument('--psk',
                         required=True,
                         help=_('Pre-shared key string.'))
 def add_known_arguments(self, parser):
     parser.add_argument(
         '--admin-state-down',
         default=True, action='store_false',
         help='Set admin state up to false')
     parser.add_argument(
         '--name',
         help='Set friendly name for the connection')
     parser.add_argument(
         '--description',
         help='Set a description for the connection')
     parser.add_argument(
         '--mtu',
         default='1500',
         help='MTU size for the connection, default:1500')
     parser.add_argument(
         '--initiator',
         default='bi-directional', choices=['bi-directional',
                                            'response-only'],
         help='Initiator state in lowercase, default:bi-directional')
     parser.add_argument(
         '--dpd',
         metavar="action=ACTION,interval=INTERVAL,timeout=TIMEOUT",
         type=utils.str2dict,
         help=vpn_utils.dpd_help("IPsec Connection"))
     parser.add_argument(
         '--vpnservice-id', metavar='VPNSERVICE',
         required=True,
         help='VPNService instance id associated with this connection')
     parser.add_argument(
         '--ikepolicy-id', metavar='IKEPOLICY',
         required=True,
         help='IKEPolicy id associated with this connection')
     parser.add_argument(
         '--ipsecpolicy-id', metavar='IPSECPOLICY',
         required=True,
         help='IPsecPolicy id associated with this connection')
     parser.add_argument(
         '--peer-address',
         required=True,
         help='Remote branch router public '
              'IPv4 address or IPv6 address or FQDN.')
     parser.add_argument(
         '--peer-id',
         required=True,
         help='Remote branch router identity')
     parser.add_argument(
         '--peer-cidr',
         action='append', dest='peer_cidrs',
         required=True,
         help='Remote subnet(s) in CIDR format')
     parser.add_argument(
         '--psk',
         required=True,
         help='Pre-Shared Key string')
 def add_known_arguments(self, parser):
     parser.add_argument(
         '--dpd',
         metavar="action=ACTION,interval=INTERVAL,timeout=TIMEOUT",
         type=utils.str2dict,
         help=vpn_utils.dpd_help("IPsec connection."))
     parser.add_argument(
         '--local-ep-group',
         help=_('Local endpoint group ID/name with subnet(s) for '
                'IPSec connection.'))
     parser.add_argument(
         '--peer-ep-group',
         help=_('Peer endpoint group ID/name with CIDR(s) for '
                'IPsec connection.'))
Пример #7
0
 def add_known_arguments(self, parser):
     parser.add_argument(
         '--dpd',
         metavar="action=ACTION,interval=INTERVAL,timeout=TIMEOUT",
         type=utils.str2dict,
         help=vpn_utils.dpd_help("IPsec connection."))
     parser.add_argument(
         '--local-ep-group',
         help=_('Local endpoint group ID/name with subnet(s) for '
                'IPSec connection.'))
     parser.add_argument('--peer-ep-group',
                         help=_(
                             'Peer endpoint group ID/name with CIDR(s) for '
                             'IPsec connection.'))
 def add_known_arguments(self, parser, is_create=True):
     parser.add_argument(
         '--name',
         help=_('Set friendly name for the connection.'))
     parser.add_argument(
         '--description',
         help=_('Set a description for the connection.'))
     parser.add_argument(
         '--dpd',
         metavar="action=ACTION,interval=INTERVAL,timeout=TIMEOUT",
         type=utils.str2dict_type(
             optional_keys=['action', 'interval', 'timeout']),
         help=vpn_utils.dpd_help("IPsec connection."))
     parser.add_argument(
         '--local-ep-group',
         help=_('Local endpoint group ID/name with subnet(s) for '
                'IPSec connection.'))
     parser.add_argument(
         '--peer-ep-group',
         help=_('Peer endpoint group ID/name with CIDR(s) for '
                'IPSec connection.'))
     parser.add_argument(
         '--peer-cidr',
         action='append', dest='peer_cidrs',
         help=_('[DEPRECATED in Mitaka] Remote subnet(s) in CIDR format. '
                'Cannot be specified when using endpoint groups. Only '
                'applicable, if subnet provided for VPN service.'))
     parser.add_argument(
         '--peer-id',
         required=is_create,
         help=_('Peer router identity for authentication. Can be '
                'IPv4/IPv6 address, e-mail address, key id, or FQDN.'))
     parser.add_argument(
         '--peer-address',
         required=is_create,
         help=_('Peer gateway public IPv4/IPv6 address or FQDN.'))
     parser.add_argument(
         '--psk',
         required=is_create,
         help=_('Pre-shared key string.'))
     parser.add_argument(
         '--mtu',
         default='1500' if is_create else argparse.SUPPRESS,
         help=_('MTU size for the connection, default:1500.'))
     parser.add_argument(
         '--initiator',
         default='bi-directional' if is_create else argparse.SUPPRESS,
         choices=['bi-directional', 'response-only'],
         help=_('Initiator state in lowercase, default:bi-directional'))
 def add_known_arguments(self, parser, is_create=True):
     parser.add_argument('--name',
                         help=_('Set friendly name for the connection.'))
     parser.add_argument('--description',
                         help=_('Set a description for the connection.'))
     parser.add_argument(
         '--dpd',
         metavar="action=ACTION,interval=INTERVAL,timeout=TIMEOUT",
         type=utils.str2dict_type(
             optional_keys=['action', 'interval', 'timeout']),
         help=vpn_utils.dpd_help("IPsec connection."))
     parser.add_argument(
         '--local-ep-group',
         help=_('Local endpoint group ID/name with subnet(s) for '
                'IPSec connection.'))
     parser.add_argument('--peer-ep-group',
                         help=_(
                             'Peer endpoint group ID/name with CIDR(s) for '
                             'IPSec connection.'))
     parser.add_argument(
         '--peer-cidr',
         action='append',
         dest='peer_cidrs',
         help=_('[DEPRECATED in Mitaka] Remote subnet(s) in CIDR format. '
                'Cannot be specified when using endpoint groups. Only '
                'applicable, if subnet provided for VPN service.'))
     parser.add_argument(
         '--peer-id',
         required=is_create,
         help=_('Peer router identity for authentication. Can be '
                'IPv4/IPv6 address, e-mail address, key id, or FQDN.'))
     parser.add_argument(
         '--peer-address',
         required=is_create,
         help=_('Peer gateway public IPv4/IPv6 address or FQDN.'))
     parser.add_argument('--psk',
                         required=is_create,
                         help=_('Pre-shared key string.'))
     parser.add_argument(
         '--mtu',
         default='1500' if is_create else argparse.SUPPRESS,
         help=_('MTU size for the connection, default:1500.'))
     parser.add_argument(
         '--initiator',
         default='bi-directional' if is_create else argparse.SUPPRESS,
         choices=['bi-directional', 'response-only'],
         help=_('Initiator state in lowercase, default:bi-directional'))
 def add_known_arguments(self, parser):
     parser.add_argument(
         "--admin-state-down", default=True, action="store_false", help=_("Set admin state up to false")
     )
     parser.add_argument("--name", help=_("Set friendly name for the connection"))
     parser.add_argument("--description", help=_("Set a description for the connection"))
     parser.add_argument("--mtu", default="1500", help=_("MTU size for the connection, default:1500"))
     parser.add_argument(
         "--initiator",
         default="bi-directional",
         choices=["bi-directional", "response-only"],
         help=_("Initiator state in lowercase, default:bi-directional"),
     )
     parser.add_argument(
         "--dpd",
         metavar="action=ACTION,interval=INTERVAL,timeout=TIMEOUT",
         type=utils.str2dict,
         help=vpn_utils.dpd_help("IPsec Connection"),
     )
     parser.add_argument(
         "--vpnservice-id",
         metavar="VPNSERVICE",
         required=True,
         help=_("VPNService instance id associated with this connection"),
     )
     parser.add_argument(
         "--ikepolicy-id", metavar="IKEPOLICY", required=True, help=_("IKEPolicy id associated with this connection")
     )
     parser.add_argument(
         "--ipsecpolicy-id",
         metavar="IPSECPOLICY",
         required=True,
         help=_("IPsecPolicy id associated with this connection"),
     )
     parser.add_argument("--peer-address", required=True, help=_("Peer gateway public IPv4/IPv6 address or FQDN."))
     parser.add_argument(
         "--peer-id",
         required=True,
         help=_(
             "Peer router identity for authentication. Can be " "IPv4/IPv6 address, e-mail address, key id, or FQDN."
         ),
     )
     parser.add_argument(
         "--peer-cidr", action="append", dest="peer_cidrs", required=True, help=_("Remote subnet(s) in CIDR format")
     )
     parser.add_argument("--psk", required=True, help=_("Pre-Shared Key string"))