
                             S r SSKJr  SSKJr  SSKJ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KJr  SSKJr   " S S\R"                  5      rg)z3gcloud dns record-sets transaction execute command.    )absolute_import)division)unicode_literalsN)import_util)transaction_util)util)base)flags)log)
propertiesc                   .    \ rS rSrSr\S 5       rS rSrg)Execute    zExecute the transaction on Cloud DNS.

This command executes the transaction on Cloud DNS. This will result in
record-sets being changed as specified in the transaction.

## EXAMPLES

To execute the transaction, run:

  $ {command} --zone=MANAGED_ZONE
c                     [         R                  " 5       R                  U 5        U R                  R	                  [         R
                  5        U R                  R                  S 5        g )N)r
   
GetZoneArgAddToParserdisplay_info	AddFormatCHANGES_FORMATAddCacheUpdater)parsers    2lib/surface/dns/record_sets/transaction/execute.pyArgsExecute.Args-   sG    	""6*
!!%"6"67
''-    c                 R   SnU R                  5       [        R                   R                  :X  a  SnO.U R                  5       [        R                   R                  :X  a  Sn[        R
                  " UR                  5       n[        R                  " X2S9nS S S 5        [        R                  " WUS9(       aY  [        R                  R                  SR                  UR                  5      5        [        R                  " UR                  5        g [         R"                  " U5      n[         R$                  " U5      R'                  UR(                  S[*        R,                  R.                  R0                  R2                  0SS9nUR4                  R7                  UR8                  R;                  XFR=                  5       UR0                  S	95      n[         R$                  " U5      R7                  S
UR0                  UR=                  5       UR>                  S9nSR                  UR                  UR=                  5       5      n	[        R                  R                  U	5        [        R@                  " U5        [        R                  " UR                  5        U$ ! , (       d  f       GN	= f)Nv1v1beta2v1alpha2)api_versionz&Nothing to do, empty transaction [{0}]projectzdns.managedZones)params
collection)changemanagedZoner!   zdns.changes)r#   r!   r%   changeIdz2Executed transaction [{0}] for managed-zone [{1}].)!ReleaseTrackr	   BETAALPHAr   TransactionFiletransaction_fileChangeFromYamlFiler   IsOnlySOAIncrementr   statusPrintformatosremover   GetApiClientGetRegistryParsezoner   VALUEScorer!   	GetOrFailchangesCreateMESSAGES_MODULEDnsChangesCreateRequestNameidCreatedResource)
selfargsr    
trans_filer$   dnszone_refresult
change_refmsgs
             r   RunExecute.Run3   s   K d//444k				 1 1 7 7	7k		)	)$*?*?	@J22
/f 
A %%f+F	jj
2
9
9##%& 	ii%%&


K
(C,22		z((--55??
 & 3 'H [[ 3 3 K K==?H<L<L !L !N OF!!+.55 (*:*:MMOfii 6 9J ?
E
Ex}}0CJJS
#IId##$M= 
A	@s    J
J& N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   rI   __static_attributes__rK   r   r   r   r       s     
 . .
'r   r   )rP   
__future__r   r   r   r1   googlecloudsdk.api_lib.dnsr   r   r   googlecloudsdk.callioper	   googlecloudsdk.command_lib.dnsr
   googlecloudsdk.corer   r   ListCommandr   rK   r   r   <module>rY      s=     : &  ' 	 2 7 + ( 0 # *:d :r   