
                             d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZ G d dej                        Z G d	 d
e      Z	 G d de	      Z
 G d de	      Z G d de	      Z G d de      Zy)z8Errors for the compute VM instances Ops Agents commands.    )absolute_import)division)unicode_literals)
exceptionsNc                       e Zd ZdZy)Errorz)Base exception for Ops Agents exceptions.N__name__
__module____qualname____doc__     Elib/googlecloudsdk/api_lib/compute/instances/ops_agents/exceptions.pyr   r      s    1r   r   c                       e Zd ZdZy)PolicyErrorz0Base exception for Ops Agents policy exceptions.Nr	   r   r   r   r   r      s    8r   r   c                   "     e Zd ZdZ fdZ xZS )PolicyMalformedErrorz9Raised when the specified Ops Agents policy is malformed.c                 P    dj                  |      }t        t        |   |       y )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   zPolicyMalformedError.__init__%   s.    	P 
)	$  

.w7r   r
   r   r   r   r   __classcell__r   s   @r   r   r   "   s    A8 8r   r   c                   "     e Zd ZdZ fdZ xZS )PolicyNotFoundErrorz9Raised when the specified Ops Agents policy is not found.c                 P    dj                  |      }t        t        |   |       y )Nz*Ops Agents policy [{policy_id}] not found.r   )r   r   r#   r   r   s      r   r   zPolicyNotFoundError.__init__2   s)    4	)	$  

t-g6r   r   r!   s   @r   r#   r#   /   s    A7 7r   r#   c                       e Zd ZdZy)PolicyValidationErrorz/Raised when Ops Agents policy validation fails.Nr	   r   r   r   r&   r&   9   s    7r   r&   c                   "     e Zd ZdZ fdZ xZS )PolicyValidationMultiErrorz8Raised when multiple Ops Agents policy validations fail.c                 f    t         t        |   dj                  d |D                     || _        y )Nz | c              3   F   K   | ]  }t        j                  |        y w)N)six	text_type).0errors     r   	<genexpr>z6PolicyValidationMultiError.__init__.<locals>.<genexpr>B   s     <VE3=='Vs   !)r   r(   r   joinerrors)r   r1   r   s     r   r   z#PolicyValidationMultiError.__init__@   s,    	
$d4

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