public class ForemanAPI extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ForemanAPI.ActionFailed
Action or query performed by the library has failed.
|
static class |
ForemanAPI.CommunicationError
Problem while talking to Foreman.
|
static class |
ForemanAPI.ProtocolMismatch
Library does not comprehend Foreman reply.
|
| Constructor and Description |
|---|
ForemanAPI(String url,
String user,
hudson.util.Secret password)
Foreman API Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAllReservedHosts()
Get the list of all already reserved hosts from Foreman for this Jenkins.
|
HostInfo |
getHostInfo(String hostname)
Get host info.
|
String |
getVersion()
Get Foreman version.
|
void |
release(String hostName)
Release host from Foreman.
|
HostInfo |
reserveHost(HostInfo host)
Reserve host outright.
|
@CheckForNull public HostInfo reserveHost(HostInfo host) throws Exception
Exceptionpublic void release(@Nonnull String hostName) throws ForemanAPI.ActionFailed
hostName - name of host to release.ForemanAPI.ActionFailed@Nonnull public String getVersion() throws ForemanAPI.ActionFailed
ForemanAPI.ActionFailed@CheckForNull public HostInfo getHostInfo(@Nonnull String hostname) throws ForemanAPI.ActionFailed
ForemanAPI.ActionFailedCopyright © 2016–2017. All rights reserved.