
    61                         S r SSK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 rS rS rSS jrSS jrSS jrSS jrS rS rS rS rSS jrS\R6                  SS4S jrg)z Flags for data-catalog commands.    N)arg_parsers)concepts)	yaml_data)concept_parsers)presentation_specsc                 *   SnU(       a  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      $ )z2Sets up an argument for the privatecloud resource.z--private-cloudprivate_cloudzvmware.private_cloudTzprivate_cloud.nameconcept_specrequired
group_helpr   ResourceYAMLDataFromPathr   ResourceSpecFromYamlGetDatar   ResourcePresentationSpecr   ConceptParserAddToParser)parser
positionalr   privatecloud_dataresource_specpresentation_specs         .lib/googlecloudsdk/command_lib/vmware/flags.pyAddPrivatecloudArgToParserr      s    	$D0099 ''001B1J1J1LM-(AA !	 
	&	&(9':	;	G	G	OO    c                    [         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " SUSSS9n[        R                  " U/5      R                  U 5      $ )z/Sets up an argument for the operation resource.zvmware.operation	operationTz
operation.r
   r   )r   operation_datar   r   s       r   AddOperationArgToParserr#   -   sw    --667IJ.''001G1G1IJ-(AA 	 
	&	&(9':	;	G	G	OOr   c                    [         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " SUSSS9n[        R                  " U/5      R                  U 5      $ )z,Sets up an argument for the subnet resource.zvmware.subnetsubnetTzsubnet.r
   r   r   address_datar   r   s       r   AddSubnetArgToParserr(   :   sx     ++44_E,''001E1E1GH-(AA 	 
	&	&(9':	;	G	G	OOr   c                 J   U(       a  SnOSn[         R                  R                  S5      n[        R                  R                  UR                  5       5      nSnU(       a  SSS.n[        R                  " UUSSUS	9n[        R                  " U/5      R                  U 5      $ )
z-Sets up an argument for the cluster resource.clusterz	--clusterzvmware.clusterN )locationzprivate-cloudTzcluster.r   r   r   r   flag_name_overridesr   )r   r   hide_resource_argument_flagsr   cluster_datar   r.   r   s           r   AddClusterArgToParserr1   I   s     DD++445EF,''001E1E1GH-!')B?(AA - 
	&	&(9':	;	G	G	OOr   c                    [         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " SUSSS9n[        R                  " U/5      R                  U 5      $ )z6Sets up an argument for the external address resource.zvmware.external_addressexternal_addressTzexternal_address.r
   r   r&   s       r   AddExternalAddressArgToParserr4   a   sy     ++445NO,''001E1E1GH-(AA $	 
	&	&(9':	;	G	G	OOr   c                    Sn[         R                  R                  U5      n[        R                  R                  UR                  5       5      n[        R                  " SUSSS9n[        R                  " U/5      R                  U 5      $ )zASets up an argument for the management DNS zone binding resource.z"vmware.management_dns_zone_bindingmanagement_dns_zone_bindingTzmanagement_dns_zone_binding.r
   r   )r   pathr'   r   r   s        r   &AddManagementDnsZoneBindingArgToParserr8   p   s}     
.$++44T:,''001E1E1GH-(AA( /	 
	&	&(9':	;	G	G	OOr   c                    [         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " SUSSS9n[        R                  " U/5      R                  U 5      $ )z8Sets up an argument for the HCX activation key resource.zvmware.hcx_activation_keyhcx_activation_keyTzhcxactivationkey.r
   r   )r   hcx_activation_key_datar   r   s       r   AddHcxActivationKeyArgToParserr<      s    %66??! ''00%%'- )AA $	 
	&	&(9':	;	G	G	OOr   c                 v   [         R                  R                  S5      nU(       a  [         R                  R                  S5      n[        R                  R                  UR                  5       5      nSnU(       a  Sn[        R                  " UUSSS9n[        R                  " U/5      R                  U 5      $ )zParses location flag.zvmware.locationzvmware.regional_locationz
--locationr,   Tz	location.r
   r   )r   regionalr   location_datar   r   r   s          r   AddLocationArgToParserr@      s    ,,556GH-..77"M ''001F1F1HI-	$D(AA 	 
	&	&(9':	;	G	G	OOr   c                 :   U(       a  SnSnOSnSS0n[         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " UUSSUS	9n[        R                  " U/5      R                  U 5      $ )
zParses node type flag.	node_typeNz--node-typer,   r+   zvmware.node_typeTz
node_type.r-   r   )r   r   r   r.   r?   r   r   s          r   AddNodeTypeArgToParserrC      s     DD%r*,,556HI-''001F1F1HI-(AA - 
	&	&(9':	;	G	G	OOr   c                 *   SnU(       a  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Parses project flag.z	--projectprojectzvmware.projectTzproject.r
   r   )r   r   r   project_datar   r   s         r   AddProjectArgToParserrG      s    	$D++445EF,''001E1E1GH-(AA 	 
	&	&(9':	;	G	G	OOr   c                 *   SnU(       a  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      $ )z8Sets up an argument for the Private Connection resource.z--private-connectionprivate_connectionzvmware.private_connectionTzprivate_connection.r
   r   )r   r   r   private_connection_datar   r   s         r   AddPrivateConnectionToParserrK      s    	$D%66??! ''00%%'- )AA &	 
	&	&(9':	;	G	G	OOr   c                    [         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " SUSSS9n[        R                  " U/5      R                  U 5      $ )z4Sets up an argument for the Logging Server resource.zvmware.logging_serverlogging_serverTzlogging_server.r
   r   )r   logging_server_datar   r   s       r   AddLoggingServerArgToParserrO      s     "22;; ''001D1L1L1NO-(AA "	 
	&	&(9':	;	G	G	OOr   c                    [         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " SUSSS9n[        R                  " U/5      R                  U 5      $ )z5Sets up an argument for the Identity Source resource.zvmware.identity_sourceidentity_sourceTzidentity_source.r
   r   )r   resource_datar   r   s       r   AddIdentitySourceArgToParserrS      sy     ,,556NO-''001F1F1HI-(AA #	 
	&	&(9':	;	G	G	OOr   c                    [         R                  R                  S5      n[        R                  R                  UR                  5       5      n[        R                  " SUSSS9n[        R                  " U/5      R                  U 5      $ )z*Sets up an argument for the node resource.zvmware.nodenodeTznode.r
   r   )r   	node_datar   r   s       r   AddNodeArgToParserrW      su     ((11-@)''001B1B1DE-(AA 
	&	&(9':	;	G	G	OOr   c                    U R                  SSS9nUR                  5       nUR                  S[        SS9  UR                  S[        SS9  UR                  S	[        S
S9  UR                  S[
        R                  " [        [        [        [        [        [        [        [        [        [        [        [        [        S./ SQS9S[        5       SS9  UR                  S[
        R                  " 5       SS9  g)zSets up autoscaling settings flags.

There are two mutually exclusive options to pass the autoscaling settings:
through command line arguments or as a yaml file.

Args:
  parser: arg_parser instance that will have the flags added.
FT)r   hiddenz$--autoscaling-min-cluster-node-countz&Minimum number of nodes in the cluster)typehelpz$--autoscaling-max-cluster-node-countz&Maximum number of nodes in the clusterz--autoscaling-cool-down-periodzQCool down period (in minutes) between consecutive cluster expansions/contractionsz--autoscaling-policy)r   node-type-idscale-out-sizezmin-node-countzmax-node-countzcpu-thresholds-scale-inzcpu-thresholds-scale-outz"granted-memory-thresholds-scale-inz#granted-memory-thresholds-scale-outz#consumed-memory-thresholds-scale-inz$consumed-memory-thresholds-scale-outzstorage-thresholds-scale-inzstorage-thresholds-scale-out)r   r\   r]   )specrequired_keysappendz/Autoscaling policy to be applied to the cluster)rZ   actiondefaultr[   z --autoscaling-settings-from-filezLA YAML file containing the autoscaling settings to be applied to the clusterN)	add_mutually_exclusive_group	add_groupadd_argumentintstrr   ArgDictlistYAMLFileContents)r   autoscaling_settings_group"inlined_autoscaling_settings_groups      r   #AddAutoscalingSettingsFlagsToParserrm     s     &BBT  C   (B'K'K'M$$11,3 2 
 %11,3 2 
 %11&%	 2  %11! # # #),*-47585869-0.1 C!$ f<- 2 0 ))('')	 * r   c                 *   SnU(       a  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 datastore resource.z--datastore	datastorezvmware.datastoreTz
datastore.r
   r   )r   r   r   datastore_datar   r   s         r   AddDatastoreArgToParserrq   L  s    	$D--66. ''001G1G1IJ-(AA 	 
	&	&(9':	;	G	G	OOr   r   returnc                    [         R                  R                  S5      n[        R                  " S[
        R                  R                  UR                  5       5      SSSS9n[        R                  " U/5      R                  U 5      $ )z-Sets up an argument for the upgrade resource.zvmware.upgradeupgradeTzupgrade.Nr-   )r   r   r   r   r   r   r   r   r   r   r   r   )r   upgrade_datar   s      r   AddUpgradeArgToParserrv   ^  sw     ++445EF,(AA((11,2F2F2HI 
	&	&(9':	;	G	G	OOr   )F)FF)__doc__argparsegooglecloudsdk.callioper    googlecloudsdk.calliope.conceptsr   $googlecloudsdk.command_lib.util.apisr   (googlecloudsdk.command_lib.util.conceptsr   r   r   r#   r(   r1   r4   r8   r<   r@   rC   rG   rK   rO   rS   rW   rm   rq   ArgumentParserrv    r   r   <module>r      s    '  / 5 : D GP$
PP  <AP0PP P"P(P,P$P(P P	P>BP$P##P	Pr   