[VOL-936] add changes for onu distance from OLT
Change-Id: If6201799946ac753780d0424c4bd986e2fb394d2
diff --git a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/common/request_handler.go b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/common/request_handler.go
index 843b95c..a97ae62 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/common/request_handler.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/common/request_handler.go
@@ -735,3 +735,37 @@
}
return result, nil
}
+func (rhp *RequestHandlerProxy) Get_ext_value(args []*ic.Argument) (*voltha.ReturnValues, error) {
+ if len(args) < 3 {
+ logger.Warn("invalid-number-of-args", log.Fields{"args": args})
+ return nil, errors.New("invalid-number-of-args")
+ }
+
+ pDeviceId := &ic.StrType{}
+ device := &voltha.Device{}
+ valuetype := &ic.IntType{}
+ for _, arg := range args {
+ switch arg.Key {
+ case "device":
+ if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
+ logger.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
+ return nil, err
+ }
+ case "pDeviceId":
+ if err := ptypes.UnmarshalAny(arg.Value, pDeviceId); err != nil {
+ logger.Warnw("cannot-unmarshal-parent-deviceId", log.Fields{"error": err})
+ return nil, err
+ }
+ case "valuetype":
+ if err := ptypes.UnmarshalAny(arg.Value, valuetype); err != nil {
+ logger.Warnw("cannot-unmarshal-valuetype", log.Fields{"error": err})
+ return nil, err
+ }
+ default:
+ logger.Warnw("key-not-found", log.Fields{"arg.Key": arg.Key})
+ }
+ }
+
+ //Invoke the Get_value API on the adapter
+ return rhp.adapter.Get_ext_value(pDeviceId.Val, device, voltha.ValueType_Type(valuetype.Val))
+}
diff --git a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/iAdapter.go b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/iAdapter.go
index 112fb94..9436963 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/iAdapter.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/iAdapter.go
@@ -53,4 +53,5 @@
Disable_port(deviceId string, port *voltha.Port) error
Child_device_lost(parentDeviceId string, parentPortNo uint32, onuID uint32) error
Start_omci_test(device *voltha.Device, request *voltha.OmciTestRequest) (*voltha.TestResponse, error)
+ Get_ext_value(deviceId string, device *voltha.Device, valueflag voltha.ValueType_Type) (*voltha.ReturnValues, error)
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index b81647f..dc46454 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -99,7 +99,7 @@
github.com/modern-go/concurrent
# github.com/modern-go/reflect2 v1.0.1
github.com/modern-go/reflect2
-# github.com/opencord/voltha-lib-go/v3 v3.1.6
+# github.com/opencord/voltha-lib-go/v3 v3.1.7
github.com/opencord/voltha-lib-go/v3/pkg/adapters
github.com/opencord/voltha-lib-go/v3/pkg/adapters/adapterif
github.com/opencord/voltha-lib-go/v3/pkg/adapters/common