1 # Copyright 2017 ZTE Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 from lcm.pub.utils.restcall import req_by_msb
18 def vnfd_rawdata_get(vnfdid):
19 ret = req_by_msb("openoapi/nslcm/v1/vnfs/%s" % vnfdid, "GET")
23 def get_packageid_by_vnfdid(vnfdid):
24 ret = req_by_msb("openoapi/nslcm/v1/vnfs/%s" % vnfdid, "GET")
28 def apply_grant_to_nfvo(data):
29 ret = req_by_msb("openoapi/nslcm/v1/grantvnf" , "POST", data)
33 def notify_lcm_to_nfvo(data, nf_inst_id):
34 ret = req_by_msb("openoapi/nslcm/v1/vnfs/%s/Notify"%nf_inst_id, "POST", data)
38 def apply_res_to_nfvo(data):
39 ret = req_by_msb("openoapi/nslcm/v1/res" , "POST", data)