VOL-2191: Implement the right interpretation of instance-control attribute
          from tech-profile

- When using "single-instance" type TP, make sure no other gem-port on any
  other UNI port is referncing the same alloc-id before releasing the alloc-id.
- When deleting tech-profile instances for the ONU, log any errors with deleting
  any TP instance, but do not break the loop (so that other TP instances can be
  freed up).
- Use 2.2.17 version of voltha-lib-go

Change-Id: I13901e6e3f21b02af076c4c022d4caafc10d6491
diff --git a/mocks/mockTechprofile.go b/mocks/mockTechprofile.go
index 7f4a0f9..7bbea66 100644
--- a/mocks/mockTechprofile.go
+++ b/mocks/mockTechprofile.go
@@ -29,25 +29,25 @@
 	TpID uint32
 }
 
-// SetKVClient to mock tefhprofile SetKVClient method
+// SetKVClient to mock techprofile SetKVClient method
 func (m MockTechProfile) SetKVClient() *db.Backend {
 	return &db.Backend{Client: &MockKVClient{}}
 }
 
-// GetTechProfileInstanceKVPath to mock tefhprofile GetTechProfileInstanceKVPath method
+// GetTechProfileInstanceKVPath to mock techprofile GetTechProfileInstanceKVPath method
 func (m MockTechProfile) GetTechProfileInstanceKVPath(techProfiletblID uint32, uniPortName string) string {
 	return ""
 
 }
 
-// GetTPInstanceFromKVStore to mock tefhprofile GetTPInstanceFromKVStore method
+// GetTPInstanceFromKVStore to mock techprofile GetTPInstanceFromKVStore method
 func (m MockTechProfile) GetTPInstanceFromKVStore(techProfiletblID uint32, path string) (*tp.TechProfile, error) {
 	log.Debug("Warning Warning Warning: GetTPInstanceFromKVStore")
 	return nil, nil
 
 }
 
-// CreateTechProfInstance to mock tefhprofile CreateTechProfInstance method
+// CreateTechProfInstance to mock techprofile CreateTechProfInstance method
 func (m MockTechProfile) CreateTechProfInstance(techProfiletblID uint32, uniPortName string, intfID uint32) *tp.TechProfile {
 
 	return &tp.TechProfile{
@@ -56,48 +56,52 @@
 		ProfileType:                    "mock",
 		Version:                        0,
 		NumGemPorts:                    2,
-		NumTconts:                      1,
 		UpstreamGemPortAttributeList:   nil,
 		DownstreamGemPortAttributeList: nil,
 	}
 
 }
 
-// DeleteTechProfileInstance to mock tefhprofile DeleteTechProfileInstance method
+// DeleteTechProfileInstance to mock techprofile DeleteTechProfileInstance method
 func (m MockTechProfile) DeleteTechProfileInstance(techProfiletblID uint32, uniPortName string) error {
 	return nil
 }
 
-// GetprotoBufParamValue to mock tefhprofile GetprotoBufParamValue method
+// GetprotoBufParamValue to mock techprofile GetprotoBufParamValue method
 func (m MockTechProfile) GetprotoBufParamValue(paramType string, paramKey string) int32 {
 	return 0
 
 }
 
-// GetUsScheduler to mock tefhprofile GetUsScheduler method
+// GetUsScheduler to mock techprofile GetUsScheduler method
 func (m MockTechProfile) GetUsScheduler(tpInstance *tp.TechProfile) *tp_pb.SchedulerConfig {
 	return &tp_pb.SchedulerConfig{}
 
 }
 
-// GetDsScheduler to mock tefhprofile GetDsScheduler method
+// GetDsScheduler to mock techprofile GetDsScheduler method
 func (m MockTechProfile) GetDsScheduler(tpInstance *tp.TechProfile) *tp_pb.SchedulerConfig {
 	return &tp_pb.SchedulerConfig{}
 }
 
-// GetTrafficScheduler to mock tefhprofile GetTrafficScheduler method
+// GetTrafficScheduler to mock techprofile GetTrafficScheduler method
 func (m MockTechProfile) GetTrafficScheduler(tpInstance *tp.TechProfile, SchedCfg *tp_pb.SchedulerConfig,
 	ShapingCfg *tp_pb.TrafficShapingInfo) *tp_pb.TrafficScheduler {
 	return &tp_pb.TrafficScheduler{}
 
 }
 
-// GetTrafficQueues to mock tefhprofile GetTrafficQueues method
+// GetTrafficQueues to mock techprofile GetTrafficQueues method
 func (m MockTechProfile) GetTrafficQueues(tp *tp.TechProfile, Dir tp_pb.Direction) []*tp_pb.TrafficQueue {
 	return []*tp_pb.TrafficQueue{{}}
 }
 
-// GetGemportIDForPbit to mock tefhprofile GetGemportIDForPbit method
+// GetGemportIDForPbit to mock techprofile GetGemportIDForPbit method
 func (m MockTechProfile) GetGemportIDForPbit(tp *tp.TechProfile, Dir tp_pb.Direction, pbit uint32) uint32 {
 	return 0
 }
+
+// FindAllTpInstances to mock techprofile FindAllTpInstances method
+func (m MockTechProfile) FindAllTpInstances(techProfiletblID uint32, ponIntf uint32, onuID uint32) []tp.TechProfile {
+	return []tp.TechProfile{}
+}