VOL-1709 - Add missing Priority Queue attribute configuration from Tech-Profile
Change-Id: I3cd7eb4cc1cd8006117552dee62f7bff5da2b4a7
diff --git a/pyvoltha/adapters/extensions/omci/omci_entities.py b/pyvoltha/adapters/extensions/omci/omci_entities.py
index 48b00d7..1db5d8a 100644
--- a/pyvoltha/adapters/extensions/omci/omci_entities.py
+++ b/pyvoltha/adapters/extensions/omci/omci_entities.py
@@ -893,7 +893,7 @@
ECA(ShortField("allocated_queue_size", None), {AA.R, AA.W}),
ECA(ShortField("discard_block_counter_reset_interval", None), {AA.R, AA.W}),
ECA(ShortField("threshold_value_for_discarded_blocks", None), {AA.R, AA.W}),
- ECA(IntField("related_port", None), {AA.R}),
+ ECA(IntField("related_port", None), {AA.R, AA.W}),
ECA(ShortField("traffic_scheduler_pointer", 0), {AA.R, AA.W}),
ECA(ByteField("weight", 1), {AA.R, AA.W}),
ECA(ShortField("back_pressure_operation", 0), {AA.R, AA.W},
diff --git a/pyvoltha/adapters/extensions/omci/omci_me.py b/pyvoltha/adapters/extensions/omci/omci_me.py
index 867b845..ea62c2a 100644
--- a/pyvoltha/adapters/extensions/omci/omci_me.py
+++ b/pyvoltha/adapters/extensions/omci/omci_me.py
@@ -18,6 +18,9 @@
"""
from pyvoltha.adapters.extensions.omci.omci import *
from pyvoltha.adapters.extensions.omci.me_frame import MEFrame
+from pyvoltha.adapters.extensions.omci.omci_entities import PriorityQueueG
+from pyvoltha.adapters.extensions.omci.omci_entities import *
+
class CardholderFrame(MEFrame):
@@ -937,3 +940,23 @@
XgPonUpstreamPerformanceMonitoringHistoryData,
entity_id,
MEFrame._attr_to_data(attributes))
+
+
+class PriorityQueueFrame(MEFrame):
+ def __init__(self, entity_id, related_port=None, traffic_scheduler_pointer=None, weight=None):
+
+ self.check_type(entity_id, (int, type(None)))
+ self.check_type(related_port, (int, type(None)))
+ self.check_type(traffic_scheduler_pointer, (int, type(None)))
+ self.check_type(weight, (int, type(None)))
+
+ assert entity_id is not None, "WARNING: Entity_ID not present"
+ data = dict()
+ if related_port is not None:
+ data['related_port'] = related_port
+ if traffic_scheduler_pointer is not None:
+ data['traffic_scheduler_pointer'] = traffic_scheduler_pointer
+ if weight is not None:
+ data['weight'] = weight
+
+ super(PriorityQueueFrame, self).__init__(PriorityQueueG, entity_id, data)