Merge R4 branch to master

Change-Id: I831804666f6391ef72aff6ac1a84fe632a661364
Signed-off-by: ss412g <shuky.har-noy@intl.att.com>
diff --git a/E2Manager/managers/e2t_association_manager.go b/E2Manager/managers/e2t_association_manager.go
index 1b105b0..822c01a 100644
--- a/E2Manager/managers/e2t_association_manager.go
+++ b/E2Manager/managers/e2t_association_manager.go
@@ -101,14 +101,13 @@
 	return nil
 }
 
-func (m *E2TAssociationManager) RemoveE2tInstance(e2tInstance *entities.E2TInstance, ransToBeDissociated []string, ranAssociationList map[string][]string) error {
-	m.logger.Infof("#E2TAssociationManager.RemoveE2tInstance -  Removing E2T %s and re-associating its associated RANs.", e2tInstance.Address)
+func (m *E2TAssociationManager) RemoveE2tInstance(e2tInstance *entities.E2TInstance) error {
+	m.logger.Infof("#E2TAssociationManager.RemoveE2tInstance -  Removing E2T %s and dessociating its associated RANs.", e2tInstance.Address)
 
-	err := m.rmClient.DeleteE2TInstance(e2tInstance.Address, ransToBeDissociated, ranAssociationList)
+	err := m.rmClient.DeleteE2TInstance(e2tInstance.Address, e2tInstance.AssociatedRanList)
 	if err != nil {
-		_ = m.setStateToRoutingManagerFailure(e2tInstance)
-		m.logger.Errorf("#E2TAssociationManager.RemoveE2tInstance - RoutingManager failure: Failed to delete E2T %s. Error: %s", e2tInstance.Address, err)
-		return err
+		m.logger.Warnf("#E2TAssociationManager.RemoveE2tInstance - RoutingManager failure: Failed to delete E2T %s. Error: %s", e2tInstance.Address, err)
+		// log and continue
 	}
 
 	err = m.e2tInstanceManager.RemoveE2TInstance(e2tInstance.Address)
@@ -117,23 +116,6 @@
 		return err
 	}
 
-	for e2tAddress, associatedRans := range ranAssociationList {
-		err = m.e2tInstanceManager.AddRansToInstance(e2tAddress, associatedRans)
-		if err != nil {
-			m.logger.Errorf("#E2TAssociationManager.RemoveE2tInstance - Failed to add RANs %s to E2T %s. Error: %s", associatedRans, e2tAddress, err)
-			return err
-		}
-	}
-
 	m.logger.Infof("#E2TAssociationManager.RemoveE2tInstance -  E2T %s successfully removed.", e2tInstance.Address)
 	return nil
 }
-
-func (m *E2TAssociationManager) setStateToRoutingManagerFailure(e2tInstance *entities.E2TInstance) error {
-
-	err := m.e2tInstanceManager.SetE2tInstanceState(e2tInstance.Address, e2tInstance.State, entities.RoutingManagerFailure)
-	if err != nil {
-		return err
-	}
-	return nil
-}