VOL-1494: Allow adapter to set of port name
This is needed given there are multiple
uni per child device serial number and
we need the name to be in a format
decided by the child device given it knows
its ports the best.
Practically speaking the onu will now set
the name to serialnumber-uniport, i.e:
port=4112, portName=BRCM33333333-1
port=4113, portName=BRCM33333333-2
port=4114, portName=BRCM33333333-3
port=4115, portName=BRCM33333333-4
port=4116, portName=BRCM33333333-5
This allows a per-uni lookup in sadis
Change-Id: I85fef83973f88cd219421dbe3c9a15ec9b0042a0
diff --git a/rw_core/core/device_manager.go b/rw_core/core/device_manager.go
index 287adaf..f37244f 100644
--- a/rw_core/core/device_manager.go
+++ b/rw_core/core/device_manager.go
@@ -205,7 +205,8 @@
}
func (dMgr *DeviceManager) GetChildDevice(parentDeviceId string, serialNumber string, onuId int64, parentPortNo int64) (*voltha.Device, error) {
- log.Debugw("GetChildDevice", log.Fields{"parentDeviceid": parentDeviceId, "serialNumber": serialNumber})
+ log.Debugw("GetChildDevice", log.Fields{"parentDeviceid": parentDeviceId, "serialNumber": serialNumber,
+ "parentPortNo": parentPortNo, "onuId": onuId})
var parentDevice *voltha.Device
var err error
diff --git a/rw_core/core/logical_device_agent.go b/rw_core/core/logical_device_agent.go
index 193ba9a..9496aa1 100644
--- a/rw_core/core/logical_device_agent.go
+++ b/rw_core/core/logical_device_agent.go
@@ -1327,7 +1327,6 @@
portCap.Port.RootPort = false
portCap.Port.Id = port.Label
portCap.Port.OfpPort.PortNo = port.PortNo
- portCap.Port.OfpPort.Name = childDevice.SerialNumber
portCap.Port.DeviceId = childDevice.Id
portCap.Port.DevicePortNo = port.PortNo
cloned := (proto.Clone(ldevice)).(*voltha.LogicalDevice)