Remove unneded script from tools

clean_enabled_files script is no longer needed since
migration to sahara-dashboard repository is done
for several cycles. that was a temporary file required
for period when sahara-dashboard's content was in both repos (horizon
and sahara-dashboard)

Change-Id: I763b9c536ca826695a0e02f9522a070b6624ad98
This commit is contained in:
Vitaly Gridnev 2016-11-18 12:58:19 +03:00
parent eef5697b5a
commit fab415a079
2 changed files with 0 additions and 49 deletions

View File

@ -322,10 +322,6 @@ function run_tests {
export SELENIUM_HEADLESS=1
fi
# TODO(david-lyle) remove when configuration files for Sahara are not loaded
# by default in Horizon
${command_wrapper} python tools/clean_enabled_files.py
if [ -z "$testargs" ]; then
run_tests_all
else

View File

@ -1,45 +0,0 @@
# 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.
# This file is temporarily needed to allow the conversion from integrated
# Sahara content in Horizon to plugin based content. Horizon currently defines
# the same module name data_processing and imports it by default. This utility
# removes the configuration files that are responsible for importing the old
# version of the module. Only Sahara content configuration files are effected
# in Horizon.
import os
from openstack_dashboard import enabled as local_enabled
from sahara_dashboard import enabled
ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
WITH_VENV = os.path.join(ROOT, 'tools', 'with_venv.sh')
def main():
src_path = os.path.dirname(enabled.__file__)
dest_path = os.path.dirname(local_enabled.__file__)
src_files = os.listdir(src_path)
for file in src_files:
# skip the __init__.py or bad things happen
if file == "__init__.py":
continue
file_path = os.path.join(dest_path, file)
if os.path.isfile(file_path):
print ("removing ", file_path)
os.remove(file_path)
if __name__ == '__main__':
main()