Beispiel #1
0
    def ArgsCommon(cls, parser):

        parser.add_argument('name', help='The name of the peering.')

        parser.add_argument(
            '--network',
            required=True,
            help='The name of the network in the current project to be peered '
            'with the peer network.')

        parser.add_argument(
            '--peer-network',
            required=True,
            help=
            'The name of the network to be peered with the current network.')

        parser.add_argument(
            '--peer-project',
            required=False,
            help=
            'The name of the project for the peer network.  If not specified, '
            'defaults to current project.')

        base.ASYNC_FLAG.AddToParser(parser)

        if cls.enable_custom_route:
            flags.AddImportCustomRoutesFlag(parser)
            flags.AddExportCustomRoutesFlag(parser)

        if cls.enable_subnet_routes_with_public_ip:
            flags.AddImportSubnetRoutesWithPublicIpFlag(parser)
            flags.AddExportSubnetRoutesWithPublicIpFlag(parser)
Beispiel #2
0
 def Args(parser):
     parser.add_argument('name', help='The name of the peering.')
     parser.add_argument(
         '--network',
         required=True,
         help='The name of the network in the current project to be peered '
         'with the peer network.')
     flags.AddImportCustomRoutesFlag(parser)
     flags.AddExportCustomRoutesFlag(parser)
Beispiel #3
0
    def Args(cls, parser):
        parser.add_argument('name', help='The name of the peering.')
        parser.add_argument(
            '--network',
            required=True,
            help='The name of the network in the current project to be peered '
            'with the peer network.')
        flags.AddImportCustomRoutesFlag(parser)
        flags.AddExportCustomRoutesFlag(parser)

        if cls.enable_subnet_routes_with_public_ip:
            flags.AddImportSubnetRoutesWithPublicIpFlag(parser)
            flags.AddExportSubnetRoutesWithPublicIpFlag(parser)
Beispiel #4
0
    def Args(parser):
        super(CreateAlphaBeta, CreateAlphaBeta).ArgsCommon(parser)
        flags.AddImportCustomRoutesFlag(parser)
        flags.AddExportCustomRoutesFlag(parser)

        action = actions.DeprecationAction(
            'auto-create-routes',
            warn='Flag --auto-create-routes is deprecated and will '
            'be removed in a future release.',
            action='store_true')
        parser.add_argument(
            '--auto-create-routes',
            action=action,
            default=False,
            required=False,
            help='If set, will automatically create routes for the '
            'network peering. Flag auto-create-routes is deprecated. Peer network '
            'subnet routes are always created in a network when peered.')
Beispiel #5
0
 def Args(parser):
   super(CreateAlpha, CreateAlpha).Args(parser)
   flags.AddImportCustomRoutesFlag(parser)
   flags.AddExportCustomRoutesFlag(parser)