
                             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r " S S\R                  5      r " S	 S
\5      r	 " S S\	5      r
 " S S\	5      r " S S\	5      r " S S\5      rg)z8Errors for the compute VM instances Ops Agents commands.    )absolute_import)division)unicode_literals)
exceptionsNc                       \ rS rSrSrSrg)Error   z)Base exception for Ops Agents exceptions. N__name__
__module____qualname____firstlineno____doc____static_attributes__r
       Elib/googlecloudsdk/api_lib/compute/instances/ops_agents/exceptions.pyr   r      s    1r   r   c                       \ rS rSrSrSrg)PolicyError   z0Base exception for Ops Agents policy exceptions.r
   Nr   r
   r   r   r   r      s    8r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )PolicyMalformedError"   z9Raised when the specified Ops Agents policy is malformed.c                 J   > SR                  US9n[        [        U ]  U5        g )Na  Encountered a malformed policy. The Ops Agents policy [{policy_id}] may have been modified directly by the OS Config guest policy API / gcloud commands. If so, please delete and re-create with the Ops Agents policy gcloud commands. If not, this may be an internal error.	policy_id)formatsuperr   __init__selfr   message	__class__s      r   r   PolicyMalformedError.__init__%   s.    	P 
)	$  

.w7r   r
   r   r   r   r   r   r   r   __classcell__r#   s   @r   r   r   "   s    A8 8r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )PolicyNotFoundError/   z9Raised when the specified Ops Agents policy is not found.c                 J   > SR                  US9n[        [        U ]  U5        g )Nz*Ops Agents policy [{policy_id}] not found.r   )r   r   r)   r   r    s      r   r   PolicyNotFoundError.__init__2   s)    4	)	$  

t-g6r   r
   r%   r'   s   @r   r)   r)   /   s    A7 7r   r)   c                       \ rS rSrSrSrg)PolicyValidationError9   z/Raised when Ops Agents policy validation fails.r
   Nr   r
   r   r   r.   r.   9   s    7r   r.   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )PolicyValidationMultiError=   z8Raised when multiple Ops Agents policy validations fail.c                 d   > [         [        U ]  SR                  S U 5       5      5        Xl        g )Nz | c              3   N   #    U  H  n[         R                  " U5      v   M     g 7f)N)six	text_type).0errors     r   	<genexpr>6PolicyValidationMultiError.__init__.<locals>.<genexpr>B   s     <VE3==''Vs   #%)r   r1   r   joinerrors)r!   r<   r#   s     r   r   #PolicyValidationMultiError.__init__@   s*    	
$d4

<V<<>Kr   )r<   r%   r'   s   @r   r1   r1   =   s    @ r   r1   )r   
__future__r   r   r   googlecloudsdk.corer   r5   r   r   r   r)   r.   r1   r
   r   r   <module>r@      sh    ? &  ' * 
2J 29% 9
8; 
87+ 78K 8!6 r   