From 4e60ec39d0165e2548d3bc5b2c230400122444ad Mon Sep 17 00:00:00 2001 From: narrieta Date: Thu, 5 Nov 2020 09:54:48 -0800 Subject: [PATCH] Report placeholder extension status as an array --- azurelinuxagent/ga/exthandlers.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/azurelinuxagent/ga/exthandlers.py b/azurelinuxagent/ga/exthandlers.py index ef35db7349..a188d4ce3d 100644 --- a/azurelinuxagent/ga/exthandlers.py +++ b/azurelinuxagent/ga/exthandlers.py @@ -955,16 +955,22 @@ def initialize(self): seq_no, status_path = self.get_status_file_path() # pylint: disable=W0612 if status_path is not None: now = datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ") - status = { - "version": 1.0, - "timestampUTC": now, - "status": { - "name": self.ext_handler.name, - "operation": "Enabling Handler", - "status": "transitioning", - "code": 0 + status = [ + { + "version": 1.0, + "timestampUTC": now, + "status": { + "name": self.ext_handler.name, + "operation": "Enabling Handler", + "status": "transitioning", + "code": 0, + "formattedMessage": { + "lang": "en-US", + "message": "Install/Enable is in progress." + } + } } - } + ] fileutil.write_file(status_path, json.dumps(status)) except IOError as e: # pylint: disable=C0103 @@ -1614,4 +1620,4 @@ class ExtensionStatusError(ExtensionError): MaxSizeExceeded = 4 def __init__(self, msg=None, inner=None, code=-1): # pylint: disable=W0235 - super(ExtensionStatusError, self).__init__(msg, inner, code) \ No newline at end of file + super(ExtensionStatusError, self).__init__(msg, inner, code)