hfc.util.policies
¶
Module Contents¶
Classes¶
Functions¶
|
-
hfc.util.policies.
s2d_grammar
= ?value: e | role | DIGIT -> number¶ dot: “.” dash: “-” name: /[wd-$&+,:;=?@#|<>^*()%!]+/ mspid: WORD role: “’” name dot mspid “’” or: “OR” and: “AND” outof: “OutOf” logic: or | and | outof e : logic “(” [value (“,” value)*] “)”
%import common.WORD %import common.LETTER %import common.DIGIT %import common.WS %ignore WS
-
class
hfc.util.policies.
String2Dict
¶ Bases:
lark.Transformer
-
unique_list_of_dict
(self, list_of_dict)¶
-
get_logic
(self, args, n)¶
-
get_outof
(self, items)¶
-
name
(self, items)¶
-
role
(self, items)¶
-
logic
(self, items)¶
-
dot
(self, *args)¶
-
dash
(self, *args)¶
-
mspid
(self, items)¶
-
number
(self, items)¶
-
e
(self, items)¶
-
-
class
hfc.util.policies.
Dict2String
¶ Bases:
object
-
roles
= []¶
-
get_policy
(self, policy)¶
-
parse
(self, policy)¶
-
-
hfc.util.policies.
s2d
()¶
-
hfc.util.policies.
d2s
¶