[VOL-4738] openonuAdapterGo: key change for storing MIB templates in kv-store
Change-Id: I5d3dd740413768330c91c03743d593385829a66d
diff --git a/templates/BBSM-12345123451234512345-BBSM_IMG_00001-v1-1UNI.json b/templates/BBSM-v0.0.1-BBSM_IMG_00001-v1-1UNI.json
similarity index 99%
rename from templates/BBSM-12345123451234512345-BBSM_IMG_00001-v1-1UNI.json
rename to templates/BBSM-v0.0.1-BBSM_IMG_00001-v1-1UNI.json
index 2b6d348..6f4df81 100644
--- a/templates/BBSM-12345123451234512345-BBSM_IMG_00001-v1-1UNI.json
+++ b/templates/BBSM-v0.0.1-BBSM_IMG_00001-v1-1UNI.json
@@ -1,6 +1,6 @@
{
"TemplateCreated": "2022-03-22 16:57:15.463577",
- "TemplateName": "BBSM/12345123451234512345/BBSM_IMG_00001",
+ "TemplateName": "BBSM/v0.0.1/BBSM_IMG_00001",
"11": {
"257": {
"Attributes": {
diff --git a/templates/BBSM-12345123451234512345-BBSM_IMG_00001-v1.json b/templates/BBSM-v0.0.1-BBSM_IMG_00001-v1.json
similarity index 99%
rename from templates/BBSM-12345123451234512345-BBSM_IMG_00001-v1.json
rename to templates/BBSM-v0.0.1-BBSM_IMG_00001-v1.json
index b3e2eac..3440284 100644
--- a/templates/BBSM-12345123451234512345-BBSM_IMG_00001-v1.json
+++ b/templates/BBSM-v0.0.1-BBSM_IMG_00001-v1.json
@@ -1,6 +1,6 @@
{
"TemplateCreated": "2022-03-22 16:57:15.463577",
- "TemplateName": "BBSM/12345123451234512345/BBSM_IMG_00001",
+ "TemplateName": "BBSM/v0.0.1/BBSM_IMG_00001",
"11": {
"257": {
"Attributes": {
diff --git a/templates/README.md b/templates/README.md
index ecb22df..d5f5b3d 100644
--- a/templates/README.md
+++ b/templates/README.md
@@ -2,7 +2,7 @@
## Important Note:
Unlike for the previous Python version of the openonu-adapter, it is no longer absolutely necessary to store a pre-built version of a MIB template in the kv store
-in order to benefit from an accelerated startup of the ONUs, since for the first ONU of a given triplet of VendorID, EquipmentID and ActiveSwVersion
+in order to benefit from an accelerated startup of the ONUs, since for the first ONU of a given triplet of VendorID, Version and ActiveSwVersion
a corresponding MIB template is generated during its startup and is stored in the kv store.
However, there is a small risk that the first ONU that registers with the Voltha POD reports a MIB which is syntactically correct but incorrect
in terms of content during MIB upload. This MIB would than be stored by the openonu-adapter as a MIB template in kv store and used for other ONUs
@@ -11,7 +11,7 @@
To generate this predefined MIB template an ONU of a certain type can be brought up under controlled laboratory conditions in a Voltha POD
and the generated MIB template can be extracted from the kv store at:
-**service/\<voltha_name>/omci_mibs/go_templates/\<VendorID>/\<EquipmentID>/\<ActiveSwVersion>/**
+**service/\<voltha_name>/omci_mibs/go_templates/\<VendorID>/\<Version>/\<ActiveSwVersion>/**
To use this MIB template in other Voltha PODs, it has to be imported again at exactly the same kv store path as it was extracted from.
An example for the BBSIM MIB template on how to do this can be found in the script file
diff --git a/templates/load-mib-template.sh b/templates/load-mib-template.sh
index 8c3a1ae..2dfd629 100755
--- a/templates/load-mib-template.sh
+++ b/templates/load-mib-template.sh
@@ -19,4 +19,4 @@
ETCD_IP=${DOCKER_HOST_IP:=172.17.0.1}
set -x
-cat BBSM-12345123451234512345-BBSM_IMG_00001-v1.json| ETCDCTL_API=3 etcdctl --endpoints=$ETCD_IP:2379 put service/voltha/omci_mibs/go_templates/BBSM/12345123451234512345/BBSM_IMG_00001
+cat BBSM-v0.0.1-BBSM_IMG_00001-v1.json| ETCDCTL_API=3 etcdctl --endpoints=$ETCD_IP:2379 put service/voltha/omci_mibs/go_templates/BBSM/v0.0.1/BBSM_IMG_00001