Example #1
0
 def Args(parser):
   flags.AddInstance(parser)
   flags.AddUsername(parser)
   flags.AddHost(parser)
   flags.AddPassword(parser)
   base.ASYNC_FLAG.AddToParser(parser)
   parser.display_info.AddCacheUpdater(flags.UserCompleter)
Example #2
0
def AddBaseArgs(parser):
    flags.AddInstance(parser)
    flags.AddUsername(parser)
    flags.AddHost(parser)
    password_group = parser.add_mutually_exclusive_group()
    flags.AddPassword(password_group)
    flags.AddPromptForPassword(password_group)
Example #3
0
 def Args(parser):
   flags.AddInstance(parser)
   parser.display_info.AddFormat("""
     table(
       id,
       windowStartTime.iso(),
       error.code.yesno(no="-"):label=ERROR,
       status
     )
   """)
Example #4
0
    def Args(parser):
        """Args is called by calliope to gather arguments for this command.

    Args:
      parser: An argparse parser that you can use it to add arguments that go
          on the command line after this command. Positional arguments are
          allowed.
    """
        flags.AddDatabaseName(parser)
        flags.AddInstance(parser)
  def Args(parser):
    """Args is called by calliope to gather arguments for this command.

    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.
    """
    base.ASYNC_FLAG.AddToParser(parser)
    flags.AddBackupRunId(parser)
    flags.AddInstance(parser)
    parser.display_info.AddCacheUpdater(None)
Example #6
0
  def Args(parser):
    """Args is called by calliope to gather arguments for this command.

    Args:
      parser: An argparse parser that you can use it to add arguments that go
          on the command line after this command. Positional arguments are
          allowed.
    """
    parser.add_argument(
        'common_name',
        help='User supplied name. Constrained to ```[a-zA-Z.-_ ]+```.')
    flags.AddInstance(parser)
Example #7
0
 def Args(parser):
   """Declare flag and positional arguments for the command parser."""
   parser.add_argument(
       'common_name',
       help='User supplied name. Constrained to ```[a-zA-Z.-_ ]+```.')
   parser.add_argument(
       'cert_file',
       default=None,
       help=('Location of file which the private key of the created ssl-cert'
             ' will be written to.'))
   flags.AddInstance(parser)
   parser.display_info.AddFormat(flags.CLIENT_CERTS_FORMAT)
Example #8
0
    def Args(parser):
        """Args is called by calliope to gather arguments for this command.

    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.
    """
        parser.add_argument('id',
                            type=arg_parsers.BoundedInt(1, sys.maxsize),
                            help='The ID of the Backup Run.')
        flags.AddInstance(parser)
 def Args(parser):
     flags.AddInstance(parser, True)
     parser.display_info.AddFormat("""
   table(
     id,
     windowStartTime.iso(),
     error.code.yesno(no="-"):label=ERROR,
     status,
     instance
   )
 """)
     parser.display_info.AddCacheUpdater(None)
Example #10
0
  def Args(parser):
    """Args is called by calliope to gather arguments for this command.

    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.AddInstance(parser)
    parser.add_argument(
        '--description', help='A friendly description of the backup.')
    base.ASYNC_FLAG.AddToParser(parser)
    parser.display_info.AddCacheUpdater(None)
Example #11
0
    def Args(parser):
        """Args is called by calliope to gather arguments for this command.

    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.AddInstance(parser)
        parser.add_argument('--description',
                            help='A friendly description of the backup.')
        parser.add_argument('--async',
                            action='store_true',
                            help='Do not wait for the operation to complete.')
Example #12
0
    def Args(parser):
        """Args is called by calliope to gather arguments for this command.

    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.
    """
        parser.add_argument(
            'id',
            # TODO(b/21877717): uncomment validation after deprecation period.
            # type=arg_parsers.BoundedInt(1, sys.maxint),
            help='The ID of the Backup Run.')
        flags.AddInstance(parser)
    def Args(parser):
        """Args is called by calliope to gather arguments for this command.

    Args:
      parser: An argparse parser that you can use it to add arguments that go
          on the command line after this command. Positional arguments are
          allowed.
    """
        flags.AddInstance(parser)
        flags.AddUsername(parser)
        flags.AddHost(parser)
        password_group = parser.add_mutually_exclusive_group()
        flags.AddPassword(password_group)
        flags.AddPromptForPassword(password_group)
        base.ASYNC_FLAG.AddToParser(parser)
Example #14
0
    def Args(parser):
        """Args is called by calliope to gather arguments for this command.

    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.
    """
        base.ASYNC_FLAG.AddToParser(parser)
        parser.add_argument(
            'id',
            type=arg_parsers.BoundedInt(1, sys.maxint),
            help="""The ID of the backup run. You can find the ID by running
            $ gcloud beta sql backups list.""")
        flags.AddInstance(parser)
