3 í«„^Î ã@s6ddlZddlmZddlmZGdd„deeƒZdS)éNé)Ú MatchContext)Ú PolicyQuerycsFeZdZdZdZedd„ƒZejdd„ƒZ‡fdd„Zdd „Z ‡Z S) Ú PirqconQuerya¸ Pirqcon context query. Parameter: policy The policy to query. Keyword Parameters/Class attributes: irq A single IRQ value. 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. NcCs|jS)N)Ú_irq)Úself©rú$/usr/lib64/python3.6/pirqconquery.pyÚirq=szPirqconQuery.irqcCs,|r"|dkrtdj|ƒƒ‚||_nd|_dS)NrzThe IRQ must be positive: {0})Ú ValueErrorÚformatr)rÚvaluerrr r As c s$tt|ƒj|f|Žtjtƒ|_dS)N)ÚsuperrÚ__init__ÚloggingZ getLoggerÚ__name__Úlog)rÚpolicyÚkwargs)Ú __class__rr rKszPirqconQuery.__init__ccsp|jjdj|ƒƒ|jjdj|ƒƒ|j|jƒx:|jjƒD],}|jrT|j|jkrTq<|j|j ƒsbq<|Vqs