From c4be4ea298bcb94bdf77144f9ee64b3fbbff8a4d Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 20 Dec 2018 18:31:45 +0100 Subject: lldp: support multiple vlans Previously we exported the contents of VLAN Name TLV in the 'vid' (uint32) and 'vlan-name' (string) attributes. This is not entirely correct as the TLV can appear multiple times. We need a way to export all the VLAN IDs and names for the neighbor. Add a new 'vlans' attribute which obsoletes the other two and is an array of dictionaries, where each dictionary contains the 'vid' and 'name' keys. --- tools/test-networkmanager-service.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tools/test-networkmanager-service.py') diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py index fe680fa215..ddf92c0a27 100755 --- a/tools/test-networkmanager-service.py +++ b/tools/test-networkmanager-service.py @@ -741,7 +741,17 @@ class Device(ExportedObj): 'system-name': dbus.String('test2.example.com'), 'system-description': dbus.String('Test system #2'), 'system-capabilities': dbus.UInt32(2047), - 'destination': dbus.String('nearest-non-tpmr-bridge') + 'destination': dbus.String('nearest-non-tpmr-bridge'), + 'ieee-802-1-vlans': dbus.Array([ + dbus.Dictionary({ + 'vid': dbus.UInt32(80), + 'name': dbus.String('vlan80'), + }, signature = 'sv'), + dbus.Dictionary({ + 'vid': dbus.UInt32(4000), + 'name': dbus.String('My VLAN'), + }, signature = 'sv'), + ]), }), dbus.Dictionary({ 'chassis-id-type': dbus.UInt32(6), -- cgit v1.2.1