예제 #1
0
  def Args(parser):
    """Args is called by calliope to gather arguments for this command.

    Please add arguments in alphabetical order except for no- or a clear-
    pair for that argument which can follow the argument itself.
    Args:
      parser: An argparse parser that you can use to add arguments that go
          on the command line after this command. Positional arguments are
          allowed.
    """
    flags.Instance().AddToParser(parser)
    flags.Description(required=False).AddToParser(parser)
    flags.Nodes(required=False).AddToParser(parser)
    base.ASYNC_FLAG.AddToParser(parser)
예제 #2
0
    def Args(parser):
        """Args is called by calliope to gather arguments for this command.

    Please add arguments in alphabetical order except for no- or a clear-
    pair for that argument which can follow the argument itself.
    Args:
      parser: An argparse parser that you can use to add arguments that go
          on the command line after this command. Positional arguments are
          allowed.
    """
        flags.Instance().AddToParser(parser)
        flags.Config().AddToParser(parser)
        flags.Description().AddToParser(parser)
        group_parser = parser.add_argument_group(mutex=True, required=True)
        flags.Nodes().AddToParser(group_parser)
        flags.ProcessingUnits().AddToParser(group_parser)
        base.ASYNC_FLAG.AddToParser(parser)
        parser.display_info.AddCacheUpdater(flags.InstanceCompleter)
예제 #3
0
  def Args(parser):
    """Args is called by calliope to gather arguments for this command.

    Please add arguments in alphabetical order except for no- or a clear-
    pair for that argument which can follow the argument itself.
    Args:
      parser: An argparse parser that you can use to add arguments that go
          on the command line after this command. Positional arguments are
          allowed.
    """
    flags.Instance().AddToParser(parser)
    parser.add_argument(
        '--config',
        required=True,
        completion_resource='spanner.projects.instanceConfigs',
        help='Instance config for the instance.')
    flags.Description().AddToParser(parser)
    flags.Nodes().AddToParser(parser)
    base.ASYNC_FLAG.AddToParser(parser)