+ #Check that datacenter-type is correct
+ datacenter_type = datacenter_descriptor.get("type", "openvim");
+ module_info = None
+ try:
+ module = "vimconn_" + datacenter_type
+ module_info = imp.find_module(module)
+ except (IOError, ImportError):
+ if module_info and module_info[0]:
+ file.close(module_info[0])
+ raise NfvoException("Incorrect datacenter type '{}'. Plugin '{}'.py not installed".format(datacenter_type, module), HTTP_Bad_Request)
+