s_logger.warn("service-instance lookup", ex);
throw new CloudRuntimeException(ex);
}
// 1. Create service-instance.
ServiceInstanceModel serviceModel = new ServiceInstanceModel(project, name, template, serviceOffering,
leftModel, rightModel);
try {
serviceModel.update(_manager.getModelController());
} catch (Exception ex) {
s_logger.warn("service-instance update", ex);
throw new CloudRuntimeException(ex);
}
s_logger.debug("service-instance object created");
ServiceInstance siObj;
try {
_manager.getDatabase().getServiceInstances().add(serviceModel);
siObj = serviceModel.getServiceInstance();
} catch (Exception ex) {
s_logger.warn("DB add", ex);
throw new CloudRuntimeException(ex);
}