summaryrefslogtreecommitdiffstats
path: root/lcm/lcm/nf/biz/grant_vnf.py
diff options
context:
space:
mode:
Diffstat (limited to 'lcm/lcm/nf/biz/grant_vnf.py')
-rw-r--r--lcm/lcm/nf/biz/grant_vnf.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/lcm/lcm/nf/biz/grant_vnf.py b/lcm/lcm/nf/biz/grant_vnf.py
index 0889e6dc..92f22350 100644
--- a/lcm/lcm/nf/biz/grant_vnf.py
+++ b/lcm/lcm/nf/biz/grant_vnf.py
@@ -76,6 +76,24 @@ def grant_resource(data, nf_inst_id, job_id, grant_type, vdus):
content_args['addResources'].append(res_def)
res_index += 1
content_args['additionalParams']['vimid'] = vim_id
+ elif grant_type == GRANT_TYPE.HEAL_RESTART:
+ res_index = 1
+ res_def = {
+ 'type': 'VDU',
+ 'resDefId': str(res_index),
+ 'resDesId': vdus[0].resourceid}
+ content_args['updateResources'].append(res_def)
+ content_args['additionalParams']['vimid'] = vdus[0].vimid
+ elif grant_type == GRANT_TYPE.HEAL_CREATE:
+ vim_id = vdus[0]["properties"]["location_info"]["vimid"]
+ res_index = 1
+ res_def = {
+ 'type': 'VDU',
+ 'resDefId': str(res_index),
+ 'resDesId': ignore_case_get(vdus[0], "vdu_id")
+ }
+ content_args['addResources'].append(res_def)
+ content_args['additionalParams']['vimid'] = vim_id
elif grant_type == GRANT_TYPE.OPERATE:
res_index = 1
for vdu in vdus: