diff options
author | dongwenjuan <dong.wenjuan@zte.com.cn> | 2017-11-27 17:42:17 +0800 |
---|---|---|
committer | dongwenjuan <dong.wenjuan@zte.com.cn> | 2017-12-11 15:21:00 +0800 |
commit | 9e36d918fef054b8d23692c0ec8c25d7b0640c07 (patch) | |
tree | 11c25b259e8c53342153df2964aba76ce4d329ee /doctor_tests/inspector/vitrage.py | |
parent | f71afa73f5a56474036215b598e45123578c38d9 (diff) |
support vitrage inspector for local installer
JIRA: DOCTOR-122
Change-Id: I771f778767a204e809d892c70603e479c1ed2f5c
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'doctor_tests/inspector/vitrage.py')
-rw-r--r-- | doctor_tests/inspector/vitrage.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/doctor_tests/inspector/vitrage.py b/doctor_tests/inspector/vitrage.py new file mode 100644 index 00000000..7d1dbc1c --- /dev/null +++ b/doctor_tests/inspector/vitrage.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2017 ZTE Corporation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +from doctor_tests.identity_auth import get_identity_auth +from doctor_tests.identity_auth import get_session +from doctor_tests.os_clients import keystone_client +from doctor_tests.os_clients import vitrage_client + +from doctor_tests.inspector.base import BaseInspector + + +class VitrageInspector(BaseInspector): + + def __init__(self, conf, log): + super(VitrageInspector, self).__init__(conf, log) + self.auth = get_identity_auth() + self.keystone = keystone_client(get_session(auth=self.auth)) + self.vitrage = vitrage_client(self.conf.vitrage_version, + get_session(auth=self.auth)) + self.inspector_url = self.get_inspector_url() + + def get_inspector_url(self): + vitrage_endpoint = \ + self.keystone.session.get_endpoint( + service_type='rca', + interface='publicURL') + return '%s/v1/event' % vitrage_endpoint + + def start(self): + self.log.info('vitrage inspector start......') + + def stop(self): + self.log.info('vitrage inspector stop......') |