509318396
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3
í«„^f	  ã               @   sX   d dl Z d dlZddlmZmZ ddlmZ ddlmZ ddl	m
Z
 G dd„ deƒZdS )	é    Né   )ÚCriteriaDescriptorÚCriteriaSetDescriptor)ÚBoundsRuletype)ÚPolicyQuery)Úmatch_regexc                   sJ   e Zd ZdZeed�ZedƒZdZ	edƒZ
dZ‡ fdd„Zdd	„ Z‡  ZS )
ÚBoundsQueryzµ
    Query *bounds statements.

    Parameter:
    policy          The policy to query.

    Keyword Parameters/Class attributes:
    ruletype        The rule type(s) to match.
    )Ú
enum_classÚparent_regexFÚchild_regexc                s$   t t| ƒj|f|Ž tjtƒ| _d S )N)Úsuperr   Ú__init__ÚloggingZ	getLoggerÚ__name__Úlog)ÚselfÚpolicyÚkwargs)Ú	__class__© ú#/usr/lib64/python3.6/boundsquery.pyr   .   s    zBoundsQuery.__init__c             c   s²   | j jdj| ƒƒ | j jdj| ƒƒ | j jdj| ƒƒ | j jdj| ƒƒ xd| jjƒ D ]V}| jrl|j| jkrlqT| jrˆt|j| j| j	ƒ rˆqT| j
r¤t|j
| j
| jƒ r¤qT|V  qTW dS )z7Generator which yields all matching *bounds statements.z)Generating bounds results from {0.policy}zRuletypes: {0.ruletype}z-Parent: {0.parent!r}, regex: {0.parent_regex}z*Child: {0.child!r}, regex: {0.child_regex}N)r   ÚinfoÚformatÚdebugr   ZboundsÚruletypeÚparentr   r
   Úchildr   )r   Úbr   r   r   Úresults2   s$    

zBoundsQuery.results)r   Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r
   r   r   r   r   Ú__classcell__r   r   )r   r   r      s   

r   )r   ÚreZdescriptorsr   r   Z	policyrepr   Zqueryr   Úutilr   r   r   r   r   r   Ú<module>   s   