コード例 #1
0
    def Args(parser):
        user_utils.AddUserArgument(
            parser,
            '',
            custom_help=(
                'If provided, the name of the user to add a public key to. '
                'Else, the default user will be used.'))

        parser.add_argument('--public-key-files',
                            required=True,
                            type=arg_parsers.ArgList(min_length=1),
                            metavar='LOCAL_FILE_PATH',
                            help='The path to a public-key file.')

        parser.add_argument('--description',
                            help='A description of the public keys')

        parser.add_argument('--expire',
                            type=arg_parsers.Duration(),
                            help="""\
        Public keys can be configured to expire after a specified amount
        of time. For example, specifying ``12h'' will cause the key to expire
        after 12 hours. Valid units for this flag are ``s'' for seconds, ``m''
        for minutes, ``h'' for hours, and ''d'' for days.
        """)
コード例 #2
0
  def Args(parser):
    parser.add_argument(
        '--fingerprints',
        type=arg_parsers.ArgList(min_length=1),
        metavar='FINGERPRINT',
        help='The fingerprints of the public keys to remove from the user.')

    user_utils.AddUserArgument(parser, '', custom_help=(
        'If provided, the name of the user to remove public keys from. '
        'Else, the default user will be used.'))
コード例 #3
0
  def Args(parser):
    parser.display_info.AddFormat(user_utils.DEFAULT_LIST_FORMAT)
    parser.add_argument(
        '--owner',
        help=('The owner of the user to be created. The owner must be an email '
              'address associated with a Google account'))

    parser.add_argument(
        '--description',
        help='An optional, textual description for the user being created.')

    user_utils.AddUserArgument(parser, 'create')
コード例 #4
0
  def Args(parser):
    user_utils.AddUserArgument(parser, '', custom_help=(
        'If provided, the name of the user to add a public key to. '
        'Else, the default user will be used.'))

    parser.add_argument(
        '--public-key-files',
        required=True,
        type=arg_parsers.ArgList(min_length=1),
        metavar='LOCAL_FILE_PATH',
        help='The path to a public-key file.')

    parser.add_argument(
        '--description',
        help='A description of the public keys')

    expiration = parser.add_argument(
        '--expire',
        help='How long until the public keys expire, e.g. 7d for 7 days',
        type=arg_parsers.Duration())
    expiration.detailed_help = """\
コード例 #5
0
ファイル: describe.py プロジェクト: mzha/HomewardBound
 def Args(parser):
     user_utils.AddUserArgument(parser, 'describe')