本文整理汇总了Java中com.microsoft.azure.management.compute.DataDisk.lun方法的典型用法代码示例。如果您正苦于以下问题:Java DataDisk.lun方法的具体用法?Java DataDisk.lun怎么用?Java DataDisk.lun使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.microsoft.azure.management.compute.DataDisk
的用法示例。
在下文中一共展示了DataDisk.lun方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setAttachableNewDataDisks
import com.microsoft.azure.management.compute.DataDisk; //导入方法依赖的package包/类
private void setAttachableNewDataDisks(Func0<Integer> nextLun) {
List<DataDisk> dataDisks = vm.inner().storageProfile().dataDisks();
for (Map.Entry<String, DataDisk> entry : this.newDisksToAttach.entrySet()) {
Disk managedDisk = vm.<Disk>taskResult(entry.getKey());
DataDisk dataDisk = entry.getValue();
dataDisk.withCreateOption(DiskCreateOptionTypes.ATTACH);
if (dataDisk.lun() == -1) {
dataDisk.withLun(nextLun.call());
}
dataDisk.withManagedDisk(new ManagedDiskParametersInner());
dataDisk.managedDisk().withId(managedDisk.id());
if (dataDisk.caching() == null) {
dataDisk.withCaching(getDefaultCachingType());
}
// Don't set default storage account type for the attachable managed disks, it is already
// defined in the managed disk and not allowed to change.
dataDisk.withName(null);
dataDisks.add(dataDisk);
}
}
示例2: setAttachableExistingDataDisks
import com.microsoft.azure.management.compute.DataDisk; //导入方法依赖的package包/类
private void setAttachableExistingDataDisks(Func0<Integer> nextLun) {
List<DataDisk> dataDisks = vm.inner().storageProfile().dataDisks();
for (DataDisk dataDisk : this.existingDisksToAttach) {
dataDisk.withCreateOption(DiskCreateOptionTypes.ATTACH);
if (dataDisk.lun() == -1) {
dataDisk.withLun(nextLun.call());
}
if (dataDisk.caching() == null) {
dataDisk.withCaching(getDefaultCachingType());
}
// Don't set default storage account type for the attachable managed disks, it is already
// defined in the managed disk and not allowed to change.
dataDisk.withName(null);
dataDisks.add(dataDisk);
}
}
示例3: setImplicitDataDisks
import com.microsoft.azure.management.compute.DataDisk; //导入方法依赖的package包/类
private void setImplicitDataDisks(Func0<Integer> nextLun) {
List<DataDisk> dataDisks = vm.inner().storageProfile().dataDisks();
for (DataDisk dataDisk : this.implicitDisksToAssociate) {
dataDisk.withCreateOption(DiskCreateOptionTypes.EMPTY);
if (dataDisk.lun() == -1) {
dataDisk.withLun(nextLun.call());
}
if (dataDisk.caching() == null) {
dataDisk.withCaching(getDefaultCachingType());
}
if (dataDisk.managedDisk() == null) {
dataDisk.withManagedDisk(new ManagedDiskParametersInner());
}
if (dataDisk.managedDisk().storageAccountType() == null) {
dataDisk.managedDisk().withStorageAccountType(getDefaultStorageAccountType());
}
dataDisk.withName(null);
dataDisks.add(dataDisk);
}
}
示例4: removeDataDisks
import com.microsoft.azure.management.compute.DataDisk; //导入方法依赖的package包/类
private void removeDataDisks() {
List<DataDisk> dataDisks = vm.inner().storageProfile().dataDisks();
for (Integer lun : this.diskLunsToRemove) {
int indexToRemove = 0;
for (DataDisk dataDisk : dataDisks) {
if (dataDisk.lun() == lun) {
dataDisks.remove(indexToRemove);
break;
}
indexToRemove++;
}
}
}