Package com.vmware.fcd
Class FcdSnapshotOperations
- java.lang.Object
-
- com.vmware.connection.ConnectedVimServiceBase
-
- com.vmware.fcd.FcdSnapshotOperations
-
@Sample(name="fcd-snapshotoperations", description="This sample executes snapshot related operation on a snapshot of a given VStorageObject.") public class FcdSnapshotOperations extends com.vmware.connection.ConnectedVimServiceBaseFcdSnapshotOperations This sample executes below snapshot related operation on a snapshot of a given VStorageObject from vslm : 1. Creates snapshot of a given VStorageObject. 2. Retrieves Snapshot Info of a given VStorageObject. 3. Retrieves Snapshot Details of a given VStorageObject. 4. Query disk changed areas of a given VStorageObject. 5. Creates vStorageObject from snapshot. 6. Reverts VStorageObject to a given snapshot. 7. Deletes snapshot of a given VStorageObject. Pre-requisite : Existing VStorageObject ID Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication vstorageobjectid [required] : Uuid of the vstorageobject description [required] : A short description to be associated with the snapshot. fcdname [required] : FCD name is required to create disk from snapshot. pbmprofileid [optional] : SPBM Profile requirement on the new virtual storage object. devicegroupid [optional] : Id of the replication device group. faultdomainid [optional] : Id of the fault domain to which the group belongs. datastorepath [optional] : Relative location in the specified datastore where disk needs to be created. Command Line: run.bat com.vmware.fcd.FcdSnapshotOperations --url [webserviceurl] --username [username] --password [password] --vstorageobjectid [vstorageobjectid] --description [description]
-
-
Constructor Summary
Constructors Constructor Description FcdSnapshotOperations()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanisSnapshotIdInSnapshotList(com.vmware.vim25.VStorageObjectSnapshotInfo retrievedSnapshotInfo, com.vmware.vim25.ID snapshotId)Verifies if Snapshot Id is included in retrievedSnapshotInfovoidrun()voidsetDatastorePath(java.lang.String datastorePath)voidsetDescription(java.lang.String description)voidsetDeviceGroupId(java.lang.String deviceGroupId)voidsetFaultDomainId(java.lang.String faultDomainId)voidsetProfileSpec(java.lang.String pbmProfileId)voidsetVStorageObjectId(java.lang.String vStorageObjectId)voidsetVStorageObjectName(java.lang.String fcdName)
-
-
-
Method Detail
-
setVStorageObjectId
@Option(name="vstorageobjectid", required=true, description="Uuid of the vstorageobject.") public void setVStorageObjectId(java.lang.String vStorageObjectId)- Parameters:
vStorageObjectId- the vStorageObjectId to set
-
setDescription
@Option(name="description", required=true, description="A short description to be associated with the snapshot.") public void setDescription(java.lang.String description)- Parameters:
description- the description to set
-
setVStorageObjectName
@Option(name="fcdname", required=true, description="A user friendly name to beassociated with the new disk.") public void setVStorageObjectName(java.lang.String fcdName)- Parameters:
fcdName- the fcdName to set
-
setProfileSpec
@Option(name="pbmprofileid", required=false, description="SPBM Profile requirement on thenew virtual storage object.") public void setProfileSpec(java.lang.String pbmProfileId)- Parameters:
pbmProfileId- the pbmProfileId to set
-
setDeviceGroupId
@Option(name="devicegroupid", required=false, description="Id of the replication device group.") public void setDeviceGroupId(java.lang.String deviceGroupId)- Parameters:
deviceGroupId- the deviceGroupId to set
-
setFaultDomainId
@Option(name="faultdomainid", required=false, description="ID of the fault domain to which the group belongs.") public void setFaultDomainId(java.lang.String faultDomainId)- Parameters:
faultDomainId- the faultDomainId to set
-
setDatastorePath
@Option(name="datastorepath", required=false, description="Relative location in the specified datastorewhere disk needs to be created.") public void setDatastorePath(java.lang.String datastorePath)- Parameters:
datastorePath- the path to set
-
isSnapshotIdInSnapshotList
public static boolean isSnapshotIdInSnapshotList(com.vmware.vim25.VStorageObjectSnapshotInfo retrievedSnapshotInfo, com.vmware.vim25.ID snapshotId)Verifies if Snapshot Id is included in retrievedSnapshotInfo- Parameters:
retrievedSnapshotInfo- VStorageObjectSnapshotInfo containing snapshot list of VStorageObjectsnapshotId- Snapshot Id of VStorageObject- Returns:
- true if retrievedSnapshotInfo contains snapshotId details
-
run
@Action public void run() throws java.lang.Exception- Throws:
java.lang.Exception
-
-