VOL-2555:
- Wait for ONU Deactivation Completed Indication before clearing the ONU
- Add unit tests for delete onu timeout and failure cases
- Fix UT of DeleteScheduler

Change-Id: Ie287f733934ca5f6eb06b365e426074622724bb7
diff --git a/agent/src/core_data.cc b/agent/src/core_data.cc
index dc98400..8cb51a8 100644
--- a/agent/src/core_data.cc
+++ b/agent/src/core_data.cc
@@ -122,11 +122,6 @@
 /* 'qmp_id_to_qmp_map' maps TM Queue Mapping Profile ID to TM Queue Mapping Profile */
 std::map<int, std::vector < uint32_t > > qmp_id_to_qmp_map;
 
-// Flag used to watch whether mocked alloc_cfg_compltd_key is added to alloc_cfg_compltd_map
-#ifdef TEST_MODE
-bool ALLOC_CFG_FLAG = false;
-#endif
-
 // Map used to track response from BAL for ITU PON Alloc Configuration.
 // The key is alloc_cfg_compltd_key and value is a concurrent thread-safe queue which is
 // used for pushing (from BAL) and popping (at application) the results.
@@ -134,6 +129,12 @@
 // Lock to protect critical section data structure used for handling AllocObject configuration response.
 bcmos_fastlock alloc_cfg_wait_lock;
 
+// Map used to track response from BAL for Onu Deactivation Completed Indication
+// The key is alloc_cfg_compltd_key and value is a concurrent thread-safe queue which is
+// used for pushing (from BAL) and popping (at application) the results.
+std::map<onu_deact_compltd_key,  Queue<onu_deactivate_complete_result> *> onu_deact_compltd_map;
+// Lock to protect critical section data structure used for handling Onu Deactivation Completed Indication
+bcmos_fastlock onu_deactivate_wait_lock;
 
 /*** ACL Handling related data start ***/