public class ForemanAPI extends Object
| Constructor and Description |
|---|
ForemanAPI(String url,
String user,
hudson.util.Secret password)
Foreman API Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getHostAttributeValue(String hostname,
String attribute)
Get value for host attribute.
|
String |
getHostParameterValue(String hostname,
String parameterName)
General utility method to get parameter value for host.
|
String |
getIPForHost(String hostname)
Get IP for Host.
|
String |
getLabelsForHost(String hostName)
Get Host's Jenkins labels.
|
String |
getRemoteFSForSlave(String hostname)
Get Jenkins Slave Remote FS root.
|
String |
getVersion()
Get Foreman version.
|
boolean |
isHostFree(String hostName)
Determine if a host is reserved.
|
boolean |
isHostReservedByUs(String hostName)
Determine if a host is reserved for current Jenkins instance
|
void |
release(String hostName)
Release host from Foreman.
|
com.fasterxml.jackson.databind.JsonNode |
reserveHost(String hostname)
Reserve host outright.
|
@CheckForNull public com.fasterxml.jackson.databind.JsonNode reserveHost(String hostname) throws Exception
hostname - resource in Foreman.Exceptionpublic void release(String hostName) throws Exception
hostName - name of host to release.Exception - if occurs.@CheckForNull public String getVersion() throws Exception
Exception - if occurs.@CheckForNull public String getHostParameterValue(String hostname, String parameterName) throws Exception
hostname - name of host.parameterName - name of param.Exception - if occurs.@CheckForNull public String getRemoteFSForSlave(String hostname) throws Exception
hostname - name of host.Exception - if occurs.@CheckForNull public String getHostAttributeValue(String hostname, String attribute)
hostname - name of host.attribute - attrib to look for.@CheckForNull public String getIPForHost(String hostname)
hostname - name of host.public String getLabelsForHost(String hostName) throws Exception
hostName - name of host.Exception - if occurs.public boolean isHostFree(String hostName) throws Exception
hostName - name of host in Foreman.Exception - if occurs.Copyright © 2016. All rights reserved.