當前位置: 首頁>>代碼示例>>Java>>正文


Java OvfFileItem類代碼示例

本文整理匯總了Java中com.vmware.vim25.OvfFileItem的典型用法代碼示例。如果您正苦於以下問題:Java OvfFileItem類的具體用法?Java OvfFileItem怎麽用?Java OvfFileItem使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


OvfFileItem類屬於com.vmware.vim25包,在下文中一共展示了OvfFileItem類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getImportSizeBytes

import com.vmware.vim25.OvfFileItem; //導入依賴的package包/類
private long getImportSizeBytes(OvfCreateImportSpecResult importResult) {
    List<OvfFileItem> items = importResult.getFileItem();
    if (items == null) {
        return 0;
    }

    long totalBytes = 0;
    for (OvfFileItem fi : items) {
        totalBytes += fi.getSize();
    }

    return totalBytes;
}
 
開發者ID:vmware,項目名稱:photon-model,代碼行數:14,代碼來源:OvfDeployer.java

示例2: computeDiskSourceUri

import com.vmware.vim25.OvfFileItem; //導入依賴的package包/類
protected String computeDiskSourceUri(String basePath, OvfFileItem ovfFileItem) {
    String s = ovfFileItem.getPath();
    if (s.startsWith("https://") ||
            s.startsWith("http://") ||
            s.startsWith("file://")) {
        return s;
    }

    return basePath + s;
}
 
開發者ID:vmware,項目名稱:photon-model,代碼行數:11,代碼來源:OvfDeployer.java

示例3: transferVmdkFiles

import com.vmware.vim25.OvfFileItem; //導入依賴的package包/類
private void transferVmdkFiles(final String ovfPath, final OvfCreateImportSpecResult importSpecResult,
                               final List<HttpNfcLeaseDeviceUrl> deviceUrls, final ProgressUpdater progressUpdater)
        throws Exception {
    for (HttpNfcLeaseDeviceUrl deviceUrl : deviceUrls) {
        final String deviceKey = deviceUrl.getImportKey();
        for (OvfFileItem fileItem : importSpecResult.getFileItem()) {
            if (deviceKey.equals(fileItem.getDeviceId())) {
                final TransferVmdkTask transferVmdkTask = getTransferVmdkTask(ovfPath, progressUpdater, deviceUrl, fileItem);
                executor.execute(transferVmdkTask);
                break;
            }
        }
    }
}
 
開發者ID:CloudSlang,項目名稱:cs-actions,代碼行數:15,代碼來源:DeployOvfTemplateService.java

示例4: getTransferVmdkTask

import com.vmware.vim25.OvfFileItem; //導入依賴的package包/類
@NotNull
private TransferVmdkTask getTransferVmdkTask(final String ovfPath, final ProgressUpdater progressUpdater,
                                             final HttpNfcLeaseDeviceUrl deviceUrl, final OvfFileItem fileItem)
        throws Exception {
    final URL vmDiskUrl = new URL(deviceUrl.getUrl());
    final ITransferVmdkFrom transferVmdkFrom = getTransferVmdK(ovfPath, fileItem.getPath());
    final TransferVmdkToUrl toUrl = new TransferVmdkToUrl(vmDiskUrl, fileItem.isCreate());

    return new TransferVmdkTask(transferVmdkFrom, toUrl, progressUpdater);
}
 
開發者ID:CloudSlang,項目名稱:cs-actions,代碼行數:11,代碼來源:DeployOvfTemplateService.java

示例5: getDisksTotalNoBytes

import com.vmware.vim25.OvfFileItem; //導入依賴的package包/類
private long getDisksTotalNoBytes(final OvfCreateImportSpecResult importSpecResult) {
    long disksTotalNoBytes = 0;
    for (final OvfFileItem item : importSpecResult.getFileItem()) {
        if (item.getCimType() == DISK_DRIVE_CIM_TYPE) {
            disksTotalNoBytes += item.getSize();
        }
    }
    return disksTotalNoBytes;
}
 
開發者ID:CloudSlang,項目名稱:cs-actions,代碼行數:10,代碼來源:DeployOvfTemplateService.java

示例6: calcTotalBytes

import com.vmware.vim25.OvfFileItem; //導入依賴的package包/類
public static long calcTotalBytes(OvfCreateImportSpecResult ovfImportResult) {
    List<OvfFileItem> fileItemArr = ovfImportResult.getFileItem();
    long totalBytes = 0;
    if (fileItemArr != null) {
        for (OvfFileItem fi : fileItemArr) {
            totalBytes += fi.getSize();
        }
    }
    return totalBytes;
}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:11,代碼來源:HttpNfcLeaseMO.java


注:本文中的com.vmware.vim25.OvfFileItem類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。