관리-도구
편집 파일: pcideviceconquery.cpython-39.opt-1.pyc
a ����q�qeR ����������������������@���sR���d�dl�Z�d�dlmZmZ�ddlmZ�ddlmZ�ddlm Z �G�dd��dee �Z dS�) �����N)�Iterable�Optional����)�MatchContext)�Pcidevicecon)�PolicyQueryc�����������������������sz���e�Zd�ZU�dZdZee�ed<�eee�d�dd��Z e j ee�dd�dd��Z dd���fd d �Zee �d�dd�Z���ZS�) �PcideviceconQuerya��� Pcidevicecon context query. Parameter: policy The policy to query. Keyword Parameters/Class attributes: device A single PCI device ID. user The criteria to match the context's user. user_regex If true, regular expression matching will be used on the user. role The criteria to match the context's role. role_regex If true, regular expression matching will be used on the role. type_ The criteria to match the context's type. type_regex If true, regular expression matching will be used on the type. range_ The criteria to match the context's range. range_subset If true, the criteria will match if it is a subset of the context's range. range_overlap If true, the criteria will match if it overlaps any of the context's range. range_superset If true, the criteria will match if it is a superset of the context's range. range_proper If true, use proper superset/subset operations. No effect if not using set operations. N�_device)�returnc�����������������C���s���|�j�S��N)r ���)�self��r ����?/usr/lib64/python3.9/site-packages/setools/pcideviceconquery.py�device1���s����zPcideviceconQuery.device)�valuer ���c�����������������C���s,���|r"|dk�rt�d�|���||�_nd�|�_d�S�)Nr���z#PCI device ID must be positive: {0})� ValueError�formatr ���)r���r���r ���r ���r���r���5���s ����c��������������������s(���t�t|��j|fi�|���t�t�|�_d�S�r���)�superr����__init__�loggingZ getLogger�__name__�log)r����policy�kwargs�� __class__r ���r���r���?���s����zPcideviceconQuery.__init__c�����������������c���sl���|�j��d�|����|�j��d�|����|��|�j���|�j���D�],}|�jrR|�j|jkrRq:|��|j �s`q:|V��q:dS�)z2Generator which yields all matching pcidevicecons.z"Generating results from {0.policy}zDevice ID: {0.device!r}N) r����infor����debugZ_match_context_debugr���Z pcideviceconsr���Z_match_context�context)r���Zpcideviceconr ���r ���r����resultsC���s����zPcideviceconQuery.results)r���� __module__�__qualname__�__doc__r ���r����int�__annotations__�propertyr����setterr���r���r���r���� __classcell__r ���r ���r���r���r��� ���s��� r���)r����typingr���r���Zmixinsr���Z policyrepr����queryr���r���r ���r ���r ���r����<module>���s ���