summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2017-02-20 10:31:19 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2017-02-20 10:31:19 +0800
commitb2876cae01135746b833bebf04cebc268fa78675 (patch)
treee9de677bccfda3a4eb83fc5fd008de7153e7c22c /lcm
parent6c8fec9120a9532f76f03eeb60fbe4cf5ec36f69 (diff)
Remove rollback logic of vnf instantiate
Change-Id: Ie49458127442a9443065fedab9ac9dd83e2a4fb7 Issue-Id: GVNFM-30 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'lcm')
-rw-r--r--lcm/lcm/pub/vimapi/adaptor.py33
1 files changed, 13 insertions, 20 deletions
diff --git a/lcm/lcm/pub/vimapi/adaptor.py b/lcm/lcm/pub/vimapi/adaptor.py
index 32905dfd..4039392f 100644
--- a/lcm/lcm/pub/vimapi/adaptor.py
+++ b/lcm/lcm/pub/vimapi/adaptor.py
@@ -38,26 +38,19 @@ OPT_CREATE_VM = 80
BOOT_FROM_VOLUME = 1
-def create_vim_res(data, do_notify, do_rollback):
- try:
- for vol in ignore_case_get(data, "volume_storages"):
- create_volume(vol, do_notify, OPT_CREATE_VOLUME)
- for network in ignore_case_get(data, "vls"):
- create_network(network, do_notify, OPT_CREATE_NETWORK)
- for subnet in ignore_case_get(data, "vls"):
- create_subnet(subnet, do_notify, OPT_CREATE_SUBNET)
- for port in ignore_case_get(data, "cps"):
- create_port(port, do_notify, OPT_CREATE_PORT)
- for flavor in ignore_case_get(data, "vdus"):
- create_flavor(flavor, do_notify, OPT_CREATE_FLAVOR)
- for vm in ignore_case_get(data, "vdus"):
- create_vm(vm, do_notify, OPT_CREATE_VM)
- except VimException as e:
- logger.error(e.message)
- do_rollback(e.message)
- except:
- logger.error(traceback.format_exc())
- do_rollback(str(sys.exc_info()))
+def create_vim_res(data, do_notify):
+ for vol in ignore_case_get(data, "volume_storages"):
+ create_volume(vol, do_notify, OPT_CREATE_VOLUME)
+ for network in ignore_case_get(data, "vls"):
+ create_network(network, do_notify, OPT_CREATE_NETWORK)
+ for subnet in ignore_case_get(data, "vls"):
+ create_subnet(subnet, do_notify, OPT_CREATE_SUBNET)
+ for port in ignore_case_get(data, "cps"):
+ create_port(port, do_notify, OPT_CREATE_PORT)
+ for flavor in ignore_case_get(data, "vdus"):
+ create_flavor(flavor, do_notify, OPT_CREATE_FLAVOR)
+ for vm in ignore_case_get(data, "vdus"):
+ create_vm(vm, do_notify, OPT_CREATE_VM)
def delete_vim_res(data, do_notify):
res_types = ["vm", "flavor", "port", "subnet", "network", "volume"]