Merge "Move datasources folder into decision_engine"

This commit is contained in:
Zuul 2019-07-19 13:27:10 +00:00 committed by Gerrit Code Review
commit 3a1e83dd9d
23 changed files with 33 additions and 28 deletions

View File

@ -18,7 +18,7 @@
from oslo_config import cfg
from watcher.datasources import manager
from watcher.decision_engine.datasources import manager
datasources = cfg.OptGroup(name='watcher_datasources',
title='Configuration Options for watcher'

View File

@ -24,7 +24,7 @@ from oslo_utils import timeutils
from watcher._i18n import _
from watcher.common import clients
from watcher.common import exception
from watcher.datasources import base
from watcher.decision_engine.datasources import base
LOG = log.getLogger(__name__)

View File

@ -24,7 +24,7 @@ from oslo_log import log
from watcher.common import clients
from watcher.common import exception
from watcher.datasources import base
from watcher.decision_engine.datasources import base
CONF = cfg.CONF
LOG = log.getLogger(__name__)

View File

@ -22,8 +22,8 @@ import six.moves.urllib.parse as urlparse
from watcher.common import clients
from watcher.common import exception
from watcher.datasources import base
from watcher.datasources.grafana_translator import influxdb
from watcher.decision_engine.datasources import base
from watcher.decision_engine.datasources.grafana_translator import influxdb
import requests

View File

@ -20,7 +20,7 @@ import abc
from watcher._i18n import _
from watcher.common import exception
from watcher.datasources import base
from watcher.decision_engine.datasources import base
class BaseGrafanaTranslator(object):

View File

@ -21,7 +21,8 @@ from oslo_log import log
from oslo_serialization import jsonutils
from watcher.common import exception
from watcher.datasources.grafana_translator.base import BaseGrafanaTranslator
from watcher.decision_engine.datasources.grafana_translator.base import \
BaseGrafanaTranslator
CONF = cfg.CONF
LOG = log.getLogger(__name__)

View File

@ -21,10 +21,10 @@ from oslo_config import cfg
from oslo_log import log
from watcher.common import exception
from watcher.datasources import ceilometer as ceil
from watcher.datasources import gnocchi as gnoc
from watcher.datasources import grafana as graf
from watcher.datasources import monasca as mon
from watcher.decision_engine.datasources import ceilometer as ceil
from watcher.decision_engine.datasources import gnocchi as gnoc
from watcher.decision_engine.datasources import grafana as graf
from watcher.decision_engine.datasources import monasca as mon
LOG = log.getLogger(__name__)

View File

@ -22,7 +22,7 @@ from monascaclient import exc
from watcher.common import clients
from watcher.common import exception
from watcher.datasources import base
from watcher.decision_engine.datasources import base
class MonascaHelper(base.DataSourceBase):

View File

@ -48,7 +48,7 @@ from watcher.common import context
from watcher.common import exception
from watcher.common.loader import loadable
from watcher.common import utils
from watcher.datasources import manager as ds_manager
from watcher.decision_engine.datasources import manager as ds_manager
from watcher.decision_engine.loading import default as loading
from watcher.decision_engine.model.collector import manager
from watcher.decision_engine.solution import default

View File

@ -22,7 +22,8 @@ from oslo_config import cfg
from oslo_log import log
from watcher.common import exception
from watcher.datasources.grafana_translator import base as base_translator
from watcher.decision_engine.datasources.grafana_translator import \
base as base_translator
from watcher.tests import base
CONF = cfg.CONF

View File

@ -23,8 +23,9 @@ from oslo_config import cfg
from oslo_log import log
from watcher.common import exception
from watcher.datasources.grafana_translator import influxdb
from watcher.tests.datasources.grafana_translators import test_base
from watcher.decision_engine.datasources.grafana_translator import influxdb
from watcher.tests.decision_engine.datasources.grafana_translators import \
test_base
CONF = cfg.CONF
LOG = log.getLogger(__name__)

View File

@ -20,7 +20,7 @@ import mock
from oslo_config import cfg
from watcher.common import exception
from watcher.datasources import base as datasource
from watcher.decision_engine.datasources import base as datasource
from watcher.tests import base
CONF = cfg.CONF

View File

@ -21,7 +21,7 @@ import mock
from watcher.common import clients
from watcher.common import exception
from watcher.datasources import ceilometer as ceilometer_helper
from watcher.decision_engine.datasources import ceilometer as ceilometer_helper
from watcher.tests import base

View File

@ -19,7 +19,7 @@ from oslo_config import cfg
from watcher.common import clients
from watcher.common import exception
from watcher.datasources import gnocchi as gnocchi_helper
from watcher.decision_engine.datasources import gnocchi as gnocchi_helper
from watcher.tests import base
CONF = cfg.CONF

View File

@ -23,7 +23,7 @@ from oslo_log import log
from watcher.common import clients
from watcher.common import exception
from watcher.datasources import grafana
from watcher.decision_engine.datasources import grafana
from watcher.tests import base
import requests

View File

@ -19,10 +19,10 @@ import mock
from mock import MagicMock
from watcher.common import exception
from watcher.datasources import gnocchi
from watcher.datasources import grafana
from watcher.datasources import manager as ds_manager
from watcher.datasources import monasca
from watcher.decision_engine.datasources import gnocchi
from watcher.decision_engine.datasources import grafana
from watcher.decision_engine.datasources import manager as ds_manager
from watcher.decision_engine.datasources import monasca
from watcher.tests import base
@ -47,7 +47,8 @@ class TestDataSourceManager(base.BaseTestCase):
self.assertEqual({}, manager.load_metric_map('/nope/nope/nope.yaml'))
def test_metric_file_metric_override(self):
path = 'watcher.datasources.manager.DataSourceManager.load_metric_map'
path = 'watcher.decision_engine.datasources.manager.' \
'DataSourceManager.load_metric_map'
retval = {
monasca.MonascaHelper.NAME: {"host_airflow": "host_fnspid"}
}
@ -65,7 +66,8 @@ class TestDataSourceManager(base.BaseTestCase):
"eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk=="
m_config.grafana_client.base_url = "https://grafana.proxy/api/"
path = 'watcher.datasources.manager.DataSourceManager.load_metric_map'
path = 'watcher.decision_engine.datasources.manager.' \
'DataSourceManager.load_metric_map'
metric_map = {
'db': 'production_cloud',
'project': '7485',

View File

@ -19,7 +19,7 @@ from oslo_config import cfg
from watcher.common import clients
from watcher.common import exception
from watcher.datasources import monasca as monasca_helper
from watcher.decision_engine.datasources import monasca as monasca_helper
from watcher.tests import base
CONF = cfg.CONF

View File

@ -17,7 +17,7 @@
import mock
from watcher.common import exception
from watcher.datasources import manager
from watcher.decision_engine.datasources import manager
from watcher.decision_engine.model import model_root
from watcher.decision_engine.strategy import strategies
from watcher.tests import base