From 205e810cea524b42a7842ae7e4474e8d45241fa8 Mon Sep 17 00:00:00 2001 From: fujinhua Date: Thu, 9 Aug 2018 10:36:48 +0800 Subject: [PATCH] Refactor codes for vfc-nfvo-lcm Move scaleaspect.py from pub to ns Change-Id: Icacc3cb630f34240246df007f765c94ccc29205d Issue-ID: VFC-1009 Signed-off-by: fujinhua --- lcm/ns/ns_manual_scale.py | 2 +- lcm/{pub/utils => ns}/scaleaspect.py | 0 lcm/ns/tests/test_ns_manual_scale.py | 2 +- lcm/{pub => ns}/tests/test_scaleaspect.py | 2 +- lcm/pub/tests/__init__.py | 13 ------------- 5 files changed, 3 insertions(+), 16 deletions(-) rename lcm/{pub/utils => ns}/scaleaspect.py (100%) rename lcm/{pub => ns}/tests/test_scaleaspect.py (99%) delete mode 100644 lcm/pub/tests/__init__.py diff --git a/lcm/ns/ns_manual_scale.py b/lcm/ns/ns_manual_scale.py index 2870ed7a..5bcee526 100644 --- a/lcm/ns/ns_manual_scale.py +++ b/lcm/ns/ns_manual_scale.py @@ -23,7 +23,7 @@ from lcm.pub.database.models import JobModel, NSInstModel from lcm.pub.exceptions import NSLCMException from lcm.pub.utils.jobutil import JobUtil, JOB_MODEL_STATUS from lcm.pub.utils.values import ignore_case_get -from lcm.pub.utils.scaleaspect import get_scale_vnf_data_info_list +from lcm.ns.scaleaspect import get_scale_vnf_data_info_list JOB_ERROR = 255 SCALE_TYPE = ("SCALE_NS", "SCALE_VNF") diff --git a/lcm/pub/utils/scaleaspect.py b/lcm/ns/scaleaspect.py similarity index 100% rename from lcm/pub/utils/scaleaspect.py rename to lcm/ns/scaleaspect.py diff --git a/lcm/ns/tests/test_ns_manual_scale.py b/lcm/ns/tests/test_ns_manual_scale.py index 6526ffca..aff180fd 100644 --- a/lcm/ns/tests/test_ns_manual_scale.py +++ b/lcm/ns/tests/test_ns_manual_scale.py @@ -25,7 +25,7 @@ from lcm.pub.exceptions import NSLCMException from lcm.pub.utils import restcall from lcm.pub.utils.jobutil import JobUtil, JOB_TYPE, JOB_MODEL_STATUS from lcm.pub.msapi import catalog -from lcm.pub.utils.scaleaspect import get_json_data +from lcm.ns.scaleaspect import get_json_data SCALING_JSON = { diff --git a/lcm/pub/tests/test_scaleaspect.py b/lcm/ns/tests/test_scaleaspect.py similarity index 99% rename from lcm/pub/tests/test_scaleaspect.py rename to lcm/ns/tests/test_scaleaspect.py index ce7704b2..f32d22d7 100644 --- a/lcm/pub/tests/test_scaleaspect.py +++ b/lcm/ns/tests/test_scaleaspect.py @@ -13,7 +13,7 @@ # limitations under the License. from django.test import TestCase -from lcm.pub.utils.scaleaspect import get_json_data +from lcm.ns.scaleaspect import get_json_data from lcm.pub.database.models import NfInstModel from lcm.pub.database.models import NSInstModel from lcm.pub.utils.timeutil import now_time diff --git a/lcm/pub/tests/__init__.py b/lcm/pub/tests/__init__.py deleted file mode 100644 index 4f0b05c3..00000000 --- a/lcm/pub/tests/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2016-2018 ZTE Corporation. -# -# 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. -- 2.16.6