예제 #1
0
    def Args(cls, parser):
        cls.ROUTER_ARG = flags.RouterArgument()
        cls.ROUTER_ARG.AddArgument(parser, operation_type='update')
        cls.VPN_TUNNEL_ARG = vpn_tunnel_flags.VpnTunnelArgumentForRouter()
        cls.VPN_TUNNEL_ARG.AddArgument(parser)

        routers_utils.AddCommonArgs(parser)
예제 #2
0
 def _Args(cls, parser, support_keepalive_interval=False):
     cls.ROUTER_ARG = flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser, operation_type='update')
     base.ASYNC_FLAG.AddToParser(parser)
     if support_keepalive_interval:
         flags.AddKeepaliveIntervalArg(parser)
     flags.AddUpdateCustomAdvertisementArgs(parser, 'router')
예제 #3
0
    def Args(cls, parser):
        cls.ROUTER_ARG = flags.RouterArgument()
        cls.ROUTER_ARG.AddArgument(parser, operation_type='update')

        parser.add_argument('--peer-name',
                            required=True,
                            help='The name of the peer being removed.')
    def Args(cls, parser):
        cls.ROUTER_ARG = flags.RouterArgument()
        cls.ROUTER_ARG.AddArgument(parser, operation_type='update')

        parser.add_argument('--peer-name',
                            required=True,
                            help='The name of the peer being modified.')

        parser.add_argument(
            '--interface',
            help='The new interface of the peer being modified.')

        parser.add_argument('--peer-asn',
                            type=int,
                            help='The new asn of the peer being modified.')

        parser.add_argument(
            '--ip-address',
            help='The new link local address of the router for this peer.')

        parser.add_argument('--peer-ip-address',
                            help='The new link local address of the peer.')

        parser.add_argument(
            '--advertised-route-priority',
            type=int,
            help=
            'The priority of routes advertised to this BGP peer. In the case '
            'where there is more than one matching route of maximum length, '
            'the routes with lowest priority value win. 0 <= priority <= '
            '65535.')
예제 #5
0
 def Args(cls, parser):
     cls.ROUTER_ARG = routers_flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser,
                                operation_type='get NAT mapping info')
     routers_flags.AddGetNatMappingInfoArgs(parser,
                                            cls.with_nat_name_filter)
     base.URI_FLAG.RemoveFromParser(parser)
예제 #6
0
 def Args(cls, parser):
     parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT)
     cls.NETWORK_ARG = network_flags.NetworkArgumentForOtherResource(
         'The network for this router')
     cls.NETWORK_ARG.AddArgument(parser)
     cls.ROUTER_ARG = flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser, operation_type='create')
     flags.AddCreateRouterArgs(parser)
예제 #7
0
    def Args(cls, parser):
        cls.ROUTER_ARG = router_flags.RouterArgument()
        cls.ROUTER_ARG.AddArgument(parser, operation_type='update')
        cls.VPN_TUNNEL_ARG = vpn_tunnel_flags.VpnTunnelArgumentForRouter(
            required=False, operation_type='updated')
        cls.VPN_TUNNEL_ARG.AddArgument(parser)

        router_flags.AddInterfaceArgs(parser, for_update=True)
예제 #8
0
 def _Args(cls, parser, support_bfd=False, support_enable=False):
     cls.ROUTER_ARG = flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser)
     base.ASYNC_FLAG.AddToParser(parser)
     flags.AddBgpPeerArgs(parser,
                          for_add_bgp_peer=True,
                          support_bfd=support_bfd,
                          support_enable=support_enable)
     flags.AddReplaceCustomAdvertisementArgs(parser, 'peer')
 def _Args(cls, parser, support_md5_authentication_keys=False):
     cls.ROUTER_ARG = flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser)
     base.ASYNC_FLAG.AddToParser(parser)
     flags.AddBgpPeerArgs(
         parser,
         for_add_bgp_peer=False,
         support_md5_authentication_keys=support_md5_authentication_keys,
         is_update=True)
     flags.AddUpdateCustomAdvertisementArgs(parser, 'peer')
 def _Args(cls, parser, support_md5_authentication_keys=False):
     cls.ROUTER_ARG = flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser)
     cls.INSTANCE_ARG = instance_flags.InstanceArgumentForRouter()
     cls.INSTANCE_ARG.AddArgument(parser)
     base.ASYNC_FLAG.AddToParser(parser)
     flags.AddBgpPeerArgs(
         parser,
         for_add_bgp_peer=True,
         support_md5_authentication_keys=support_md5_authentication_keys)
     flags.AddReplaceCustomAdvertisementArgs(parser, 'peer')
