TemplateInfo template = templateFactory.getTemplate(templateId, DataStoreRole.Image);
DataStore store = dataStoreMgr.getImageStore(dcId);
AsyncCallFuture<TemplateApiResult> future = new AsyncCallFuture<TemplateApiResult>();
templateSvr.createTemplateAsync(template, store, future);
try {
TemplateApiResult result = future.get();
assertTrue(result.isSuccess(), "failed to register template: " + result.getResult());
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
assertTrue(false, e.getMessage());
} catch (ExecutionException e) {