1 ##############################################################################
2 # Copyright (c) 2017 ZTE Corporation and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 from doctor_tests.identity_auth import get_identity_auth
10 from doctor_tests.identity_auth import get_session
11 from doctor_tests.os_clients import keystone_client
12 from doctor_tests.os_clients import vitrage_client
14 from doctor_tests.inspector.base import BaseInspector
17 class VitrageInspector(BaseInspector):
19 def __init__(self, conf, log):
20 super(VitrageInspector, self).__init__(conf, log)
21 self.auth = get_identity_auth()
22 self.keystone = keystone_client(self.conf.keystone_version,
23 get_session(auth=self.auth))
24 self.vitrage = vitrage_client(self.conf.vitrage_version,
25 get_session(auth=self.auth))
26 self.inspector_url = self.get_inspector_url()
28 def get_inspector_url(self):
30 self.keystone.session.get_endpoint(
32 interface='publicURL')
33 return '%s/v1/event' % vitrage_endpoint
36 self.log.info('vitrage inspector start......')
39 self.log.info('vitrage inspector stop......')