[VOL-4722] openonuAdapterGo: OMCI extended message set - support PM data retrieval
Change-Id: I97245dd5ba1e2780255cb0579c87c04b793f60cf
diff --git a/internal/pkg/swupg/omci_onu_upgrade.go b/internal/pkg/swupg/omci_onu_upgrade.go
index 196daf3..ba3295f 100755
--- a/internal/pkg/swupg/omci_onu_upgrade.go
+++ b/internal/pkg/swupg/omci_onu_upgrade.go
@@ -1000,7 +1000,7 @@
requestedAttributes := me.AttributeValueMap{me.SoftwareImage_IsCommitted: 0, me.SoftwareImage_IsActive: 0, me.SoftwareImage_Version: ""}
meInstance, err := oFsm.pOmciCC.SendGetMe(log.WithSpanFromContext(context.Background(), ctx),
me.SoftwareImageClassID, oFsm.InactiveImageMeID, requestedAttributes, oFsm.pDeviceHandler.GetOmciTimeout(),
- false, oFsm.PAdaptFsm.CommChan)
+ false, oFsm.PAdaptFsm.CommChan, oFsm.isExtendedOmci)
if err != nil {
logger.Errorw(ctx, "OnuUpgradeFsm get Software Image ME result error",
log.Fields{"device-id": oFsm.deviceID, "Error": err})
@@ -1077,7 +1077,8 @@
"device-id": oFsm.deviceID, "me-id": oFsm.InactiveImageMeID})
requestedAttributes := me.AttributeValueMap{me.SoftwareImage_IsCommitted: 0, me.SoftwareImage_IsActive: 0, me.SoftwareImage_Version: ""}
meInstance, err := oFsm.pOmciCC.SendGetMe(log.WithSpanFromContext(context.Background(), ctx),
- me.SoftwareImageClassID, oFsm.InactiveImageMeID, requestedAttributes, oFsm.pDeviceHandler.GetOmciTimeout(), false, oFsm.PAdaptFsm.CommChan)
+ me.SoftwareImageClassID, oFsm.InactiveImageMeID, requestedAttributes,
+ oFsm.pDeviceHandler.GetOmciTimeout(), false, oFsm.PAdaptFsm.CommChan, oFsm.isExtendedOmci)
if err != nil {
logger.Errorw(ctx, "OnuUpgradeFsm get Software Image ME result error",
log.Fields{"device-id": oFsm.deviceID, "Error": err})
diff --git a/internal/pkg/swupg/onu_image_status.go b/internal/pkg/swupg/onu_image_status.go
index b38fd5e..b0e6f12 100755
--- a/internal/pkg/swupg/onu_image_status.go
+++ b/internal/pkg/swupg/onu_image_status.go
@@ -43,6 +43,7 @@
respChannel chan cmn.Message
mutexPLastTxMeInstance sync.RWMutex
pLastTxMeInstance *me.ManagedEntity
+ isExtendedOmci bool
}
const cResponse = "response: "
@@ -57,6 +58,7 @@
requestedAttributes: make(me.AttributeValueMap),
waitingForResp: false,
respChannel: make(chan cmn.Message),
+ isExtendedOmci: apDevEntry.GetPersIsExtOmciSupported(),
}
}
@@ -108,7 +110,7 @@
func (oo *OnuImageStatus) requestOnuImageAttributes(ctx context.Context, imageID uint16, image *voltha.OnuImage) error {
oo.mutexPLastTxMeInstance.Lock()
meInstance, err := oo.pOmciCC.SendGetMe(log.WithSpanFromContext(context.TODO(), ctx), me.SoftwareImageClassID,
- imageID, oo.requestedAttributes, oo.pDeviceHandler.GetOmciTimeout(), true, oo.respChannel)
+ imageID, oo.requestedAttributes, oo.pDeviceHandler.GetOmciTimeout(), true, oo.respChannel, oo.isExtendedOmci)
if err != nil {
oo.mutexPLastTxMeInstance.Unlock()
logger.Errorw(ctx, "can't send omci request to get data for image id", log.Fields{"image-id": imageID, "device-id": oo.deviceID})