VOL-1643 Update voltha-go to use voltha-protos and voltha-lib-go v3.0.0
Change-Id: I86744943d59de38e9285ed7f53adc49c3b047e62
diff --git a/rw_core/core/device_agent.go b/rw_core/core/device_agent.go
index 0cbd448..a97e12a 100755
--- a/rw_core/core/device_agent.go
+++ b/rw_core/core/device_agent.go
@@ -27,11 +27,11 @@
"github.com/gogo/protobuf/proto"
"github.com/opencord/voltha-go/db/model"
coreutils "github.com/opencord/voltha-go/rw_core/utils"
- fu "github.com/opencord/voltha-lib-go/v2/pkg/flows"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- ic "github.com/opencord/voltha-protos/v2/go/inter_container"
- ofp "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ fu "github.com/opencord/voltha-lib-go/v3/pkg/flows"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ ic "github.com/opencord/voltha-protos/v3/go/inter_container"
+ ofp "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
@@ -651,7 +651,7 @@
return nil
}
-func (agent *DeviceAgent) updateAdminState(adminState voltha.AdminState_AdminState) error {
+func (agent *DeviceAgent) updateAdminState(adminState voltha.AdminState_Types) error {
agent.lockDevice.Lock()
defer agent.lockDevice.Unlock()
log.Debugw("updateAdminState", log.Fields{"id": agent.deviceID})
@@ -1134,18 +1134,18 @@
return agent.updateDeviceInStoreWithoutLock(cloned, false, "")
}
-func (agent *DeviceAgent) updateDeviceStatus(operStatus voltha.OperStatus_OperStatus, connStatus voltha.ConnectStatus_ConnectStatus) error {
+func (agent *DeviceAgent) updateDeviceStatus(operStatus voltha.OperStatus_Types, connStatus voltha.ConnectStatus_Types) error {
agent.lockDevice.Lock()
defer agent.lockDevice.Unlock()
cloned := agent.getDeviceWithoutLock()
// Ensure the enums passed in are valid - they will be invalid if they are not set when this function is invoked
- if s, ok := voltha.ConnectStatus_ConnectStatus_value[connStatus.String()]; ok {
+ if s, ok := voltha.ConnectStatus_Types_value[connStatus.String()]; ok {
log.Debugw("updateDeviceStatus-conn", log.Fields{"ok": ok, "val": s})
cloned.ConnectStatus = connStatus
}
- if s, ok := voltha.OperStatus_OperStatus_value[operStatus.String()]; ok {
+ if s, ok := voltha.OperStatus_Types_value[operStatus.String()]; ok {
log.Debugw("updateDeviceStatus-oper", log.Fields{"ok": ok, "val": s})
cloned.OperStatus = operStatus
}
@@ -1181,7 +1181,7 @@
return agent.updateDeviceInStoreWithoutLock(cloned, false, "")
}
-func (agent *DeviceAgent) updatePortState(portType voltha.Port_PortType, portNo uint32, operStatus voltha.OperStatus_OperStatus) error {
+func (agent *DeviceAgent) updatePortState(portType voltha.Port_PortType, portNo uint32, operStatus voltha.OperStatus_Types) error {
agent.lockDevice.Lock()
defer agent.lockDevice.Unlock()
// Work only on latest data