We configure the communication with the Control-M Enterprise Manager systems in
etc/hwm_universal_interface_config.php this way:
$hwm_universal_interface_config = array(
'communication' => array(
...
'ctm' => array(
'connection' => array(
'url' => 'https://ctm_dev.my_company.com:8443/automation-api',
'ssl_verifypeer' => true,
'cainfo' => 'c:/HORIZONT/var/ssl/my_company_CA.crt',
'timeout' => 120,
'postfields' => array(),
'httpheader' => array(),
),
'callback' => array(
'request' => 'ctm_request',
'response' => 'ctm_response',
),
),
...
),
),
...
require_once('ctm_lib.php');
function ctm_request(&$connection, $inData, &$errMsg)
{
$system = isset($inData['system']) ? $inData['system'] : '';
switch (strtoupper($system))
{
case 'PROD':
$connection['url'] =
'https://ctm_prod.my_company.com:8443/automation-api';
break;
case 'DEV':
case 'TEST':
default:
$connection['url'] =
'https://ctm_dev.my_company.com:8443/automation-api';
break;
}
return ctm_universal_interface_request($connection, $inData, $errMsg);
}
function ctm_response(&$response, &$errMsg)
{
return ctm_universal_interface_response($response, $errMsg);