Skip to content

Commit 46b6c34

Browse files
committed
add bridge versioning
1 parent 55c313f commit 46b6c34

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

source/__version__.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'''
2+
##############################################################################
3+
# Copyright 2021 IBM Corp.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
##############################################################################
17+
18+
Created on Feb 17, 2021
19+
20+
@author: HWASSMAN
21+
'''
22+
23+
__version__ = '6.1.1'

source/zimonGrafanaIntf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from queryHandler.QueryHandler import QueryHandler2 as QueryHandler
3434
from queryHandler.Topo import Topo
3535
from queryHandler import SensorConfig
36+
from __version__ import __version__
3637
from collections import defaultdict
3738
from timeit import default_timer as timer
3839

@@ -67,7 +68,8 @@
6768
'ReceivAttrValues': 'Received {}:{}',
6869
'TimerInfo': 'Processing {} took {} seconds',
6970
'Query2port': 'For better bridge performance multithreaded port {} will be used',
70-
'CollectorConnInfo': 'Connection to the collector server established successfully'
71+
'CollectorConnInfo': 'Connection to the collector server established successfully',
72+
'BridgeVersionInfo': 'IBM Spectrum Scale bridge for Grafana - Version: {}'
7173
}
7274

7375

@@ -689,6 +691,8 @@ def main(argv):
689691

690692
# prepare metadata
691693
try:
694+
print("\n" + MSG['BridgeVersionInfo'].format(__version__))
695+
logger.info("%s", MSG['BridgeVersionInfo'].format(__version__))
692696
validateCollectorConf(args, logger)
693697
mdHandler = MetadataHandler(logger, args.server, args.serverPort)
694698
print(MSG['MetaSuccess'])

0 commit comments

Comments
 (0)