summaryrefslogtreecommitdiffstats
path: root/tests/monitor.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/monitor.py')
-rw-r--r--tests/monitor.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/monitor.py b/tests/monitor.py
index 8e8aa7a5..7450c534 100644
--- a/tests/monitor.py
+++ b/tests/monitor.py
@@ -11,12 +11,11 @@ import argparse
from datetime import datetime
import json
import logger as doctor_log
-import os
import requests
import socket
-import sys
import time
+from keystoneauth1 import session
from congressclient.v1 import client
import identity_auth
@@ -48,8 +47,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)