diff --git a/voltha/adapters/openolt/openolt_alarms.py b/voltha/adapters/openolt/openolt_alarms.py
index 6eb0702..efb9c1f 100644
--- a/voltha/adapters/openolt/openolt_alarms.py
+++ b/voltha/adapters/openolt/openolt_alarms.py
@@ -18,6 +18,7 @@
 import voltha.adapters.openolt.openolt_platform as platform
 # from voltha.protos.device_pb2 import Port
 from voltha.extensions.alarms.adapter_alarms import AdapterAlarms
+from voltha.extensions.alarms.simulator.simulate_alarms import AdapterAlarmSimulator
 from voltha.extensions.alarms.olt.olt_los_alarm import OltLosAlarm
 from voltha.extensions.alarms.onu.onu_dying_gasp_alarm import OnuDyingGaspAlarm
 from voltha.extensions.alarms.onu.onu_los_alarm import OnuLosAlarm
@@ -31,8 +32,6 @@
 from voltha.extensions.alarms.onu.onu_window_drift_alarm import OnuWindowDriftAlarm
 from voltha.extensions.alarms.onu.onu_activation_fail_alarm import OnuActivationFailAlarm
 
-from voltha.extensions.alarms.onu.onu_discovery_alarm import OnuDiscoveryAlarm
-
 import protos.openolt_pb2 as openolt_pb2
 import voltha.protos.device_pb2 as device_pb2
 
@@ -60,6 +59,7 @@
         self.alarm_suppress = {"olt_los_clear": 0, "onu_disc_raised": []}  # Keep count of alarms to limit.
         try:
             self.alarms = AdapterAlarms(self.adapter_agent, self.device_id, self.logical_device_id)
+            self.simulator = AdapterAlarmSimulator(self.alarms)
         except Exception as initerr:
             self.log.exception("alarmhandler-init-error", errmsg=initerr.message)
             raise Exception(initerr)
@@ -104,48 +104,7 @@
                            alarm=alarm_ind)
 
     def simulate_alarm(self, alarm):
-        if alarm.indicator == "los":
-            alarm_obj = OltLosAlarm(self.alarms, intf_id=alarm.intf_id, port_type_name=alarm.port_type_name)
-        elif alarm.indicator == "dying_gasp":
-            alarm_obj = OnuDyingGaspAlarm(self.alarms, alarm.intf_id, alarm.onu_device_id)
-        elif alarm.indicator == "onu_los":
-            alarm_obj = OnuLosAlarm(self.alarms, onu_id=alarm.onu_device_id, intf_id=alarm.intf_id)
-        elif alarm.indicator == "onu_lopc_miss":
-            alarm_obj = OnuLopcMissAlarm(self.alarms, onu_id=alarm.onu_device_id, intf_id=alarm.intf_id)
-        elif alarm.indicator == "onu_lopc_mic":
-            alarm_obj = OnuLopcMicErrorAlarm(self.alarms, onu_id=alarm.onu_device_id, intf_id=alarm.intf_id)
-        elif alarm.indicator == "onu_lob":
-            alarm_obj = OnuLobAlarm(self.alarms, onu_id=alarm.onu_device_id, intf_id=alarm.intf_id)
-        elif alarm.indicator == "onu_startup":
-            alarm_obj = OnuStartupAlarm(self.alarms, intf_id=alarm.intf_id, onu_id=alarm.onu_device_id)
-        elif alarm.indicator == "onu_signal_degrade":
-            alarm_obj = OnuSignalDegradeAlarm(self.alarms, intf_id=alarm.intf_id, onu_id=alarm.onu_device_id,
-                                  inverse_bit_error_rate=alarm.inverse_bit_error_rate)
-        elif alarm.indicator == "onu_drift_of_window":
-            alarm_obj = OnuWindowDriftAlarm(self.alarms, intf_id=alarm.intf_id,
-                                onu_id=alarm.onu_device_id,
-                                drift=alarm.drift,
-                                new_eqd=alarm.new_eqd)
-        elif alarm.indicator == "onu_signal_fail":
-            alarm_obj = OnuSignalFailAlarm(self.alarms, intf_id=alarm.intf_id,
-                               onu_id=alarm.onu_device_id,
-                               inverse_bit_error_rate=alarm.inverse_bit_error_rate)
-        elif alarm.indicator == "onu_activation":
-            alarm_obj = OnuActivationFailAlarm(self.alarms, intf_id=alarm.intf_id,
-                                   onu_id=alarm.onu_device_id)
-        elif alarm.indicator == "onu_discovery":
-            alarm_obj = OnuDiscoveryAlarm(self.alarms, pon_id=alarm.intf_id,
-                                   serial_number=alarm.onu_serial_number)
-        else:
-            raise Exception("Unknown alarm indicator %s" % alarm.indicator)
-
-        if alarm.operation == alarm.RAISE:
-            alarm_obj.raise_alarm()
-        elif alarm.operation == alarm.CLEAR:
-            alarm_obj.clear_alarm()
-        else:
-            # This shouldn't happen
-            raise Exception("Unknown alarm operation")
+        self.simulator.simulate_alarm(alarm)
 
     def los_indication(self, los_ind):
 
