foreman.php¶
Foreman integration module for retrieving infrastructure data such as OS lists, partitioning schemes, installation media, hostgroups, and network information.
API Methods¶
| Method | Action | Description |
|---|---|---|
get_hostgroup | get hostgroups | Returns suitable hostgroups for a specific location from Foreman. |
get_media | get installation media | Returns suitable installation media for a specific OS from Foreman. |
get_network | get network info | Returns Foreman's network ID for a specific IP address. |
get_os | get OS list | Returns a list of available operating systems for the server's location. |
get_ptable | get partitioning table | Returns suitable partitioning schemas for a specific OS from Foreman. |
foreman/get_hostgroup¶
Returns suitable hostgroups for a specific location from Foreman.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get_hostgroup |
| token | ✅ | string | Authentication token. |
| id | ✅ | integer | Server ID used to determine the location for hostgroups. |
Request example
Success response example
foreman/get_media¶
Returns suitable installation media for a specific OS from Foreman.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get_media |
| token | ✅ | string | Authentication token. |
| id | ✅ | integer | Server ID used for permission check and location retrieval. |
| os_id | ✅ | integer | Operating system ID to fetch installation media for. |
Request example
Success response example
foreman/get_network¶
Returns Foreman's network ID for a specific IP address.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get_network |
| token | ✅ | string | Authentication token. |
| id | ✅ | integer | Server ID for permission check and location lookup. |
| ip | ✅ | string | IP address to determine the network information. |
| network | ✅ | string | Параметр network |
Request example
Success response example
foreman/get_os¶
Returns a list of available operating systems for the server's location.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get_os |
| token | ✅ | string | Authentication token. |
| id | ✅ | integer | Server ID used to determine the location for OS list retrieval. |
Request example
Success response example
foreman/get_ptable¶
Returns suitable partitioning schemas for a specific OS from Foreman.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get_ptable |
| token | ✅ | string | Authentication token. |
| id | ✅ | integer | Server ID used for permission check and location retrieval. |
| os_id | ✅ | integer | Operating system ID to fetch partitioning schemas. |
Request example