live.threads
Class ThreadedZVMTasks.VSwitchCreateConnect

java.lang.Object
  extended byjava.lang.Thread
      extended bylive.threads.ThreadedUserAction
          extended bylive.threads.ThreadedZVMTasks.VSwitchCreateConnect
All Implemented Interfaces:
Runnable
Enclosing class:
ThreadedZVMTasks

public static class ThreadedZVMTasks.VSwitchCreateConnect
extends ThreadedUserAction

Wraps ZVMTasks.virtualSwitchCreateConnect(String, String, String, String, String). Connects a guest to a VSwitch, creating it if it doesn't exist. Reccomendation: don't use this to create networks, because it causes problems. In order for this to work properly when creating a network, at least one guest must be logged on. The static calls (the ones to Dirmaint) don't actually create the VSwitch, only the dynamic ones do. So if no guests are logged on, the VSwitch isn't created because the dynamic calls fail, then when a guest DOES log on the VSwitch doesn't exist for it to connect to. Also, no cache update is done from this.


Nested Class Summary
 
Nested classes inherited from class live.threads.ThreadedUserAction
 
Field Summary
private  String memberName
           
private  Object memberVaddr
           
private  String netName
           
private  String portname
           
private  String raddr
           
 
Fields inherited from class live.threads.ThreadedUserAction
CANCELED, COMPLETE, done, ERROR, IN_PROGRESS, INDETERMINATE, PENDING, tasks
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ThreadedZVMTasks.VSwitchCreateConnect(ThreadInitInfo initInfo, String netName, String portname, String raddr, String memberName, String memberVaddr)
          Creates an action that will call ZVMTasks.virtualSwitchCreateConnect(String, String, String, String, String).
ThreadedZVMTasks.VSwitchCreateConnect(ThreadInitInfo initInfo, String netName, String portname, String raddr, String memberName, ThreadedZVMTasks.FindCommonFreeAddress memberVaddr)
          Creates an action that will call ZVMTasks.virtualSwitchCreateConnect(String, String, String, String, String).
 
Method Summary
 String description()
          Returns a description of this task
private  String getVirtualAddress()
          Finds the lowest common free address amongst a collection of guests
 Object rawResult()
          Returns null or an exception
protected  void runImpl()
          Calls ZVMTasks.virtualSwitchCreateConnect(String, String, String, String, String)
 
Methods inherited from class live.threads.ThreadedUserAction
getCache, getException, getID, getStatus, getTimeFinished, getTimeStarted, init, init, isFinished, result, run, setCanceled, setComplete, setError, setError, setIndeterminate, setIndeterminate, setInProgress, startJoinForever, startJoinTimeout, startNoJoin, toString
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

netName

private String netName

memberName

private String memberName

memberVaddr

private Object memberVaddr

portname

private String portname

raddr

private String raddr
Constructor Detail

ThreadedZVMTasks.VSwitchCreateConnect

public ThreadedZVMTasks.VSwitchCreateConnect(ThreadInitInfo initInfo,
                                             String netName,
                                             String portname,
                                             String raddr,
                                             String memberName,
                                             ThreadedZVMTasks.FindCommonFreeAddress memberVaddr)
Creates an action that will call ZVMTasks.virtualSwitchCreateConnect(String, String, String, String, String).

Parameters:
initInfo - The ThreadInitInfo object
netName - The name of the VSwitch to create
portname - The name of the port to connect to or null
raddr - The address of a real OSA device to connect to, or null
memberName - The name of a member to connect to
memberVaddr - The FindCommonFreeAddress object that will return the virtual address from rawResult()

ThreadedZVMTasks.VSwitchCreateConnect

public ThreadedZVMTasks.VSwitchCreateConnect(ThreadInitInfo initInfo,
                                             String netName,
                                             String portname,
                                             String raddr,
                                             String memberName,
                                             String memberVaddr)
Creates an action that will call ZVMTasks.virtualSwitchCreateConnect(String, String, String, String, String).

Parameters:
initInfo - The ThreadInitInfo object
netName - The name of the VSwitch to create
portname - The name of the port to connect to or null
raddr - The address of a real OSA device to connect to, or null
memberName - The name of a member to connect to
memberVaddr - The virtual address (in hex, no more than 4 digits) to connect the virtual NIC at
Method Detail

getVirtualAddress

private String getVirtualAddress()
Finds the lowest common free address amongst a collection of guests

Returns:
String 4-digit hexadecimal virtual address

runImpl

protected void runImpl()
                throws ZVMTasksException
Calls ZVMTasks.virtualSwitchCreateConnect(String, String, String, String, String)

Specified by:
runImpl in class ThreadedUserAction
Throws:
ZVMTasksException
See Also:
ThreadedUserAction.run()

description

public String description()
Returns a description of this task

Specified by:
description in class ThreadedUserAction
Returns:
String
See Also:
ThreadedUserAction.toString()

rawResult

public Object rawResult()
Returns null or an exception

Specified by:
rawResult in class ThreadedUserAction
Returns:
null or an exception thrown by ZVMTasks.guestLANCreateConnect(String,String,String)


Copyright © 2005