Commit b595b26d authored by Adrian's avatar Adrian
Browse files

aruba: add bridge connection if necessary

parent 670d3a9b
......@@ -61,6 +61,9 @@ class AddArubaAp(Script):
self.log_success("Created new Aruba AP: {}".format(
if (self.ap_type_requires_uplink_passthrough_bridge(data['ap_type'])):
ap_main_iface = Interface.objects.get(device=ap, name='E0')
ap_main_iface.mac_address = data['ap_mac']
ap_main_iface.iface_mode = IFACE_MODE_ACCESS
......@@ -78,3 +81,20 @@ class AddArubaAp(Script):
ap.primary_ip4 = ap_ip
self.log_success("Assigned primary IP to AP")
def ap_type_requires_uplink_passthrough_bridge(self, ap_type):
if (ap_type.model == "AP-205H"):
return True
return False
def bridge_uplink_via_passthrough(self, ap):
ap_uplink = Interface.objects.get(device=ap, name='E0')
ap_passthrough_rear = RearPort.objects.get(device=ap, name='PT')
conn = Cable(termination_a = ap_uplink,
termination_b = ap_passthrough_rear,
label = "Uplink passthrough bridge")
self.log_info("Automatically added Uplink-Passthrough bridge connection")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment