11import importlib
2+ import time
3+ import os
24
35from indy_node .__metadata__ import __version__ as node_pgk_version
46from plenum .server .validator_info_tool import none_on_fail , \
@@ -11,9 +13,12 @@ class ValidatorNodeInfoTool(PlenumValidatorNodeInfoTool):
1113 @property
1214 def info (self ):
1315 info = super ().info
16+ ts_str = "{}" .format (time .strftime (
17+ "%A, %B %{0}d, %Y %{0}I:%M:%S %p %z" .format ('#' if os .name == 'nt' else '-' ),
18+ time .localtime (info ["timestamp" ])))
19+ info .update ({"Update time" : ts_str })
1420 if 'Node_info' in info :
1521 if 'Metrics' in info ['Node_info' ]:
16- info ['Node_info' ]['Metrics' ]['transaction-count' ].update (config = self .__config_ledger_size )
1722 std_ledgers = [POOL_LEDGER_ID , DOMAIN_LEDGER_ID , CONFIG_LEDGER_ID ]
1823 other_ledgers = {}
1924 for idx , linfo in self ._node .ledgerManager .ledgerRegistry .items ():
@@ -24,23 +29,18 @@ def info(self):
2429
2530 return info
2631
27- @property
28- @none_on_fail
29- def software_info (self ):
30- info = super ().software_info
31- if 'Software' in info :
32- info ['Software' ].update ({'indy-node' : self .__node_pkg_version })
33- try :
34- pkg = importlib .import_module (self ._config .UPGRADE_ENTRY )
35- info ['Software' ].update ({self ._config .UPGRADE_ENTRY : pkg .__version__ })
36- except Exception :
37- pass
38- return info
39-
40- @property
4132 @none_on_fail
42- def __config_ledger_size (self ):
43- return self ._node .configLedger .size
33+ def _generate_software_info (self ):
34+ sfv = super ()._generate_software_info ()
35+ sfv ['Software' ].update ({'indy-node' : self .__node_pkg_version })
36+ sfv ['Software' ].update ({'sovrin' : "unknown" })
37+ try :
38+ pkg = importlib .import_module (self ._config .UPGRADE_ENTRY )
39+ sfv ['Software' ].update ({self ._config .UPGRADE_ENTRY : pkg .__version__ })
40+ except Exception :
41+ pass
42+
43+ return sfv
4444
4545 @property
4646 @none_on_fail
0 commit comments