Skip to content

Commit

Permalink
IFMAP client is overridding ST ConnectionType
Browse files Browse the repository at this point in the history
vnc_ifmap_client in vnc_cfg_api_server is overridding schema transformer
ConnectionType object with sandesh ConnectionType object.

Change-Id: I94294d5515a7605f57b75779d26b7a325b9d8bcc
Closes-Bug: 1657393
(cherry picked from commit 6e65613)
  • Loading branch information
sahilsabharwal authored and Sachin Bansal committed Feb 21, 2017
1 parent 3f71d69 commit f8e0722
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/config/api-server/vnc_ifmap_client.py
Expand Up @@ -34,7 +34,7 @@
from provision_defaults import Provision
from pysandesh.connection_info import ConnectionState
from pysandesh.gen_py.process_info.ttypes import ConnectionStatus
from pysandesh.gen_py.process_info.ttypes import ConnectionType
from pysandesh.gen_py.process_info.ttypes import ConnectionType as ConnType
from pysandesh.gen_py.sandesh.ttypes import SandeshLevel
from sandesh.traces.ttypes import IfmapTrace

Expand Down Expand Up @@ -100,7 +100,7 @@ def __init__(self, db_client_mgr, ifmap_srv_ip, ifmap_srv_port,
self._db_client_mgr = db_client_mgr
self._sandesh = db_client_mgr._sandesh

ConnectionState.update(conn_type = ConnectionType.IFMAP,
ConnectionState.update(conn_type = ConnType.IFMAP,
name = 'IfMap', status = ConnectionStatus.INIT, message = '',
server_addrs = ["%s:%s" % (ifmap_srv_ip, ifmap_srv_port)])
self._conn_state = ConnectionStatus.INIT
Expand Down Expand Up @@ -386,7 +386,7 @@ def _init_conn(self):
self.config_log(msg, level=SandeshLevel.SYS_WARN)
time.sleep(3)

ConnectionState.update(conn_type = ConnectionType.IFMAP,
ConnectionState.update(conn_type = ConnType.IFMAP,
name = 'IfMap', status = ConnectionStatus.UP, message = '',
server_addrs = ["%s:%s" % (self._ifmap_srv_ip,
self._ifmap_srv_port)])
Expand Down Expand Up @@ -550,7 +550,7 @@ def _publish_to_ifmap(self, oper_body):
self.config_log(log_str, level=SandeshLevel.SYS_ERR)

ConnectionState.update(
conn_type = ConnectionType.IFMAP,
conn_type = ConnType.IFMAP,
name = 'IfMap',
status = ConnectionStatus.INIT,
message = 'Session lost, renew it',
Expand Down Expand Up @@ -764,7 +764,7 @@ def _health_checker(self):
if not self._is_ifmap_up:
self._get_api_server().publish_ifmap_to_discovery('up', '')
self._is_ifmap_up = True
ConnectionState.update(conn_type = ConnectionType.IFMAP,
ConnectionState.update(conn_type = ConnType.IFMAP,
name = 'IfMap',
status = ConnectionStatus.UP,
message = '',
Expand All @@ -777,7 +777,7 @@ def _health_checker(self):
self._get_api_server().publish_ifmap_to_discovery('down',
'IFMAP DB - Invalid state')
self._is_ifmap_up = False
ConnectionState.update(conn_type = ConnectionType.IFMAP,
ConnectionState.update(conn_type = ConnType.IFMAP,
name = 'IfMap',
status = ConnectionStatus.DOWN,
message = 'Invalid IFMAP DB State',
Expand Down

0 comments on commit f8e0722

Please sign in to comment.