1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

Initial firewall applier implementation

This commit is contained in:
Игорь Чудов 2020-06-02 19:06:21 +04:00
parent 2369384a2a
commit 283825ecc2
Signed by untrusted user: nir
GPG Key ID: 0F3883600CAE7AAC

View File

@ -18,8 +18,26 @@
class FirewallRule:
def __init__(self, data):
pass
data_array = data.split('|')
self.version = data_array[0]
self.action = data_array[1]
self.active = data_array[2]
self.dir = data_array[3]
self.protocol = data_array[4]
self.profile = data_array[5]
self.lport = data_array[6]
self.name = data_array[7]
self.desc = data_array[8]
def apply(self):
pass
pstr = '{} {} {} {} {} {} {} {} {}'.format(self.version
, self.action
, self.active
, self.dir
, self.protocol
, self.profile
, self.lport
, self.name
, self.desc)