
                         :    S r SSKJr  SSKJr  SS jrS	S jrS rg)
zFlags for OS Login subcommands.    )arg_parsers)filesc                     U R                  SS9nUR                  SSR                  X5      S9  UR                  SSR                  X5      S9  g)	z4Adds --key and --key-file flags to oslogin commands.T)requiredz--keyzG          The SSH public key to {0} the OS Login Profile.{1}
          )helpz
--key-filezn          The path to a file containing an SSH public key to {0} the
          OS Login Profile.{1}
          N)add_mutually_exclusive_groupadd_argumentformat)parseractionadditional_helpkey_args       /lib/googlecloudsdk/command_lib/oslogin/flags.pyAddKeyFlagsr      sc    ///>'	fV-	  / 
 fV-  /    c                 N    U R                  S[        R                  " 5       USS9  g )Nz--ttlaO            The amount of time before the SSH key expires. For example,
          specifying ``30m'' will set the expiration time on the SSH key for
          30 minutes from the current time. A value of 0 will result in no
          expiration time.
          See $ gcloud topic datetimes for information on duration formats.
          )typer   r   )r	   r   Duration)r   r   s     r   
AddTtlFlagr   (   s,    !	  
r   c                     U R                   (       a"  [        R                  " U R                   5      nU$ U R                  nU$ )N)key_filer   ReadFileContentskey)argsr   s     r   GetKeyFromArgsr   6   s4    	]]

 
 
/C 
* ((C	*r   N) )F)__doc__googlecloudsdk.callioper   googlecloudsdk.core.utilr   r   r   r    r   r   <module>r!      s!    & 0 */$r   