|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlive.zvmtasks.ZVMTasks
ZVMTasks is a library of functions that perform some user oriented task on a z/VM system. It makes extensive use of the SMAPIWrapper library.
Nested Class Summary | |
static interface |
ZVMTasks.getCommonAddressProgressListener
|
Field Summary | |
static String |
PROFILE_GENERAL
|
static String |
PROFILE_SUPER
|
static String |
SEG_BUILDER
|
private SMAPI_Interface |
smapi
|
Constructor Summary | |
ZVMTasks(String hostName,
int port,
String userName,
String password)
Creates a new instance of ZVMTasks. |
Method Summary | |
LinkedList |
activeImagesQuery()
This function returns a LinkedList of all active guests
Wraps SMAPI_Interface.activeImagesQuery() . |
boolean |
authenticate()
Tests whether this user can authenticate to the SMAPI server. |
LinkedList |
changeGuestsDirectory(LinkedList existGuestDirectory,
String cloneGuestName,
String clonePassword)
This function will go through and update and make the clone's directory the same as the existing guest's and will return a list of the minidisks for either creation or copying Wraps SMAPI_Interface.imageReplace(String, LinkedList) . |
void |
changeMemory(String guestName,
String newInitMem,
String newMaxMem)
This function changes the initial and maximum allotted memory for a guest Wraps SMAPI_Interface.imageReplace(String, LinkedList) |
LinkedList |
cloneCopyMDisks(LinkedList existGuestDirectory,
String cloneGuestName,
String clonePassword,
String existGuestName)
Takes an existing Guest Directory, takes out DEDICATE and SPECIAL statements takes MDISK statements and copies each one of the disks Wraps SMAPI_Interface.imageDiskCopyDM(String, String, String, String, String, String, String, String, String) . |
LinkedList |
cloneCreateMDisks(LinkedList existGuestDirectory,
String cloneGuestName,
String clonePassword,
boolean formatDisks)
Takes an existing Guest Directory, takes out DEDICATE and SPECIAL statements takes MDISK statements and creates a list of minidisks for the clone of the same size, type etc Wraps SMAPI_Interface.imageDiskCreateDM(String, String, String, String, String, String, String, String, String, String) . |
LinkedList |
cloneGuest(String existGuestName,
String cloneGuestName,
String clonePassword,
boolean cloneDisks,
boolean formatDisks)
This function will clone an existing guest by copying all it's characteristics (except password) to a new guest Wraps SMAPI_Interface.imageCreate(String, String, String) . |
String |
convertSizeToCylinders(MDisk disk)
Converts the size of a disk from megabytes to numbers of cylinders or blocks |
String |
convertSizetoMB(MDisk disk)
Converts the size of a minidisk from blocks or cylinders to MB |
void |
createGuest(String guestName,
String password,
String initMem,
String maxMem,
String prototypeName)
This function creates a new guest with certain specified characteristics Wraps SMAPI_Interface.imageCreate(String, String, String) . |
void |
createMDisk(String strGuestName,
String strVirtualDeviceAddress,
String strAllocationType,
String strDiskSize,
String strDiskMode,
String strReadPW,
String strWritePW,
String strMultiPW)
This function creates a new minidisk for a particular user Wraps SMAPI_Interface.imageDiskCreate(String, String, String, String, String, String, String, String, String, String) . |
void |
deleteImage(String imageName)
Deletes a guest Wraps SMAPI_Interface.imageDelete(String) . |
void |
deleteMDisk(String strGuestName,
String strVirtualDeviceAddress)
This function deletes a minidisk for a particular user Wraps SMAPI_Interface.imageDiskDeleteDM(String, String)
Wraps SMAPI_Interface.imageDiskDelete(String, String) . |
private void |
ensurePrototypeExists(String prototypeName)
This function makes sure that the given prototype exists, if it does not, it creates it (this will probably be used at server startup for our generic prototype) Wraps SMAPI_Interface.prototypeCreate(String, LinkedList) . |
String |
findNICaddress(String strGuestName)
Finds the lowest block of address space available for use as a virtual NIC Wraps SMAPI_Interface.getLowestFreeAddress(String, String)
NOT CURRENTLY USED |
LinkedList |
getAllFreeAddresses(Collection memberNames,
ZVMTasks.getCommonAddressProgressListener listener)
Takes a list of member names and returns a LinkedList of LinkedList s of all their
free addresses (gaps being bigger than 3 addresses so we can use the addresses for
virtual NIC addresses) |
LinkedList |
getAllNetworkNames()
Returns a LinkedList of all networks and their members
Wraps SMAPI_Interface.queryNetworkMembers(String) |
String |
getCommonAddress(Collection memberNames)
Overloaded call of the original |
String |
getCommonAddress(Collection memberNames,
ZVMTasks.getCommonAddressProgressListener listener)
Takes a list of guests and finds the lowest available common NIC address amongst them |
LinkedList |
getGroups()
This function gets all the namelist names and contents from the server and puts them in a list of Group objects
Wraps SMAPI_Interface.nameListQueryAll() . |
Network |
getNetworkInfo(String NetName)
Queries the information for a given network Wraps SMAPI_Interface.virtualLanQuery() . |
Network |
getNetworkMembers(String strNetName)
Queries the members of a particular VSwitch Wraps SMAPI_Interface.queryNetworkMembers(String) . |
String |
getNICaddress(String strNetworkName,
String strGuestName)
Queries a network for a specified guest and returns that guest's virtual NIC Wraps SMAPI_Interface.getNICaddress(String, String) |
private String |
getPageRangeFromGuests(LinkedList guests,
String segSizeInMB)
Given a list of guests, they will all be querried and a page range will be returned that is above all of the guests address spaces and that is not currently being used for any shared segment. |
LinkedList |
getStorageGaps(String imageName)
Returns all the virtual address gaps for a user Wraps SMAPI_Interface.returnQueryVirtual(String) . |
void |
guestLANCreate(String lanName)
Creates a new Guest LAN with no one attached to it SMAPI_Interface.virtualLANCreate(String) |
void |
guestLANCreateConnect(String lanName,
String guestName,
String vaddr)
Creates a new Guest LAN and attaches a guest to it with a virtual NIC of the specified address Wraps SMAPI_Interface.virtualLANCreateAndConnectDM(String, String, String)
& SMAPI_Interface.virtualLANCreateAndConnect(String, String) . |
void |
guestLANDeleteDisconnect(String lanName,
String guestName,
String vaddr)
Disconnects a guest (with a specified NIC address) from a LAN and deletes the LAN if it is the last guest on the LAN Wraps SMAPI_Interface.virtualLANDisconnectAndDeleteDM(String, String, String)
& SMAPI_Interface.virtualLANDisconnectAndDelete(String, String, String) |
void |
imageActivate(String imageName)
This function activates a guest Wraps SMAPI_Interface.imageActivate(String) . |
void |
imageDeactivate(String imageName)
This function deactivates a guest Wraps SMAPI_Interface.imageDeactivate(String) . |
private Vector |
parseQueryVirtual(LinkedList queryRes,
int addrtype)
Sorts through the results of query virtual, and returns a vector of sorted addresses with no duplicates |
LinkedList |
queryAllGuestNames()
Queries all the guests on the system. |
LinkedList |
queryAllNetworks()
Returns a linkedlist of Networks. |
Guest |
queryGuest(String guestName)
This function queries the characteristics of a guest Wraps SMAPI_Interface.imageQuery(String) . |
LinkedList |
queryMDisks(String strGuestName)
This function queries minidisks for a particular user Wraps SMAPI_Interface.imageQuery(String) . |
void |
setGuestPassword(String strGuestName,
String strPassword)
This function sets a guest's password Wraps SMAPI_Interface.imageSetPassword(String, String) . |
void |
setGuestsGroup(String imageName,
String oldGroupName,
String newGroupName)
Removes/adds a guest to/from a group. |
void |
shareDisk(String sourceGuest,
String sourceVaddr,
String destGuest,
String destVaddr,
String accessMode)
Creates a minidisk link for a user that allows that user to gain access to another guests minidisk Wraps SMAPI_Interface.imageDiskShare(String, String, String, String, String, String) . |
void |
sharedStorageAccessAdd(String guestName,
String segmentName)
|
boolean |
sharedStorageAccessQuery(String guestName,
String segmentName)
|
LinkedList |
sharedStorageAccessQueryNameList(String segmentName)
Gets the name list with the access information for a saved segment Wraps SMAPI_Interface.nameListQuery(String) . |
void |
sharedStorageAccessRemove(String guestName,
String segmentName)
Revokes a guest's access to a saved segment Wraps SMAPI_Interface.sharedStorageRemoveAccess(String, String) . |
void |
sharedStorageCreate(String segName,
String segSizeInMB,
LinkedList guestsToAdd)
Creates a new shared segment given the name of the segment, its size and a list of guests you wish to eventually add to the segment. |
void |
sharedStorageDelete(String segName)
Deletes a shared storage segment, given the name. |
LinkedList |
sharedStorageQuery()
Returns a linkedlist of SavedSegment objects that correspond to the shared segments that exist on the system Wraps SMAPI_Interface.sharedStorageQuery() . |
void |
unshareDisk(String sourceGuest,
String sourceVaddr,
String destGuest,
String destVaddr)
Removes a minidisk link from a guest Wraps SMAPI_Interface.imageDiskUnshare(String, String, String, String) . |
void |
virtualSwitchCreate(String lanName,
String portname,
String raddr)
Creates a new VSwitch with no one attached to it Wraps SMAPI_Interface.virtualSwitchCreate(String, String, String) |
void |
virtualSwitchCreateConnect(String lanName,
String guestName,
String vaddr,
String portname,
String raddr)
Creates a new VSwitch and attaches a guest to it with a virtual NIC of the specified address Wraps SMAPI_Interface.virtualSwitchCreateAndConnectDM(String, String, String, String, String)
& SMAPI_Interface.virtualSwitchCreateAndConnect(String, String, String, String, String) . |
void |
virtualSwitchDelete(String switchName)
Deletes a VSwitch, even if there are people connected to it Wraps SMAPI_Interface.virtualSwitchDelete(String) |
void |
virtualSwitchDetatch(String switchName,
String guestName)
Detaches a guest from a VSwitch Wraps SMAPI_Interface.virtualSwitchDisconnectAndDeleteDM(String, String, String)
& SMAPI_Interface.virtualSwitchDetatch(String, String) |
void |
virtualSwitchGrant(String switchName,
String userName)
Grants a user (already connected) access to a VSwitch Wraps SMAPI_Interface.virtualSwitchSet(String, String, String) |
void |
virtualSwitchRevoke(String switchName,
String userName)
Restricts a user from being on a VSwitch's authorized list Wraps SMAPI_Interface.virtualSwitchSet(String, String, String) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private SMAPI_Interface smapi
public static final String PROFILE_GENERAL
public static final String PROFILE_SUPER
public static final String SEG_BUILDER
Constructor Detail |
public ZVMTasks(String hostName, int port, String userName, String password)
hostName
- Name or number of the hostport
- Port numberuserName
- Authenticated user namepassword
- User's passwordMethod Detail |
public boolean authenticate() throws ZVMTasksException
ZVMTasksException
public LinkedList queryAllNetworks() throws ZVMTasksException
SMAPI_Interface.virtualLanQuery()
Linkedlist
of Network
s on the z/VM system.
ZVMTasksException
public LinkedList queryAllGuestNames() throws ZVMTasksException
LinkedList
of String
s. Each String is the name of a guest on
the system.
Wraps SMAPI_Interface.imageNameQuery()
LinkedList
of guest names on the z/VM system.
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void guestLANCreateConnect(String lanName, String guestName, String vaddr) throws ZVMTasksException
SMAPI_Interface.virtualLANCreateAndConnectDM(String, String, String)
& SMAPI_Interface.virtualLANCreateAndConnect(String, String)
.
lanName
- Name of LAN to createguestName
- Name of guest to connectvaddr
- Virtual address to create NIC at
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void guestLANCreate(String lanName) throws ZVMTasksException
SMAPI_Interface.virtualLANCreate(String)
lanName
- Name of LAN to create
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void guestLANDeleteDisconnect(String lanName, String guestName, String vaddr) throws ZVMTasksException
SMAPI_Interface.virtualLANDisconnectAndDeleteDM(String, String, String)
& SMAPI_Interface.virtualLANDisconnectAndDelete(String, String, String)
lanName
- Name of LAN to disconnectguestName
- Name of guest to disconnectvaddr
- Virtual address of guest's NIC
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void virtualSwitchCreate(String lanName, String portname, String raddr) throws ZVMTasksException
SMAPI_Interface.virtualSwitchCreate(String, String, String)
lanName
- Name of VSwitch to createportname
- Name of real port for VSwitch (specified if you want to connect the VSwitch externally)raddr
- Real address of port (specified if you want to connect the VSwitch externally)
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void virtualSwitchCreateConnect(String lanName, String guestName, String vaddr, String portname, String raddr) throws ZVMTasksException
SMAPI_Interface.virtualSwitchCreateAndConnectDM(String, String, String, String, String)
& SMAPI_Interface.virtualSwitchCreateAndConnect(String, String, String, String, String)
.
lanName
- Name of VSwitch to createguestName
- Name of guest to connectvaddr
- Virtual address to create NIC atportname
- Name of real port for VSwitchraddr
- Real address of port (specified if you want to connect the VSwitch externally)
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void virtualSwitchDetatch(String switchName, String guestName) throws ZVMTasksException
SMAPI_Interface.virtualSwitchDisconnectAndDeleteDM(String, String, String)
& SMAPI_Interface.virtualSwitchDetatch(String, String)
switchName
- Name of VSwitchguestName
- Name of guest to detach
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void virtualSwitchDelete(String switchName) throws ZVMTasksException
SMAPI_Interface.virtualSwitchDelete(String)
switchName
- Name of VSwitch to delete
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void virtualSwitchRevoke(String switchName, String userName) throws ZVMTasksException
SMAPI_Interface.virtualSwitchSet(String, String, String)
switchName
- Name of VSwitchuserName
- Name of guest to restrict
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void virtualSwitchGrant(String switchName, String userName) throws ZVMTasksException
SMAPI_Interface.virtualSwitchSet(String, String, String)
switchName
- Name of VSwitchuserName
- Name of guest to grant access
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic String findNICaddress(String strGuestName) throws ZVMTasksException
SMAPI_Interface.getLowestFreeAddress(String, String)
NOT CURRENTLY USED
strGuestName
- name of guest to query
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic String getNICaddress(String strNetworkName, String strGuestName) throws ZVMTasksException
SMAPI_Interface.getNICaddress(String, String)
strNetworkName
- Network to querystrGuestName
- Name of guest to query for
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic LinkedList getAllNetworkNames() throws ZVMTasksException
LinkedList
of all networks and their members
Wraps SMAPI_Interface.queryNetworkMembers(String)
LinkedList
of Network
s each containing network name and a list of members
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic Network getNetworkMembers(String strNetName) throws ZVMTasksException
SMAPI_Interface.queryNetworkMembers(String)
.
strNetName
- Name of VSwitch to query
Network
containing network name and list of members
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic Network getNetworkInfo(String NetName) throws ZVMTasksException
SMAPI_Interface.virtualLanQuery()
.
NetName
- Name of network to query
Network
with information on the queried network
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic String getCommonAddress(Collection memberNames) throws ZVMTasksException
memberNames
- List of guests to find the common address among
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic String getCommonAddress(Collection memberNames, ZVMTasks.getCommonAddressProgressListener listener) throws ZVMTasksException
memberNames
- LinkedList of guests to find lowest address among
ZVMTasksException
- An error occurred. Just passes up the SMAPI exception
NoCommonAddressException
- Could not find a common address among the given guestspublic LinkedList getAllFreeAddresses(Collection memberNames, ZVMTasks.getCommonAddressProgressListener listener) throws ZVMTasksException
LinkedList
of LinkedList
s of all their
free addresses (gaps being bigger than 3 addresses so we can use the addresses for
virtual NIC addresses)
memberNames
- LinkedList of strings (guest names)
LinkedList
of LinkedList
s of free addresses (provided there are 3+ contiguous free addresses in a row
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic LinkedList getStorageGaps(String imageName) throws ZVMTasksException
SMAPI_Interface.returnQueryVirtual(String)
.
imageName
- Name of guest to query
LinkedList
of Interval
s with the address space gaps
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionprivate Vector parseQueryVirtual(LinkedList queryRes, int addrtype) throws ZVMTasksException
queryRes
- Results of query virtualaddrtype
- 1 for all addresses, 2 for NIC addresses, 3 for DASD
Vector
of addresses in 4 digit hexadecimal notation (i.e. 0x0009)
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void setGuestsGroup(String imageName, String oldGroupName, String newGroupName) throws ZVMTasksException
SMAPI_Interface.nameListRemove(String, String)
& Wraps SMAPI_Interface.nameListAdd(String, String)
.
imageName
- Name of guest to add/removeoldGroupName
- Name of group to remove guest from (optional)newGroupName
- Name of group to add guest to (optional)
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void deleteImage(String imageName) throws ZVMTasksException
SMAPI_Interface.imageDelete(String)
.
imageName
- Name of guest to delete
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic LinkedList getGroups() throws ZVMTasksException
Group
objects
Wraps SMAPI_Interface.nameListQueryAll()
.
LinkedList
of Group
s.
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic Guest queryGuest(String guestName) throws ZVMTasksException
SMAPI_Interface.imageQuery(String)
.
guestName
- Name of guest to query
Guest
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic LinkedList activeImagesQuery() throws ZVMTasksException
LinkedList
of all active guests
Wraps SMAPI_Interface.activeImagesQuery()
.
LinkedList
of guest names.
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void imageActivate(String imageName) throws ZVMTasksException
SMAPI_Interface.imageActivate(String)
.
imageName
- Name of guest to activate
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void imageDeactivate(String imageName) throws ZVMTasksException
SMAPI_Interface.imageDeactivate(String)
.
imageName
- Name of guest to deactivate
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void setGuestPassword(String strGuestName, String strPassword) throws ZVMTasksException
SMAPI_Interface.imageSetPassword(String, String)
.
strGuestName
- Name of guest to change password ofstrPassword
- New Password
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void createMDisk(String strGuestName, String strVirtualDeviceAddress, String strAllocationType, String strDiskSize, String strDiskMode, String strReadPW, String strWritePW, String strMultiPW) throws ZVMTasksException
SMAPI_Interface.imageDiskCreate(String, String, String, String, String, String, String, String, String, String)
.
Wraps SMAPI_Interface.imageDiskCreateDM(String, String, String, String, String, String, String, String, String, String)
.
strGuestName
- Name of guest to create minidisk forstrVirtualDeviceAddress
- Virtual device address of minidiskstrAllocationType
- How to allocate the minidisk (group region volume or temporary)strDiskSize
- Size of minidisk to createstrDiskMode
- Access mode for minidisk (read, write, etc)strReadPW
- Read access passwordstrWritePW
- Write access passwordstrMultiPW
- Multi access password
ZVMTasksException
- An error occurred, just passes up SMAPIExceptionpublic String convertSizeToCylinders(MDisk disk)
disk
- information for the Minidisk that you are working with
public void deleteMDisk(String strGuestName, String strVirtualDeviceAddress) throws ZVMTasksException
SMAPI_Interface.imageDiskDeleteDM(String, String)
Wraps SMAPI_Interface.imageDiskDelete(String, String)
.
strGuestName
- Name of guest to create minidisk forstrVirtualDeviceAddress
- Virtual device address of minidisk
ZVMTasksException
- An error occurred, just passes up SMAPIExceptionpublic LinkedList queryMDisks(String strGuestName) throws ZVMTasksException
SMAPI_Interface.imageQuery(String)
.
strGuestName
- Name of guest to create minidisk for
LinkedList
of MDisk
s
ZVMTasksException
- An error occurred, just passes up SMAPIExceptionpublic String convertSizetoMB(MDisk disk)
disk
- MDisk
to convert size of
public void shareDisk(String sourceGuest, String sourceVaddr, String destGuest, String destVaddr, String accessMode) throws ZVMTasksException
SMAPI_Interface.imageDiskShare(String, String, String, String, String, String)
.
sourceGuest
- The guest owning the disk to share.sourceVaddr
- The virtual address of the disk relative to source guest.destGuest
- The guest obtaining the link.destVaddr
- The virtual address of the disk relative to destination guest.accessMode
- PErmissions the linker will gave to read/write the disk. Can be any valid CP access mode (i.e: RR, WR, MR,etc).
ZVMTasksException
- An error occurred, just passes up SMAPIExceptionpublic void unshareDisk(String sourceGuest, String sourceVaddr, String destGuest, String destVaddr) throws ZVMTasksException
SMAPI_Interface.imageDiskUnshare(String, String, String, String)
.
sourceGuest
- The guest owning the disk being share.sourceVaddr
- The virtual address of the disk relative to source guest.destGuest
- The guest that has the link.destVaddr
- The virtual address of the disk relative to destination guest.
ZVMTasksException
- An error occurred, just passes up SMAPIExceptionpublic LinkedList cloneGuest(String existGuestName, String cloneGuestName, String clonePassword, boolean cloneDisks, boolean formatDisks) throws ZVMTasksException
SMAPI_Interface.imageCreate(String, String, String)
.
existGuestName
- Name of guest to clonecloneGuestName
- Name of cloneclonePassword
- Password of clone
LinkedList
of minidisk addresses and the result of the disk operations
ZVMTasksException
- An error occurredpublic LinkedList changeGuestsDirectory(LinkedList existGuestDirectory, String cloneGuestName, String clonePassword) throws ZVMTasksException
SMAPI_Interface.imageReplace(String, LinkedList)
.
existGuestDirectory
- Linked List of the existing Guest's directory statementscloneGuestName
- name of the cloneclonePassword
- password for the clone
LinkedList
of MDisk
s
ZVMTasksException
- An error occurred, just passes up the SMAPIExceptionpublic LinkedList cloneCreateMDisks(LinkedList existGuestDirectory, String cloneGuestName, String clonePassword, boolean formatDisks) throws ZVMTasksException, exceptions.SMAPIException
SMAPI_Interface.imageDiskCreateDM(String, String, String, String, String, String, String, String, String, String)
.
existGuestDirectory
- directory of the guest you're cloningcloneGuestName
- name of the cloneclonePassword
- password for the cloneformatDisks
- whether to format the disks
LinkedList
of MDisk
s
ZVMTasksException
- An error occurred. Just passes up the SMAPI exception
SMAPIException
- A disk creation error occurred
exceptions.SMAPIException
public LinkedList cloneCopyMDisks(LinkedList existGuestDirectory, String cloneGuestName, String clonePassword, String existGuestName) throws ZVMTasksException, exceptions.SMAPIException
SMAPI_Interface.imageDiskCopyDM(String, String, String, String, String, String, String, String, String)
.
existGuestDirectory
- directory of the guest you're cloningcloneGuestName
- name of the cloneclonePassword
- clone's passwordexistGuestName
- name of the guest you are cloning
LinkedList
of returncodes and addresses
ZVMTasksException
- An error occurred, just passes up the SMAPIException
SMAPIException
- An error occurred
exceptions.SMAPIException
public void createGuest(String guestName, String password, String initMem, String maxMem, String prototypeName) throws ZVMTasksException
SMAPI_Interface.imageCreate(String, String, String)
.
guestName
- Name of new guestpassword
- PasswordinitMem
- Initial amount of memory the guest hasmaxMem
- Maximum amount of memory the guest can haveprototypeName
- Prototype to use for this guest (usually we'll use our default, except for cloned guests)
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionpublic void changeMemory(String guestName, String newInitMem, String newMaxMem) throws ZVMTasksException
SMAPI_Interface.imageReplace(String, LinkedList)
guestName
- Name of guest to change memory ofnewInitMem
- Initial amount of memory you want the guest to havenewMaxMem
- Maximum amount of memory you want the guest to be able to have
ZVMTasksException
- An error occurred. Just passes up the SMAPI exceptionprivate void ensurePrototypeExists(String prototypeName) throws exceptions.SMAPIException
SMAPI_Interface.prototypeCreate(String, LinkedList)
.
prototypeName
- Name of profile to look for
ZVMTasksException
- An error occurred. Just passes up the SMAPI exception.
exceptions.SMAPIException
public void sharedStorageCreate(String segName, String segSizeInMB, LinkedList guestsToAdd) throws ZVMTasksException
SMAPI_Interface.sharedStorageCreate(String, String, String, String)
& getPageRangeFromGuests(LinkedList, String)
.
segName
- Name of the segment to create.segSizeInMB
- The size of the segment you wish to create in Megabytes.guestsToAdd
- List of guests to use as model for determining page range.
ZVMTasksException
- An error occurred. Just passes up the SMAPI exception.private String getPageRangeFromGuests(LinkedList guests, String segSizeInMB) throws ZVMTasksException
SMAPI_Interface.sharedStorageFindPageRange(String, String)
guests
- Guests to consider when choosing the page range.segSizeInMB
- Size of the page range to return.
ZVMTasksException
- An error occurred. Just passes up the SMAPI exception.public void sharedStorageDelete(String segName) throws ZVMTasksException
SMAPI_Interface.sharedStorageDelete(String, String)
.
segName
- Name of segment to delete.
ZVMTasksException
- An error occurred. Just passes up the SMAPI exception.public LinkedList sharedStorageQuery() throws ZVMTasksException
SMAPI_Interface.sharedStorageQuery()
.
LinkedList
of SavedSegment
s.
ZVMTasksException
- An error occurred. Just passes up the SMAPI exception.public void sharedStorageAccessAdd(String guestName, String segmentName) throws ZVMTasksException
ZVMTasksException
public void sharedStorageAccessRemove(String guestName, String segmentName) throws ZVMTasksException
SMAPI_Interface.sharedStorageRemoveAccess(String, String)
.
guestName
- Guest to revoke access forsegmentName
- Saved segment to revoke access from
ZVMTasksException
- An error occurred. Just passes up the SMAPI exception.public boolean sharedStorageAccessQuery(String guestName, String segmentName) throws ZVMTasksException
ZVMTasksException
public LinkedList sharedStorageAccessQueryNameList(String segmentName) throws ZVMTasksException
SMAPI_Interface.nameListQuery(String)
.
segmentName
- Name of the saved segment to query
ZVMTasksException
- An error occurred. Just passes up the SMAPI exception.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |