summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFu Jinhua <fu.jinhua@zte.com.cn>2018-03-19 10:56:19 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-19 10:56:19 +0000
commit2cf40569cc7730673c182ba07f2972c67f6c3a68 (patch)
tree3bb6e971960d6299cb9e70afd7918c1e847ad6d1
parent5407ec210abee5ba0086fd73b1190e53a688b198 (diff)
parent405ab3bc5b7161a2616501710bad23caeea669e2 (diff)
Merge "Fix vfc-vnflcm query vnfd bug"
-rw-r--r--lcm/lcm/nf/const.py20
-rw-r--r--lcm/lcm/nf/vnf_create/inst_vnf.py4
2 files changed, 22 insertions, 2 deletions
diff --git a/lcm/lcm/nf/const.py b/lcm/lcm/nf/const.py
index da338f67..8b0c0bdb 100644
--- a/lcm/lcm/nf/const.py
+++ b/lcm/lcm/nf/const.py
@@ -11,6 +11,7 @@
# 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.
+import json
from lcm.pub.utils.jobutil import enum
@@ -21,6 +22,7 @@ VNF_STATUS = enum(NULL='null', INSTANTIATING="instantiating", INACTIVE='inactive
inst_req_data = {
"flavourId": "flavour_1",
"instantiationLevelId": "instantiationLevel_1",
+ "vnfmId": "vnfm_1",
"extVirtualLinks": [
{
"vlInstanceId": "1",
@@ -72,6 +74,7 @@ inst_req_data = {
],
"localizationLanguage": "en_US",
"additionalParams": {
+ "vimId": "vim_1",
"inputs": {
"key1": "test1",
"key2": "test2"
@@ -568,7 +571,7 @@ c10_data_get_vm = {
"status": "ACTIVE"
}
-vnfpackage_info = {
+vnfdModel = {
"volume_storages": [],
"inputs": {
"pe1_id": {
@@ -654,6 +657,21 @@ vnfpackage_info = {
}
}
+vnfpackage_info = {
+ "imageInfo": [],
+ "csarId": "vOpenNAT",
+ "packageInfo": {
+ "csarName": "vOpenNAT.csar",
+ "vnfdModel": json.dumps(vnfdModel),
+ "vnfdProvider": "Intel",
+ "vnfdId": "openNAT_1.0",
+ "downloadUrl": "http://10.96.33.39:8806/static/catalog/vOpenNAT/vOpenNAT.csar",
+ "vnfVersion": "v1.0",
+ "vnfdVersion": "v1.0",
+ "vnfPackageId": "vOpenNAT"
+ }
+}
+
# # vnfd_rawdata
# vnfd_rawdata = {
# "rawData": {
diff --git a/lcm/lcm/nf/vnf_create/inst_vnf.py b/lcm/lcm/nf/vnf_create/inst_vnf.py
index 59ec9930..5eb4f01e 100644
--- a/lcm/lcm/nf/vnf_create/inst_vnf.py
+++ b/lcm/lcm/nf/vnf_create/inst_vnf.py
@@ -170,7 +170,9 @@ class InstVnf(Thread):
def create_res(self):
logger.info("[NF instantiation] create resource start")
- adaptor.create_vim_res(self.vnfd_info, self.do_notify)
+ self.vnfdModel = json.loads(ignore_case_get(ignore_case_get(self.vnfd_info, "packageInfo"), "vnfdModel"))
+ logger.debug("self.vnfdModel = %s", self.vnfdModel)
+ adaptor.create_vim_res(self.vnfdModel, self.do_notify)
JobUtil.add_job_status(self.job_id, 70, '[NF instantiation] create resource finish')
logger.info("[NF instantiation] create resource finish")