[VOL-3801] remove consul support
Bump up voltha-lib-go version to remove consul
voltha-protos version is updated automatically by mod-update
Change-Id: Ifad40dc54fb03b1e40ea9f5fe46344dacb2527ee
diff --git a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/ponresourcemanager/ponresourcemanager.go b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/ponresourcemanager/ponresourcemanager.go
index 408936b..415ce21 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/ponresourcemanager/ponresourcemanager.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/ponresourcemanager/ponresourcemanager.go
@@ -112,8 +112,11 @@
FLOW_ID_RESOURCE_MAP_PATH = "{%s}/{%s}/flow_ids"
//Flow Id info: Use to store more metadata associated with the flow_id
- //Format: <device_id>/<(pon_intf_id, onu_id)>/flow_id_info/<flow_id>
- FLOW_ID_INFO_PATH = "{%s}/{%s}/flow_id_info/{%d}"
+ FLOW_ID_INFO_PATH_PREFIX = "{%s}/flow_id_info"
+ //Format: <device_id>/flow_id_info/<(pon_intf_id, onu_id)>
+ FLOW_ID_INFO_PATH_INTF_ONU_PREFIX = "{%s}/flow_id_info/{%s}"
+ //Format: <device_id>/flow_id_info/<(pon_intf_id, onu_id)><flow_id>
+ FLOW_ID_INFO_PATH = FLOW_ID_INFO_PATH_PREFIX + "/{%s}/{%d}"
//path on the kvstore to store onugem info map
//format: <device-id>/onu_gem_info/<intfid>
@@ -140,7 +143,7 @@
Technology string
DeviceType string
DeviceID string
- Backend string // ETCD, or consul
+ Backend string // ETCD only currently
Address string // address of the KV store
OLTModel string
KVStore *db.Backend
@@ -159,8 +162,6 @@
func newKVClient(ctx context.Context, storeType string, address string, timeout time.Duration) (kvstore.Client, error) {
logger.Infow(ctx, "kv-store-type", log.Fields{"store": storeType})
switch storeType {
- case "consul":
- return kvstore.NewConsulClient(ctx, address, timeout)
case "etcd":
return kvstore.NewEtcdClient(ctx, address, timeout, log.WarnLevel)
}
@@ -1036,6 +1037,20 @@
return true
}
+func (PONRMgr *PONResourceManager) RemoveAllFlowIDInfo(ctx context.Context, IntfONUID string) bool {
+ /*
+ Remove flow_id_info details configured for the ONU.
+ :param pon_intf_onu_id: reference of PON interface id and onu id
+ */
+ Path := fmt.Sprintf(FLOW_ID_INFO_PATH_INTF_ONU_PREFIX, PONRMgr.DeviceID, IntfONUID)
+
+ if err := PONRMgr.KVStore.DeleteWithPrefix(ctx, Path); err != nil {
+ logger.Errorf(ctx, "Falied to remove resource %s", Path)
+ return false
+ }
+ return true
+}
+
func (PONRMgr *PONResourceManager) UpdateAllocIdsForOnu(ctx context.Context, IntfONUID string, AllocIDs []uint32) error {
/*
Update currently configured alloc ids for given pon_intf_onu_id