本文整理汇总了Java中com.vmware.vim25.VirtualMachineSnapshotInfo类的典型用法代码示例。如果您正苦于以下问题:Java VirtualMachineSnapshotInfo类的具体用法?Java VirtualMachineSnapshotInfo怎么用?Java VirtualMachineSnapshotInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VirtualMachineSnapshotInfo类属于com.vmware.vim25包,在下文中一共展示了VirtualMachineSnapshotInfo类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: removeAllSnapshots
import com.vmware.vim25.VirtualMachineSnapshotInfo; //导入依赖的package包/类
public boolean removeAllSnapshots() throws Exception {
VirtualMachineSnapshotInfo snapshotInfo = getSnapshotInfo();
if (snapshotInfo != null && snapshotInfo.getRootSnapshotList() != null) {
List<VirtualMachineSnapshotTree> tree = snapshotInfo.getRootSnapshotList();
for (VirtualMachineSnapshotTree treeNode : tree) {
ManagedObjectReference morTask = _context.getService().removeSnapshotTask(treeNode.getSnapshot(), true, true);
boolean result = _context.getVimClient().waitForTask(morTask);
if (result) {
_context.waitForTaskProgressDone(morTask);
} else {
s_logger.error("VMware removeSnapshot_Task failed due to " + TaskMO.getTaskFailureInfo(_context, morTask));
return false;
}
}
}
return true;
}
开发者ID:apache,项目名称:cloudstack,代码行数:20,代码来源:VirtualMachineMO.java
示例2: findSnapshot
import com.vmware.vim25.VirtualMachineSnapshotInfo; //导入依赖的package包/类
public ManagedObjectReference findSnapshot(String vmName, String snapshotId)
throws Exception {
ManagedObjectReference vm = getVirtualMachine(vmName);
VirtualMachineSnapshotInfo info = (VirtualMachineSnapshotInfo) getServiceUtil()
.getDynamicProperty(vm, PROPERTY_SNAPSHOT);
if (info == null) {
return null;
}
return searchSnapshot(info.getRootSnapshotList(), snapshotId);
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:12,代码来源:VMwareClient.java
示例3: listSnapshots
import com.vmware.vim25.VirtualMachineSnapshotInfo; //导入依赖的package包/类
static void listSnapshots(VirtualMachine vm)
{
if(vm==null)
{
return;
}
VirtualMachineSnapshotInfo snapInfo = vm.getSnapshot();
VirtualMachineSnapshotTree[] snapTree =
snapInfo.getRootSnapshotList();
printSnapshots(snapTree);
}
开发者ID:Juniper,项目名称:vijava,代码行数:12,代码来源:VMSnapshot.java
示例4: getSnapshotMor
import com.vmware.vim25.VirtualMachineSnapshotInfo; //导入依赖的package包/类
public ManagedObjectReference getSnapshotMor(String snapshotName) throws Exception {
VirtualMachineSnapshotInfo info = getSnapshotInfo();
if (info != null) {
List<VirtualMachineSnapshotTree> snapTree = info.getRootSnapshotList();
return VmwareHelper.findSnapshotInTree(snapTree, snapshotName);
}
return null;
}
开发者ID:apache,项目名称:cloudstack,代码行数:9,代码来源:VirtualMachineMO.java
示例5: hasSnapshot
import com.vmware.vim25.VirtualMachineSnapshotInfo; //导入依赖的package包/类
public boolean hasSnapshot() throws Exception {
VirtualMachineSnapshotInfo info = getSnapshotInfo();
if (info != null) {
ManagedObjectReference currentSnapshot = info.getCurrentSnapshot();
if (currentSnapshot != null) {
return true;
}
List<VirtualMachineSnapshotTree> rootSnapshotList = info.getRootSnapshotList();
if (rootSnapshotList != null && rootSnapshotList.size() > 0) {
return true;
}
}
return false;
}
开发者ID:apache,项目名称:cloudstack,代码行数:15,代码来源:VirtualMachineMO.java
示例6: getSnapshotInfo
import com.vmware.vim25.VirtualMachineSnapshotInfo; //导入依赖的package包/类
public VirtualMachineSnapshotInfo getSnapshotInfo() throws Exception {
return (VirtualMachineSnapshotInfo)_context.getVimClient().getDynamicProperty(_mor, "snapshot");
}
开发者ID:apache,项目名称:cloudstack,代码行数:4,代码来源:VirtualMachineMO.java
注:本文中的com.vmware.vim25.VirtualMachineSnapshotInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论