
                             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 jr	S r
S	 rSS
 jrSS jrS rS rSS jrSS jrSS jrSS jrSS jrg)z Flags for data-catalog commands.    )concepts)	arg_utils)	yaml_data)concept_parsers)presentation_specsc                 ,   U(       a  SnOSn[         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " UUSSS9n[        R                  " U/5      R                  U 5      $ )z.Sets up an argument for the instance resource.instancez
--instancezmps.power_instanceTz	instance.nameconcept_specrequired
group_helpr   ResourceYAMLDataFromPathr   ResourceSpecFromYamlGetDatar   ResourcePresentationSpecr   ConceptParserAddToParser)parser
positionalr   instance_dataresource_specpresentation_specs         +lib/googlecloudsdk/command_lib/mps/flags.pyAddInstanceArgToParserr      s    DD,,556JK-''001F1F1HI-(AA 	
 
	&	&(9':	;	G	G	OO    c                 0    U R                  SS[        SS9  g)z'Adds system type argument for Instance.z--system-typez%IBM Power system type of the instanceThelptyper   Nadd_argumentstrr   s    r   AddInstanceSystemTypeArgToParser(   )   s!    2	  r   c                 0    U R                  SS[        SS9  g)z+Adds name of boot image to create Instance.z--boot-image-namez3Name of the boot image used to create this instanceTr!   Nr$   r'   s    r   "AddInstanceBootImageNameArgToParser*   2   s!    @	  r   c                 0    U R                  SS[        US9  g)z$Adds memory size to create Instance.z--memory-gibz.The memory size used to create instance in Gibr!   N)r%   intr   r   s     r   AddInstanceMemoryGibArgToParser.   ;   s!    ;	  r   c                 0    U R                  SS[        US9  g)-Adds virtual CPU Cores argument for Instance.z--virtual-cpu-coreszProcessor for the instancer!   N)r%   floatr-   s     r   $AddInstanceVirtualCpuCoresArgToParser2   D   s!    '	  r   c                 P    U R                  SSSSSS.S[        R                  SS	9  g
)r0   z--virtual-cpu-typeUnspecifiedzDedicated processors. zUncapped shared processorszCapped shared processors)UNSPECIFIED	DEDICATEDUNCAPPED_SHAREDCAPPED_SHAREDzProcessor type for the instanceT)choicesr"   r#   r   N)r%   r   ChoiceToEnumNamer'   s    r   #AddInstanceVirtualCpuTypeArgToParser;   M   s<     
"
&
$	 -%%  r   c                 2    U R                  S[        SSSS9  g )Nz--network-attachment-nameTappendz0Name of network attached to the instance created)r#   r   actionr"   r$   r'   s    r   *AddInstanceNetworkAttachmentNameArgToParser?   `   s$    !=  r   c                 ,   U(       a  SnOSn[         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " UUSSS9n[        R                  " U/5      R                  U 5      $ )+Sets up an argument for the image resource.imagez--imagezmps.power_imageTzimage.r
   r   )r   r   r   
image_datar   r   s         r   AddImageArgToParserrD   j   s    DD))223DE*''001C1C1EF-(AA 	
 
	&	&(9':	;	G	G	OOr   c                 ,   U(       a  SnOSn[         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " UUSSS9n[        R                  " U/5      R                  U 5      $ )z-Sets up an argument for the network resource.networkz	--networkzmps.power_networkTznetwork.r
   r   )r   r   r   network_datar   r   s         r   AddNetworkArgToParserrH   z       DD++445HI,''001E1E1GH-(AA 	
 
	&	&(9':	;	G	G	OOr   c                 ,   U(       a  SnOSn[         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " UUSSS9n[        R                  " U/5      R                  U 5      $ )z,Sets up an argument for the volume resource.volumez--volumezmps.power_volumeTzvolume.r
   r   )r   r   r   volume_datar   r   s         r   AddVolumeArgToParserrM      s    DD**334FG+''001D1D1FG-(AA 	
 
	&	&(9':	;	G	G	OOr   c                 ,   U(       a  SnOSn[         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " UUSSS9n[        R                  " U/5      R                  U 5      $ )rA   ssh_keyz	--ssh_keyzmps.power_ssh_keyTzssh-key.r
   r   )r   r   r   ssh_key_datar   r   s         r   AddSSHKeyArgToParserrQ      rI   r   c                 ,   [         R                  R                  S5      n[        R                  R                  UR                  5       5      nU(       a  SnOSn[        R                  " UUSSS9n[        R                  " U/5      R                  U 5      $ )zParses region flag.z
mps.regionregionz--regionFzregion.r
   r   )r   r   region_datar   r   r   s         r   AddRegionArgToParserrU      s    **33LA+''001D1D1FG-DD(AA 	
 
	&	&(9':	;	G	G	OOr   N)F)T)__doc__ googlecloudsdk.calliope.conceptsr   $googlecloudsdk.command_lib.util.apisr   r   (googlecloudsdk.command_lib.util.conceptsr   r   r   r(   r*   r.   r2   r;   r?   rD   rH   rM   rQ   rU    r   r   <module>r[      s]    ' 6 : : D GP &P P P P Pr   