File tree Expand file tree Collapse file tree 3 files changed +9
-18
lines changed
Expand file tree Collapse file tree 3 files changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -214,8 +214,7 @@ def command( # type: ignore[override]
214214 mysql_port ,
215215 )
216216
217- @staticmethod
218- def process (output ):
217+ def process (self , output ):
219218 database_table_privileges = defaultdict (set )
220219
221220 for line in output :
Original file line number Diff line number Diff line change @@ -32,8 +32,7 @@ class Home(FactBase[Optional[str]]):
3232 Returns the home directory of the given user, or the current user if no user is given.
3333 """
3434
35- @staticmethod
36- def command (user = "" ):
35+ def command (self , user = "" ):
3736 return f"echo ~{ user } "
3837
3938
@@ -124,8 +123,7 @@ class Command(FactBase[str]):
124123 Returns the raw output lines of a given command.
125124 """
126125
127- @staticmethod
128- def command (command ):
126+ def command (self , command ):
129127 return command
130128
131129
@@ -134,8 +132,7 @@ class Which(FactBase[Optional[str]]):
134132 Returns the path of a given command according to `command -v`, if available.
135133 """
136134
137- @staticmethod
138- def command (command ):
135+ def command (self , command ):
139136 return "command -v {0} || true" .format (command )
140137
141138
Original file line number Diff line number Diff line change @@ -19,39 +19,34 @@ class Pools(FactBase):
1919 def command (self ):
2020 return "zpool get -H all"
2121
22- @staticmethod
23- def process (output ):
22+ def process (self , output ):
2423 return _process_zfs_props_table (output )
2524
2625
2726class Datasets (FactBase ):
2827 def command (self ):
2928 return "zfs get -H all"
3029
31- @staticmethod
32- def process (output ):
30+ def process (self , output ):
3331 return _process_zfs_props_table (output )
3432
3533
3634class Filesystems (ShortFactBase ):
3735 fact = Datasets
3836
39- @staticmethod
40- def process_data (data ):
37+ def process_data (self , data ):
4138 return {name : props for name , props in data .items () if props .get ("type" ) == "filesystem" }
4239
4340
4441class Snapshots (ShortFactBase ):
4542 fact = Datasets
4643
47- @staticmethod
48- def process_data (data ):
44+ def process_data (self , data ):
4945 return {name : props for name , props in data .items () if props .get ("type" ) == "snapshot" }
5046
5147
5248class Volumes (ShortFactBase ):
5349 fact = Datasets
5450
55- @staticmethod
56- def process_data (data ):
51+ def process_data (self , data ):
5752 return {name : props for name , props in data .items () if props .get ("type" ) == "volume" }
You can’t perform that action at this time.
0 commit comments