You are here

function acquia_agent_call in Acquia Connector 6.2

Same name and namespace in other branches
  1. 6 acquia_agent/acquia_agent.module \acquia_agent_call()
  2. 7.3 acquia_agent/acquia_agent.module \acquia_agent_call()
  3. 7 acquia_agent/acquia_agent.module \acquia_agent_call()
  4. 7.2 acquia_agent/acquia_agent.module \acquia_agent_call()

Prepare and send a XML-RPC request to Acquia with an authenticator.

7 calls to acquia_agent_call()
acquia_agent_get_subscription in acquia_agent/acquia_agent.module
Get subscription status from Acquia
acquia_agent_migrate_form in acquia_agent/acquia_agent.pages.inc
Migration start form
acquia_agent_settings_credentials_validate in acquia_agent/acquia_agent.pages.inc
Validate credentials form submit.
acquia_agent_valid_credentials in acquia_agent/acquia_agent.module
Validate identifier/key pair via XML-RPC call to Acquia address.
acquia_spi_send_data in acquia_spi/acquia_spi.module
Send data to Acquia Insight.

... See full list

File

acquia_agent/acquia_agent.module, line 571
Acquia Agent securely sends information to Acquia.

Code

function acquia_agent_call($method, $params, $identifier = NULL, $key = NULL, $acquia_network_address = NULL) {
  $path = drupal_get_path('module', 'acquia_agent');
  require_once $path . '/acquia_agent_streams.inc';
  $acquia_network_address = acquia_agent_network_address($acquia_network_address);
  $ip = isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : '';
  $host = isset($_SERVER["HTTP_HOST"]) ? $_SERVER["HTTP_HOST"] : '';
  $ssl = isset($_SERVER["HTTPS"]) ? TRUE : FALSE;
  $data = array(
    'authenticator' => _acquia_agent_authenticator($params, $identifier, $key),
    'ip' => $ip,
    'host' => $host,
    'ssl' => $ssl,
    'body' => $params,
  );
  $data['result'] = _acquia_agent_request($acquia_network_address, $method, $data);
  return $data;
}