예제 #11
0
    def Args(cls, parser):
        """See base.CreateCommand."""

        parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT)
        cls.NETWORK_ARG = network_flags.NetworkArgumentForOtherResource(
            'The network for this router')
        cls.NETWORK_ARG.AddArgument(parser)
        cls.ROUTER_ARG = flags.RouterArgument()
        cls.ROUTER_ARG.AddArgument(parser, operation_type='create')
        base.ASYNC_FLAG.AddToParser(parser)
        flags.AddCreateRouterArgs(parser)
        flags.AddReplaceCustomAdvertisementArgs(parser, 'router')
예제 #12
0
 def _Args(cls, parser, support_keepalive_interval=False):
   parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT)
   cls.NETWORK_ARG = network_flags.NetworkArgumentForOtherResource(
       'The network for this router')
   cls.NETWORK_ARG.AddArgument(parser)
   cls.ROUTER_ARG = flags.RouterArgument()
   cls.ROUTER_ARG.AddArgument(parser, operation_type='create')
   base.ASYNC_FLAG.AddToParser(parser)
   flags.AddCreateRouterArgs(parser)
   if support_keepalive_interval:
     flags.AddKeepaliveIntervalArg(parser)
   flags.AddReplaceCustomAdvertisementArgs(parser, 'router')
   parser.display_info.AddCacheUpdater(flags.RoutersCompleter)
예제 #13
0
  def _Args(cls, parser):
    cls.ROUTER_ARG = flags.RouterArgument()
    cls.ROUTER_ARG.AddArgument(parser, operation_type='update')

    bgp_peer_parser = parser.add_mutually_exclusive_group(required=True)
    # TODO(b/170227243): deprecate --peer-name after --peer-names hit GA
    bgp_peer_parser.add_argument(
        '--peer-name', help='The name of the peer being removed.')
    bgp_peer_parser.add_argument(
        '--peer-names',
        type=arg_parsers.ArgList(),
        metavar='PEER_NAME',
        help='The list of names for peers being removed.')
예제 #14
0
    def Args(cls, parser):
        cls.ROUTER_ARG = router_flags.RouterArgument()
        cls.ROUTER_ARG.AddArgument(parser, operation_type='update')

        link_parser = parser.add_mutually_exclusive_group(required=True)

        cls.VPN_TUNNEL_ARG = vpn_tunnel_flags.VpnTunnelArgumentForRouter(
            required=False)
        cls.VPN_TUNNEL_ARG.AddArgument(link_parser)

        cls.INTERCONNECT_ATTACHMENT_ARG = (
            attachment_flags.InterconnectAttachmentArgumentForRouter())
        cls.INTERCONNECT_ATTACHMENT_ARG.AddArgument(link_parser)

        router_flags.AddInterfaceArgs(parser)
예제 #15
0
    def Args(cls, parser):
        cls.NETWORK_ARG = network_flags.NetworkArgumentForOtherResource(
            'The network for this router')
        cls.NETWORK_ARG.AddArgument(parser)
        cls.ROUTER_ARG = flags.RouterArgument()
        cls.ROUTER_ARG.AddArgument(parser, operation_type='create')

        parser.add_argument('--description',
                            help='An optional description of this router.')

        parser.add_argument(
            '--asn',
            required=True,
            type=int,
            # TODO(b/36051028): improve this help
            help='The BGP asn for this router')
예제 #16
0
  def Args(cls, parser):
    cls.ROUTER_ARG = flags.RouterArgument()
    cls.ROUTER_ARG.AddArgument(parser, operation_type='update')
    cls.VPN_TUNNEL_ARG = vpn_tunnel_flags.VpnTunnelArgumentForRouter()
    cls.VPN_TUNNEL_ARG.AddArgument(parser)

    parser.add_argument(
        '--interface-name',
        required=True,
        help='The name of the interface being added.')

    parser.add_argument(
        '--ip-address',
        type=utils.IPV4Argument,
        help='The link local address of the router for this interface.')

    parser.add_argument(
        '--mask-length',
        type=int,
        # TODO(b/36050233): better help
        help='The mask for network used for the server IP address.')
예제 #17
0
    def Args(cls, parser):
        cls.ROUTER_ARG = flags.RouterArgument()
        cls.ROUTER_ARG.AddArgument(parser, operation_type='update')

        parser.add_argument('--interface-name',
                            required=True,
                            help='The name of the interface being updated.')

        parser.add_argument('--vpn-tunnel',
                            help='The tunnel of the interface being updated.')

        parser.add_argument(
            '--ip-address',
            type=utils.IPV4Argument,
            help='The link local address of the router for this interface.')

        parser.add_argument(
            '--mask-length',
            type=int,
            # TODO(user): better help
            help='The mask for network used for the server IP address.')
