|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlive.smapi.SMAPI_Interface
SMAPI_Interface is a library that utilizes the z/VM SMAPI to provide the same feature set as the SMAPI but without the trouble of the confusing technical details of the SMAPI. You will not need to check return or reason codes, or worry about setting the correct parameters. This library provides procedures that reduce the complexity of many SMAPI procedure calls by using sane default values for arguments and reducing the amount of usually unneeded options available to the programmer. It also provides procedures that exactly corespond to the SMAPI calls so that the programmer can still utilize the full power of the SMAPI if neccessary. Note: Not all functions have been written, and some that have been written do not allow you to make full use of the underlying SMAPI call. In these cases, the limitations are clearly explained.
Constructor Summary | |
SMAPI_Interface(String hostName,
int port,
String userName,
String password)
Creates a new SMAPI Interface object with the given parameters. |
Method Summary | |
LinkedList |
activeImagesQuery()
UNOFFICIAL: This function returns a LinkedList of Strings. |
private void |
asynchronousCall(String asyncOperationID)
Corresponds to the SMAPI procedure QUERY_ASYNCHRONOUS_OPERATION_1. |
private LinkedList |
connectRequest(String functionName,
String parms)
Executes the requested SMAPI function given its name and parameters. |
private LinkedList |
connectRequestRAW(String functionName,
String parms)
Executes the requested SMAPI function given its name and parameters. |
private void |
errorCheck(String desc,
int rc,
int rs)
Given an RC/RS pair, compare them against known errors and throw an appropriate exception if an error is detected. |
String |
getLowestFreeAddress(String guestName,
String size)
UNOFFICIAL: Returns the lowest free virtual address for a particular user. |
String |
getNICaddress(String netName,
String guestName)
UNOFFICIAL: This function returns the virtual address of a specified NIC for a specified user on a specified network . |
void |
imageActivate(String guestName)
Corresponds to the SMAPI procedure IMAGE_ACTIVATE. |
void |
imageCreate(String guestName,
String prototypeName,
String password)
Corresponds to the SMAPI procedure IMAGE_CREATE. |
void |
imageDeactivate(String guestName)
Corresponds to the SMAPI procedure IMAGE_DEACTIVATE. |
void |
imageDelete(String guestName)
Corresponds to the SMAPI procedure IMAGE_DELETE. |
int |
imageDiskCopy(String strGuestName,
String strVirtualDeviceAddress,
String strSourceImageName,
String strSourceDeviceAddress,
String strAllocationType,
String strDiskMode,
String strReadPW,
String strWritePW,
String strMultiPW)
Copies a minidisk from one guest to another |
int |
imageDiskCopyDM(String strGuestName,
String strVirtualDeviceAddress,
String strSourceImageName,
String strSourceDeviceAddress,
String strAllocationType,
String strDiskMode,
String strReadPW,
String strWritePW,
String strMultiPW)
Copies a minidisk from one guest's directory to another guest's directory |
void |
imageDiskCreate(String strGuestName,
String strVirtualDeviceAddress,
String strAllocationType,
String strAllocUnitSize,
String strDiskSize,
String strDiskMode,
String strFormat,
String strReadPW,
String strWritePW,
String strMultiPW)
Creates a new minidisk for a guest |
void |
imageDiskCreateDM(String strGuestName,
String strVirtualDeviceAddress,
String strAllocationType,
String strAllocUnitSize,
String strDiskSize,
String strDiskMode,
String strFormat,
String strReadPW,
String strWritePW,
String strMultiPW)
Creates a new minidisk for a guest's directory entry |
void |
imageDiskDelete(String strGuestName,
String strVirtualDeviceAddress)
This function deletes a minidisk from a guest |
void |
imageDiskDeleteDM(String strGuestName,
String strVirtualDeviceAddress)
This function deletes a minidisk from a guest's directory entry |
void |
imageDiskShare(String sourceGuestName,
String sourceVaddr,
String destGuestName,
String destVaddr,
String accMode,
String passwordNeededToLink)
Corresponds to the SMAPI procedure IMAGE_DISK_SHARE. |
void |
imageDiskShareDM(String sourceGuestName,
String sourceVaddr,
String destGuestName,
String destVaddr,
String accMode,
String passwordNeededToLink)
Corresponds to the SMAPI procedure IMAGE_DISK_SHARE. |
void |
imageDiskUnshare(String guestUsingDisk,
String vaddrOfGuestUsingDisk,
String guestOwningDisk,
String vaddrOfGuestOwningDisk)
Corresponds to the SMAPI procedure IMAGE_DISK_UNSHARE. |
void |
imageDiskUnshareDM(String guestUsingDisk,
String vaddrOfGuestUsingDisk,
String guestOwningDisk,
String vaddrOfGuestOwningDisk)
Corresponds to the SMAPI procedure IMAGE_DISK_UNSHARE. |
void |
imageLock(String guestName)
Corresponds to the SMAPI procedure IMAGE_LOCK. |
LinkedList |
imageNameQuery()
Corresponds to the SMAPI procedure IMAGE_NAME_QUERY. |
LinkedList |
imageQuery(String guestName)
Corresponds to the SMAPI procedure IMAGE_QUERY. |
void |
imageReplace(String imageName,
LinkedList imageDefLines)
Corresponds to the SMAPI procedure IMAGE_REPLACE. |
void |
imageSetPassword(String guestName,
String password)
Corresponds to the SMAPI procedure IMAGE_PASSWORD_SET. |
void |
imageUnlock(String guestName)
Corresponds to the SMAPI procedure IMAGE_UNLOCK. |
int |
nameListAdd(String listName,
String nameToAdd)
Corresponds to the SMAPI procedure NAME_LIST_ADD. |
void |
nameListDestroy(String listName)
Corresponds to the SMAPI procedure NAME_LIST_DESTROY. |
LinkedList |
nameListQuery(String listName)
Corresponds to the SMAPI procedure NAME_LIST_QUERY. |
LinkedList |
nameListQueryAll()
UNOFFICIAL: This function returns all information from the SMAPI namelist file which is used to store the SMAPIs namelists and their members. |
int |
nameListRemove(String strListName,
String strNameToRemove)
Corresponds to the SMAPI procedure NAME_LIST_REMOVE. |
void |
nullRequest()
Executes a simple SMAPI call that does nothing other than authenticate with the SMAPI server. |
private Network |
parseGLan(LinkedList lines)
Parses Guest LAN output from the query networks SMAPI call. |
private LinkedList |
parseNetworks(LinkedList tokens)
Parses output from the query networks SMAPI call. |
private LinkedList |
parseServerStream(String data)
Parses raw data returned from the SMAPI server and returns a LinkedList of Strings representing the returned data. |
private Network |
parseVSwitch(LinkedList lines)
Parses VSwitch output from the query networks SMAPI call. |
void |
prototypeCreate(String name,
LinkedList linesList)
Corresponds to the SMAPI procedure PROTOTYPE_CREATE. |
void |
prototypeDelete(String prototypeName)
Corresponds to the SMAPI procedure PROTOTYPE_DELETE. |
LinkedList |
prototypeNameQuery()
Corresponds to the SMAPI procedure PROTOTYPE_NAME_QUERY. |
LinkedList |
prototypeQuery(String prototypeName)
Corresponds to the SMAPI procedure PROTOTYPE_QUERY. |
LinkedList |
queryNetworkMembers(String netName)
UNOFFICIAL: This function returns the members of a specified VSwitch, or all VSwitches on the system. |
private String |
readUntilSeeChar(StringBuffer sb,
byte character)
Read from a string buffer until we need a given character, remove and return all the read data. |
LinkedList |
returnQueryVirtual(String guestName)
UNOFFICIAL: Returns the results of QUERY VIRTUAL for the given guest. |
void |
sharedStorageAddAccess(String guestName,
String segmentName)
Corresponds to the SMAPI procedure SHARED_STORAGE_ACCESS_ADD. |
void |
sharedStorageCreate(String guestName,
String segmentName,
String pageRange,
String accessDescriptor)
|
void |
sharedStorageDelete(String guestName,
String segmentName)
Corresponds to the SMAPI procedure SHARED_STORAGE_DELETE. |
String |
sharedStorageFindPageRange(String segmentSizeInMB,
String guestName)
UNOFFICIAL: Given a guest to use as a model, find an appropriate page range for a new shared segment of the given size. |
LinkedList |
sharedStorageQuery()
UNOFFICIAL: We currently use an unofficial call to do this. |
boolean |
sharedStorageQueryAccess(String guestToQuery,
String segToQuery)
Queries access information for a shared storage segment. |
void |
sharedStorageRemoveAccess(String guestName,
String segmentName)
Corresponds to the SMAPI procedure SHARED_STORAGE_ACCESS_REMOVE. |
void |
virtualLANCreate(String lanName)
UNOFFICIAL: Creates a guest LAN. |
int |
virtualLANCreateAndConnect(String lanName,
String guestName)
Corresponds to the SMAPI procedure VIRTUAL_NETWORK_LAN_CONNECT. |
int |
virtualLANCreateAndConnectDM(String lanName,
String guestName,
String vaddr)
Corresponds to the SMAPI procedure VIRTUAL_NETWORK_LAN_CONNECT_DM. |
int |
virtualLANDisconnectAndDelete(String lanName,
String guestName,
String vaddr)
Corresponds to the SMAPI procedure VIRTUAL_NETWORK_LAN_DISCONNECT. |
int |
virtualLANDisconnectAndDeleteDM(String lanName,
String guestName,
String vaddr)
Corresponds to the SMAPI procedure VIRTUAL_NETWORK_LAN_DISCONNECT_DM. |
LinkedList |
virtualLanQuery()
Corresponds to the SMAPI procedure VIRTUAL_NETWORK_LAN_QUERY. |
void |
virtualSwitchCreate(String switchName,
String portname,
String raddr)
UNOFFICIAL: Creates a VSwitch with the given parameters. |
int |
virtualSwitchCreateAndConnect(String switchName,
String guestName,
String vaddr,
String portname,
String raddr)
Corresponds to the SMAPI procedure VIRTUAL_NETWORK_VSWITCH_CONNECT. |
int |
virtualSwitchCreateAndConnectDM(String switchName,
String guestName,
String vaddr,
String portname,
String raddr)
Corresponds to the SMAPI procedure VIRTUAL_NETWORK_VSWITCH_CONNECT_DM. |
void |
virtualSwitchDelete(String switchName)
UNOFFICIAL: Deletes a VSwitch from the system. |
void |
virtualSwitchDetatch(String guestName,
String vaddr)
UNOFFICIAL: Detatches a guest's virtual NIC from the VSwitch it is attched to. |
int |
virtualSwitchDisconnectAndDelete(String guestName,
String switchName,
String vaddr)
Corresponds to the SMAPI procedure VIRTUAL_NETWORK_VSWITCH_DISCONNECT. |
int |
virtualSwitchDisconnectAndDeleteDM(String guestName,
String switchName,
String vaddr)
Corresponds to the SMAPI procedure VIRTUAL_NETWORK_VSWITCH_DISCONNECT. |
void |
virtualSwitchSet(String switchName,
String grantID,
String revokeID)
Corresponds to the SMAPI procedure VIRTUAL_NETWORK_VSWITCH_SET. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String NAMELIST_QUERY
private static final String AUTH_LIST_ADD
private static final String AUTH_LIST_QUERY
private static final String AUTH_LIST_REM
private static final String IMAGE_ACTIV
private static final String IMAGE_CREATE_DM
private static final String IMAGE_DEACT
private static final String IMAGE_DELETE_DM
private static final String IMAGE_DEDICATE
private static final String IMAGE_DEDIC_DM
private static final String IMAGE_DEV_RESE
private static final String IMAGE_UNDED
private static final String IMAGE_UNDED_DM
private static final String IMAGE_DISK_CP
private static final String IMAGE_DISK_CP_DM
private static final String IMAGE_DISK_CREAT
private static final String IMAGE_DISK_CREAT_DM
private static final String IMAGE_DISK_DEL
private static final String IMAGE_DISK_DEL_DM
private static final String IMAGE_DISK_SH
private static final String IMAGE_DISK_SH_DM
private static final String IMAGE_DISK_UNSH
private static final String IMAGE_DISK_UNSH_DM
private static final String IMAGE_LOCK_DM
private static final String IMAGE_NAME_QU_DM
private static final String IMAGE_PSWD_SET_DM
private static final String IMAGE_QUERY_DM
private static final String IMAGE_RECY
private static final String IMAGE_REPLACE_DM
private static final String IMAGE_STAT_QUER
private static final String IMAGE_UNLCK_DM
private static final String IMAGE_VOL_ADD
private static final String IMAGE_VOL_DEL
private static final String IMAGE_VOL_DEF_DM
private static final String IMAGE_VOL_QUE_DM
private static final String IMAGE_VOL_REM_DM
private static final String NAME_LIST_ADD
private static final String NAME_LIST_DES
private static final String NAME_LIST_REM
private static final String PROTO_CREA_DM
private static final String PROTO_DEL_DM
private static final String PROTO_NM_QU_DM
private static final String PROTO_QUE_DM
private static final String PROTO_REPL_DM
private static final String SS_ACC_ADD_DM
private static final String SS_ACC_QUE_DM
private static final String SS_ACC_REM_DM
private static final String SS_CREATE
private static final String SS_DELETE
private static final String SS_QUERY
private static final String SS_REPLACE
private static final String STAT_CHANG_ACT_DM
private static final String STAT_CHANG_DEA_DM
private static final String STAT_CHANG_IMM_DM
private static final String VIRT_NET_AD_CR
private static final String VIRT_NET_AD_CR_DM
private static final String VIRT_NET_AD_DE
private static final String VIRT_NET_AD_DE_DM
private static final String VIRT_NET_CON_CR
private static final String VIRT_NET_CON_CR_DM
private static final String VIRT_NET_CON_DE
private static final String VIRT_NET_CON_DE_DM
private static final String VIRT_NET_LAN_CON
private static final String VIRT_NET_LAN_CON_DM
private static final String VIRT_NET_LAN_DS
private static final String VIRT_NET_LAN_DS_DM
private static final String VIRT_NET_LAN_QU
private static final String VIRT_NET_VSW_CON
private static final String VIRT_NET_VSW_CON_DM
private static final String VIRT_NET_VSW_DS
private static final String VIRT_NET_VSW_DS_DM
private static final String VIRT_NET_VSW_QUE
private static final String VIRT_NET_VSW_SET
private static final String QUERY_ASYNC_OP
private static final String NULL_CALL
private static final String VIRT_NET_VSW_MAKE
private static final String ACTIVE_IMAGE_QUERY
private static final String NAME_LIST_Q_ALL
private static final String QUERY_VIRTUAL
private static final String LOW_FREE_ADDR
private static final String FIND_STORAGE
private static final String QUER_NIC_ADDR
private static final String QUER_NET_MEMBERS
private static final String VIRT_SWIT_CREATE
private static final String VSW_DEL
private static final String VSW_DET
private static final byte B_NULL
private static final byte B_LINETERM
private static final byte B_SPACE
public static final int NL_GUESTADDED
public static final int NL_LISTMADE_GUESTADDED
public static final int NL_LISTMADE_GUESTTHERE
private String hostName
private int port
private String userName
private String password
Constructor Detail |
public SMAPI_Interface(String hostName, int port, String userName, String password)
hostName
- The host name or IP address of the z/VM system to connect to.port
- The port number the SMAPI server is listening on.userName
- The user name used to authenticate to the SMAPI server.password
- The password used to authenticate to the SMAPI server.Method Detail |
public void nullRequest() throws exceptions.SMAPIException
exceptions.SMAPIException
public LinkedList nameListQuery(String listName) throws exceptions.SMAPIException
listName
- The name of the namelist to query.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public int nameListAdd(String listName, String nameToAdd) throws exceptions.SMAPIException
listName
- Name list to which an entry will be added.nameToAdd
- Name to add to the name list.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void nameListDestroy(String listName) throws exceptions.SMAPIException
listName
- The name of the list to destroy.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public int nameListRemove(String strListName, String strNameToRemove) throws exceptions.SMAPIException
strListName
- name list from which to remove an entry.strNameToRemove
- Name to remove from the name list.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
private void asynchronousCall(String asyncOperationID) throws exceptions.SMAPIException
asyncOperationID
- ID of the asynchronous operation.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public LinkedList prototypeNameQuery() throws exceptions.SMAPIException
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void prototypeCreate(String name, LinkedList linesList) throws exceptions.SMAPIException
name
- The name of throws prototype to createlinesList
- A LinkedList of strings. Each string is a line/entry in the new prototype.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void prototypeDelete(String prototypeName) throws exceptions.SMAPIException
prototypeName
- Name of the prototype to delete.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public LinkedList prototypeQuery(String prototypeName) throws exceptions.SMAPIException
prototypeName
- Name of the prototype to return.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public LinkedList imageNameQuery() throws exceptions.SMAPIException
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageCreate(String guestName, String prototypeName, String password) throws exceptions.SMAPIException
guestName
- Name of the new guest.prototypeName
- Name of the prototype this guest will be modeled after.password
- Password for this guest.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageReplace(String imageName, LinkedList imageDefLines) throws exceptions.SMAPIException
imageName
- name of the guest to replace.imageDefLines
- Array containing strings that represent the lines of the new directory entry for this guest.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageDelete(String guestName) throws exceptions.SMAPIException
guestName
- name of the guest to delete.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public LinkedList imageQuery(String guestName) throws exceptions.SMAPIException
guestName
- The name of the guest to query.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageSetPassword(String guestName, String password) throws exceptions.SMAPIException
guestName
- Name of the guest to set the password for.password
- The new password for the guest.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageLock(String guestName) throws exceptions.SMAPIException
guestName
- The guest to lock, or the guest who owns the device you wish to lock.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageUnlock(String guestName) throws exceptions.SMAPIException
guestName
- The guest to unlock
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageActivate(String guestName) throws exceptions.SMAPIException
guestName
- The guest (or name list) to activate (log on).
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageDeactivate(String guestName) throws exceptions.SMAPIException
guestName
- The name of the guest to log off.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public LinkedList virtualLanQuery() throws exceptions.SMAPIException
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
private LinkedList parseNetworks(LinkedList tokens) throws exceptions.SMAPIException
tokens
- The output from VIRTUAL_NETWORK_LAN_QUERY
exceptions.SMAPIException
private Network parseGLan(LinkedList lines) throws exceptions.SMAPIException
lines
- Output from VIRTUAL_NETWORK_LAN_QUERY
exceptions.SMAPIException
private Network parseVSwitch(LinkedList lines) throws exceptions.SMAPIException
lines
- Output from VIRTUAL_NETWORK_LAN_QUERY
exceptions.SMAPIException
public void imageDiskCreate(String strGuestName, String strVirtualDeviceAddress, String strAllocationType, String strAllocUnitSize, String strDiskSize, String strDiskMode, String strFormat, String strReadPW, String strWritePW, String strMultiPW) throws exceptions.SMAPIException
strGuestName
- Guest to create minidisk forstrVirtualDeviceAddress
- Virtual address to create minidisk atstrAllocationType
- How to allocate minidisk (T, V, or AUTO)strAllocUnitSize
- What units to allocate the minidisk in (cylinders or blocks)strDiskSize
- How large of a disk to createstrDiskMode
- What type of access to have for the minidisk (e.g. RR or RW)strReadPW
- ReadPW for the diskstrWritePW
- WritePW for the diskstrMultiPW
- MultiPW for the disk
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageDiskCreateDM(String strGuestName, String strVirtualDeviceAddress, String strAllocationType, String strAllocUnitSize, String strDiskSize, String strDiskMode, String strFormat, String strReadPW, String strWritePW, String strMultiPW) throws exceptions.SMAPIException
strGuestName
- Guest to create minidisk forstrVirtualDeviceAddress
- Virtual address to create minidisk atstrAllocationType
- How to allocate minidisk (T, V, or AUTO)strAllocUnitSize
- What units to allocate the minidisk in (cylinders or blocks)strDiskSize
- How large of a disk to createstrDiskMode
- What type of access to have for the minidisk (e.g. RR or RW)
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageDiskDelete(String strGuestName, String strVirtualDeviceAddress) throws exceptions.SMAPIException
strGuestName
- Name of guest to delete disk fromstrVirtualDeviceAddress
- Virtual Device of disk to delete
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageDiskDeleteDM(String strGuestName, String strVirtualDeviceAddress) throws exceptions.SMAPIException
strGuestName
- Name of guest to delete disk fromstrVirtualDeviceAddress
- Virtual Device of disk to delete
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public int imageDiskCopy(String strGuestName, String strVirtualDeviceAddress, String strSourceImageName, String strSourceDeviceAddress, String strAllocationType, String strDiskMode, String strReadPW, String strWritePW, String strMultiPW) throws exceptions.SMAPIException
strGuestName
- Guest to copy minidisk tostrVirtualDeviceAddress
- Virtual address to copy minidisk tostrSourceImageName
- Guest to copy minidisk fromstrSourceDeviceAddress
- Virtual address to copy minidisk fromstrAllocationType
- How to allocate minidisk (AUTO G, R, or V)strDiskMode
- What type of access to have for the minidisk (e.g. RR or RW)strReadPW
- Read access passwordstrWritePW
- Write access passwordstrMultiPW
- Multi access password
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public int imageDiskCopyDM(String strGuestName, String strVirtualDeviceAddress, String strSourceImageName, String strSourceDeviceAddress, String strAllocationType, String strDiskMode, String strReadPW, String strWritePW, String strMultiPW) throws exceptions.SMAPIException
strGuestName
- Guest to copy minidisk tostrVirtualDeviceAddress
- Virtual address to copy minidisk tostrSourceImageName
- Guest to copy minidisk fromstrSourceDeviceAddress
- Virtual address to copy minidisk fromstrAllocationType
- How to allocate minidisk (AUTO G, R, or V)strDiskMode
- What type of access to have for the minidisk (e.g. RR or RW)strReadPW
- Read access passwordstrWritePW
- Write access passwordstrMultiPW
- Multi access password
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageDiskShare(String sourceGuestName, String sourceVaddr, String destGuestName, String destVaddr, String accMode, String passwordNeededToLink) throws exceptions.SMAPIException
sourceGuestName
- The name of the guest that owns the disk to be shared.sourceVaddr
- The address of the disk to be shared.destGuestName
- The guest that will obtain the link to the shared disk.destVaddr
- The virtual address that will be created and linked to the shared disk.accMode
- The mode that the disk will be shared in.passwordNeededToLink
- Optional. Password used to access the disk. Pass empty string to ignore this password.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageDiskShareDM(String sourceGuestName, String sourceVaddr, String destGuestName, String destVaddr, String accMode, String passwordNeededToLink) throws exceptions.SMAPIException
sourceGuestName
- The name of the guest that owns the disk to be shared.sourceVaddr
- The address of the disk to be shared.destGuestName
- The guest that will obtain the link to the shared disk.destVaddr
- The virtual address that will be created and linked to the shared disk.accMode
- The mode that the disk will be shared in.passwordNeededToLink
- Optional. Password used to access the disk. Pass empty string to ignore this password.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void imageDiskUnshare(String guestUsingDisk, String vaddrOfGuestUsingDisk, String guestOwningDisk, String vaddrOfGuestOwningDisk) throws exceptions.SMAPIException
guestUsingDisk
- Name of the guest linking to the disk.vaddrOfGuestUsingDisk
- Virtual address of disk with respect to the guest with the link.guestOwningDisk
- Guest that owns the disk being linked tovaddrOfGuestOwningDisk
- Virtual address of disk with respect to the guest that owns the disk.
exceptions.SMAPIException
public void imageDiskUnshareDM(String guestUsingDisk, String vaddrOfGuestUsingDisk, String guestOwningDisk, String vaddrOfGuestOwningDisk) throws exceptions.SMAPIException
guestUsingDisk
- Name of the guest linking to the disk.vaddrOfGuestUsingDisk
- Virtual address of disk with respect to the guest with the link.guestOwningDisk
- Guest that owns the disk being linked tovaddrOfGuestOwningDisk
- Virtual address of disk with respect to the guest that owns the disk.
exceptions.SMAPIException
public int virtualLANCreateAndConnect(String lanName, String guestName) throws exceptions.SMAPIException
lanName
- The name of the LAN to couple to.guestName
- Guest owning the NIC.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public int virtualLANCreateAndConnectDM(String lanName, String guestName, String vaddr) throws exceptions.SMAPIException
lanName
- The name of the LAN to couple to.guestName
- Guest owning the NIC.vaddr
- guestName virtual address of the new virtual NIC.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public int virtualLANDisconnectAndDelete(String lanName, String guestName, String vaddr) throws exceptions.SMAPIException
lanName
- The LAN to delete the NIC from.guestName
- Guest owning the NIC to delete.vaddr
- Base address of the NIC to delete.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public int virtualLANDisconnectAndDeleteDM(String lanName, String guestName, String vaddr) throws exceptions.SMAPIException
lanName
- The LAN to delete the NIC from.guestName
- Guest owning the NIC to delete.vaddr
- Base address of the NIC to delete.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public int virtualSwitchCreateAndConnect(String switchName, String guestName, String vaddr, String portname, String raddr) throws exceptions.SMAPIException
switchName
- name of the VSWITCH to create/connect NIC to.guestName
- Guest to own NIC.vaddr
- Base address for NIC.portname
- The port name to connect the real device toraddr
- The physical address of the real OSA device
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public int virtualSwitchCreateAndConnectDM(String switchName, String guestName, String vaddr, String portname, String raddr) throws exceptions.SMAPIException
switchName
- name of the VSWITCH to create/connect NIC to.guestName
- Guest to own NIC.vaddr
- Base address for NIC.portname
- The port name to connect the real device toraddr
- The physical address of the real OSA device
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void virtualSwitchCreate(String switchName, String portname, String raddr) throws exceptions.SMAPIException
switchName
- Name of the VSwitch you are creatingportname
- The portname for the real device attached to this VSwitch.raddr
- The address for the real device attached to this VSwitch.
exceptions.SMAPIException
public void virtualLANCreate(String lanName) throws exceptions.SMAPIException
lanName
- Name of the guest LAN you are creating
exceptions.SMAPIException
public void virtualSwitchSet(String switchName, String grantID, String revokeID) throws exceptions.SMAPIException
switchName
- name of the VSWITCH to modify.grantID
- userID to grant access to the VSWITCH.revokeID
- userID to revoke access to the VSWITCH.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public int virtualSwitchDisconnectAndDelete(String guestName, String switchName, String vaddr) throws exceptions.SMAPIException
guestName
- Guest owning the NIC to delete.switchName
- Name of VSWITCH.vaddr
- Base address of NIC.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public int virtualSwitchDisconnectAndDeleteDM(String guestName, String switchName, String vaddr) throws exceptions.SMAPIException
guestName
- Guest owning the NIC to delete.switchName
- Name of VSWITCH.vaddr
- Basee address of NIC.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public String sharedStorageFindPageRange(String segmentSizeInMB, String guestName) throws exceptions.SMAPIException
segmentSizeInMB
- Size of desired shared segment.guestName
- Guest to use as model.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void sharedStorageCreate(String guestName, String segmentName, String pageRange, String accessDescriptor) throws exceptions.SMAPIException
exceptions.SMAPIException
public void sharedStorageDelete(String guestName, String segmentName) throws exceptions.SMAPIException
guestName
- Guest owning the segment.segmentName
- name of segment.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public LinkedList sharedStorageQuery() throws exceptions.SMAPIException
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void sharedStorageAddAccess(String guestName, String segmentName) throws exceptions.SMAPIException
guestName
- guest to give access.segmentName
- Segment name.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void sharedStorageRemoveAccess(String guestName, String segmentName) throws exceptions.SMAPIException
guestName
- Guest for whom to remove access.segmentName
- Segment name.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public boolean sharedStorageQueryAccess(String guestToQuery, String segToQuery) throws exceptions.SMAPIException
guestToQuery
- Name of the guest for whom to query shared storage segmentssegToQuery
- Name of the segment to query information for
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public LinkedList returnQueryVirtual(String guestName) throws exceptions.SMAPIException
guestName
- Guest for which to query virtual adddresses.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public String getLowestFreeAddress(String guestName, String size) throws exceptions.SMAPIException
guestName
- Guest to query.size
- Size of free virtual address space needed (i.e. NICS need 3)
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public LinkedList queryNetworkMembers(String netName) throws exceptions.SMAPIException
Network
s.
netName
- Name of the network to query, use "" or "&" to query all networks
Network
s, each with containing only network name and members
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public String getNICaddress(String netName, String guestName) throws exceptions.SMAPIException
netName
- Name of the network the NIC is attached to.guestName
- Name of the guest to query on the given network
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public LinkedList nameListQueryAll() throws exceptions.SMAPIException
NameList
s
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public LinkedList activeImagesQuery() throws exceptions.SMAPIException
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void virtualSwitchDelete(String switchName) throws exceptions.SMAPIException
switchName
- Name of the switch to delete.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
public void virtualSwitchDetatch(String guestName, String vaddr) throws exceptions.SMAPIException
guestName
- Name of guest obtaining the NIC to detatch.vaddr
- The virtual address of the NIC to detatch.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
private LinkedList connectRequest(String functionName, String parms) throws exceptions.SMAPIException
functionName
- The short name of the SMAPI function to be called.parms
- The space delimited list of paramters for the given SMAPI call.
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
private LinkedList connectRequestRAW(String functionName, String parms) throws exceptions.SMAPIException
functionName
- The short name of the SMAPI function to be called.parms
- The paramters for the given SMAPI call, passed "AS IS".
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
private LinkedList parseServerStream(String data)
data
- Raw data from the SMAPI server.
private String readUntilSeeChar(StringBuffer sb, byte character)
sb
- A StringBuffer containing the data to search through.character
- The character we are looking for.
private void errorCheck(String desc, int rc, int rs) throws exceptions.SMAPIException
desc
- String describing the function calling errorCheck.rc
- SMAPI return coders
- SMAPI result code
SMAPIException
- An error occurred. This is the parent exception for all other exceptions in this library.
exceptions.SMAPIException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |