Update to omci-lib-go version 1.15.2
Change-Id: I383f643458f7edac5174408b5b3083afa6c584f6
diff --git a/VERSION b/VERSION
index 4b1cb82..a21ae4a 100755
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.2.5-dev168
+1.2.5-dev169
diff --git a/go.mod b/go.mod
index 6cd9f23..ff9b3d0 100644
--- a/go.mod
+++ b/go.mod
@@ -9,7 +9,7 @@
github.com/golang/protobuf v1.4.2
github.com/google/gopacket v1.1.17
github.com/looplab/fsm v0.1.0
- github.com/opencord/omci-lib-go v0.15.0
+ github.com/opencord/omci-lib-go v0.15.2
github.com/opencord/voltha-lib-go/v4 v4.0.8
github.com/opencord/voltha-protos/v4 v4.0.12
github.com/stretchr/testify v1.6.1
diff --git a/go.sum b/go.sum
index d28d98f..862d5bb 100644
--- a/go.sum
+++ b/go.sum
@@ -219,8 +219,8 @@
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.2 h1:3mYCb7aPxS/RU7TI1y4rkEn1oKmPRjNJLNEXgw7MH2I=
github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
-github.com/opencord/omci-lib-go v0.15.0 h1:ADbDnHOm+XwOZ8CwRY0XmVnFXl/VIdygIdh3iZkbk6E=
-github.com/opencord/omci-lib-go v0.15.0/go.mod h1:6OIHB14Ch5qGgHzwSWlMACtk5KFoLzQ4LAhdcy4jwvo=
+github.com/opencord/omci-lib-go v0.15.2 h1:RVqjVI0RvWlJb+n8NMWrIDt2J+o5L7JNkHZdHjpMLws=
+github.com/opencord/omci-lib-go v0.15.2/go.mod h1:6OIHB14Ch5qGgHzwSWlMACtk5KFoLzQ4LAhdcy4jwvo=
github.com/opencord/voltha-lib-go/v4 v4.0.8 h1:QgcbvmTG917U89FdjchCckvLprETR3A8qnd4BInvRnA=
github.com/opencord/voltha-lib-go/v4 v4.0.8/go.mod h1:n4QSYuNICFuQCQuTHf4N8Gh4ymOqPNbijqCD+sgSgJ4=
github.com/opencord/voltha-protos/v4 v4.0.12 h1:x8drb8inaUByjVLFbXSiQwRTU//dfde0MKIHyKb1JMw=
diff --git a/internal/pkg/onuadaptercore/omci_cc.go b/internal/pkg/onuadaptercore/omci_cc.go
index a21761b..4776796 100644
--- a/internal/pkg/onuadaptercore/omci_cc.go
+++ b/internal/pkg/onuadaptercore/omci_cc.go
@@ -2569,9 +2569,7 @@
// DeviceIdentifier: omci.BaselineIdent, // Optional, defaults to Baseline
// Length: 0x28, // Optional, defaults to 40 octets
}
- //TODO!!!: omci-lib wrongly defines just 29 byte data section (which should be 31 bytes)
- // as long as this is valid and testing is done with some dummy image we omit the last two bytes in each section!!!
- var localSectionData [29]byte
+ var localSectionData [31]byte
copy(localSectionData[:], aSection)
request := &omci.DownloadSectionRequest{
MeBasePacket: omci.MeBasePacket{
diff --git a/vendor/github.com/opencord/omci-lib-go/VERSION b/vendor/github.com/opencord/omci-lib-go/VERSION
index a551051..4312e0d 100644
--- a/vendor/github.com/opencord/omci-lib-go/VERSION
+++ b/vendor/github.com/opencord/omci-lib-go/VERSION
@@ -1 +1 @@
-0.15.0
+0.15.2
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/classidmap.go b/vendor/github.com/opencord/omci-lib-go/generated/classidmap.go
index 2fe9ea1..3c3bdbe 100644
--- a/vendor/github.com/opencord/omci-lib-go/generated/classidmap.go
+++ b/vendor/github.com/opencord/omci-lib-go/generated/classidmap.go
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
- /*
+/*
* NOTE: This file was generated, manual edits will be overwritten!
*
* Generated by 'goCodeGenerator.py':
@@ -53,7 +53,7 @@
func init() {
// Create mapping of 16-bit managed entity class IDs to ME-type
- classToManagedEntityMap = make(map[ClassID]CreateME, 177)
+ classToManagedEntityMap = make(map[ClassID]CreateME, 179)
classToManagedEntityMap[2] = NewOnuData
classToManagedEntityMap[5] = NewCardholder
@@ -170,9 +170,11 @@
classToManagedEntityMap[305] = NewDot1AgCfmStack
classToManagedEntityMap[306] = NewDot1AgChassisManagementInfo
classToManagedEntityMap[307] = NewOctetString
+ classToManagedEntityMap[308] = NewGeneralPurposeBuffer
classToManagedEntityMap[309] = NewMulticastOperationsProfile
classToManagedEntityMap[310] = NewMulticastSubscriberConfigInfo
classToManagedEntityMap[311] = NewMulticastSubscriberMonitor
+ classToManagedEntityMap[312] = NewFecPerformanceMonitoringHistoryData
classToManagedEntityMap[313] = NewReAniG
classToManagedEntityMap[314] = NewPhysicalPathTerminationPointReUni
classToManagedEntityMap[315] = NewReUpstreamAmplifier
diff --git a/vendor/github.com/opencord/omci-lib-go/layers.go b/vendor/github.com/opencord/omci-lib-go/layers.go
index f05c34b..6eb09a9 100644
--- a/vendor/github.com/opencord/omci-lib-go/layers.go
+++ b/vendor/github.com/opencord/omci-lib-go/layers.go
@@ -154,6 +154,7 @@
nextLayerMapping[TestRequestType] = LayerTypeTestRequest
nextLayerMapping[StartSoftwareDownloadRequestType] = LayerTypeStartSoftwareDownloadRequest
nextLayerMapping[DownloadSectionRequestType] = LayerTypeDownloadSectionRequest
+ nextLayerMapping[DownloadSectionRequestWithResponseType] = LayerTypeDownloadSectionRequest
nextLayerMapping[EndSoftwareDownloadRequestType] = LayerTypeEndSoftwareDownloadRequest
nextLayerMapping[ActivateSoftwareRequestType] = LayerTypeActivateSoftwareRequest
nextLayerMapping[CommitSoftwareRequestType] = LayerTypeCommitSoftwareRequest
diff --git a/vendor/github.com/opencord/omci-lib-go/messagetypes.go b/vendor/github.com/opencord/omci-lib-go/messagetypes.go
index 8cca403..c237e72 100644
--- a/vendor/github.com/opencord/omci-lib-go/messagetypes.go
+++ b/vendor/github.com/opencord/omci-lib-go/messagetypes.go
@@ -29,46 +29,47 @@
type MessageType byte
const (
- CreateRequestType = MessageType(byte(me.Create) | me.AR)
- CreateResponseType = MessageType(byte(me.Create) | me.AK)
- DeleteRequestType = MessageType(byte(me.Delete) | me.AR)
- DeleteResponseType = MessageType(byte(me.Delete) | me.AK)
- SetRequestType = MessageType(byte(me.Set) | me.AR)
- SetResponseType = MessageType(byte(me.Set) | me.AK)
- GetRequestType = MessageType(byte(me.Get) | me.AR)
- GetResponseType = MessageType(byte(me.Get) | me.AK)
- GetAllAlarmsRequestType = MessageType(byte(me.GetAllAlarms) | me.AR)
- GetAllAlarmsResponseType = MessageType(byte(me.GetAllAlarms) | me.AK)
- GetAllAlarmsNextRequestType = MessageType(byte(me.GetAllAlarmsNext) | me.AR)
- GetAllAlarmsNextResponseType = MessageType(byte(me.GetAllAlarmsNext) | me.AK)
- MibUploadRequestType = MessageType(byte(me.MibUpload) | me.AR)
- MibUploadResponseType = MessageType(byte(me.MibUpload) | me.AK)
- MibUploadNextRequestType = MessageType(byte(me.MibUploadNext) | me.AR)
- MibUploadNextResponseType = MessageType(byte(me.MibUploadNext) | me.AK)
- MibResetRequestType = MessageType(byte(me.MibReset) | me.AR)
- MibResetResponseType = MessageType(byte(me.MibReset) | me.AK)
- TestRequestType = MessageType(byte(me.Test) | me.AR)
- TestResponseType = MessageType(byte(me.Test) | me.AK)
- StartSoftwareDownloadRequestType = MessageType(byte(me.StartSoftwareDownload) | me.AR)
- StartSoftwareDownloadResponseType = MessageType(byte(me.StartSoftwareDownload) | me.AK)
- DownloadSectionRequestType = MessageType(byte(me.DownloadSection) | me.AR)
- DownloadSectionResponseType = MessageType(byte(me.DownloadSection) | me.AK)
- EndSoftwareDownloadRequestType = MessageType(byte(me.EndSoftwareDownload) | me.AR)
- EndSoftwareDownloadResponseType = MessageType(byte(me.EndSoftwareDownload) | me.AK)
- ActivateSoftwareRequestType = MessageType(byte(me.ActivateSoftware) | me.AR)
- ActivateSoftwareResponseType = MessageType(byte(me.ActivateSoftware) | me.AK)
- CommitSoftwareRequestType = MessageType(byte(me.CommitSoftware) | me.AR)
- CommitSoftwareResponseType = MessageType(byte(me.CommitSoftware) | me.AK)
- SynchronizeTimeRequestType = MessageType(byte(me.SynchronizeTime) | me.AR)
- SynchronizeTimeResponseType = MessageType(byte(me.SynchronizeTime) | me.AK)
- RebootRequestType = MessageType(byte(me.Reboot) | me.AR)
- RebootResponseType = MessageType(byte(me.Reboot) | me.AK)
- GetNextRequestType = MessageType(byte(me.GetNext) | me.AR)
- GetNextResponseType = MessageType(byte(me.GetNext) | me.AK)
- GetCurrentDataRequestType = MessageType(byte(me.GetCurrentData) | me.AR)
- GetCurrentDataResponseType = MessageType(byte(me.GetCurrentData) | me.AK)
- SetTableRequestType = MessageType(byte(me.SetTable) | me.AR)
- SetTableResponseType = MessageType(byte(me.SetTable) | me.AK)
+ CreateRequestType = MessageType(byte(me.Create) | me.AR)
+ CreateResponseType = MessageType(byte(me.Create) | me.AK)
+ DeleteRequestType = MessageType(byte(me.Delete) | me.AR)
+ DeleteResponseType = MessageType(byte(me.Delete) | me.AK)
+ SetRequestType = MessageType(byte(me.Set) | me.AR)
+ SetResponseType = MessageType(byte(me.Set) | me.AK)
+ GetRequestType = MessageType(byte(me.Get) | me.AR)
+ GetResponseType = MessageType(byte(me.Get) | me.AK)
+ GetAllAlarmsRequestType = MessageType(byte(me.GetAllAlarms) | me.AR)
+ GetAllAlarmsResponseType = MessageType(byte(me.GetAllAlarms) | me.AK)
+ GetAllAlarmsNextRequestType = MessageType(byte(me.GetAllAlarmsNext) | me.AR)
+ GetAllAlarmsNextResponseType = MessageType(byte(me.GetAllAlarmsNext) | me.AK)
+ MibUploadRequestType = MessageType(byte(me.MibUpload) | me.AR)
+ MibUploadResponseType = MessageType(byte(me.MibUpload) | me.AK)
+ MibUploadNextRequestType = MessageType(byte(me.MibUploadNext) | me.AR)
+ MibUploadNextResponseType = MessageType(byte(me.MibUploadNext) | me.AK)
+ MibResetRequestType = MessageType(byte(me.MibReset) | me.AR)
+ MibResetResponseType = MessageType(byte(me.MibReset) | me.AK)
+ TestRequestType = MessageType(byte(me.Test) | me.AR)
+ TestResponseType = MessageType(byte(me.Test) | me.AK)
+ StartSoftwareDownloadRequestType = MessageType(byte(me.StartSoftwareDownload) | me.AR)
+ StartSoftwareDownloadResponseType = MessageType(byte(me.StartSoftwareDownload) | me.AK)
+ DownloadSectionRequestType = MessageType(me.DownloadSection) // me.AR is optional
+ DownloadSectionRequestWithResponseType = MessageType(byte(me.DownloadSection) | me.AR)
+ DownloadSectionResponseType = MessageType(byte(me.DownloadSection) | me.AK)
+ EndSoftwareDownloadRequestType = MessageType(byte(me.EndSoftwareDownload) | me.AR)
+ EndSoftwareDownloadResponseType = MessageType(byte(me.EndSoftwareDownload) | me.AK)
+ ActivateSoftwareRequestType = MessageType(byte(me.ActivateSoftware) | me.AR)
+ ActivateSoftwareResponseType = MessageType(byte(me.ActivateSoftware) | me.AK)
+ CommitSoftwareRequestType = MessageType(byte(me.CommitSoftware) | me.AR)
+ CommitSoftwareResponseType = MessageType(byte(me.CommitSoftware) | me.AK)
+ SynchronizeTimeRequestType = MessageType(byte(me.SynchronizeTime) | me.AR)
+ SynchronizeTimeResponseType = MessageType(byte(me.SynchronizeTime) | me.AK)
+ RebootRequestType = MessageType(byte(me.Reboot) | me.AR)
+ RebootResponseType = MessageType(byte(me.Reboot) | me.AK)
+ GetNextRequestType = MessageType(byte(me.GetNext) | me.AR)
+ GetNextResponseType = MessageType(byte(me.GetNext) | me.AK)
+ GetCurrentDataRequestType = MessageType(byte(me.GetCurrentData) | me.AR)
+ GetCurrentDataResponseType = MessageType(byte(me.GetCurrentData) | me.AK)
+ SetTableRequestType = MessageType(byte(me.SetTable) | me.AR)
+ SetTableResponseType = MessageType(byte(me.SetTable) | me.AK)
// Autonomous ONU messages
AlarmNotificationType = MessageType(byte(me.AlarmNotification))
AttributeValueChangeType = MessageType(byte(me.AttributeValueChange))
@@ -2143,7 +2144,7 @@
type DownloadSectionRequest struct {
MeBasePacket // Note: EntityInstance for software download is two specific values
SectionNumber byte
- SectionData [29]byte // 0 padding if final transfer requires only a partial block
+ SectionData [31]byte // 0 padding if final transfer requires only a partial block
}
func (omci *DownloadSectionRequest) String() string {
@@ -2202,7 +2203,7 @@
if omci.EntityClass != me.SoftwareImageClassID {
return me.NewProcessingError("invalid Entity Class for Download Section response")
}
- bytes, err := b.AppendBytes(1 + 29)
+ bytes, err := b.AppendBytes(1 + len(omci.SectionData))
if err != nil {
return err
}
diff --git a/vendor/github.com/opencord/omci-lib-go/omci.go b/vendor/github.com/opencord/omci-lib-go/omci.go
index 7a162d6..3904352 100644
--- a/vendor/github.com/opencord/omci-lib-go/omci.go
+++ b/vendor/github.com/opencord/omci-lib-go/omci.go
@@ -112,6 +112,7 @@
TransactionID uint16
MessageType MessageType
DeviceIdentifier DeviceIdent
+ ResponseExpected bool // Significant for Download Section Request only
Payload []byte
padding []byte
Length uint16
@@ -206,6 +207,7 @@
omci.TransactionID = binary.BigEndian.Uint16(data[0:])
omci.MessageType = MessageType(data[2])
omci.DeviceIdentifier = DeviceIdent(data[3])
+ omci.ResponseExpected = byte(omci.MessageType)&me.AR == me.AR
isNotification := (int(omci.MessageType) & ^me.MsgTypeMask) == 0
if omci.TransactionID == 0 && !isNotification {
@@ -298,7 +300,13 @@
return errors.New(msg)
}
binary.BigEndian.PutUint16(bytes, omci.TransactionID)
- bytes[2] = byte(omci.MessageType)
+ // Download section request can optionally have the AR bit set or cleared. If user passes in this
+ // message type and sets download requested, fix up the message type for them.
+ if omci.MessageType == DownloadSectionRequestType && omci.ResponseExpected {
+ bytes[2] = byte(DownloadSectionRequestWithResponseType)
+ } else {
+ bytes[2] = byte(omci.MessageType)
+ }
bytes[3] = byte(omci.DeviceIdentifier)
b.PushLayer(LayerTypeOMCI)
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 5448a90..6a2dcc5 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -73,7 +73,7 @@
github.com/mitchellh/go-homedir
# github.com/mitchellh/mapstructure v1.1.2
github.com/mitchellh/mapstructure
-# github.com/opencord/omci-lib-go v0.15.0
+# github.com/opencord/omci-lib-go v0.15.2
github.com/opencord/omci-lib-go
github.com/opencord/omci-lib-go/generated
# github.com/opencord/voltha-lib-go/v4 v4.0.8