From f0a3e92e48ffe0bffc0a342e2cd568b39b8f44b8 Mon Sep 17 00:00:00 2001 From: Anusha Ramineni Date: Wed, 14 Dec 2016 08:56:06 +0530 Subject: [PATCH] Remove outdated changes Change-Id: I30f93d25927f270bf84a99ea1047461e5e6c0b3a --- congress/api/system/driver_model.py | 5 ---- congress/dse2/deepsix2.py | 36 ----------------------------- congress/harness.py | 36 ----------------------------- 3 files changed, 77 deletions(-) delete mode 100644 congress/dse2/deepsix2.py diff --git a/congress/api/system/driver_model.py b/congress/api/system/driver_model.py index f3699ed75..1fc4827b8 100644 --- a/congress/api/system/driver_model.py +++ b/congress/api/system/driver_model.py @@ -23,11 +23,6 @@ from congress.api import webservice from congress import exception -def d6service(name, keys, inbox, datapath, args): - return DatasourceDriverModel(name, keys, inbox=inbox, - dataPath=datapath, **args) - - class DatasourceDriverModel(base.APIModel): """Model for handling API requests about DatasourceDriver.""" diff --git a/congress/dse2/deepsix2.py b/congress/dse2/deepsix2.py deleted file mode 100644 index df1846058..000000000 --- a/congress/dse2/deepsix2.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2016 Styra, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - -from oslo_log import log as logging - -from congress.dse2 import data_service - -LOG = logging.getLogger(__name__) - - -class deepSix(data_service.DataService): - """A placeholder while we transition to the new arch.""" - def __init__(self, name, keys, inbox=None, dataPath=None): - data_service.DataService.__init__(self, name) - self.name = name - - def log_info(self, msg, *args): - LOG.info(msg, *args) - - def log(self, msg, *args): - LOG.debug(msg, *args) diff --git a/congress/harness.py b/congress/harness.py index 931e5bdaf..55955e41c 100644 --- a/congress/harness.py +++ b/congress/harness.py @@ -17,14 +17,9 @@ from __future__ import print_function from __future__ import division from __future__ import absolute_import -import copy -import os -import os.path -import re import sys from oslo_config import cfg - from oslo_log import log as logging from congress.api import action_model @@ -182,34 +177,3 @@ def create_datasources(bus): raise return services - - -def load_data_service(service_name, config, cage, rootdir, id_): - """Load service. - - Load a service if not already loaded. Also loads its - module if the module is not already loaded. Returns None. - SERVICE_NAME: name of service - CONFIG: dictionary of configuration values - CAGE: instance to load service into - ROOTDIR: dir for start of module paths - ID: UUID of the service. - """ - config = copy.copy(config) - if service_name in cage.services: - return - if 'module' not in config: - raise exception.DataSourceConfigException( - "Service %s config missing 'module' entry" % service_name) - module_path = config['module'] - module_name = re.sub('[^a-zA-Z0-9_]', '_', module_path) - if not os.path.isabs(module_path) and rootdir is not None: - module_path = os.path.join(rootdir, module_path) - if module_name not in sys.modules: - LOG.info("Trying to create module %s from %s", - module_name, module_path) - cage.loadModule(module_name, module_path) - LOG.info("Trying to create service %s with module %s", - service_name, module_name) - cage.createservice(name=service_name, moduleName=module_name, - args=config, type_='datasource_driver', id_=id_)