
                             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	rS
rSrSSSS.rS rS rS rS rS rS rg)z@Helper methods for configuring deployment manager command flags.    )absolute_import)division)unicode_literals)dm_api_util)arg_parsers)base)	arg_utilsa  
    table(
      resources:format='table(
        name,
        type:wrap,
        update.state.yesno(no="COMPLETED"),
        update.error.errors.group(code),
        update.intent)',
      outputs:format='table(
        name:label=OUTPUTS,
        finalValue:label=VALUE)'
    )
z
    table(
      name,
      operationType:label=TYPE,
      status,
      targetLink.basename():label=TARGET,
      error.errors.group(code),
      warnings.group(code)
    )
a  
    default(
      name, id, description, fingerprint,insertTime, manifest.basename(),
      labels, operation.operationType, operation.progress,
      operation.status, operation.user, operation.endTime, operation.startTime,
      operation.error, operation.warnings, update)
zDelete policy for resources that will change as part of an update or delete. `delete` deletes the resource while `abandon` just removes the resource reference from the deployment.deletez--delete-policy)help_strdefaultnamec                 Z    [         R                  " [        S   U [        S   [        S   S9$ )Nr   r   r   )r   r   )r	   ChoiceEnumMapper_DELETE_FLAG_KWARGS)policy_enums    :lib/googlecloudsdk/command_lib/deployment_manager/flags.pyGetDeleteFlagEnumMapr   G   s0    		#	#&!":.!),	
. .    c                 $    U R                  SSS9  g)Add properties flag.deployment_namezDeployment name.helpNadd_argumentparsers    r   AddDeploymentNameFlagr   O   s    '.@Ar   c                 d    U R                  SSS9  U R                  SSS9  U R                  SSS9  g)	z)Add flags for different types of configs.z--configzFilename of a top-level yaml config that specifies resources to deploy. For a guide to creating a configuration, refer to https://cloud.google.com/deployment-manager/docs/configuration/create-basic-configurationr   z
--templatez8Filename of a top-level jinja or python config template.z--composite-typezName of a composite type to deploy. For an example of creating and deploying a composite type, see: https://cloud.google.com/deployment-manager/docs/configuration/templates/create-composite-types#examplecompositetypeNr   r   s    r   AddConfigFlagsr    T   sV    #  $ 	E  G 	  r   c                 r    U R                  SS[        R                  " [        R                  " 5       S9SS9  g)r   z--propertieszgA comma separated, key:value, map to be used when deploying a template file or composite type directly.)	operators
properties)r   typedestN)r   r   ArgDictr   NewParserDictr   s    r   AddPropertiesFlagr(   i   s:     	N)B)B)DE  r   c                 B    [         R                  R                  U 5        g)zAdd the async argument.N)r   
ASYNC_FLAGAddToParserr   s    r   AddAsyncFlagr,   t   s    //f%r   c                 &    U R                  SSSS9  g)zAdd the fingerprint argument.z--fingerprinta  The fingerprint to use in requests to modify a deployment. If not specified, a get deployment request will be made to fetch the latest fingerprint. A fingerprint is a randomly generated value that is part of the update, stop, and cancel-preview request to perform optimistic locking. It is initially generated by Deployment Manager and changes after every request to modify data. The latest fingerprint is printed when deployment data is modified.fingerprint)r   r%   Nr   r   s    r   AddFingerprintFlagr/   y   s"       
r   N)__doc__
__future__r   r   r   )googlecloudsdk.api_lib.deployment_managerr   googlecloudsdk.callioper   r   $googlecloudsdk.command_lib.util.apisr	   RESOURCES_AND_OUTPUTS_FORMATOPERATION_FORMATDEPLOYMENT_FORMATr   r   r   r    r(   r,   r/    r   r   <module>r9      sl     G &  ' A / ( :  	    .B
*&
r   