}
nfcLease.progress(0);
ProgressListener listener = new ProgressListener(nfcLease, importTotal);
vmRef = nfcLease.getInfo().getEntity();
ThumbprintTrustManager tm = HttpsConnectionUtil.getThumbprintTrustManager();
// upload all files
for(DeviceUrl deviceUrl : nfcLease.getInfo().getDeviceUrl()) {
File f = fileMap.get(deviceUrl.getImportKey());
String thumbprint = deviceUrl.getSslThumbprint();
tm.add(thumbprint.toString(), Thread.currentThread());
try {
uploadFileLoop(deviceUrl.getUrl(), f, ds,
name + "/" + f.getName(), listener);
} finally {
tm.remove(thumbprint.toString(), Thread.currentThread());
}
}
nfcLease.progress(100);
nfcLease.complete();
} catch (Exception e) {