diff options
author | fengyuanxing <feng.yuanxing@zte.com.cn> | 2018-03-06 11:25:55 +0800 |
---|---|---|
committer | fengyuanxing <feng.yuanxing@zte.com.cn> | 2018-03-06 11:25:55 +0800 |
commit | 052f205dc7f9ecfee5f9bba8a0adfda67c50a6c0 (patch) | |
tree | bcb882713a6692ecda12c849be91cd4e9b055c02 | |
parent | 7dfdc86cf8cb6fe9f62a8cbc4866352958772c6c (diff) |
Modify code because of interface
Change-Id: Ic921877beab19ef55771a2a572da71076f030a7e
Issue-ID: VFC-784
Signed-off-by: fengyuanxing <feng.yuanxing@zte.com.cn>
-rw-r--r-- | lcm/ns/ns_manual_scale.py | 2 | ||||
-rw-r--r-- | lcm/pub/utils/scaleaspect.py | 13 |
2 files changed, 5 insertions, 10 deletions
diff --git a/lcm/ns/ns_manual_scale.py b/lcm/ns/ns_manual_scale.py index 91be03ae..7a17f583 100644 --- a/lcm/ns/ns_manual_scale.py +++ b/lcm/ns/ns_manual_scale.py @@ -66,7 +66,7 @@ class NSManualScaleService(threading.Thread): raise NSLCMException('scaleType parameter does not exist or value incorrect. It must be SCALE_NS.') # Get data if SCALE_NS - self.scale_ns_data = ignore_case_get(self.request_data, 'scaleNsData') + self.scale_ns_data = ignore_case_get(self.request_data, 'scaleNsByStepsData') self.scale_vnf_data = get_scale_vnf_data_package(self.scale_ns_data, self.ns_instance_id) logger.debug('scale_vnf_data = %s' % self.scale_vnf_data) # Get data if SCALE_VNF diff --git a/lcm/pub/utils/scaleaspect.py b/lcm/pub/utils/scaleaspect.py index 521bf583..c2481ca5 100644 --- a/lcm/pub/utils/scaleaspect.py +++ b/lcm/pub/utils/scaleaspect.py @@ -212,20 +212,15 @@ def get_nsdId(ns_instanceId): return None -def get_and_check_params(scaleNsData, ns_InstanceId): +def get_and_check_params(scaleNsByStepsData, ns_InstanceId): - if scaleNsData is None: - pass - # raise NSLCMException("Error! scaleNsData in the request is Empty!") - - scaleNsByStepsData = scaleNsData[0]["scaleNsByStepsData"] if scaleNsByStepsData is None: pass # raise NSLCMException("Error! scaleNsByStepsData in the request is Empty!") - aspect = scaleNsByStepsData[0]["aspectId"] - numberOfSteps = scaleNsByStepsData[0]["numberOfSteps"] - scale_type = scaleNsByStepsData[0]["scalingDirection"] + aspect = scaleNsByStepsData["aspectId"] + numberOfSteps = scaleNsByStepsData["numberOfSteps"] + scale_type = scaleNsByStepsData["scalingDirection"] return ns_InstanceId, aspect, numberOfSteps, scale_type |