diff --git a/voltha/extensions/alarms/simulator/README.md b/voltha/extensions/alarms/simulator/README.md
new file mode 100644
index 0000000..1333ed7
--- /dev/null
+++ b/voltha/extensions/alarms/simulator/README.md
@@ -0,0 +1 @@
+TODO
diff --git a/voltha/extensions/alarms/simulator/__init__.py b/voltha/extensions/alarms/simulator/__init__.py
new file mode 100644
index 0000000..b0fb0b2
--- /dev/null
+++ b/voltha/extensions/alarms/simulator/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/voltha/extensions/alarms/simulator/simulate_alarms.py b/voltha/extensions/alarms/simulator/simulate_alarms.py
new file mode 100644
index 0000000..73e7b2e
--- /dev/null
+++ b/voltha/extensions/alarms/simulator/simulate_alarms.py
@@ -0,0 +1,77 @@
+#
+# Copyright 2017 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from voltha.extensions.alarms.olt.olt_los_alarm import OltLosAlarm
+from voltha.extensions.alarms.onu.onu_dying_gasp_alarm import OnuDyingGaspAlarm
+from voltha.extensions.alarms.onu.onu_los_alarm import OnuLosAlarm
+from voltha.extensions.alarms.onu.onu_lopc_miss_alarm import OnuLopcMissAlarm
+from voltha.extensions.alarms.onu.onu_lopc_mic_error_alarm import OnuLopcMicErrorAlarm
+from voltha.extensions.alarms.onu.onu_lob_alarm import OnuLobAlarm
+
+from voltha.extensions.alarms.onu.onu_startup_alarm import OnuStartupAlarm
+from voltha.extensions.alarms.onu.onu_signal_degrade_alarm import OnuSignalDegradeAlarm
+from voltha.extensions.alarms.onu.onu_signal_fail_alarm import OnuSignalFailAlarm
+from voltha.extensions.alarms.onu.onu_window_drift_alarm import OnuWindowDriftAlarm
+from voltha.extensions.alarms.onu.onu_activation_fail_alarm import OnuActivationFailAlarm
+
+from voltha.extensions.alarms.onu.onu_discovery_alarm import OnuDiscoveryAlarm
+
+class AdapterAlarmSimulator(object):
+    def __init__(self, adapter_alarms):
+        self.adapter_alarms = adapter_alarms
+
+    def simulate_alarm(self, alarm):
+        if alarm.indicator == "los":
+            alarm_obj = OltLosAlarm(self.adapter_alarms, intf_id=alarm.intf_id, port_type_name=alarm.port_type_name)
+        elif alarm.indicator == "dying_gasp":
+            alarm_obj = OnuDyingGaspAlarm(self.adapter_alarms, alarm.intf_id, alarm.onu_device_id)
+        elif alarm.indicator == "onu_los":
+            alarm_obj = OnuLosAlarm(self.adapter_alarms, onu_id=alarm.onu_device_id, intf_id=alarm.intf_id)
+        elif alarm.indicator == "onu_lopc_miss":
+            alarm_obj = OnuLopcMissAlarm(self.adapter_alarms, onu_id=alarm.onu_device_id, intf_id=alarm.intf_id)
+        elif alarm.indicator == "onu_lopc_mic":
+            alarm_obj = OnuLopcMicErrorAlarm(self.adapter_alarms, onu_id=alarm.onu_device_id, intf_id=alarm.intf_id)
+        elif alarm.indicator == "onu_lob":
+            alarm_obj = OnuLobAlarm(self.adapter_alarms, onu_id=alarm.onu_device_id, intf_id=alarm.intf_id)
+        elif alarm.indicator == "onu_startup":
+            alarm_obj = OnuStartupAlarm(self.adapter_alarms, intf_id=alarm.intf_id, onu_id=alarm.onu_device_id)
+        elif alarm.indicator == "onu_signal_degrade":
+            alarm_obj = OnuSignalDegradeAlarm(self.adapter_alarms, intf_id=alarm.intf_id, onu_id=alarm.onu_device_id,
+                                  inverse_bit_error_rate=alarm.inverse_bit_error_rate)
+        elif alarm.indicator == "onu_drift_of_window":
+            alarm_obj = OnuWindowDriftAlarm(self.adapter_alarms, intf_id=alarm.intf_id,
+                                onu_id=alarm.onu_device_id,
+                                drift=alarm.drift,
+                                new_eqd=alarm.new_eqd)
+        elif alarm.indicator == "onu_signal_fail":
+            alarm_obj = OnuSignalFailAlarm(self.adapter_alarms, intf_id=alarm.intf_id,
+                               onu_id=alarm.onu_device_id,
+                               inverse_bit_error_rate=alarm.inverse_bit_error_rate)
+        elif alarm.indicator == "onu_activation":
+            alarm_obj = OnuActivationFailAlarm(self.adapter_alarms, intf_id=alarm.intf_id,
+                                   onu_id=alarm.onu_device_id)
+        elif alarm.indicator == "onu_discovery":
+            alarm_obj = OnuDiscoveryAlarm(self.adapter_alarms, pon_id=alarm.intf_id,
+                                   serial_number=alarm.onu_serial_number)
+        else:
+            raise Exception("Unknown alarm indicator %s" % alarm.indicator)
+
+        if alarm.operation == alarm.RAISE:
+            alarm_obj.raise_alarm()
+        elif alarm.operation == alarm.CLEAR:
+            alarm_obj.clear_alarm()
+        else:
+            # This shouldn't happen
+            raise Exception("Unknown alarm operation")
