remove elasticsearch helpers
diff --git a/README.md b/README.md
index caa78a6..dc93b16 100644
--- a/README.md
+++ b/README.md
@@ -14,10 +14,7 @@
pip install -r ./tcp_tests/requirements.txt
-Initialize fuel-devops database if needed:
-------------------------------------------
-
-dos-manage.py migrate
+* Note: Please read [1] if you don't have fuel-devops installed, because there are required some additional packages and configuration.
Get cloudinit images
--------------------
@@ -50,11 +47,10 @@
py.test -vvv -s -k test_tcp_install_default
-, or as an alternative there is another test that use deploy scripts from models repository written on bash [1]:
+, or as an alternative there is another test that use deploy scripts from models repository written on bash [2]:
py.test -vvv -s -k test_tcp_install_with_scripts
-[1] https://github.com/Mirantis/mk-lab-salt-model/tree/dash/scripts
Create and start the env for manual tests
@@ -66,3 +62,7 @@
Then, wait until cloud-init is finished and port 22 is open (~3-4 minutes), and login with root:r00tme
+
+[1] https://github.com/openstack/fuel-devops/blob/master/doc/source/install.rst
+
+[2] https://github.com/Mirantis/mk-lab-salt-model/tree/dash/scripts
diff --git a/tcp_tests/helpers/utils.py b/tcp_tests/helpers/utils.py
index f9fd8a4..c60e1b9 100644
--- a/tcp_tests/helpers/utils.py
+++ b/tcp_tests/helpers/utils.py
@@ -23,7 +23,6 @@
import yaml
from devops.helpers import helpers
from devops.helpers import ssh_client
-from elasticsearch import Elasticsearch
from tcp_tests import logger
from tcp_tests import settings
@@ -185,61 +184,6 @@
return _retry
-class ElasticClient(object):
- def __init__(self, host='localhost', port=9200):
- self.es = Elasticsearch([{'host': '{}'.format(host),
- 'port': port}])
- self.host = host
- self.port = port
-
- def find(self, key, value):
- LOG.info('Search for {} for {}'.format(key, value))
- search_request_body = '{' +\
- ' "query": {' +\
- ' "simple_query_string": {' +\
- ' "query": "{}",'.format(value) +\
- ' "analyze_wildcard" : "true",' +\
- ' "fields" : ["{}"],'.format(key) +\
- ' "default_operator": "AND"' +\
- ' }' +\
- ' },' +\
- ' "size": 1' +\
- '}'
- LOG.info('Search by {}'.format(search_request_body))
-
- def is_found():
- def temporary_status():
- res = self.es.search(index='_all', body=search_request_body)
- return res['hits']['total'] != 0
- return temporary_status
-
- predicate = is_found()
- helpers.wait(predicate, timeout=300,
- timeout_msg='Timeout waiting, result from elastic')
-
- es_raw = self.es.search(index='_all', body=search_request_body)
- if es_raw['timed_out']:
- raise RuntimeError('Elastic search timeout exception')
-
- return ElasticSearchResult(key, value, es_raw['hits']['total'], es_raw)
-
-
-class ElasticSearchResult(object):
- def __init__(self, key, value, count, raw):
- self.key = key
- self.value = value
- self.count = count
- self.raw = raw
- if self.count != 0:
- self.items = raw['hits']['hits']
-
- def get(self, index):
- if self.count != 0:
- return self.items[index]['_source']
- else:
- None
-
-
class YamlEditor(object):
"""Manipulations with local or remote .yaml files.