|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.internet2.hopi.dragon.DragonCSA
public class DragonCSA
Issue basic DRAGON CSA CLI commands via telnet. Can be used to setup, teardown, and poll information about LSPs.
| Constructor Summary | |
|---|---|
DragonCSA()
Constructor that creates telnet client and sets default values |
|
| Method Summary | |
|---|---|
java.lang.String |
command(java.lang.String cmd)
Issues commands to DRAGON CSA CLI |
void |
disconnect()
Disconnects telnet session. |
java.util.ArrayList<DragonLSP> |
getAllLSPs()
Maps all LSPs a CSA currently participates in and stores them in a list. |
java.lang.String |
getError()
Get error message reported by any of the methods in this class. |
DragonLSP |
getLSPByName(java.lang.String lspName)
Maps already existing LSP to an LSP object. |
java.lang.String |
getPromptPattern()
Returns pattern used to identify command prompt |
java.util.ArrayList<java.lang.String> |
listLSPs()
Returns a list of the names of all the LSPs in which a DRAGON CSA participates |
boolean |
login(java.lang.String host,
int port,
java.lang.String password)
Logs user into DRAGON CSA telnet |
boolean |
lspExists(java.lang.String lspName)
Checks whether an LSP with a given name exists. |
java.lang.String |
readUntil(java.lang.String pattern)
Reads output from telnet until the specified pattern is reached. |
void |
setPromptPattern(java.lang.String pattern)
Sets pattern used to identify the CLI command prompt. |
boolean |
setupLSP(DragonLSP lsp)
Creates and commits LSP with the parameters of the LSP object passed to it. |
boolean |
teardownLSP(java.lang.String lspName)
Removes LSP with the given LSP name |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DragonCSA()
| Method Detail |
|---|
public boolean login(java.lang.String host,
int port,
java.lang.String password)
host - hostname of machine running DRAGON CSA telnet serverport - port that on which DRAGON telnet server is runningpassword - password for CSA
public java.lang.String command(java.lang.String cmd)
cmd - command to run on DRAGON CSA CLI
public java.lang.String readUntil(java.lang.String pattern)
pattern - Regular expression used to determine when output should stop being read
public void disconnect()
public boolean setupLSP(DragonLSP lsp)
lsp - LSP object with parameters of the LSP to be setup
public boolean teardownLSP(java.lang.String lspName)
lspName - Name of LSP to be deleted
public boolean lspExists(java.lang.String lspName)
lspName - Name of LSP whose existence needs to be verified.
public DragonLSP getLSPByName(java.lang.String lspName)
lspName - name of LSP to map to object
public java.util.ArrayList<DragonLSP> getAllLSPs()
public java.util.ArrayList<java.lang.String> listLSPs()
public java.lang.String getError()
public void setPromptPattern(java.lang.String pattern)
pattern - Regular expression pattern used to identify command promptpublic java.lang.String getPromptPattern()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||