Package com.vmware.simpleagent
Class CreateUser
- java.lang.Object
-
- com.vmware.connection.ConnectedVimServiceBase
-
- com.vmware.connection.ESXHostSampleBase
-
- com.vmware.simpleagent.CreateUser
-
@Sample(name="create-user", description="\n\nCreateUser generates an random username (Usernnnn, where nnnn is a psuedo-randomly generated number) and random password and stores them in the credential store on the local machine. CreateUser works with ESX or ESXi only (not vCenter) \n") public class CreateUser extends ESXHostSampleBaseCreateUser The CreateUser class creates a user account and password stores them the local credential store. CreateUser should be used in conjunction with the
SimpleAgentsample application only. CreateUser generates an arbitrary user name (Usernnnn, where nnnn is a psuedo-randomly generated number) and password and stores them in the credential store on the local machine. CreateUser works with ESX or ESXi only (not vCenter) Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication server [required] : server for which username and password are to be added user [optional] : provide your own username to create (default is a randomly generated name) pass [optional] : provide your own password for newly created username (default is a randomly generated password) Command Line: run.bat com.vmware.simpleagent.CreateUser --server [myServerName] --url [URLString] --username [User] --password [Password]
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vmware.connection.ConnectedVimServiceBase
ConnectedVimServiceBase.ConnectionException
-
-
Field Summary
-
Fields inherited from class com.vmware.connection.ConnectedVimServiceBase
PROP_ME_NAME, SVC_INST_NAME
-
-
Constructor Summary
Constructors Constructor Description CreateUser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateUser()java.lang.StringgetPass()java.lang.StringgetUser()voidsetPass(java.lang.String password)voidsetServer(java.lang.String server)voidsetUser(java.lang.String userName)-
Methods inherited from class com.vmware.connection.ESXHostSampleBase
connect, setConnection
-
Methods inherited from class com.vmware.connection.ConnectedVimServiceBase
basicConnectionFromConnection, disconnect, getServiceInstanceReference, setHostConnection
-
-
-
-
Method Detail
-
setServer
@Option(name="server", required=false, description="server for which username and password are to be added") public void setServer(java.lang.String server)
-
setUser
@Option(name="user", required=false, description="provide your own username to create (default is a randomly generated name)") public void setUser(java.lang.String userName)
-
getUser
public java.lang.String getUser()
-
setPass
@Option(name="pass", required=false, description="provide your own password for newly created username (default is a randomly generated password)") public void setPass(java.lang.String password)
-
getPass
public java.lang.String getPass()
-
createUser
@Action public void createUser() throws com.vmware.vim25.RuntimeFaultFaultMsg, com.vmware.vim25.AlreadyExistsFaultMsg, com.vmware.vim25.NotFoundFaultMsg, com.vmware.vim25.AuthMinimumAdminPermissionFaultMsg, com.vmware.vim25.UserNotFoundFaultMsg, java.io.IOException- Throws:
com.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.AlreadyExistsFaultMsgcom.vmware.vim25.NotFoundFaultMsgcom.vmware.vim25.AuthMinimumAdminPermissionFaultMsgcom.vmware.vim25.UserNotFoundFaultMsgjava.io.IOException
-
-