VOL-729: ADTRAN ONU - Fix fetch of TCONT attribute from MIB datbase
Change-Id: Iff356cf1ee90fae2b2111cd16be79cc4807c41c8
diff --git a/voltha/adapters/adtran_onu/pon_port.py b/voltha/adapters/adtran_onu/pon_port.py
index 06fe0d3..40dee83 100644
--- a/voltha/adapters/adtran_onu/pon_port.py
+++ b/voltha/adapters/adtran_onu/pon_port.py
@@ -329,7 +329,7 @@
for tcont in self._tconts.itervalues():
free_entity_id = next((k for k, v in tcont_idents.items()
- if isinstance(k, int) and v.get('alloc_id', 0) == 0xFFFF), None)
+ if isinstance(k, int) and v.get('attributes', {}).get('alloc_id', 0) == 0xFFFF), None)
if free_entity_id is None:
self.log.error('no-available-tconts')
break