23 lines
No EOL
629 B
Groovy
23 lines
No EOL
629 B
Groovy
//To be called by the ethernet test script to query for a usable resource.
|
|
def LocateResources(AllTestEnvironmentPath,TargetHardware){
|
|
def AllTestEnvironements = readJSON(AllTestEnvironmentPath);
|
|
|
|
}
|
|
|
|
// GET
|
|
def DoGET(url){
|
|
def get = new URL(url).openConnection();
|
|
def getRC = get.getResponseCode();
|
|
|
|
if (getRC.equals(200)) {
|
|
def Response = get.getInputStream().getText();
|
|
}
|
|
else{
|
|
def Response = "Request Failed"
|
|
echo("REST: received ${getRC} from GET to ${url}");
|
|
}
|
|
echo("REST: received ${getRC} from GET to ${url}");
|
|
}
|
|
|
|
TestResourceUnpacker = this;
|
|
return this; |