本文整理汇总了Java中com.microsoft.azure.management.compute.DataDisk.name方法的典型用法代码示例。如果您正苦于以下问题:Java DataDisk.name方法的具体用法?Java DataDisk.name怎么用?Java DataDisk.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.microsoft.azure.management.compute.DataDisk
的用法示例。
在下文中一共展示了DataDisk.name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDataDiskState
import com.microsoft.azure.management.compute.DataDisk; //导入方法依赖的package包/类
private DiskState createDataDiskState(EnumerationContext ctx, DataDisk dataDisk, boolean isManaged) {
DiskState diskState = new DiskState();
String id = UUID.randomUUID().toString();
diskState.documentSelfLink = UriUtils.buildUriPath(DiskService.FACTORY_LINK, id);
diskState.name = dataDisk.name();
if (isManaged) {
diskState.id = dataDisk.managedDisk().id();
} else {
diskState.id = AzureUtils.canonizeId(dataDisk.vhd().uri());
}
diskState.capacityMBytes = dataDisk.diskSizeGB() * 1024;
diskState.status = DiskService.DiskStatus.ATTACHED;
diskState.tenantLinks = ctx.parentCompute.tenantLinks;
diskState.resourcePoolLink = ctx.request.resourcePoolLink;
diskState.computeHostLink = ctx.parentCompute.documentSelfLink;
diskState.endpointLink = ctx.request.endpointLink;
AdapterUtils.addToEndpointLinks(diskState, ctx.request.endpointLink);
diskState.customProperties = new HashMap<>();
diskState.customProperties.put(AZURE_DATA_DISK_CACHING, dataDisk.caching().name());
diskState.customProperties.put(DISK_CONTROLLER_NUMBER, String.valueOf(dataDisk.lun()));
diskState.customProperties.put(AZURE_MANAGED_DISK_TYPE,
dataDisk.managedDisk().storageAccountType().toString());
return diskState;
}