@Sample(name="acquire-session-info",
description="This sample will acquire a session with VC or ESX and print a cim service ticket and related session information to a file")
public class AcquireSessionInfo
extends ConnectedVimServiceBase
AcquireSessionInfo
This sample will acquire a session with VC or ESX
and print a cim service ticket and related
session information to a file
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
host [required] : Name of the host
info [optional] : Type of info required
only [cimticket] for now
file [optional] : Full path of the file to save data to
Command Line:
run.bat com.vmware.general.Browser --url [webserviceurl]
--username [username] --password [password]
--host [hostname] --info [password] --file [path_to_file]
ConnectedVimServiceBase.ConnectionExceptionPROP_ME_NAME, SVC_INST_NAME| Constructor and Description |
|---|
AcquireSessionInfo() |
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
setFilename(java.lang.String filename) |
void |
setHostname(java.lang.String hostname) |
void |
setInfo(java.lang.String info) |
basicConnectionFromConnection, connect, disconnect, getServiceInstanceReference, setConnection, setHostConnection@Option(name="host",
description="name of host")
public void setHostname(java.lang.String hostname)
@Option(name="info",
required=false,
description="Type of info required [cimticket]")
public void setInfo(java.lang.String info)
@Option(name="file",
required=false,
description="Full path of the file to save data to")
public void setFilename(java.lang.String filename)
@Action
public void run()
throws com.vmware.vim25.RuntimeFaultFaultMsg,
java.io.IOException,
com.vmware.vim25.InvalidPropertyFaultMsg
com.vmware.vim25.RuntimeFaultFaultMsgjava.io.IOExceptioncom.vmware.vim25.InvalidPropertyFaultMsg