From 6e65613401048c2189e0b991ada5af727b36d494 Mon Sep 17 00:00:00 2001 From: Sahil Date: Mon, 23 Jan 2017 16:42:55 -0800 Subject: [PATCH] IFMAP client is overridding ST ConnectionType vnc_ifmap_client in vnc_cfg_api_server is overridding schema transformer ConnectionType object with sandesh ConnectionType object. Change-Id: I94294d5515a7605f57b75779d26b7a325b9d8bcc Closes-Bug: 1657393 --- src/config/api-server/vnc_ifmap_client.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/config/api-server/vnc_ifmap_client.py b/src/config/api-server/vnc_ifmap_client.py index 5df9df57115..aca822bdd11 100644 --- a/src/config/api-server/vnc_ifmap_client.py +++ b/src/config/api-server/vnc_ifmap_client.py @@ -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 @@ -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 @@ -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)]) @@ -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', @@ -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 = '', @@ -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',