volt autoconfig for access agent
diff --git a/xos/synchronizers/onos/steps/sync_onosapp.py b/xos/synchronizers/onos/steps/sync_onosapp.py
index a26a916..5ca7ffc 100644
--- a/xos/synchronizers/onos/steps/sync_onosapp.py
+++ b/xos/synchronizers/onos/steps/sync_onosapp.py
@@ -259,9 +259,20 @@
}
access_devices.append(access_device)
+ if voltdev.access_agent:
+ agent = voltdev.access_agent
+ olts = {}
+ for port_mapping in agent.access_devices.objects.all():
+ olts[port_mapping.port] = port_mapping.mac
+ agent_config = {
+ "olts" : olts
+ "mac" : agent.mac
+ }
+
device = {
voltdev.openflow_id : {
- "accessDevice" : access_devices
+ "accessDevice" : access_devices,
+ "accessAgent" : agent_config
},
"basic" : {
"driver" : voltdev.driver