VOL-3936: Remove techprofile and ponresourcemanager circular dependency
Also bump major version given that it breaks the APIs for techprofile
and ponresource manager modules.
Change-Id: Ie11770209b61f1b7056647d209192a07544aa3a0
diff --git a/pkg/ponresourcemanager/ponresourcemanager.go b/pkg/ponresourcemanager/ponresourcemanager.go
index 804a6f3..35b67a7 100755
--- a/pkg/ponresourcemanager/ponresourcemanager.go
+++ b/pkg/ponresourcemanager/ponresourcemanager.go
@@ -28,7 +28,6 @@
"github.com/opencord/voltha-lib-go/v5/pkg/db"
"github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore"
"github.com/opencord/voltha-lib-go/v5/pkg/log"
- tp "github.com/opencord/voltha-lib-go/v5/pkg/techprofile"
)
const (
@@ -144,7 +143,6 @@
OLTModel string
KVStore *db.Backend
KVStoreForConfig *db.Backend
- TechProfileMgr tp.TechProfileIf // create object of *tp.TechProfileMgr
// Below attribute, pon_resource_ranges, should be initialized
// by reading from KV store.
@@ -209,11 +207,7 @@
logger.Error(ctx, "KV Config Client initilization failed")
return nil, errors.New("Failed to init KV Config client")
}
- // Initialize techprofile for this technology
- if PONMgr.TechProfileMgr, _ = tp.NewTechProfile(ctx, &PONMgr, Backend, Address, basePathKvStore); PONMgr.TechProfileMgr == nil {
- logger.Error(ctx, "Techprofile initialization failed")
- return nil, errors.New("Failed to init tech profile")
- }
+
PONMgr.PonResourceRanges = make(map[string]interface{})
PONMgr.SharedResourceMgrs = make(map[string]*PONResourceManager)
PONMgr.SharedIdxByType = make(map[string]string)