509318396
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3
í«„^t  ã               @   sD   d dl Z d dlZddlmZmZ ddlmZ G dd„ deeeƒZdS )é    Né   )Ú	MatchNameÚMatchPermission)ÚPolicyQueryc                   s(   e Zd ZdZ‡ fdd„Zdd„ Z‡  ZS )ÚCommonQuerya”  
    Query common permission sets.

    Parameter:
    policy       The policy to query.

    Keyword Parameters/Class attributes:
    name         The name of the common to match.
    name_regex   If true, regular expression matching will
                 be used for matching the name.
    perms        The permissions to match.
    perms_equal  If true, only commons with permission sets
                 that are equal to the criteria will
                 match.  Otherwise, any intersection
                 will match.
    perms_regex  If true, regular expression matching will be used
                 on the permission names instead of set logic.
    c                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/commonquery.pyr   /   s    zCommonQuery.__init__c             c   s`   | j jdj| ƒƒ | j| j ƒ | j| j ƒ x0| jjƒ D ]"}| j|ƒsFq6| j|ƒsRq6|V  q6W dS )z,Generator which yields all matching commons.z)Generating common results from {0.policy}N)	r   ÚinfoÚformatZ_match_name_debugZ_match_perms_debugr   ZcommonsZ_match_nameZ_match_perms)r   Zcomr   r   r   Úresults3   s    

zCommonQuery.results)r
   Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__classcell__r   r   )r   r   r      s   r   )r	   ÚreZmixinsr   r   Zqueryr   r   r   r   r   r   Ú<module>   s   