
    ^                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ dd	l
mZ dd
Zd Zd ZddZddZd Zd ZddZddZddZddZddZy)z Flags for data-catalog commands.    )absolute_import)division)unicode_literals)concepts)	arg_utils)	yaml_data)concept_parsers)presentation_specsc                 $   |rd}nd}t         j                  j                  d      }t        j                  j                  |j                               }t        j                  ||dd      }t        j                  |g      j                  |       S )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                 6    | j                  ddt        d       y)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                 6    | j                  ddt        d       y)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-   5   s!    @	  r"   c                 6    | j                  ddt        |       y)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    AddInstanceMemoryGibArgToParser1   >   s!    ;	  r"   c                 6    | j                  ddt        |       y)-Adds virtual CPU Cores argument for Instance.z--virtual-cpu-coreszProcessor for the instancer$   N)r(   floatr0   s     r    $AddInstanceVirtualCpuCoresArgToParser5   G   s!    '	  r"   c                 V    | j                  dddddddt        j                  d	       y
)r3   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>   P   s<     
"
&
$	 -%%  r"   c                 8    | j                  dt        ddd       y )Nz--network-attachment-nameTappendz0Name of network attached to the instance created)r&   r   actionr%   r'   r*   s    r    *AddInstanceNetworkAttachmentNameArgToParserB   c   s$    !=  r"   c                 $   |rd}nd}t         j                  j                  d      }t        j                  j                  |j                               }t        j                  ||dd      }t        j                  |g      j                  |       S )+Sets up an argument for the image resource.imagez--imagezmps.power_imageTzimage.r   r   )r   r   r   
image_datar   r   s         r    AddImageArgToParserrG   m   s    DD))223DE*''001C1C1EF-(AA 	
 
	&	&(9':	;	G	G	OOr"   c                 $   |rd}nd}t         j                  j                  d      }t        j                  j                  |j                               }t        j                  ||dd      }t        j                  |g      j                  |       S )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    AddNetworkArgToParserrK   }       DD++445HI,''001E1E1GH-(AA 	
 
	&	&(9':	;	G	G	OOr"   c                 $   |rd}nd}t         j                  j                  d      }t        j                  j                  |j                               }t        j                  ||dd      }t        j                  |g      j                  |       S )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    AddVolumeArgToParserrP      s    DD**334FG+''001D1D1FG-(AA 	
 
	&	&(9':	;	G	G	OOr"   c                 $   |rd}nd}t         j                  j                  d      }t        j                  j                  |j                               }t        j                  ||dd      }t        j                  |g      j                  |       S )rD   ssh_keyz	--ssh_keyzmps.power_ssh_keyTzssh-key.r   r   )r   r   r   ssh_key_datar   r   s         r    AddSSHKeyArgToParserrT      rL   r"   c                 $   t         j                  j                  d      }t        j                  j                  |j                               }|rd}nd}t        j                  ||dd      }t        j                  |g      j                  |       S )zParses region flag.z
mps.regionregionz--regionFzregion.r   r   )r   r   region_datar   r   r   s         r    AddRegionArgToParserrX      s    **33LA+''001D1D1FG-DD(AA 	
 
	&	&(9':	;	G	G	OOr"   N)F)T)__doc__
__future__r   r   r    googlecloudsdk.calliope.conceptsr   $googlecloudsdk.command_lib.util.apisr   r   (googlecloudsdk.command_lib.util.conceptsr	   r
   r!   r+   r-   r1   r5   r>   rB   rG   rK   rP   rT   rX    r"   r    <module>r_      sd    ' &  ' 5 : : D GP &P P P P Pr"   