66
77
88class FortigateAddress (FortigateNamedObject , FortigateInterfaceMixin ):
9+ interface_attribute = "associated-interface"
10+
911 """Fortigate object for addresses.
1012
1113 :ivar interface: Interface the address is connected to
@@ -55,7 +57,7 @@ def render(self) -> dict:
5557 "name": "Test_address",
5658 "type": "ipmask",
5759 "subnet": "10.10.10.1 255.255.255.255",
58- "interface": "port4",
60+ "associated- interface": "port4",
5961 "comments": "Test comment",
6062 }
6163 """
@@ -64,7 +66,7 @@ def render(self) -> dict:
6466 "type" : "ipmask" ,
6567 "subnet" : f"{ self .subnet .network_address } { self .subnet .netmask } " ,
6668 "comment" : self .comment ,
67- "interface" : self .interface .name if self .interface else "" ,
69+ "associated- interface" : self .interface .name if self .interface else "" ,
6870 "color" : self .color ,
6971 }
7072
@@ -103,7 +105,7 @@ def render(self) -> dict:
103105 "type": "iprange",
104106 "start-ip": "10.10.10.1",
105107 "end-ip": "10.10.10.15",
106- "interface": "port4",
108+ "associated- interface": "port4",
107109 "comments": "Test comment",
108110 }
109111 """
@@ -113,7 +115,7 @@ def render(self) -> dict:
113115 "start-ip" : str (self .ip_start ),
114116 "end-ip" : str (self .ip_end ),
115117 "comment" : self .comment ,
116- "interface" : self .interface .name if self .interface else "" ,
118+ "associated- interface" : self .interface .name if self .interface else "" ,
117119 "color" : self .color ,
118120 }
119121
@@ -145,7 +147,7 @@ def render(self) -> dict:
145147 "name": "Test_fqdn",
146148 "type": "fqdn",
147149 "fqdn": "kernel.org",
148- "interface": "port4",
150+ "associated- interface": "port4",
149151 "comments": "Test comment",
150152 }
151153 """
@@ -154,6 +156,6 @@ def render(self) -> dict:
154156 "type" : "fqdn" ,
155157 "fqdn" : self .fqdn ,
156158 "comment" : self .comment ,
157- "interface" : self .interface .name if self .interface else "" ,
159+ "associated- interface" : self .interface .name if self .interface else "" ,
158160 "color" : self .color ,
159161 }
0 commit comments