Skip to content

Commit 5d5f941

Browse files
committed
Remove references to interface
1 parent ea40f9e commit 5d5f941

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

capirca/lib/policy.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,6 @@ def __init__(self, obj):
535535
self.stateless_reply = False
536536
# fortigate specific
537537
self.fortigate_application_id = []
538-
self.interface = None
539538

540539
# AddObject touches variables which might not have been initialized
541540
# further up so this has to be at the end.
@@ -918,8 +917,6 @@ def __str__(self):
918917
ret_str.append(' destination_zone: %s' % sorted(self.destination_zone))
919918
if self.fortigate_application_id:
920919
ret_str.append(' application_id: %s' % self.fortigate_application_id)
921-
if self.interface:
922-
ret_str.append(' interface: %s' % self.interface)
923920

924921
return '\n'.join(ret_str)
925922

@@ -1017,9 +1014,6 @@ def __eq__(self, other):
10171014
if self.destination_interface != other.destination_interface:
10181015
return False
10191016

1020-
if self.interface != other.interface:
1021-
return False
1022-
10231017
# tags
10241018
if not (
10251019
sorted(self.source_tag) == sorted(other.source_tag)
@@ -1343,8 +1337,6 @@ def AddObject(self, obj):
13431337
self.destination_zone.append(x.value)
13441338
elif x.var_type is VarType.FORTIGATE_APPLICATION_ID:
13451339
self.fortigate_application_id.append(x.value)
1346-
elif x.var_type is VarType.INTERFACE:
1347-
self.interface.append(x.value)
13481340
else:
13491341
raise TermObjectTypeError(
13501342
"%s isn't a type I know how to deal with (contains '%s')"
@@ -1454,8 +1446,6 @@ def AddObject(self, obj):
14541446
self.filter_term = obj.value
14551447
elif obj.var_type is VarType.FORTIGATE_APPLICATION_ID:
14561448
self.fortigate_application_id.append(obj.value)
1457-
elif obj.var_type is VarType.INTERFACE:
1458-
self.interface = obj.value
14591449
else:
14601450
raise TermObjectTypeError(
14611451
"%s isn't a type I know how to deal with" % (type(obj))
@@ -1826,7 +1816,6 @@ class VarType:
18261816
POLICE_BURST = 74
18271817
POLICE_PPS = 75
18281818
FORTIGATE_APPLICATION_ID = 76
1829-
INTERFACE = 77
18301819

18311820
def __init__(self, var_type, value):
18321821
self.var_type = var_type
@@ -2022,7 +2011,6 @@ def __ne__(self, other):
20222011
'ICMP_TYPE',
20232012
'ICMP_CODE',
20242013
'INTEGER',
2025-
'INTERFACE',
20262014
'LOGGING',
20272015
'LOG_LIMIT',
20282016
'LOG_NAME',
@@ -2118,7 +2106,6 @@ def __ne__(self, other):
21182106
'header': 'HEADER',
21192107
'icmp-type': 'ICMP_TYPE',
21202108
'icmp-code': 'ICMP_CODE',
2121-
'interface': 'INTERFACE',
21222109
'logging': 'LOGGING',
21232110
'log-limit': 'LOG_LIMIT',
21242111
'log_name': 'LOG_NAME',
@@ -2827,9 +2814,6 @@ def p_interface_spec(p):
28272814
p[0] = VarType(VarType.SINTERFACE, p[4])
28282815
if p[1].find('destination-interface') >= 0:
28292816
p[0] = VarType(VarType.DINTERFACE, p[4])
2830-
elif p[1].find('interface') >= 0:
2831-
p[0] = VarType(VarType.INTERFACE, p[4])
2832-
28332817

28342818
def p_platform_spec(p):
28352819
"""platform_spec : PLATFORM ':' ':' one_or_more_strings

capirca/lib/policy_simple.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,6 @@ class Vpn(Field):
354354
class ApplicationID(Field):
355355
"""A application id field."""
356356

357-
class Interface(Field):
358-
"""An interface field."""
359-
360357
destination_address_fields = (DestinationAddress, DestinationExclude,
361358
DestinationPrefix)
362359

@@ -422,7 +419,6 @@ class Interface(Field):
422419
'encapsulate': Encapsulate,
423420
'decapsulate': Decapsulate,
424421
'application-id': ApplicationID,
425-
'interface': Interface,
426422
}
427423

428424

0 commit comments

Comments
 (0)