
    	                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSKJr  S	S
S.r\R                  " \R                  R                   \R                  R"                  5       " S S\R$                  5      5       r\\l        g)z)Bare Metal Solution SSH keys add command.    )absolute_import)division)unicode_literals)	BmsClient)base)flags)fileszO
          Add a public SSH key to the project in Bare Metal Solution.
        a  
          To add an SSH key called ``my-ssh-key'' in project ``my-project''
          with a public key ``ABC6695''

          $ {command} my-ssh-key --project=my-project --key=ABC6695

          To add an SSH key called ``my-ssh-key'' in project ``my-project''
          with a public key stored in /home/user/.ssh/id_rsa.pub

          $ {command} my-ssh-key --project=my-project --key-file=/home/user/.ssh/id_rsa.pub
    )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)Add/   z;Add a public SSH key to the project in Bare Metal Solution.c                     [         R                  " U SS9  U R                  SS9nUR                  SSS9  UR                  SSS9  g	)
z Register flags for this command.T)
positional)requiredz--keyzThe SSH public key to add)helpz
--key-filez6The path to a file containing an SSH public key to addN)r   AddSshKeyArgToParseradd_mutually_exclusive_groupadd_argument)parserkey_args     lib/surface/bms/ssh_keys/add.pyArgsAdd.Args3   sU     
v$71141@G'BCF  I    c                    [        5       nUR                  (       a!  [        R                  " UR                  5      nOUR                  nUR                  UR                  R                  R                  5       UR                  5       S9$ )N)resource
public_key)
r   key_filer	   ReadFileContentskeyCreateSshKeyCONCEPTSssh_keyParsestrip)selfargsclientr   s       r   RunAdd.Run=   sh    [F}}))$--8j88j&&,,.:;K;K;M  O Or    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r*   __static_attributes__r,   r   r   r   r   /   s    CI IOr   r   N)r1   
__future__r   r   r   %googlecloudsdk.api_lib.bms.bms_clientr   googlecloudsdk.callioper   googlecloudsdk.command_lib.bmsr   googlecloudsdk.core.utilr	   DETAILED_HELPReleaseTracksReleaseTrackALPHAGACreateCommandr   detailed_helpr,   r   r   <module>r@      s    0 &  ' ; ( 0 *
	
	( D%%++T->->-A-ABO$

 O CO. " r   