VOL-3052 Onu Software preliminary upgrade extensions with internal test, version 1.2.5-dev171
Signed-off-by: mpagenko <michael.pagenkopf@adtran.com>
Change-Id: I23ee1a14af635def33b565444f1a1f81370a86a7
diff --git a/internal/pkg/onuadaptercore/onu_device_entry.go b/internal/pkg/onuadaptercore/onu_device_entry.go
index 301a973..25ffaa3 100644
--- a/internal/pkg/onuadaptercore/onu_device_entry.go
+++ b/internal/pkg/onuadaptercore/onu_device_entry.go
@@ -199,6 +199,14 @@
firstSwImageMeID = 0
secondSwImageMeID = 1
)
+const ( //definitions as per G.988 softwareImage::IsCommitted
+ swIsUncommitted = 0
+ swIsCommitted = 1
+)
+const ( //definitions as per G.988 softwareImage::IsActive
+ //swIsInactive = 0 not yet used
+ swIsActive = 1
+)
const onuDataMeID = 0
const onugMeID = 0
const onu2gMeID = 0
@@ -209,9 +217,15 @@
const cEmptyMacAddrString = "000000000000"
const cEmptySerialNumberString = "0000000000000000"
-type swImages struct {
- version string
- isActive uint8
+type sEntrySwImageIndication struct {
+ valid bool
+ entityID uint16
+ version string
+ isCommitted uint8
+}
+type sSwImageIndications struct {
+ activeEntityEntry sEntrySwImageIndication
+ inactiveEntityEntry sEntrySwImageIndication
}
type uniPersConfig struct {
@@ -255,7 +269,7 @@
vendorID string
serialNumber string
equipmentID string
- swImages [secondSwImageMeID + 1]swImages
+ onuSwImageIndications sSwImageIndications
activeSwVersion string
macAddress string
//lockDeviceEntries sync.RWMutex
@@ -448,7 +462,7 @@
)
if onuDeviceEntry.pMibDownloadFsm == nil || onuDeviceEntry.pMibDownloadFsm.pFsm == nil {
logger.Errorw(ctx, "MibDownloadFsm could not be instantiated", log.Fields{"device-id": dh.deviceID})
- // TODO some specifc error treatment - or waiting for crash ?
+ // TODO some specific error treatment - or waiting for crash ?
}
onuDeviceEntry.mibTemplateKVStore = onuDeviceEntry.baseDeviceHandler.setBackend(ctx, cBasePathMibTemplateKvStore)