예제 #18
0
    def _Args(cls, parser, support_remove_list=False):
        cls.ROUTER_ARG = flags.RouterArgument()
        cls.ROUTER_ARG.AddArgument(parser, operation_type='update')

        if support_remove_list:
            interface_parser = parser.add_mutually_exclusive_group(
                required=True)
            # TODO(b/170227243): deprecate --peer-name after --peer-names hit GA
            interface_parser.add_argument(
                '--interface-name',
                help='The name of the interface being removed.')
            interface_parser.add_argument(
                '--interface-names',
                type=arg_parsers.ArgList(),
                metavar='INTERFACE_NAME',
                help='The list of names for interfaces being removed.')
        else:
            parser.add_argument(
                '--interface-name',
                required=True,
                help='The name of the interface being removed.')
  def _Args(cls, parser):
    cls.ROUTER_ARG = router_flags.RouterArgument()
    cls.ROUTER_ARG.AddArgument(parser, operation_type='update')

    link_parser = parser.add_mutually_exclusive_group(required=True)

    vpn_tunnel_group = link_parser.add_argument_group('VPN Tunnel')
    cls.VPN_TUNNEL_ARG = vpn_tunnel_flags.VpnTunnelArgumentForRouter(
        required=False)
    cls.VPN_TUNNEL_ARG.AddArgument(vpn_tunnel_group)

    interconnect_attachment_group = link_parser.add_argument_group(
        'Interconnect Attachment')
    cls.INTERCONNECT_ATTACHMENT_ARG = (
        attachment_flags.InterconnectAttachmentArgumentForRouter())
    cls.INTERCONNECT_ATTACHMENT_ARG.AddArgument(interconnect_attachment_group)

    subnetwork_group = link_parser.add_argument_group('Subnetwork')
    cls.SUBNETWORK_ARG = (subnet_flags.SubnetworkArgumentForRouter())
    cls.SUBNETWORK_ARG.AddArgument(subnetwork_group)

    router_flags.AddInterfaceArgs(parser)
 def Args(cls, parser):
     cls.ROUTER_ARG = routers_flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser,
                                operation_type='get NAT mapping info')
     base.URI_FLAG.RemoveFromParser(parser)
예제 #21
0
 def Args(cls, parser):
     cls.ROUTER_ARG = flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser)
     router_utils.AddUpdateBgpPeerArgs(parser)
예제 #22
0
 def Args(cls, parser):
     cls.ROUTER_ARG = flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser)
     base.ASYNC_FLAG.AddToParser(parser)
     flags.AddBgpPeerArgs(parser, for_add_bgp_peer=True)
     flags.AddReplaceCustomAdvertisementArgs(parser, 'peer')
예제 #23
0
 def Args(cls, parser):
     cls.ROUTER_ARG = flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser)
     router_utils.AddUpdateBgpPeerArgs(parser)
     router_utils.AddCustomAdvertisementArgs(parser, 'peer')
예제 #24
0
 def Args(cls, parser):
   cls.ROUTER_ARG = flags.RouterArgument()
   cls.ROUTER_ARG.AddArgument(parser, operation_type='update')
   router_utils.AddCustomAdvertisementArgs(parser, 'router')
 def Args(cls, parser):
     cls.ROUTER_ARG = flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser, operation_type='update')
     flags.AddBgpPeerArgs(parser, for_add_bgp_peer=True)
예제 #26
0
 def Args(parser):
   Delete.ROUTER_ARG = flags.RouterArgument(plural=True)
   Delete.ROUTER_ARG.AddArgument(parser, operation_type='delete')
예제 #27
0
 def Args(cls, parser):
     cls.ROUTER_ARG = flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser, operation_type='update')
     base.ASYNC_FLAG.AddToParser(parser)
     flags.AddCustomAdvertisementArgs(parser, 'router')
예제 #28
0
 def Args(parser):
     Delete.ROUTER_ARG = flags.RouterArgument(plural=True)
     Delete.ROUTER_ARG.AddArgument(parser, operation_type='delete')
     parser.display_info.AddCacheUpdater(flags.RoutersCompleter)
예제 #29
0
 def Args(parser):
     Describe.ROUTER_ARG = flags.RouterArgument()
     Describe.ROUTER_ARG.AddArgument(parser, operation_type='describe')
예제 #30
0
 def Args(cls, parser):
     cls.ROUTER_ARG = flags.RouterArgument()
     cls.ROUTER_ARG.AddArgument(parser)
     flags.AddBgpPeerArgs(parser)