[VOL-2252] Adding support for OMCI Test messages and releasing 0.0.2
Change-Id: I6607745b16d2f4ab1eed47c739c96b583c0dff24
diff --git a/README.md b/README.md
index 7183f6e..c3930c5 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
-# omci-sim
+# Omci-sim
-Test
+This library is a dump of the OMCI messages reported by an ALPHA device
+and it is currently used by [BBSim](github.com/opencord/bbsim) to
+emulate OMCI responses during [VOLTHA](docs.voltha.org) scale tests.
diff --git a/VERSION b/VERSION
index c0ab82c..8acdd82 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.0.1-dev
+0.0.1
diff --git a/omci_handlers.go b/omci_handlers.go
index 67a57e7..de62498 100644
--- a/omci_handlers.go
+++ b/omci_handlers.go
@@ -37,6 +37,7 @@
SynchronizeTime: syncTime,
Delete: delete,
Reboot: reboot,
+ Test: testHandler,
}
func mibReset(class OmciClass, content OmciContent, key OnuKey) ([]byte, error) {
@@ -564,3 +565,22 @@
return pkt, nil
}
+func testHandler(class OmciClass, content OmciContent, key OnuKey) ([]byte, error) {
+ var pkt []byte
+ pkt = []byte{
+ 0x20, 0x52, 0x45, 0x43, 0x56, 0x00, 0x20, 0x53,
+ 0x45, 0x4e, 0x44, 0x00, 0x88, 0xb5, 0x02, 0x3f,
+ 0x1b, 0x0a, 0x01, 0x07, 0x80, 0x01, 0x01, 0x00,
+ 0xa5, 0x03, 0xe0, 0x0b, 0x05, 0x0b, 0x2b, 0x09,
+ 0x1c, 0xd0, 0x0c, 0x32, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x28, 0xf8, 0x13, 0x1b, 0x36,}
+
+ log.WithFields(log.Fields{
+ "IntfId": key.IntfId,
+ "OnuId": key.OnuId,
+ }).Trace("Omci Test")
+ return pkt, nil
+}
+