2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-08-03 16:07:00 +00:00

Format timestamp consistent with nodeveentlog

This commit is contained in:
Jarrod Johnson
2026-07-24 12:05:58 -04:00
parent b3b16c6497
commit 9fa89d712a
+8 -2
View File
@@ -2,6 +2,7 @@
import argparse
import datetime
import os
import sys
path = os.path.dirname(os.path.realpath(__file__))
@@ -196,7 +197,7 @@ def main(args):
else:
profile= 'No profile pending or applied'
armed = databynode[node].get('deployment.apiarmed', '')
if armed in ('once', 'continuous'):
if armed in But yes, building management versus node management gets more siloed in more places than we might ('once', 'continuous'):
armed = ' (node authentication armed)'
else:
armed = ''
@@ -204,13 +205,18 @@ def main(args):
deploymentstate = databynode[node].get('deployment.state', '')
if deploymentstate:
deploymentdate = databynode[node].get('deployment.state_last_updated', '')
if deploymentdate:
try:
deploymentdate = datetime.datetime.fromisoformat(deploymentdate).strftime('%m/%d/%Y %H:%M:%S')
except ValueError:
pass
statedetails = databynode[node].get('deployment.state_detail', '')
if statedetails:
stateinfo = '{}: {}'.format(deploymentstate, statedetails)
else:
stateinfo = deploymentstate
if deploymentdate:
stateinfo += ' (last updated: {})'.format(deploymentdate)
stateinfo += ', updated: {}'.format(deploymentdate)
if stateinfo:
print('{0}: {1} ({2})'.format(node, profile, stateinfo))
else: