예제 #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)
예제 #2
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)

        flags.AddImportSubnetRoutesWithPublicIpFlag(parser)
        flags.AddExportSubnetRoutesWithPublicIpFlag(parser)