Fix the ElasticsearchPluginApi class
The ElasticsearchPluginApi constructor called get_plugin_vip() but the Nailgun client returned a 404 exception since no environment was created yet. Change-Id: Id7b1379503a811a7ba6bf025dc24a9c9efadb127
This commit is contained in:
parent
5c0fe817d3
commit
921adcb604
@ -23,8 +23,14 @@ from stacklight_tests.elasticsearch_kibana import plugin_settings
|
||||
class ElasticsearchPluginApi(base_test.PluginApi):
|
||||
def __init__(self):
|
||||
super(ElasticsearchPluginApi, self).__init__()
|
||||
self.es = elasticsearch.Elasticsearch([{'host': self.get_plugin_vip(),
|
||||
'port': 9200}])
|
||||
self._es_client = None
|
||||
|
||||
@property
|
||||
def es(self):
|
||||
if self._es_client is None:
|
||||
self._es_client = elasticsearch.Elasticsearch(
|
||||
[{'host': self.get_plugin_vip(), 'port': 9200}])
|
||||
return self._es_client
|
||||
|
||||
def get_plugin_settings(self):
|
||||
return plugin_settings
|
||||
|
Loading…
x
Reference in New Issue
Block a user