function hosting_hosting_server_context_options in Hosting 6.2
Same name and namespace in other branches
- 7.4 server/hosting_server.drush.inc \hosting_hosting_server_context_options()
- 7.3 server/hosting_server.drush.inc \hosting_hosting_server_context_options()
Pass options for the server verification to the backend.
Here we pass the hostname, IP addresses, and setup the services for this server (?).
File
- server/
hosting_server.drush.inc, line 9
Code
function hosting_hosting_server_context_options(&$task) {
$task->context_options['remote_host'] = $task->ref->title;
$ip_list = $task->ref->ip_addresses;
$task->context_options['ip_addresses'] = sizeof($ip_list) ? implode(',', $ip_list) : 'null';
foreach (hosting_server_services() as $type => $info) {
if (isset($task->ref->services[$type])) {
$service = $task->ref->services[$type];
if ($service->available) {
$service
->context_options($task->task_type, $task->ref->type, $task);
}
}
else {
$task->context_options["{$type}_service_type"] = '0';
}
}
}