How to Assign Port Based on OID

Tags: #<Tag:0x00007f84b31a6078> #<Tag:0x00007f84b31a58d0>

Hi,

I have a device with TL1 based. However, the existing script does not capture the interfaces/ports.
The OID itself describe as interfaces/ports instead of OID value.

Please refer below on the portion of discovery.php output:-

ethIntfOpticalPwrReceivedMinTh[1][1][gigE][1] = .0
ethIntfOpticalPwrReceivedMinTh[1][1][gigE][11] = .0
ethIntfOpticalPwrReceivedMinTh[1][1][xGigE][1] = -30.4
ethIntfOpticalPwrReceivedMinTh[1][1][xGigE][2] = -30.4
ethIntfOpticalPwrReceivedMaxTh[1][1][gigE][1] = .0
ethIntfOpticalPwrReceivedMaxTh[1][1][gigE][11] = .0
ethIntfOpticalPwrReceivedMaxTh[1][1][xGigE][1] = -5.0
ethIntfOpticalPwrReceivedMaxTh[1][1][xGigE][2] = -5.0
ethIntfOpticalPwrTransmittedMinTh[1][1][gigE][1] = .0
ethIntfOpticalPwrTransmittedMinTh[1][1][gigE][11] = .0
ethIntfOpticalPwrTransmittedMinTh[1][1][xGigE][1] = -2.9
ethIntfOpticalPwrTransmittedMinTh[1][1][xGigE][2] = -2.9
ethIntfOpticalPwrTransmittedMaxTh[1][1][gigE][1] = .0
ethIntfOpticalPwrTransmittedMaxTh[1][1][gigE][11] = .0
ethIntfOpticalPwrTransmittedMaxTh[1][1][xGigE][1] = 5.0
ethIntfOpticalPwrTransmittedMaxTh[1][1][xGigE][2] = 5.0
ethIntfPEC[1][1][gigE][1] = 
ethIntfPEC[1][1][gigE][11] = 
ethIntfPEC[1][1][xGigE][1] = 
ethIntfPEC[1][1][xGigE][2] = 
ethIntfAdminStatus[1][1][gigE][1] = 1
ethIntfAdminStatus[1][1][gigE][11] = 1
ethIntfAdminStatus[1][1][xGigE][1] = 1
ethIntfAdminStatus[1][1][xGigE][2] = 1
ethIntfOperStatus[1][1][gigE][1] = 1
ethIntfOperStatus[1][1][gigE][11] = 1
ethIntfOperStatus[1][1][xGigE][1] = 1
ethIntfOperStatus[1][1][xGigE][2] = 2
ethIntfOperStatQlfr[1][1][gigE][1] = "nr"
ethIntfOperStatQlfr[1][1][gigE][11] = "nr"
ethIntfOperStatQlfr[1][1][xGigE][1] = "nr"
ethIntfOperStatQlfr[1][1][xGigE][2] = "au,flt"
ethIntfAutoEnableTimer[1][1][gigE][1] = 0000-00
ethIntfAutoEnableTimer[1][1][gigE][11] = 0000-00
ethIntfAutoEnableTimer[1][1][xGigE][1] = 0000-00
ethIntfAutoEnableTimer[1][1][xGigE][2] = 0000-00
ethIntfActAutoEnableTimer[1][1][gigE][1] = 000-00
ethIntfActAutoEnableTimer[1][1][gigE][11] = 000-00
ethIntfActAutoEnableTimer[1][1][xGigE][1] = 000-00
ethIntfActAutoEnableTimer[1][1][xGigE][2] = 000-00
ethIntfWavelength[1][1][gigE][1] = .00
ethIntfWavelength[1][1][gigE][11] = .00
ethIntfWavelength[1][1][xGigE][1] = 1553.32
ethIntfWavelength[1][1][xGigE][2] = 1553.32
ethIntfVendorPN1[1][1][gigE][1] = 
ethIntfVendorPN1[1][1][gigE][11] = 
ethIntfVendorPN1[1][1][xGigE][1] = 
ethIntfVendorPN1[1][1][xGigE][2] = 
ethIntfVendorPN2[1][1][gigE][1] = 
ethIntfVendorPN2[1][1][gigE][11] = 
ethIntfVendorPN2[1][1][xGigE][1] = 
ethIntfVendorPN2[1][1][xGigE][2] = 
ethIntfVendorPN3[1][1][gigE][1] = 
ethIntfVendorPN3[1][1][gigE][11] = 
ethIntfVendorPN3[1][1][xGigE][1] = 
ethIntfVendorPN3[1][1][xGigE][2] = 
ethIntfPhyPMMon[1][1][gigE][1] = 2
ethIntfPhyPMMon[1][1][gigE][11] = 2
ethIntfPhyPMMon[1][1][xGigE][1] = 2
ethIntfPhyPMMon[1][1][xGigE][2] = 2
ethIntfFPSD[1][1][gigE][1] = 2
ethIntfFPSD[1][1][gigE][11] = 2
ethIntfFPSD[1][1][xGigE][1] = 2
ethIntfFPSD[1][1][xGigE][2] = 2
ethIntfId1[1][1][gigE][1] = *
ethIntfId1[1][1][gigE][11] = 
ethIntfId1[1][1][xGigE][1] = 
ethIntfId1[1][1][xGigE][2] = 
ethIntfFiberType[1][1][gigE][1] = 1
ethIntfFiberType[1][1][gigE][11] = 1
ethIntfFiberType[1][1][xGigE][1] = 1
ethIntfFiberType[1][1][xGigE][2] = 1
ethIntfCustom1[1][1][gigE][1] = 
ethIntfCustom1[1][1][gigE][11] = 
ethIntfCustom1[1][1][xGigE][1] = 
ethIntfCustom1[1][1][xGigE][2] = 
ethIntfSpeed[1][1][gigE][1] = 1000
ethIntfSpeed[1][1][gigE][11] = 100
ethIntfSpeed[1][1][xGigE][1] = 10000
ethIntfSpeed[1][1][xGigE][2] = 10000
ethIntfDuplex[1][1][gigE][1] = 2
ethIntfDuplex[1][1][gigE][11] = 2
ethIntfDuplex[1][1][xGigE][1] = 2
ethIntfDuplex[1][1][xGigE][2] = 2

Any help?