Repository: Azure/WALinuxAgent
Pull request #2376 (2021-10-05 15:00:07)

Rename ValidHandlerStatus to ExtensionStatusValue
During a previous PR we talked about renaming ValidHandlerStatus to ExtensionStatus. There is already an ExtensionStatus in the restapi module so using ExtensionStatusValue instead.

For consistency, I also renamed HandlerStatus to ExtHandlerStatusValue (since there is a ExtHandlerStatus in restapi)


Patch:
diff --git a/azurelinuxagent/common/logcollector_manifests.py b/azurelinuxagent/common/logcollector_manifests.py
index 27eba6ed..cdeed984 100644
--- a/azurelinuxagent/common/logcollector_manifests.py
+++ b/azurelinuxagent/common/logcollector_manifests.py
@@ -126,4 +126,4 @@ echo,
 
 echo,### Gathering Disk Info ###
 diskinfo,
-"""
\ No newline at end of file
+"""
diff --git a/azurelinuxagent/ga/exthandlers.py b/azurelinuxagent/ga/exthandlers.py
index ed5fe8d8..32e1195b 100644
--- a/azurelinuxagent/ga/exthandlers.py
+++ b/azurelinuxagent/ga/exthandlers.py
@@ -88,15 +88,15 @@ _STATUS_FILE_RETRY_DELAY = 2  # seconds
 _DEFAULT_SEQ_NO = "0"
 
 
-class HandlerStatus(object):
+class ExtHandlerStatusValue(object):
     """
-    Statuses for Handlers
+    Statuses for Extension Handlers
     """
     ready = "Ready"
     not_ready = "NotReady"
 
 
-class ValidHandlerStatus(object):
+class ExtensionStatusValue(object):
     """
     Statuses for Extensions
     """
@@ -107,7 +107,7 @@ class ValidHandlerStatus(object):
     STRINGS = ['transitioning', 'warning', 'error', 'success']
 
 
-_EXTENSION_TERMINAL_STATUSES = [ValidHandlerStatus.error, ValidHandlerStatus.success]
+_EXTENSION_TERMINAL_STATUSES = [ExtensionStatusValue.error, ExtensionStatusValue.success]
 
 
 class ExtCommandEnvVariable(object):
@@ -147,7 +147,7 @@ def parse_formatted_message(formatted_message):
 def parse_ext_substatus(substatus):
     # Check extension sub status format
     validate_has_key(substatus, 'status', 'substatus/status')
-    validate_in_range(substatus['status'], ValidHandlerStatus.STRINGS, 'substatus/status')
+    validate_in_range(substatus['status'], ExtensionStatusValue.STRINGS, 'substatus/status')
     status = ExtensionSubStatus()
     status.name = substatus.get('name')
     status.status = substatus.get('status')
@@ -174,8 +174,8 @@ def parse_ext_status(ext_status, data):
     validate_has_key(status_data, 'status', 'status/status')
 
     status = status_data['status']
-    if status not in ValidHandlerStatus.STRINGS:
-        status = ValidHandlerStatus.error
+    if status not in ExtensionStatusValue.STRINGS:
+        status = ExtensionStatusValue.error
 
     applied_time = status_data.get('configurationAppliedTime')
     ext_status.configurationAppliedTime = applied_time
@@ -530,7 +530,7 @@ class ExtHandlersHandler(object):
                     if handler_i.get_handler_status() is None:
                         handler_i.set_handler_status(message=depends_on_err_msg, code=-1)
 
-                    handler_i.create_status_file_if_not_exist(extension, status=ValidHandlerStatus.error, code=-1,
+                    handler_i.create_status_file_if_not_exist(extension, status=ExtensionStatusValue.error, code=-1,
                                                               operation=WALAEventOperation.ExtensionProcessing,
                                                               message=depends_on_err_msg)
 
@@ -604,7 +604,7 @@ class ExtHandlersHandler(object):
                 extension_name, status)
             raise Exception(msg)
 
-        if status != ValidHandlerStatus.success:
+        if status != ExtensionStatusValue.success:
             msg = "Dependent Extension {0} did not succeed. Status was {1}".format(extension_name, status)
             raise Exception(msg)
 
@@ -655,7 +655,7 @@ class ExtHandlersHandler(object):
             # This error is only thrown for enable operation on MultiConfig extension.
             # Since these are maintained by the extensions, the expectation here is that they would update their status files appropriately with their errors.
             # The extensions should already have a placeholder status file, but incase they dont, setting one here to fail fast.
