Skip to content

Commit

Permalink
.minor
Browse files Browse the repository at this point in the history
  • Loading branch information
aliasgar1978 committed Apr 12, 2022
1 parent 7069cc9 commit f330091
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 32 deletions.
13 changes: 7 additions & 6 deletions fwOper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@
'''

__all__ = [
"ACLS", "ACL", "dummy_group",
"ACLS", "ACL", "ACL_REMARK",
"OBJS", "OBJ", 'get_member_obj',
"ROUTES", "ROUTE",
"INSTANCES",
"get_object",
"network_group_member", "port_group_member",

# "HOST",
"NETWORK", "OBJ_GROUP", "PORTS",

"NetworkObject", "UDPPortObject", "TCPPortObject", "ProtocolObject", "ICMPPortObject",

# "ANY", "ICMP", "DEFAULT_ROUTE", "VALID_PROTOCOLS",
# 'network_member', 'port_member', "get_match_dict",
# "update_ports_name" ,
]

__version__ = "0.0.4"
__version__ = "0.0.3"

from .acl import (ACLS, ACL, dummy_group)
from .acl import (ACLS, ACL, ACL_REMARK)
from .acg import (OBJS, OBJ, get_member_obj)
from .route import (ROUTES, ROUTE)
from .instances import (Instances)
Expand Down
2 changes: 1 addition & 1 deletion fwOper/acl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# ----------------------------------------------------------------------------------------
from nettoolkit import *
from collections import OrderedDict
Expand Down Expand Up @@ -722,6 +721,7 @@ def parse(self, objs):
if spl_line[pv] in ANY: idx_variance -= 1
except:
pass
# add rest statics and create ACL entry dict
self._repr_dic[line_no] = {
'remark': remark,
'acl_type': spl_line[2],
Expand Down
25 changes: 0 additions & 25 deletions fwOper/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,31 +204,6 @@ def __repr__(self): return self.remark
def __eq__(self, obj): return str(obj) == str(self)
def str(self): return self.remark + "\n"


# ----------------------------------------------------------------------------------------
# DUMMY BLANK OBJECT GOUPs
# ----------------------------------------------------------------------------------------

class NetworkObject():
obj_grp_type = 'network'
obj_grp_svc_filter = ''

class UDPPortObject(Singular):
obj_grp_type = 'service'
obj_grp_svc_filter = 'udp'

class TCPPortObject(Singular):
obj_grp_type = 'service'
obj_grp_svc_filter = 'tcp'

class ProtocolObject(Singular):
obj_grp_type = 'protocol'
obj_grp_svc_filter = ''

class ICMPPortObject(Singular):
obj_grp_type = 'icmp-type'
obj_grp_svc_filter = ''

# ----------------------------------------------------------------------------------------
# Main
# ----------------------------------------------------------------------------------------
Expand Down

0 comments on commit f330091

Please sign in to comment.