Package com.vmware.spbm.samples
Class FcdAssociateProfile
- java.lang.Object
-
- com.vmware.spbm.connection.ConnectedServiceBase
-
- com.vmware.spbm.samples.FcdAssociateProfile
-
@Sample(name="fcd-associateprofile", description="This sample attaches a given virtual storage object(FCD) to the given virtual machine.") public class FcdAssociateProfile extends ConnectedServiceBaseFcdAssociateProfile This sample attaches a virtual storage object to given virtual machine and associates a given storage profile to the virtual storage object. 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 disk vmpath [required] : Inventory path of the virtual machine datastorename [required] : Name of the datastore which contains the virtual storage object profilename [required] : Name of the storage profile Command Line: Attach a given virtual storage object to the given virtual machine. run.bat com.vmware.spbm.samples.FcdAssociateProfile --url [webserviceurl] --username [username] --password [password] --vstorageobjectid [vstorageobjectid] --vmpath [vmpath] --datastorename [datastorename] --profilename [profilename] Ex: vmpath :: <DatacenterName>/<HiddenFolder - "vm">/<VmName> ( testDC/vm/VM_Test1 )
-
-
Constructor Summary
Constructors Constructor Description FcdAssociateProfile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()voidsetDatastoreName(java.lang.String datastoreName)voidsetProfileName(java.lang.String profileName)voidsetVmPath(java.lang.String vmPath)voidsetVStorageObjectId(java.lang.String vStorageObjectId)-
Methods inherited from class com.vmware.spbm.connection.ConnectedServiceBase
setConnection, start, stop
-
-
-
-
Method Detail
-
setVStorageObjectId
@Option(name="vstorageobjectid", required=true, description="Uuid of the disk.") public void setVStorageObjectId(java.lang.String vStorageObjectId)- Parameters:
vStorageObjectId- the vStorageObjectId to set
-
setVmPath
@Option(name="vmpath", required=true, description="Path of virtual machine.") public void setVmPath(java.lang.String vmPath)- Parameters:
vmPath- the vmPath to set
-
setDatastoreName
@Option(name="datastorename", required=true, description="Name of datastore containing the vstorageobject.") public void setDatastoreName(java.lang.String datastoreName)- Parameters:
datastoreName- the datastoreName to set
-
setProfileName
@Option(name="profilename", required=true, description="Name of the storage profile") public void setProfileName(java.lang.String profileName)- Parameters:
profileName- the profileName to set
-
run
@Action public void run() throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsg, com.vmware.vim25.FileFaultFaultMsg, com.vmware.vim25.InvalidDatastoreFaultMsg, com.vmware.vim25.NotFoundFaultMsg, com.vmware.vim25.InvalidControllerFaultMsg, com.vmware.vim25.InvalidStateFaultMsg, com.vmware.vim25.MissingControllerFaultMsg, com.vmware.vim25.VmConfigFaultFaultMsg, com.vmware.vim25.InvalidCollectorVersionFaultMsg, com.vmware.pbm.InvalidArgumentFaultMsg, com.vmware.pbm.RuntimeFaultFaultMsg, com.vmware.vim25.ConcurrentAccessFaultMsg, com.vmware.vim25.DuplicateNameFaultMsg, com.vmware.vim25.InsufficientResourcesFaultFaultMsg, com.vmware.vim25.InvalidNameFaultMsg, com.vmware.vim25.TaskInProgressFaultMsg- Throws:
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.FileFaultFaultMsgcom.vmware.vim25.InvalidDatastoreFaultMsgcom.vmware.vim25.NotFoundFaultMsgcom.vmware.vim25.InvalidControllerFaultMsgcom.vmware.vim25.InvalidStateFaultMsgcom.vmware.vim25.MissingControllerFaultMsgcom.vmware.vim25.VmConfigFaultFaultMsgcom.vmware.vim25.InvalidCollectorVersionFaultMsgcom.vmware.pbm.InvalidArgumentFaultMsgcom.vmware.vim25.ConcurrentAccessFaultMsgcom.vmware.vim25.DuplicateNameFaultMsgcom.vmware.vim25.InsufficientResourcesFaultFaultMsgcom.vmware.vim25.InvalidNameFaultMsgcom.vmware.vim25.TaskInProgressFaultMsg
-
-