aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-08-09 10:36:48 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-08-09 10:36:48 +0800
commit205e810cea524b42a7842ae7e4474e8d45241fa8 (patch)
tree202e8e9a85a33a4e12b6ef904fc6682fb3631792
parent2775c0454c820eeffb30dfe202ca648947dd5730 (diff)
Refactor codes for vfc-nfvo-lcm
Move scaleaspect.py from pub to ns Change-Id: Icacc3cb630f34240246df007f765c94ccc29205d Issue-ID: VFC-1009 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/ns/ns_manual_scale.py2
-rw-r--r--lcm/ns/scaleaspect.py (renamed from lcm/pub/utils/scaleaspect.py)0
-rw-r--r--lcm/ns/tests/test_ns_manual_scale.py2
-rw-r--r--lcm/ns/tests/test_scaleaspect.py (renamed from lcm/pub/tests/test_scaleaspect.py)2
-rw-r--r--lcm/pub/tests/__init__.py13
5 files changed, 3 insertions, 16 deletions
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
index c70d5fd7..c70d5fd7 100644
--- a/lcm/pub/utils/scaleaspect.py
+++ b/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
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.