-            ext_handler_i.create_status_file_if_not_exist(extension, status=ValidHandlerStatus.error, code=error.code,
+            ext_handler_i.create_status_file_if_not_exist(extension, status=ExtensionStatusValue.error, code=error.code,
                                                           operation=ext_handler_i.operation, message=err_msg)
             add_event(name=ext_name, version=ext_handler_i.ext_handler.properties.version, op=ext_handler_i.operation,
                       is_success=False, log_event=True, message=err_msg)
@@ -696,7 +696,7 @@ class ExtHandlersHandler(object):
         # file with failure since the extensions wont be called where they can create their status files.
         # This way we guarantee reporting back to CRP
         if ext_handler_i.should_perform_multi_config_op(extension):
-            ext_handler_i.create_status_file_if_not_exist(extension, status=ValidHandlerStatus.error, code=error.code,
+            ext_handler_i.create_status_file_if_not_exist(extension, status=ExtensionStatusValue.error, code=error.code,
                                                           operation=report_op, message=message)
 
         if report:
@@ -1439,7 +1439,7 @@ class ExtHandlerInstance(object):
             raise
         # Even if a single extension is enabled for this handler, set the Handler state as Enabled
         self.set_handler_state(ExtHandlerState.Enabled)
-        self.set_handler_status(status=HandlerStatus.ready, message="Plugin enabled")
+        self.set_handler_status(status=ExtHandlerStatusValue.ready, message="Plugin enabled")
 
     def should_perform_multi_config_op(self, extension):
         return self.supports_multi_config and extension is not None
@@ -1492,7 +1492,7 @@ class ExtHandlerInstance(object):
         # For MultiConfig, Set the handler state to Installed only when all extensions have been disabled
         if not self.supports_multi_config or not any(self.enabled_extensions):
             self.set_handler_state(ExtHandlerState.Installed)
-            self.set_handler_status(status=HandlerStatus.not_ready, message="Plugin disabled")
+            self.set_handler_status(status=ExtHandlerStatusValue.not_ready, message="Plugin disabled")
 
     def install(self, uninstall_exit_code=None, extension=None):
         # For Handler level operations, extension just specifies the settings that initiated the install.
@@ -1508,7 +1508,7 @@ class ExtHandlerInstance(object):
         self.launch_command(install_cmd, cmd_name="install", timeout=900, extension=extension,
                             extension_error_code=ExtensionErrorCodes.PluginInstallProcessingFailed, env=env)
         self.set_handler_state(ExtHandlerState.Installed)
-        self.set_handler_status(status=HandlerStatus.not_ready, message="Plugin installed but not enabled")
+        self.set_handler_status(status=ExtHandlerStatusValue.not_ready, message="Plugin installed but not enabled")
 
     def uninstall(self, extension=None):
         # For Handler level operations, extension just specifies the settings that initiated the uninstall.
@@ -1682,7 +1682,7 @@ class ExtHandlerInstance(object):
             data_str, data = self._read_status_file(ext_status_file)
         except ExtensionStatusError as e:
             msg = ""
-            ext_status.status = ValidHandlerStatus.error
+            ext_status.status = ExtensionStatusValue.error
 
             if e.code == ExtensionStatusError.CouldNotReadStatusFile:
                 ext_status.code = ExtensionErrorCodes.PluginUnknownFailure
@@ -1700,7 +1700,7 @@ class ExtHandlerInstance(object):
                 # Reporting a success code and transitioning status to keep in accordance with existing code that
                 # creates default status placeholder file
                 ext_status.code = ExtensionErrorCodes.PluginSuccess
-                ext_status.status = ValidHandlerStatus.transitioning
+                ext_status.status = ExtensionStatusValue.transitioning
 
             # This log is periodic due to the verbose nature of the status check. Please make sure that the message
             # constructed above does not change very frequently and includes important info such as sequence number,
@@ -1743,7 +1743,7 @@ class ExtHandlerInstance(object):
                 ext_status.message = "Could not get a valid status from the extension {0}. Encountered the " \
                                      "following error: {1}".format(self.get_full_name(ext), ustr(e))
                 ext_status.code = ExtensionErrorCodes.PluginSettingsStatusInvalid
-                ext_status.status = ValidHandlerStatus.error
+                ext_status.status = ExtensionStatusValue.error
 
         return ext_status
 
@@ -1757,7 +1757,7 @@ class ExtHandlerInstance(object):
         # Missing status file is considered a non-terminal state here
         # so that extension sequencing can wait until it becomes existing
         if not os.path.exists(ext_status_file):
-            status = ValidHandlerStatus.warning
+            status = ExtensionStatusValue.warning
         else:
             ext_status = self.collect_ext_status(ext)
             status = ext_status.status if ext_status is not None else None
@@ -1844,7 +1844,7 @@ class ExtHandlerInstance(object):
                 # This way the error would be reported back to CRP and the failure would be propagated instantly as compared to CRP eventually timing it out.
                 ext_status = ExtensionStatus(name=ext.name, seq_no=ext.sequenceNumber,
                                              code=ExtensionErrorCodes.PluginUnknownFailure,
-                                             status=ValidHandlerStatus.error, message=msg)
+                                             status=ExtensionStatusValue.error, message=msg)
                 ext_handler_status.extension_status = ext_status
                 ext_handler_statuses.append(ext_handler_status)
 
@@ -2087,7 +2087,7 @@ class ExtHandlerInstance(object):
             self.report_event(name=extension_name, message=message, is_success=False, log_event=False)
             self.logger.warn(message)
 
-    def set_handler_status(self, status=HandlerStatus.not_ready, message="", code=0):
+    def set_handler_status(self, status=ExtHandlerStatusValue.not_ready, message="", code=0):
         state_dir = self.get_conf_dir()
 
         handler_status = ExtHandlerStatus()
diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py
index aa45f88b..9ccb64de 100644
--- a/azurelinuxagent/ga/update.py
+++ b/azurelinuxagent/ga/update.py
@@ -56,7 +56,7 @@ from azurelinuxagent.ga.collect_logs import get_collect_logs_handler, is_log_col
 from azurelinuxagent.ga.env import get_env_handler
 from azurelinuxagent.ga.collect_telemetry_events import get_collect_telemetry_events_handler
 
-from azurelinuxagent.ga.exthandlers import HandlerManifest, ExtHandlersHandler, list_agent_lib_directory, ValidHandlerStatus, HandlerStatus
+from azurelinuxagent.ga.exthandlers import HandlerManifest, ExtHandlersHandler, list_agent_lib_directory, ExtensionStatusValue, ExtHandlerStatusValue
 from azurelinuxagent.ga.monitor import get_monitor_handler
 
 from azurelinuxagent.ga.send_telemetry_events import get_send_telemetry_events_handler
@@ -108,7 +108,7 @@ class ExtensionsSummary(object):
             # take the name and status of the extension if is it not None, else use the handler's
             self.summary = [(o.name, o.status) for o in map(lambda h: h.extension_status if h.extension_status is not None else h, vm_status.vmAgent.extensionHandlers)]
             self.summary.sort(key=lambda s: s[0])  # sort by extension name to make comparisons easier
-            self.converged = all(status in (ValidHandlerStatus.success, ValidHandlerStatus.error, HandlerStatus.ready, HandlerStatus.not_ready) for _, status in self.summary)
+            self.converged = all(status in (ExtensionStatusValue.success, ExtensionStatusValue.error, ExtHandlerStatusValue.ready, ExtHandlerStatusValue.not_ready) for _, status in self.summary)
 
     def __eq__(self, other):
         return self.summary == other.summary


Test patch:
diff --git a/tests/ga/test_extension.py b/tests/ga/test_extension.py
index e5f110e3..3b9e06b9 100644
--- a/tests/ga/test_extension.py
+++ b/tests/ga/test_extension.py
@@ -47,7 +47,7 @@ from azurelinuxagent.common.utils.restutil import KNOWN_WIRESERVER_IP
 
 from azurelinuxagent.ga.exthandlers import ExtHandlerInstance, migrate_handler_state, \
     get_exthandlers_handler, AGENT_STATUS_FILE, ExtCommandEnvVariable, HandlerManifest, NOT_RUN, \
-    ValidHandlerStatus, HANDLER_COMPLETE_NAME_PATTERN, HandlerEnvironment, GoalStateStatus
+    ExtensionStatusValue, HANDLER_COMPLETE_NAME_PATTERN, HandlerEnvironment, GoalStateStatus
 
 from tests.protocol import mockwiredata
 from tests.protocol.mocks import mock_wire_protocol, HttpRequestPredicates, MockHttpResponse
@@ -1567,7 +1567,7 @@ class TestExtension_Deprecated(AgentTestCase):
         exthandlers_handler.report_ext_handlers_status()
 
         self._assert_handler_status(protocol.report_vm_status, "Ready", 1, "1.0.0")
-        self._assert_ext_status(protocol.report_vm_status, ValidHandlerStatus.transitioning, 0,
+        self._assert_ext_status(protocol.report_vm_status, ExtensionStatusValue.transitioning, 0,
                                 expected_msg="This status is being reported by the Guest Agent since no status "
                                              "file was reported by extension OSTCExtensions.ExampleHandlerLinux")
 
@@ -1600,7 +1600,7 @@ class TestExtension_Deprecated(AgentTestCase):
                 self._assert_handler_status(protocol.report_vm_status, "Ready", 1, "1.0.0",
                                             expected_handler_name="OSTCExtensions.OtherExampleHandlerLinux")
                 # The extension status reported by the Handler should be transitioning since no status file was found
-                self._assert_ext_status(protocol.report_vm_status, ValidHandlerStatus.transitioning, 0,
+                self._assert_ext_status(protocol.report_vm_status, ExtensionStatusValue.transitioning, 0,
                                         expected_handler_name="OSTCExtensions.OtherExampleHandlerLinux",
                                         expected_msg="This status is being reported by the Guest Agent since no status "
                                                      "file was reported by extension OSTCExtensions.OtherExampleHandlerLinux")
@@ -1609,7 +1609,7 @@ class TestExtension_Deprecated(AgentTestCase):
                 # And since it was not executed, it should not report any extension status either
                 self._assert_handler_status(protocol.report_vm_status, "NotReady", 0, "1.0.0",
                                             expected_msg="Dependent Extension OSTCExtensions.OtherExampleHandlerLinux did not reach a terminal state within the allowed timeout. Last status was {0}".format(
-                                                ValidHandlerStatus.warning))
+                                                ExtensionStatusValue.warning))
 
     def test_it_should_not_create_placeholder_for_single_config_extensions(self, mock_http_get, mock_crypt_util, *args):
         original_popen = subprocess.Popen
@@ -1648,13 +1648,13 @@ class TestExtension_Deprecated(AgentTestCase):
             self._assert_handler_status(protocol.report_vm_status, "Ready", 0, "1.0.0",
                                         expected_handler_name="Microsoft.AKS.Compute.AKS.Linux.Billing")
 
-            self._assert_ext_status(protocol.report_vm_status, ValidHandlerStatus.success, 0,
+            self._assert_ext_status(protocol.report_vm_status, ExtensionStatusValue.success, 0,
                                     expected_handler_name="OSTCExtensions.ExampleHandlerLinux",
                                     expected_msg="Enabling non-AKS")
-            self._assert_ext_status(protocol.report_vm_status, ValidHandlerStatus.success, 0,
+            self._assert_ext_status(protocol.report_vm_status, ExtensionStatusValue.success, 0,
                                     expected_handler_name="Microsoft.AKS.Compute.AKS.Linux.AKSNode",
                                     expected_msg="Enabling AKSNode")
-            self._assert_ext_status(protocol.report_vm_status, ValidHandlerStatus.success, 0,
+            self._assert_ext_status(protocol.report_vm_status, ExtensionStatusValue.success, 0,
                                     expected_handler_name="Microsoft.AKS.Compute.AKS-Engine.Linux.Billing",
                                     expected_msg="Enabling AKSBilling")
 
@@ -1691,9 +1691,9 @@ class TestExtension_Deprecated(AgentTestCase):
                                             expected_handler_name="OSTCExtensions.ExampleHandlerLinux")
             # The extension status reported by the Handler should contain a fragment of status file for
             # debugging. The uniqueMachineId tag comes from status file
-            self._assert_ext_status(protocol.report_vm_status, ValidHandlerStatus.error, 0,
-                                        expected_handler_name="OSTCExtensions.ExampleHandlerLinux",
-                                        expected_msg="\"uniqueMachineId\": \"e5e5602b-48a6-4c35-9f96-752043777af1\"")
+            self._assert_ext_status(protocol.report_vm_status, ExtensionStatusValue.error, 0,
+                                    expected_handler_name="OSTCExtensions.ExampleHandlerLinux",
+                                    expected_msg="\"uniqueMachineId\": \"e5e5602b-48a6-4c35-9f96-752043777af1\"")
 
     def test_wait_for_handler_completion_success_status(self, mock_http_get, mock_crypt_util, *args):
         """
@@ -1709,13 +1709,13 @@ class TestExtension_Deprecated(AgentTestCase):
                                     expected_handler_name="OSTCExtensions.OtherExampleHandlerLinux",
                                     expected_msg='Plugin enabled')
         # The extension status reported by the Handler should be an error since no status file was found
-        self._assert_ext_status(protocol.report_vm_status, ValidHandlerStatus.success, 0,
+        self._assert_ext_status(protocol.report_vm_status, ExtensionStatusValue.success, 0,
                                 expected_handler_name="OSTCExtensions.OtherExampleHandlerLinux")
 
         # The Handler Status for the dependent extension should be NotReady as it was not executed at all
         # And since it was not executed, it should not report any extension status either
         self._assert_handler_status(protocol.report_vm_status, "Ready", 1, "1.0.0", expected_msg='Plugin enabled')
-        self._assert_ext_status(protocol.report_vm_status, ValidHandlerStatus.success, 0)
+        self._assert_ext_status(protocol.report_vm_status, ExtensionStatusValue.success, 0)
 
     def test_wait_for_handler_completion_error_status(self, mock_http_get, mock_crypt_util, *args):
         """
@@ -3185,13 +3185,13 @@ class TestCollectExtensionStatus(AgentTestCase):
         self.assertEqual(ext_status.sequenceNumber, 0)
         self.assertEqual(ext_status.message, "Aenean semper nunc nisl, vitae sollicitudin felis consequat at. In "
                                              "lobortis elementum sapien, non commodo odio semper ac.")
-        self.assertEqual(ext_status.status, ValidHandlerStatus.success)
+        self.assertEqual(ext_status.status, ExtensionStatusValue.success)
 
         self.assertEqual(len(ext_status.substatusList), 1)
         sub_status = ext_status.substatusList[0]
         self.assertEqual(sub_status.code, "0")
         self.assertEqual(sub_status.message, None)
-        self.assertEqual(sub_status.status, ValidHandlerStatus.success)
+        self.assertEqual(sub_status.status, ExtensionStatusValue.success)
 
     @patch("azurelinuxagent.common.conf.get_lib_dir")
     def test_collect_ext_status_for_invalid_json(self, mock_lib_dir):
@@ -3212,7 +3212,7 @@ class TestCollectExtensionStatus(AgentTestCase):
                                              r"was in an incorrect format and the agent could not parse it correctly."
                                              r" Failed due to.*")
         self.assertIn("\"uniqueMachineId\": \"e5e5602b-48a6-4c35-9f96-752043777af1\"", ext_status.message)
-        self.assertEqual(ext_status.status, ValidHandlerStatus.error)
+        self.assertEqual(ext_status.status, ExtensionStatusValue.error)
         self.assertEqual(len(ext_status.substatusList), 0)
 
     @patch("azurelinuxagent.common.conf.get_lib_dir")
@@ -3230,7 +3230,7 @@ class TestCollectExtensionStatus(AgentTestCase):
         self.assertEqual(ext_status.sequenceNumber, 0)
         self.assertEqual(ext_status.message, "Aenean semper nunc nisl, vitae sollicitudin felis consequat at. In "
                                              "lobortis elementum sapien, non commodo odio semper ac.")
-        self.assertEqual(ext_status.status, ValidHandlerStatus.success)
+        self.assertEqual(ext_status.status, ExtensionStatusValue.success)
 
     @patch("azurelinuxagent.common.conf.get_lib_dir")
     def test_collect_ext_status_very_large_status_message(self, mock_lib_dir):
@@ -3250,7 +3250,7 @@ class TestCollectExtensionStatus(AgentTestCase):
         self.assertRegex(ext_status.message, r"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum non "
                                              r"lacinia urna, sit .*\[TRUNCATED\]")
         self.maxDiff = None
-        self.assertEqual(ext_status.status, ValidHandlerStatus.success)
+        self.assertEqual(ext_status.status, ExtensionStatusValue.success)
         self.assertEqual(len(ext_status.substatusList), 1) # NUM OF SUBSTATUS PARSED
         for sub_status in ext_status.substatusList:
             self.assertRegex(sub_status.name, r'\[\{"status"\: \{"status": "success", "code": "1", "snapshotInfo": '
@@ -3258,7 +3258,7 @@ class TestCollectExtensionStatus(AgentTestCase):
             self.assertEqual(0, sub_status.code)
             self.assertRegex(sub_status.message, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum "
                                                  "non lacinia urna, sit amet venenatis orci.*")
-            self.assertEqual(sub_status.status, ValidHandlerStatus.success)
+            self.assertEqual(sub_status.status, ExtensionStatusValue.success)
 
     @patch("azurelinuxagent.common.conf.get_lib_dir")
     def test_collect_ext_status_very_large_status_file_with_multiple_substatus_nodes(self, mock_lib_dir):
@@ -3277,7 +3277,7 @@ class TestCollectExtensionStatus(AgentTestCase):
         self.assertEqual(ext_status.sequenceNumber, 0)
         self.assertRegex(ext_status.message, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
                                              "Vestibulum non lacinia urna, sit .*")
-        self.assertEqual(ext_status.status, ValidHandlerStatus.success)
+        self.assertEqual(ext_status.status, ExtensionStatusValue.success)
         self.assertEqual(len(ext_status.substatusList), 12)  # The original file has 41 substatus nodes.
         for sub_status in ext_status.substatusList:
             self.assertRegex(sub_status.name, r'\[\{"status"\: \{"status": "success", "code": "1", "snapshotInfo": '
@@ -3285,7 +3285,7 @@ class TestCollectExtensionStatus(AgentTestCase):
             self.assertEqual(0, sub_status.code)
             self.assertRegex(sub_status.message, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum "
                                                  "non lacinia urna, sit amet venenatis orci.*")
-            self.assertEqual(ValidHandlerStatus.success, sub_status.status)
+            self.assertEqual(ExtensionStatusValue.success, sub_status.status)
 
     @patch("azurelinuxagent.common.conf.get_lib_dir")
     def test_collect_ext_status_read_file_read_exceptions(self, mock_lib_dir):
@@ -3315,7 +3315,7 @@ class TestCollectExtensionStatus(AgentTestCase):
             self.assertRegex(ext_status.message, r".*We couldn't read any status for {0}-{1} extension, for the "
                                                  r"sequence number {2}. It failed due to".
                              format("TestHandler", "1.0.0", 0))
-            self.assertEqual(ext_status.status, ValidHandlerStatus.error)
+            self.assertEqual(ext_status.status, ExtensionStatusValue.error)
             self.assertEqual(len(ext_status.substatusList), 0)
 
     @patch("azurelinuxagent.common.conf.get_lib_dir")
@@ -3335,7 +3335,7 @@ class TestCollectExtensionStatus(AgentTestCase):
                                              "was in an incorrect format and the agent could not parse it correctly."
                                              " Failed due to.*".
                          format("TestHandler", "1.0.0", 0))
-        self.assertEqual(ext_status.status, ValidHandlerStatus.error)
+        self.assertEqual(ext_status.status, ExtensionStatusValue.error)
         self.assertEqual(len(ext_status.substatusList), 0)
 
     @patch("azurelinuxagent.common.conf.get_lib_dir")
@@ -3353,7 +3353,7 @@ class TestCollectExtensionStatus(AgentTestCase):
         self.assertEqual(ext_status.sequenceNumber, 0)
         self.assertRegex(ext_status.message, "Could not get a valid status from the extension {0}-{1}. "
                                              "Encountered the following error".format("TestHandler", "1.0.0"))
-        self.assertEqual(ext_status.status, ValidHandlerStatus.error)
+        self.assertEqual(ext_status.status, ExtensionStatusValue.error)
         self.assertEqual(len(ext_status.substatusList), 0)
 
     @patch("azurelinuxagent.common.conf.get_lib_dir")
@@ -3370,7 +3370,7 @@ class TestCollectExtensionStatus(AgentTestCase):
         self.assertEqual(ext_status.sequenceNumber, 0)
         self.assertIn("This status is being reported by the Guest Agent since no status file was reported by extension {0}".
                       format("TestHandler"), ext_status.message)
-        self.assertEqual(ext_status.status, ValidHandlerStatus.transitioning)
+        self.assertEqual(ext_status.status, ExtensionStatusValue.transitioning)
         self.assertEqual(len(ext_status.substatusList), 0)
 
 
diff --git a/tests/ga/test_multi_config_extension.py b/tests/ga/test_multi_config_extension.py
index 2c787f31..4ce686df 100644
--- a/tests/ga/test_multi_config_extension.py
+++ b/tests/ga/test_multi_config_extension.py
@@ -10,7 +10,7 @@ from azurelinuxagent.common.exception import GoalStateAggregateStatusCodes
 from azurelinuxagent.common.future import ustr
 from azurelinuxagent.common.protocol.restapi import ExtHandlerRequestedState, ExtensionState
 from azurelinuxagent.common.utils import fileutil
-from azurelinuxagent.ga.exthandlers import get_exthandlers_handler, ValidHandlerStatus, ExtCommandEnvVariable, \
+from azurelinuxagent.ga.exthandlers import get_exthandlers_handler, ExtensionStatusValue, ExtCommandEnvVariable, \
     GoalStateStatus, ExtHandlerInstance
 from tests.ga.extension_emulator import enable_invocations, extension_emulator, ExtensionCommandNames, Actions, \
     extract_extension_info_from_command
@@ -229,11 +229,11 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                           handler_name="OSTCExtensions.ExampleHandlerLinux",
                                                           expected_count=3)
         expected_extensions = {
-            "firstExtension": {"status": ValidHandlerStatus.success, "seq_no": 1,
+            "firstExtension": {"status": ExtensionStatusValue.success, "seq_no": 1,
                                "message": get_message("Enabling firstExtension")},
-            "secondExtension": {"status": ValidHandlerStatus.success, "seq_no": 2,
+            "secondExtension": {"status": ExtensionStatusValue.success, "seq_no": 2,
                                 "message": get_message("Enabling secondExtension")},
-            "thirdExtension": {"status": ValidHandlerStatus.success, "seq_no": 3,
+            "thirdExtension": {"status": ExtensionStatusValue.success, "seq_no": 3,
                                "message": get_message("Enabling thirdExtension")},
         }
         self._assert_extension_status(mc_handlers[:], expected_extensions, multi_config=True)
@@ -241,7 +241,7 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
         sc_handler = self._assert_and_get_handler_status(aggregate_status=protocol.aggregate_status,
                                                          handler_name="Microsoft.Powershell.ExampleExtension")
         expected_extensions = {
-            "Microsoft.Powershell.ExampleExtension": {"status": ValidHandlerStatus.success, "seq_no": 9,
+            "Microsoft.Powershell.ExampleExtension": {"status": ExtensionStatusValue.success, "seq_no": 9,
                                                       "message": get_message("Enabling SingleConfig extension")}
         }
         self._assert_extension_status(sc_handler[:], expected_extensions)
@@ -259,8 +259,8 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                           handler_name="OSTCExtensions.ExampleHandlerLinux",
                                                           status="Ready", expected_count=2)
         expected_extensions = {
-            "thirdExtension": {"status": ValidHandlerStatus.success, "seq_no": 99, "message": None},
-            "fourthExtension": {"status": ValidHandlerStatus.success, "seq_no": 101, "message": None},
+            "thirdExtension": {"status": ExtensionStatusValue.success, "seq_no": 99, "message": None},
+            "fourthExtension": {"status": ExtensionStatusValue.success, "seq_no": 101, "message": None},
         }
         self.__assert_extension_not_present(mc_handlers[:], ["firstExtension", "secondExtension"])
         self._assert_extension_status(mc_handlers[:], expected_extensions, multi_config=True)
@@ -268,7 +268,7 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                          handler_name="Microsoft.Powershell.ExampleExtension",
                                                          status="Ready")
         expected_extensions = {
-            "Microsoft.Powershell.ExampleExtension": {"status": ValidHandlerStatus.success, "seq_no": 10,
+            "Microsoft.Powershell.ExampleExtension": {"status": ExtensionStatusValue.success, "seq_no": 10,
                                                       "message": None}
         }
         self._assert_extension_status(sc_handler[:], expected_extensions)
@@ -346,7 +346,7 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                                                                "OSTCExtensions.ExampleHandlerLinux"))
             self.assertTrue(all(
                 handler['runtimeSettingsStatus']['settingsStatus']['status']['operation'] == WALAEventOperation.Download and
-                handler['runtimeSettingsStatus']['settingsStatus']['status']['status'] == ValidHandlerStatus.error for
+                handler['runtimeSettingsStatus']['settingsStatus']['status']['status'] == ExtensionStatusValue.error for
                 handler in mc_handlers), "Incorrect data reported")
             sc_handlers = self._assert_and_get_handler_status(aggregate_status=protocol.aggregate_status,
                                                               handler_name="Microsoft.Powershell.ExampleExtension",
@@ -391,9 +391,9 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                                   handler_name="OSTCExtensions.ExampleHandlerLinux",
                                                                   expected_count=3, status="Ready")
                 expected_extensions = {
-                    "firstExtension": {"status": ValidHandlerStatus.error, "seq_no": 1, "message": fail_code},
-                    "secondExtension": {"status": ValidHandlerStatus.success, "seq_no": 2, "message": None},
-                    "thirdExtension": {"status": ValidHandlerStatus.success, "seq_no": 3, "message": None},
+                    "firstExtension": {"status": ExtensionStatusValue.error, "seq_no": 1, "message": fail_code},
+                    "secondExtension": {"status": ExtensionStatusValue.success, "seq_no": 2, "message": None},
+                    "thirdExtension": {"status": ExtensionStatusValue.success, "seq_no": 3, "message": None},
                 }
                 self._assert_extension_status(mc_handlers, expected_extensions, multi_config=True)
 
@@ -446,7 +446,7 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                               handler_name="OSTCExtensions.ExampleHandlerLinux",
                                                               expected_count=1, handler_version=new_version)
             expected_extensions = {
-                "thirdExtension": {"status": ValidHandlerStatus.success, "seq_no": 99, "message": None}
+                "thirdExtension": {"status": ExtensionStatusValue.success, "seq_no": 99, "message": None}
             }
             self._assert_extension_status(mc_handlers, expected_extensions, multi_config=True)
             self._assert_and_get_handler_status(aggregate_status=protocol.aggregate_status, handler_version=new_version,
@@ -509,14 +509,14 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                               handler_name="OSTCExtensions.ExampleHandlerLinux",
                                                               expected_count=1, handler_version=new_version)
             expected_extensions = {
-                "thirdExtension": {"status": ValidHandlerStatus.success, "seq_no": 99, "message": None}
+                "thirdExtension": {"status": ExtensionStatusValue.success, "seq_no": 99, "message": None}
             }
             self._assert_extension_status(mc_handlers, expected_extensions, multi_config=True)
             sc_handler = self._assert_and_get_handler_status(aggregate_status=protocol.aggregate_status,
                                                              handler_version=new_version,
                                                              handler_name="Microsoft.Powershell.ExampleExtension")
             expected_extensions = {
-                "Microsoft.Powershell.ExampleExtension": {"status": ValidHandlerStatus.success, "seq_no": 10,
+                "Microsoft.Powershell.ExampleExtension": {"status": ExtensionStatusValue.success, "seq_no": 10,
                                                           "message": None}
             }
             self._assert_extension_status(sc_handler, expected_extensions)
@@ -567,14 +567,14 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                               expected_count=1, handler_version=new_version,
                                                               status="NotReady", message=fail_code)
             expected_extensions = {
-                "thirdExtension": {"status": ValidHandlerStatus.error, "seq_no": 99, "message": fail_code}
+                "thirdExtension": {"status": ExtensionStatusValue.error, "seq_no": 99, "message": fail_code}
             }
             self._assert_extension_status(mc_handlers, expected_extensions, multi_config=True)
             sc_handler = self._assert_and_get_handler_status(aggregate_status=protocol.aggregate_status,
                                                              handler_version=new_version,
                                                              handler_name="Microsoft.Powershell.ExampleExtension")
             expected_extensions = {
-                "Microsoft.Powershell.ExampleExtension": {"status": ValidHandlerStatus.success, "seq_no": 10,
+                "Microsoft.Powershell.ExampleExtension": {"status": ExtensionStatusValue.success, "seq_no": 10,
                                                           "message": None}
             }
             self._assert_extension_status(sc_handler, expected_extensions)
@@ -615,9 +615,9 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                                   handler_name="OSTCExtensions.ExampleHandlerLinux",
                                                                   expected_count=3, status="Ready")
                 expected_extensions = {
-                    "firstExtension": {"status": ValidHandlerStatus.success, "seq_no": 1, "message": None},
-                    "secondExtension": {"status": ValidHandlerStatus.success, "seq_no": 2, "message": None},
-                    "thirdExtension": {"status": ValidHandlerStatus.error, "seq_no": 3, "message": fail_code},
+                    "firstExtension": {"status": ExtensionStatusValue.success, "seq_no": 1, "message": None},
+                    "secondExtension": {"status": ExtensionStatusValue.success, "seq_no": 2, "message": None},
+                    "thirdExtension": {"status": ExtensionStatusValue.error, "seq_no": 3, "message": fail_code},
                 }
                 self._assert_extension_status(mc_handlers, expected_extensions, multi_config=True)
 
@@ -625,7 +625,7 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                                  handler_name="Microsoft.Powershell.ExampleExtension",
                                                                  status="NotReady", message=fail_code)
                 expected_extensions = {
-                    "Microsoft.Powershell.ExampleExtension": {"status": ValidHandlerStatus.error, "seq_no": 9,
+                    "Microsoft.Powershell.ExampleExtension": {"status": ExtensionStatusValue.error, "seq_no": 9,
                                                               "message": fail_code}
                 }
                 self._assert_extension_status(sc_handler, expected_extensions)
@@ -661,8 +661,8 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                               handler_name="OSTCExtensions.ExampleHandlerLinux",
                                                               expected_count=2, status="Ready")
             expected_extensions = {
-                "thirdExtension": {"status": ValidHandlerStatus.success, "seq_no": 99, "message": "Enabling thirdExtension"},
-                "fourthExtension": {"status": ValidHandlerStatus.success, "seq_no": 101, "message": "Enabling fourthExtension"},
+                "thirdExtension": {"status": ExtensionStatusValue.success, "seq_no": 99, "message": "Enabling thirdExtension"},
+                "fourthExtension": {"status": ExtensionStatusValue.success, "seq_no": 101, "message": "Enabling fourthExtension"},
             }
             self._assert_extension_status(mc_handlers, expected_extensions, multi_config=True)
             __assert_state_file("OSTCExtensions.ExampleHandlerLinux", "1.0.0",
@@ -672,7 +672,7 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
             sc_handler = self._assert_and_get_handler_status(aggregate_status=protocol.aggregate_status,
                                                              handler_name="Microsoft.Powershell.ExampleExtension")
             expected_extensions = {
-                "Microsoft.Powershell.ExampleExtension": {"status": ValidHandlerStatus.success, "seq_no": 10,
+                "Microsoft.Powershell.ExampleExtension": {"status": ExtensionStatusValue.success, "seq_no": 10,
                                                           "message": "Enabling SingleConfig Extension"}
             }
             self._assert_extension_status(sc_handler, expected_extensions)
@@ -784,7 +784,7 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                                   handler_name="OSTCExtensions.ExampleHandlerLinux",
                                                                   expected_count=1, handler_version="1.1.0")
                 expected_extensions = {
-                    "thirdExtension": {"status": ValidHandlerStatus.success, "seq_no": 99,
+                    "thirdExtension": {"status": ExtensionStatusValue.success, "seq_no": 99,
                                        "message": "Enabling thirdExtension"},
                 }
                 self._assert_extension_status(mc_handlers[:], expected_extensions, multi_config=True)
@@ -793,7 +793,7 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                                  handler_name="Microsoft.Powershell.ExampleExtension",
                                                                  handler_version="1.1.0")
                 expected_extensions = {
-                    "Microsoft.Powershell.ExampleExtension": {"status": ValidHandlerStatus.success, "seq_no": 10,
+                    "Microsoft.Powershell.ExampleExtension": {"status": ExtensionStatusValue.success, "seq_no": 10,
                                                               "message": "Enabling SingleConfig extension"}
                 }
                 self._assert_extension_status(sc_handler[:], expected_extensions)
@@ -928,11 +928,11 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                        "reported by extension {0}: " \
                                        "[ExtensionStatusError] Status file"
                 expected_extensions = {
-                    "firstExtension": {"status": ValidHandlerStatus.transitioning, "seq_no": 1,
+                    "firstExtension": {"status": ExtensionStatusValue.transitioning, "seq_no": 1,
                                        "message": agent_status_message.format("OSTCExtensions.ExampleHandlerLinux.firstExtension")},
-                    "secondExtension": {"status": ValidHandlerStatus.transitioning, "seq_no": 2,
+                    "secondExtension": {"status": ExtensionStatusValue.transitioning, "seq_no": 2,
                                         "message": agent_status_message.format("OSTCExtensions.ExampleHandlerLinux.secondExtension")},
-                    "thirdExtension": {"status": ValidHandlerStatus.transitioning, "seq_no": 3,
+                    "thirdExtension": {"status": ExtensionStatusValue.transitioning, "seq_no": 3,
                                        "message": agent_status_message.format("OSTCExtensions.ExampleHandlerLinux.thirdExtension")},
                 }
                 self._assert_extension_status(mc_handlers[:], expected_extensions, multi_config=True)
@@ -940,7 +940,7 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                 sc_handler = self._assert_and_get_handler_status(aggregate_status=protocol.aggregate_status,
                                                                  handler_name="Microsoft.Powershell.ExampleExtension")
                 expected_extensions = {
-                    "Microsoft.Powershell.ExampleExtension": {"status": ValidHandlerStatus.transitioning, "seq_no": 9,
+                    "Microsoft.Powershell.ExampleExtension": {"status": ExtensionStatusValue.transitioning, "seq_no": 9,
                                                               "message": agent_status_message.format("Microsoft.Powershell.ExampleExtension")}
                 }
                 self._assert_extension_status(sc_handler[:], expected_extensions)
@@ -995,16 +995,16 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                                                                   handler_name="OSTCExtensions.ExampleHandlerLinux",
                                                                   expected_count=3, status="NotReady", message=err_msg)
                 expected_extensions = {
-                    "firstExtension": {"status": ValidHandlerStatus.error, "seq_no": 1, "message": err_msg},
-                    "secondExtension": {"status": ValidHandlerStatus.error, "seq_no": 2, "message": err_msg},
-                    "thirdExtension": {"status": ValidHandlerStatus.error, "seq_no": 3, "message": err_msg},
+                    "firstExtension": {"status": ExtensionStatusValue.error, "seq_no": 1, "message": err_msg},
+                    "secondExtension": {"status": ExtensionStatusValue.error, "seq_no": 2, "message": err_msg},
+                    "thirdExtension": {"status": ExtensionStatusValue.error, "seq_no": 3, "message": err_msg},
                 }
                 self._assert_extension_status(mc_handlers[:], expected_extensions, multi_config=True)
 
                 sc_handler = self._assert_and_get_handler_status(aggregate_status=protocol.aggregate_status,
                                                                  handler_name="Microsoft.Powershell.ExampleExtension")
                 expected_extensions = {
-                    "Microsoft.Powershell.ExampleExtension": {"status": ValidHandlerStatus.success, "seq_no": 9}
+                    "Microsoft.Powershell.ExampleExtension": {"status": ExtensionStatusValue.success, "seq_no": 9}
                 }
                 self._assert_extension_status(sc_handler[:], expected_extensions)
 
@@ -1036,16 +1036,16 @@ class TestMultiConfigExtensions(_MultiConfigBaseTestClass):
                     # Since the extensions were not even executed, their status file should reflect the last status
                     # (Handler status above should always report the error though)
                     expected_extensions = {
-                        "firstExtension": {"status": ValidHandlerStatus.success, "seq_no": 1},
-                        "secondExtension": {"status": ValidHandlerStatus.success, "seq_no": 2},
-                        "thirdExtension": {"status": ValidHandlerStatus.success, "seq_no": 3},
+                        "firstExtension": {"status": ExtensionStatusValue.success, "seq_no": 1},
+                        "secondExtension": {"status": ExtensionStatusValue.success, "seq_no": 2},
+                        "thirdExtension": {"status": ExtensionStatusValue.success, "seq_no": 3},
                     }
                     self._assert_extension_status(mc_handlers[:], expected_extensions, multi_config=True)
 
                     sc_handler = self._assert_and_get_handler_status(aggregate_status=protocol.aggregate_status,
                                                                      handler_name="Microsoft.Powershell.ExampleExtension")
                     expected_extensions = {
-                        "Microsoft.Powershell.ExampleExtension": {"status": ValidHandlerStatus.success, "seq_no": 9}
+                        "Microsoft.Powershell.ExampleExtension": {"status": ExtensionStatusValue.success, "seq_no": 9}
                     }
                     self._assert_extension_status(sc_handler[:], expected_extensions)
 
@@ -1091,23 +1091,23 @@ class TestMultiConfigExtensionSequencing(_MultiConfigBaseTestClass):
                                                                   handler_name="OSTCExtensions.ExampleHandlerLinux",
                                                                   expected_count=3)
                 expected_extensions = {
-                    "firstExtension": {"status": ValidHandlerStatus.success, "seq_no": 2},
-                    "secondExtension": {"status": ValidHandlerStatus.success, "seq_no": 2},
-                    "thirdExtension": {"status": ValidHandlerStatus.success, "seq_no": 1},
+                    "firstExtension": {"status": ExtensionStatusValue.success, "seq_no": 2},
+                    "secondExtension": {"status": ExtensionStatusValue.success, "seq_no": 2},
+                    "thirdExtension": {"status": ExtensionStatusValue.success, "seq_no": 1},
                 }
                 self._assert_extension_status(mc_handlers[:], expected_extensions, multi_config=True)
 
                 sc_dependent_handler = self._assert_and_get_handler_status(aggregate_status=protocol.aggregate_status,
                                                                            handler_name="Microsoft.Powershell.ExampleExtension")
                 expected_extensions = {
-                    "Microsoft.Powershell.ExampleExtension": {"status": ValidHandlerStatus.success, "seq_no": 2}
+                    "Microsoft.Powershell.ExampleExtension": {"status": ExtensionStatusValue.success, "seq_no": 2}
                 }
                 self._assert_extension_status(sc_dependent_handler[:], expected_extensions)
                 sc_independent_handler = self._assert_and_get_handler_status(
                     aggregate_status=protocol.aggregate_status, handler_name="Microsoft.Azure.Geneva.GenevaMonitoring",
                     handler_version="1.1.0")
                 expected_extensions = {
-                    "Microsoft.Azure.Geneva.GenevaMonitoring": {"status": ValidHandlerStatus.success, "seq_no": 1}
+                    "Microsoft.Azure.Geneva.GenevaMonitoring": {"status": ExtensionStatusValue.success, "seq_no": 1}
                 }
                 self._assert_extension_status(sc_independent_handler[:], expected_extensions)
 
@@ -1119,9 +1119,9 @@ class TestMultiConfigExtensionSequencing(_MultiConfigBaseTestClass):
                                                           message=mc_message)
 
         expected_extensions = {
-            "firstExtension": {"status": ValidHandlerStatus.error, "seq_no": 2, "message": fail_code},
-            "secondExtension": {"status": ValidHandlerStatus.error, "seq_no": 2, "message": err_msg},
-            "thirdExtension": {"status": ValidHandlerStatus.error, "seq_no": 1, "message": err_msg},
+            "firstExtension": {"status": ExtensionStatusValue.error, "seq_no": 2, "message": fail_code},
+            "secondExtension": {"status": ExtensionStatusValue.error, "seq_no": 2, "message": err_msg},
+            "thirdExtension": {"status": ExtensionStatusValue.error, "seq_no": 1, "message": err_msg},
         }
         self._assert_extension_status(mc_handlers[:], expected_extensions, multi_config=True)
 
@@ -1186,7 +1186,7 @@ class TestMultiConfigExtensionSequencing(_MultiConfigBaseTestClass):
                     status_file = "{0}.{1}.status".format(env[ExtCommandEnvVariable.ExtensionName],
                                                           env[ExtCommandEnvVariable.ExtensionSeqNumber])
 
-                    status_contents = [{"status": {"status": ValidHandlerStatus.error, "code": fail_code,
+                    status_contents = [{"status": {"status": ExtensionStatusValue.error, "code": fail_code,
                                                    "formattedMessage": {"message": fail_code, "lang": "en-US"}}}]
                     fileutil.write_file(os.path.join(env[ExtCommandEnvVariable.ExtensionPath], "status", status_file),
                                         json.dumps(status_contents))
diff --git a/tests/ga/test_update.py b/tests/ga/test_update.py
index e6939d1f..781cb51a 100644
--- a/tests/ga/test_update.py
+++ b/tests/ga/test_update.py
@@ -40,7 +40,7 @@ from azurelinuxagent.common.utils.flexible_version import FlexibleVersion
 from azurelinuxagent.common.utils.networkutil import FirewallCmdDirectCommands
 from azurelinuxagent.common.version import AGENT_PKG_GLOB, AGENT_DIR_GLOB, AGENT_NAME, AGENT_DIR_PATTERN, \
     AGENT_VERSION, CURRENT_AGENT, CURRENT_VERSION
-from azurelinuxagent.ga.exthandlers import ExtHandlersHandler, ExtHandlerInstance, HandlerEnvironment, ValidHandlerStatus
+from azurelinuxagent.ga.exthandlers import ExtHandlersHandler, ExtHandlerInstance, HandlerEnvironment, ExtensionStatusValue
 from azurelinuxagent.ga.update import GuestAgent, GuestAgentError, MAX_FAILURE, AGENT_MANIFEST_FILE, \
     get_update_handler, ORPHAN_POLL_INTERVAL, AGENT_PARTITION_FILE, AGENT_ERROR_FILE, ORPHAN_WAIT_INTERVAL, \
     CHILD_LAUNCH_RESTART_MAX, CHILD_HEALTH_INTERVAL, GOAL_STATE_PERIOD_EXTENSIONS_DISABLED, UpdateHandler, READONLY_FILE_GLOBS, ExtensionsSummary
@@ -2069,7 +2069,7 @@ def _mock_exthandlers_handler(extension_statuses=None):
         exthandlers_handler = ExtHandlersHandler(protocol)
         exthandlers_handler.run = Mock()
         if extension_statuses is None:
-            exthandlers_handler.report_ext_handlers_status = Mock(return_value=create_vm_status(ValidHandlerStatus.success))
+            exthandlers_handler.report_ext_handlers_status = Mock(return_value=create_vm_status(ExtensionStatusValue.success))
         else:
             exthandlers_handler.report_ext_handlers_status = Mock(side_effect=[create_vm_status(s) for s in extension_statuses])
         yield exthandlers_handler
@@ -2163,7 +2163,7 @@ class GoalStateIntervalTestCase(AgentTestCase):
         initial_goal_state_period, goal_state_period = 11111, 22222
         with patch('azurelinuxagent.common.conf.get_initial_goal_state_period', return_value=initial_goal_state_period):
             with patch('azurelinuxagent.common.conf.get_goal_state_period', return_value=goal_state_period):
-                with _mock_exthandlers_handler([ValidHandlerStatus.transitioning, ValidHandlerStatus.success]) as exthandlers_handler:
+                with _mock_exthandlers_handler([ExtensionStatusValue.transitioning, ExtensionStatusValue.success]) as exthandlers_handler:
                     remote_access_handler = Mock()
 
                     update_handler = _create_update_handler()
@@ -2181,7 +2181,7 @@ class GoalStateIntervalTestCase(AgentTestCase):
         initial_goal_state_period, goal_state_period = 11111, 22222
         with patch('azurelinuxagent.common.conf.get_initial_goal_state_period', return_value=initial_goal_state_period):
             with patch('azurelinuxagent.common.conf.get_goal_state_period', return_value=goal_state_period):
-                with _mock_exthandlers_handler([ValidHandlerStatus.transitioning, ValidHandlerStatus.transitioning]) as exthandlers_handler:
+                with _mock_exthandlers_handler([ExtensionStatusValue.transitioning, ExtensionStatusValue.transitioning]) as exthandlers_handler:
                     remote_access_handler = Mock()
 
                     update_handler = _create_update_handler()
@@ -2211,36 +2211,36 @@ class ExtensionsSummaryTestCase(AgentTestCase):
         return ExtensionsSummary(vm_status)
 
     def test_equality_operator_should_return_true_on_items_with_the_same_value(self):
-        summary1 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ValidHandlerStatus.success), ("Extension 2", ValidHandlerStatus.transitioning)])
-        summary2 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ValidHandlerStatus.success), ("Extension 2", ValidHandlerStatus.transitioning)])
+        summary1 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success), ("Extension 2", ExtensionStatusValue.transitioning)])
+        summary2 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success), ("Extension 2", ExtensionStatusValue.transitioning)])
 
         self.assertTrue(summary1 == summary2, "{0} == {1} should be True".format(summary1, summary2))
 
     def test_equality_operator_should_return_false_on_items_with_different_values(self):