Example #15
0
    def Args(parser):
        """Args is called by calliope to gather arguments for this command.

    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.AddInstance(parser)
        parser.display_info.AddFormat("""
      table(
          name,
          charset,
          collation
        )
      """)
def AddBaseArgs(parser):
    """Args is called by calliope to gather arguments for this command.

  Args:
    parser: An argparse parser that you can use it to add arguments that go on
      the command line after this command. Positional arguments are allowed.
  """
    flags.AddInstance(parser)
    flags.AddUsername(parser)
    flags.AddHost(parser)
    flags.AddPasswordPolicyAllowedFailedAttempts(parser)
    flags.AddPasswordPolicyPasswordExpirationDuration(parser)
    flags.AddPasswordPolicyEnableFailedAttemptsCheck(parser)
    flags.AddPasswordPolicyClearPasswordPolicy(parser)
    base.ASYNC_FLAG.AddToParser(parser)
    parser.display_info.AddCacheUpdater(None)
Example #17
0
def AddBaseArgs(parser):
    """AddBaseArgs is called to gather arguments for this command.

  Args:
    parser: An argparse parser that you can use it to add arguments that go on
      the command line after this command. Positional arguments are allowed.
  """

    flags.AddInstance(parser)
    flags.AddUsername(parser)
    flags.AddHost(parser)
    flags.AddPassword(parser)
    flags.AddType(parser)
    flags.AddPasswordPolicyAllowedFailedAttempts(parser)
    flags.AddPasswordPolicyPasswordExpirationDuration(parser)
    flags.AddPasswordPolicyEnableFailedAttemptsCheck(parser)
Example #18
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.AddCharset(parser)
        flags.AddCollation(parser)
        flags.AddDatabaseName(parser)
        flags.AddInstance(parser)
        parser.add_argument('--diff',
                            action='store_true',
                            help='Show what changed as a result of the patch.')
Example #19
0
    def Args(parser):
        """Args is called by calliope to gather arguments for this command.

    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.AddInstance(parser)
        parser.add_argument('--description',
                            help='A friendly description of the backup.')
        parser.add_argument(
            '--location',
            help=(
                'Choose where to store your backup. Backups are stored in the '
                'closest multi-region location to you by default. Only '
                'customize if needed.'))
        base.ASYNC_FLAG.AddToParser(parser)
        parser.display_info.AddCacheUpdater(None)
Example #20
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.AddCharset(parser)
        custom_help = (
            'Cloud SQL database collation setting, which specifies '
            'the set of rules for comparing characters in a character set. Each'
            ' database version may support a different set of collations. This flag'
            ' can\'t be used with PostgreSQL instances.')
        flags.AddCollation(parser, custom_help)
        flags.AddDatabaseName(parser)
        flags.AddInstance(parser)
        parser.add_argument('--diff',
                            action='store_true',
                            help='Show what changed as a result of the patch.')
        parser.display_info.AddFormat('table(new:format="default")')
Example #21
0
 def Args(parser):
     flags.AddInstance(parser)
     parser.display_info.AddFormat(flags.OPERATION_FORMAT_BETA)
     parser.display_info.AddCacheUpdater(None)
Example #22
0
def AddBaseArgs(parser):
  flags.AddInstance(parser)
  parser.display_info.AddCacheUpdater(flags.UserCompleter)
Example #23
0
 def Args(parser):
     """Declare flag and positional arguments for the command parser."""
     base.ASYNC_FLAG.AddToParser(parser)
     flags.AddInstance(parser)
     parser.display_info.AddFormat(flags.SERVER_CA_CERTS_FORMAT)
Example #24
0
 def Args(parser):
     flags.AddInstance(parser)
     flags.AddUsername(parser)
     flags.AddHost(parser)
     flags.AddPassword(parser)
     base.ASYNC_FLAG.AddToParser(parser)
Example #25
0
 def Args(parser):
     flags.AddInstance(parser)
     # TODO(b/36473146): Add an output format test to kill a mutant.
     parser.display_info.AddFormat(flags.USERS_FORMAT_BETA)
     parser.display_info.AddCacheUpdater(flags.UserCompleter)
Example #26
0
 def Args(parser):
   flags.AddInstance(parser)
   parser.display_info.AddFormat(flags.CLIENT_CERTS_FORMAT)
Example #27
0
 def Args(parser):
     flags.AddInstance(parser)
     parser.display_info.AddFormat(flags.SERVER_CA_CERTS_FORMAT)
Example #28
0
def AddBaseArgs(parser):
  flags.AddInstance(parser)
  flags.AddUsername(parser)
  flags.AddHost(parser)
  flags.AddPassword(parser)