
    r                     V    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 r	S r
S	 rg
)z"Common code for operation pooling.    )absolute_import)division)unicode_literals)poller)waiterc                      g)Ncompute.regionOperations r
       9lib/googlecloudsdk/command_lib/compute/operation_utils.pyGetRegionalOperationsCollectionr          	#r   c                      g)Nzcompute.globalOperationsr
   r
   r   r   GetGlobalOperationsCollectionr      r   r   c                     SUR                   0nUS:X  a  UR                  US'   U R                  UR                  XcS9n[        R
                  " X5      n[        R                  " XU5      $ )av  Waits for the operation to finish.

Args:
  resources: The resource parser.
  service: apitools.base.py.base_api.BaseApiService, the service representing
    the target of the operation.
  operation: The operation to wait for.
  collection: The operations collection.
  resource_ref: The resource reference.
  message: The message to show.

Returns:
  The operation result.
projectr	   region)params
collection)r   r   Parsenamer   Pollerr   WaitFor)		resourcesservice	operationr   resource_refmessager   operation_refoperation_pollers	            r   WaitForOperationr!   !   sj      |++,&--#**F8//nnV " <-]]79	(	AAr   N)__doc__
__future__r   r   r   )googlecloudsdk.api_lib.compute.operationsr   googlecloudsdk.api_lib.utilr   r   r   r!   r
   r   r   <module>r&      s)    ) &  ' < .$$Br   