diff options
author | liyin <liyin11@huawei.com> | 2017-05-08 09:04:32 +0000 |
---|---|---|
committer | liyin <liyin11@huawei.com> | 2017-05-10 11:16:02 +0000 |
commit | 6a8257127b3dce1f18a650afe6921a34b6c6f5b8 (patch) | |
tree | bfb2d60c1ce3f6688b92e5787818f222d620f52e /utils/dispatcher/func.py | |
parent | 2d9642a33a6a58f53aceba4ff3d6242f191f25f0 (diff) |
Delete testcase of rubbos and vstf.
JIRA:BOTTLENECK-167
This patch will delete vstf and rubbos testcase code.
Include some testcase config file,
if there will be someone who want to use this testcase
maybe B or C version code will contain those testcase.
if you use the D version code to run this two testcase
we will info you that:
Rubbos testsuite is not updating anymore.
This entrance for running Rubbos within Bottlenecks is no longer supported.
Change-Id: I04e4042ff3998b3696df2ed47a9ffab6f1620ec3
Signed-off-by: liyin <liyin11@huawei.com>
Diffstat (limited to 'utils/dispatcher/func.py')
-rw-r--r-- | utils/dispatcher/func.py | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/utils/dispatcher/func.py b/utils/dispatcher/func.py deleted file mode 100644 index cb907e5e..00000000 --- a/utils/dispatcher/func.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 2013: Mirantis Inc. -# All Rights Reserved. -# -# 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. - -# bottlenecks comment: this is a modified copy of rally/rally/common/utils.py - -import os -import sys -from oslo_utils import importutils - -import utils - - -# Decorator for cli-args -def cliargs(*args, **kwargs): - def _decorator(func): - func.__dict__.setdefault('arguments', []).insert(0, (args, kwargs)) - return func - return _decorator - - -def itersubclasses(cls, _seen=None): - """Generator over all subclasses of a given class in depth first order.""" - - if not isinstance(cls, type): - raise TypeError("itersubclasses must be called with " - "new-style classes, not %.100r" % cls) - _seen = _seen or set() - try: - subs = cls.__subclasses__() - except TypeError: # fails only when cls is type - subs = cls.__subclasses__(cls) - for sub in subs: - if sub not in _seen: - _seen.add(sub) - yield sub - for sub in itersubclasses(sub, _seen): - yield sub - - -def try_append_module(name, modules): - if name not in modules: - modules[name] = importutils.import_module(name) - - -def import_modules_from_package(package): - """Import modules from package and append into sys.modules - - :param: package - Full package name. For example: rally.deploy.engines - """ - path = [os.path.dirname(utils.__file__), ".."] + package.split(".") - path = os.path.join(*path) - for root, dirs, files in os.walk(path): - for filename in files: - if filename.startswith("__") or not filename.endswith(".py"): - continue - new_package = ".".join(root.split(os.sep)).split("....")[1] - module_name = "%s.%s" % (new_package, filename[:-3]) - try_append_module(module_name, sys.modules) |