aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfengyuanxing <feng.yuanxing@zte.com.cn>2018-03-22 15:33:45 +0800
committerfengyuanxing <feng.yuanxing@zte.com.cn>2018-03-22 15:33:45 +0800
commitc61bec5c99f3c42713d79cf9cf94fb17f9df88a6 (patch)
tree6e7027e19581c69913f6b573ff22d6a9e931e530
parent349f31ca23fb6809d99020da301d3582e9438f83 (diff)
Refactor the method name
Change-Id: I86136fa266f0f4832f7eb590ecfca6f7aa78210b Issue-ID: VFC-784 Signed-off-by: fengyuanxing <feng.yuanxing@zte.com.cn>
-rw-r--r--lcm/pub/tests/test_scaleaspect.py4
-rw-r--r--lcm/pub/utils/scaleaspect.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/lcm/pub/tests/test_scaleaspect.py b/lcm/pub/tests/test_scaleaspect.py
index ed69cbf5..38d4ad29 100644
--- a/lcm/pub/tests/test_scaleaspect.py
+++ b/lcm/pub/tests/test_scaleaspect.py
@@ -18,7 +18,7 @@ from lcm.pub.utils.scaleaspect import get_nsdId
from lcm.pub.utils.scaleaspect import get_scale_vnf_data_from_json
from lcm.pub.utils.scaleaspect import get_scale_vnf_data_info_list
from lcm.pub.utils.scaleaspect import set_scacle_vnf_instance_id
-from lcm.pub.utils.scaleaspect import get_and_check_params
+from lcm.pub.utils.scaleaspect import check_and_set_params
from lcm.pub.utils.scaleaspect import set_scaleVnfData_type
from lcm.pub.database.models import NfInstModel
from lcm.pub.database.models import NSInstModel
@@ -237,7 +237,7 @@ class TestScaleAspect(TestCase):
NfInstModel().clean()
def test_get_and_check_params(self):
- aspect, numberOfSteps, scale_type = get_and_check_params(
+ aspect, numberOfSteps, scale_type = check_and_set_params(
self.scaleNsData, "1")
self.assertEqual(aspect, self.ns_scale_aspect)
self.assertEqual(numberOfSteps, self.ns_scale_steps)
diff --git a/lcm/pub/utils/scaleaspect.py b/lcm/pub/utils/scaleaspect.py
index 81fdfd8b..cf78092f 100644
--- a/lcm/pub/utils/scaleaspect.py
+++ b/lcm/pub/utils/scaleaspect.py
@@ -133,7 +133,7 @@ def get_nsdId(ns_instanceId):
return None
-def get_and_check_params(scaleNsData, ns_InstanceId):
+def check_and_set_params(scaleNsData, ns_InstanceId):
if scaleNsData is None:
raise Exception("Error! scaleNsData in the request is Empty!")
@@ -155,7 +155,7 @@ def get_scale_vnf_data(scaleNsData, ns_InstanceId):
os.path.abspath(__file__))))
filename = curdir_path + "/ns/data/scalemapping.json"
logger.debug("filename = %s" % filename)
- aspect, numberOfSteps, scale_type = get_and_check_params(
+ aspect, numberOfSteps, scale_type = check_and_set_params(
scaleNsData, ns_InstanceId)
return get_scale_vnf_data_list(
filename,
@@ -174,7 +174,7 @@ def get_scale_vnf_data_info_list(scaleNsData, ns_InstanceId):
scalingmap_json = catalog.get_scalingmap_json_package(ns_InstanceId)
# Gets and checks the values of parameters.
- aspect, numberOfSteps, scale_type = get_and_check_params(
+ aspect, numberOfSteps, scale_type = check_and_set_params(
scaleNsData, ns_InstanceId)
# Firstly, gets the scaling vnf data info list from the scaling map json data.