Add switch capabilities for openolt's logical device
Change-Id: I65b59dcdd0b0e1608844102a16e495cec612bee6
diff --git a/voltha/adapters/openolt/openolt_device.py b/voltha/adapters/openolt/openolt_device.py
index 63e5ec9..9877930 100644
--- a/voltha/adapters/openolt/openolt_device.py
+++ b/voltha/adapters/openolt/openolt_device.py
@@ -200,7 +200,19 @@
mac = olt_indication.mac
# Create logical OF device
- ld = LogicalDevice(root_device_id=self.device_id)
+ ld = LogicalDevice(
+ root_device_id=self.device_id,
+ switch_features=ofp_switch_features(
+ n_buffers=256, # TODO fake for now
+ n_tables=2, # TODO ditto
+ capabilities=( # TODO and ditto
+ OFPC_FLOW_STATS
+ | OFPC_TABLE_STATS
+ | OFPC_PORT_STATS
+ | OFPC_GROUP_STATS
+ )
+ )
+ )
ld_initialized = self.adapter_agent.create_logical_device(ld, dpid=mac)
self.logical_device_id = ld_initialized.id