public class Connector extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
baseURL |
protected Secret |
password |
protected Integer |
port |
protected String |
realm |
protected String |
username |
static long |
WAIT_TIME_MS |
| Constructor and Description |
|---|
Connector(String hostname,
String username,
String realm,
Secret password) |
Connector(String hostname,
String username,
String realm,
Secret password,
Boolean ignoreSSL) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkIfAuthTicketIsValid() |
protected void |
finalize() |
List<String> |
getNodes() |
HashMap<String,Integer> |
getQemuMachines(String node) |
List<String> |
getQemuMachineSnapshots(String node,
Integer vmid) |
kong.unirest.json.JSONObject |
getQemuMachineStatus(String node,
Integer vmid) |
kong.unirest.json.JSONObject |
getTaskStatus(String node,
String taskId) |
Boolean |
isQemuMachineRunning(String node,
Integer vmid) |
void |
login() |
String |
rollbackQemuMachineSnapshot(String node,
Integer vmid,
String snapshotName) |
String |
shutdownQemuMachine(String node,
Integer vmid) |
String |
startQemuMachine(String node,
Integer vmid) |
String |
stopQemuMachine(String node,
Integer vmid) |
kong.unirest.json.JSONObject |
waitForTaskToFinish(String node,
String taskId) |
public static final long WAIT_TIME_MS
protected Integer port
protected String username
protected String realm
protected Secret password
protected String baseURL
public void login()
throws LoginException
LoginExceptionpublic void checkIfAuthTicketIsValid()
throws LoginException
LoginExceptionpublic List<String> getNodes() throws LoginException
LoginExceptionpublic kong.unirest.json.JSONObject getTaskStatus(String node, String taskId) throws LoginException
LoginExceptionpublic kong.unirest.json.JSONObject getQemuMachineStatus(String node, Integer vmid) throws LoginException
LoginExceptionpublic Boolean isQemuMachineRunning(String node, Integer vmid) throws LoginException
LoginExceptionpublic kong.unirest.json.JSONObject waitForTaskToFinish(String node, String taskId) throws LoginException, InterruptedException
LoginExceptionInterruptedExceptionpublic HashMap<String,Integer> getQemuMachines(String node) throws LoginException
LoginExceptionpublic List<String> getQemuMachineSnapshots(String node, Integer vmid) throws LoginException
LoginExceptionpublic String rollbackQemuMachineSnapshot(String node, Integer vmid, String snapshotName) throws LoginException
LoginExceptionpublic String startQemuMachine(String node, Integer vmid) throws LoginException
LoginExceptionpublic String stopQemuMachine(String node, Integer vmid) throws LoginException
LoginExceptionpublic String shutdownQemuMachine(String node, Integer vmid) throws LoginException
LoginExceptionCopyright © 2016–2022 Dynamo-Media. All rights reserved.