summaryrefslogtreecommitdiffstats
path: root/tests/monitor.py
diff options
context:
space:
mode:
authorUmar Farooq <umar.farooq@neclab.eu>2017-05-30 13:42:11 +0000
committerUmar Farooq <umar.farooq@neclab.eu>2017-05-30 13:42:11 +0000
commit7ad77a7c4970056c3be42bc2aec5cb5322154cdb (patch)
tree98cb67746b29ac0afc2a3e3d2b59a77c7ce67437 /tests/monitor.py
parentb2614799f404ed44b19d5dbc7c0b6229071c87bb (diff)
Fix session error with INSPECTOR_TYPE=congress
In monitor.py, the self.session value is not defined in DoctorMonitorSample class. This commit fixes it. JIRA: DOCTOR-111 Change-Id: Ib61caa4146d78d6fe4857299c4730f13a7ac7a27 Signed-off-by: Umar Farooq <umar.farooq@neclab.eu>
Diffstat (limited to 'tests/monitor.py')
-rw-r--r--tests/monitor.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/monitor.py b/tests/monitor.py
index 8e8aa7a5..8244dc88 100644
--- a/tests/monitor.py
+++ b/tests/monitor.py
@@ -17,6 +17,7 @@ import socket
import sys
import time
+from keystoneauth1 import session
from congressclient.v1 import client
import identity_auth
@@ -48,8 +49,8 @@ class DoctorMonitorSample(object):
self.inspector_url = 'http://127.0.0.1:12345/events'
elif self.inspector_type == 'congress':
auth=identity_auth.get_identity_auth()
- sess=session.Session(auth=auth)
- congress = client.Client(session=sess, service_type='policy')
+ self.session=session.Session(auth=auth)
+ congress = client.Client(session=self.session, service_type='policy')
ds = congress.list_datasources()['results']
doctor_ds = next((item for item in ds if item['driver'] == 'doctor'),
None)