+
    ,i  c                   s   a  R t0 t ^ RIHt ^ RIHt ^ RIt^RIHtHtH	t	H
t
 Rt] ^ k  ! R R]P                  ]	P                  4      tR# )	i    IPv6Address)IterableN)mixins	policyrepqueryutilIbpkeyconQueryc                   s   a  ] tR t^t o RtRtRtRtRtRt	Rt
]V 3R lR l4       t]P                  V 3R lR l4       t]V 3R lR	 l4       t]P                  V 3R
 lR l4       tV 3R lR ltV 3R ltRtV tR# )r   a  
Infiniband pkey context query.

Parameter:
policy          The policy to query.

Keyword Parameters/Class attributes:
subnet_prefix   A subnet prefix to match.
pkeys           A 2-tuple of the pkey range to match. (Set both to
                the same value for a single pkey)
pkeys_subset    If true, the criteria will match if it is a subset
                of the ibpkeycon's range.
pkeys_overlap   If true, the criteria will match if it overlaps
                any of the ibpkeycon's range.
pkeys_superset  If true, the criteria will match if it is a superset
                of the ibpkeycon's range.
pkeys_proper    If true, use proper superset/subset operations.
                No effect if not using set operations.
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.
NFc                sB   < V ^8  d   QhRS[ P                  R,          /#    returnN)r   IbpkeyconRangeformat__classdict__   "=/usr/lib64/python3.14/site-packages/setools/ibpkeyconquery.py__annotate__IbpkeyconQuery.__annotate__>   s      y//$6     c                    V P                   # N)_pkeysself   &r   pkeysIbpkeyconQuery.pkeys=   s    {{r   c                sl   < V ^8  d   QhRS[ P                  S[S[S[3,          ,          R,          RR/# r	   valueNr
   )r   r   tupleZintr   r   r   r   r   B   s8     N N933eCHoEL NQU Nr   c                s    \        V\        P                  4      '       d	   Wn        R # V'       d   \        P                  ! V!  MR V n        R # r   )Z
isinstancer   r   r   r   r      &&r   r   r   A   s0    eY5566K>C)22E:DKr   c                s.   < V ^8  d   QhRS[ R,          /# r   r    r   r   r   r   r   I   s     # #{T1 #r   c                r   r   )_subnet_prefixr   r   r   subnet_prefixIbpkeyconQuery.subnet_prefixH   s    """r   c                sB   < V ^8  d   QhRS[ S[,          R,          RR/# r   )strr   r   r   r   r   r   M   s%     ' '3#4t#; ' 'r   c                sH    V'       d   \        V4      V n        R # R V n        R # r   )r   r!   r   r    r   r"   r#   L   s    "-e"4D"&Dr   c                sD   < V ^8  d   QhRS[ S[P                  ,          /# )r	   r
   )r   r   Z	Ibpkeyconr   r   r   r   r   S   s      )"5"56 r   c              #  sp  "   V P                   P                  RV P                   24       V P                   P                  RV P                  : 24       V P                   P                  RV P
                  : RV P                  : RV P                  : RV P                  : RV P                  : 2
4       V P                  V P                   4       V P                  P                  4        F  pV P                  e   V P                  VP                  8w  d   K.  V P
                  '       d`   \        P                  ! VP
                  V P
                  V P                  V P                  V P                  V P                  4      '       g   K  V P                  VP                  4      '       g   K  Vx  K  	  R# 5i)	z/Generator which yields all matching ibpkeycons.z"Generating ibpkeycon results from zself.subnet_prefix=zself.pkeys=z, self.pkeys_overlap=z, self.pkeys_subset=z, self.pkeys_superset=z, self.pkeys_proper=N)ZlogZinfoZpolicyZdebugr"   r   pkeys_overlappkeys_subsetpkeys_supersetpkeys_properZ_match_context_debugZ
ibpkeyconsr   Zmatch_rangeZ_match_contextZcontext)r   Zpks   & r   resultsZIbpkeyconQuery.resultsS   sW    :4;;-HI-$,,./0+$**&<););(==R@Q@Q?S T/--//D$2C2C1EG 	H!!$((+++((*B!!-$2D2DHXHX2Xzzz$"2"2HHJJ%%&&''%%#' #' &&rzz22H! +s   D'F6*AF6"F6*F6c                s   < V ^8  d   Qh/ S[ R,          ;R&   S[P                  R,          ;R&   S[;R&   S[;R&   S[;R&   S[;R&   # )r	   Nr!   r   r&   r%   r'   r(   )r   r   r   Zboolr   r   r   r   r      so     P  $&-Q R $$t+2S T U V W X  Y Z [ r   )r   r!   )Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r!   r   r&   r%   r'   r(   Zpropertyr   Zsetterr"   r)   Z__annotate_func__Z__static_attributes__Z__classdictcell__)r      @r   r   r      s     $L *.N.2FLM NL  \\N N # # ' ' K  r   c                s    V ^8  d   Qh/ ^ \         9   d,   \        P                  \        \        R3,          ,          ;R&   # )r	   .__all__)__conditional_annotations__typingZFinalr   r$   )r   s   "r   r   r      s+     ! ! = <eCHo	& < "r   )r   )r,   Z	ipaddressr   Zcollections.abcr   r-   Z r   r   r   r   r+   ZMatchContextZPolicyQueryr   r   )r,   r*   r   <module>r.      s>   
 " ! $  , ,)< <]V((%*;*; ]r   