-        summary1 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ValidHandlerStatus.success), ("Extension 2", ValidHandlerStatus.transitioning)])
-        summary2 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ValidHandlerStatus.success), ("Extension 2", ValidHandlerStatus.success)])
+        summary1 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success), ("Extension 2", ExtensionStatusValue.transitioning)])
+        summary2 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success), ("Extension 2", ExtensionStatusValue.success)])
 
         self.assertFalse(summary1 == summary2, "{0} == {1} should be False")
 
-        summary1 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ValidHandlerStatus.success)])
-        summary2 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ValidHandlerStatus.success), ("Extension 2", ValidHandlerStatus.success)])
+        summary1 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success)])
+        summary2 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success), ("Extension 2", ExtensionStatusValue.success)])
 
         self.assertFalse(summary1 == summary2, "{0} == {1} should be False")
 
     def test_inequality_operator_should_return_true_on_items_with_different_values(self):
-        summary1 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ValidHandlerStatus.success), ("Extension 2", ValidHandlerStatus.transitioning)])
-        summary2 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ValidHandlerStatus.success), ("Extension 2", ValidHandlerStatus.success)])
+        summary1 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success), ("Extension 2", ExtensionStatusValue.transitioning)])
+        summary2 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success), ("Extension 2", ExtensionStatusValue.success)])
 
         self.assertTrue(summary1 != summary2, "{0} != {1} should be True".format(summary1, summary2))
 
-        summary1 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ValidHandlerStatus.success)])
-        summary2 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ValidHandlerStatus.success), ("Extension 2", ValidHandlerStatus.success)])
+        summary1 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success)])
+        summary2 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success), ("Extension 2", ExtensionStatusValue.success)])
 
         self.assertTrue(summary1 != summary2, "{0} != {1} should be True")
 
     def test_inequality_operator_should_return_false_on_items_with_same_value(self):
-        summary1 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ValidHandlerStatus.success), ("Extension 2", ValidHandlerStatus.transitioning)])
-        summary2 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ValidHandlerStatus.success), ("Extension 2", ValidHandlerStatus.transitioning)])
+        summary1 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success), ("Extension 2", ExtensionStatusValue.transitioning)])
+        summary2 = ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success), ("Extension 2", ExtensionStatusValue.transitioning)])
 
         self.assertFalse(summary1 != summary2, "{0} != {1} should be False".format(summary1, summary2))