Commit 14f9df00 authored by Steven Jones's avatar Steven Jones

Issue #1471928 by Steven Jones: Fixed provision-save: Unknown options:...

Issue #1471928 by Steven Jones: Fixed provision-save: Unknown options: --context_type(), --platform, --server, --db_server(), --profile, --client_name(), --aliases.
parent 9fe8f9e5
......@@ -306,7 +306,7 @@ class Provision_Context {
* Return context-specific configuration options for help.
*
* @return
* array('--option' => 'description')
* array('option' => 'description')
*/
static function option_documentation() {
return array();
......
......@@ -14,11 +14,11 @@ class Provision_Context_platform extends Provision_Context {
static function option_documentation() {
return array(
'--root' => 'platform: path to a Drupal installation',
'--server' => 'platform: drush backend server; default @server_master',
'--web_server' => 'platform: web server hosting the platform; default @server_master',
'--makefile' => 'platform: drush makefile to use for building the platform if it doesn\'t already exist',
'--make_working_copy' => 'platform: Specifiy TRUE to build the platform with the Drush make --working-copy option.',
'root' => 'platform: path to a Drupal installation',
'server' => 'platform: drush backend server; default @server_master',
'web_server' => 'platform: web server hosting the platform; default @server_master',
'makefile' => 'platform: drush makefile to use for building the platform if it doesn\'t already exist',
'make_working_copy' => 'platform: Specifiy TRUE to build the platform with the Drush make --working-copy option.',
);
}
......
......@@ -21,16 +21,16 @@ class Provision_Context_server extends Provision_Context {
static function option_documentation() {
$options = array(
'--remote_host' => 'server: host name; default localhost',
'--script_user' => 'server: OS user name; default current user',
'--aegir_root' => 'server: Aegir root; default ' . getenv('HOME'),
'--master_url' => 'server: Hostmaster URL',
'remote_host' => 'server: host name; default localhost',
'script_user' => 'server: OS user name; default current user',
'aegir_root' => 'server: Aegir root; default ' . getenv('HOME'),
'master_url' => 'server: Hostmaster URL',
);
foreach (drush_command_invoke_all('provision_services') as $service => $default) {
$reflect = new reflectionClass('Provision_Service_' . $service);
$base_dir = dirname($reflect->getFilename());
$types = array();
$options['--' . $service . '_service_type'] = 'placeholder';
$options[$service . '_service_type'] = 'placeholder';
foreach (array_keys(drush_scan_directory($base_dir, '%.*_service\.inc%')) as $service_file) {
if (preg_match('%^' . $base_dir . '/([a-z]+)/(?:\1)_service.inc$%', $service_file, $match)) {
$types[] = $match[1];
......@@ -38,7 +38,7 @@ class Provision_Context_server extends Provision_Context {
$options = array_merge($options, call_user_func(array(sprintf('Provision_Service_%s_%s', $service, $match[1]), 'option_documentation')));
}
}
$options['--' . $service . '_service_type'] = 'server: ' . implode(', ', $types) . ', or null; default ' . (empty($default) ? 'null' : $default);
$options[$service . '_service_type'] = 'server: ' . implode(', ', $types) . ', or null; default ' . (empty($default) ? 'null' : $default);
}
return $options;
}
......
......@@ -10,14 +10,14 @@ class Provision_Context_site extends Provision_Context {
static function option_documentation() {
return array(
'--platform' => 'site: the platform the site is run on',
'--db_server' => 'site: the db server the site is run on',
'--uri' => 'site: example.com URI, no http:// or trailing /',
'--language' => 'site: site language; default en',
'--aliases' => 'site: comma-separated URIs',
'--redirection' => 'site: boolean for whether --aliases should redirect; default false',
'--client_name' => 'site: machine name of the client that owns this site',
'--profile' => 'site: Drupal profile to use; default default',
'platform' => 'site: the platform the site is run on',
'db_server' => 'site: the db server the site is run on',
'uri' => 'site: example.com URI, no http:// or trailing /',
'language' => 'site: site language; default en',
'aliases' => 'site: comma-separated URIs',
'redirection' => 'site: boolean for whether --aliases should redirect; default false',
'client_name' => 'site: machine name of the client that owns this site',
'profile' => 'site: Drupal profile to use; default default',
);
}
......
......@@ -318,7 +318,7 @@ class Provision_Service extends Provision_ChainedState {
* Return service-specific configuration options for help.
*
* @return
* array('--option' => 'description')
* array('option' => 'description')
*/
static function option_documentation() {
return array();
......
......@@ -14,7 +14,7 @@ class Provision_Service_db extends Provision_Service {
static function option_documentation() {
return array(
'--master_db' => 'server with db: Master database connection info, {type}://{user}:{password}@{host}',
'master_db' => 'server with db: Master database connection info, {type}://{user}:{password}@{host}',
);
}
......
......@@ -3,7 +3,7 @@
class Provision_Service_http_cluster extends Provision_Service_http {
static function option_documentation() {
return array(
'--cluster_web_servers' => 'server with cluster: comma-separated list of web servers.'
'cluster_web_servers' => 'server with cluster: comma-separated list of web servers.'
);
}
......
......@@ -21,8 +21,8 @@
class Provision_Service_http_pack extends Provision_Service_http {
static function option_documentation() {
return array(
'--slave_web_servers' => 'server with pack: comma-separated list of slave web servers.',
'--master_web_servers' => 'server with pack: comma-separated list of master web servers.',
'slave_web_servers' => 'server with pack: comma-separated list of slave web servers.',
'master_web_servers' => 'server with pack: comma-separated list of master web servers.',
);
}
......
......@@ -73,9 +73,9 @@ class Provision_Service_http_public extends Provision_Service_http {
static function option_documentation() {
return array(
'--web_group' => 'server with http: OS group for permissions; working default will be attempted',
'--web_disable_url' => 'server with http: URL disabled sites are redirected to; default {master_url}/hosting/disabled',
'--web_maintenance_url' => 'server with http: URL maintenance sites are redirected to; default {master_url}/hosting/maintenance',
'web_group' => 'server with http: OS group for permissions; working default will be attempted',
'web_disable_url' => 'server with http: URL disabled sites are redirected to; default {master_url}/hosting/disabled',
'web_maintenance_url' => 'server with http: URL maintenance sites are redirected to; default {master_url}/hosting/maintenance',
);
}
......
......@@ -92,8 +92,8 @@ function provision_drush_command() {
'@context_name' => 'Context to save',
),
'options' => array_merge(array(
'--context_type' => 'server, platform, or site; default server',
'--delete' => 'Remove the alias.',
'context_type' => 'server, platform, or site; default server',
'delete' => 'Remove the alias.',
), Provision_Context_server::option_documentation(), Provision_Context_platform::option_documentation(), Provision_Context_site::option_documentation()),
'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
);
......@@ -246,7 +246,9 @@ function provision_drush_command() {
'arguments' => array(
'example.com' => dt('The name of the site to migrate'),
'/path/to/platform' => dt('The platform to migrate the site to.'),
'--makefile' => dt('The optional makefile to use instead of aegir.')
),
'options' => array(
'makefile' => dt('The optional makefile to use instead of aegir.')
),
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment