Skip to content

Commit

Permalink
Report placeholder extension status as an array (#2068)
Browse files Browse the repository at this point in the history
Co-authored-by: narrieta <narrieta>
  • Loading branch information
narrieta authored Nov 5, 2020
1 parent 67e1086 commit 2b56987
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions azurelinuxagent/ga/exthandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
super(ExtensionStatusError, self).__init__(msg, inner, code)

0 comments on commit 2b56987

Please sign in to comment.