Ejemplo n.º 1
0
 /**
  * Handle the command
  *
  * @return mixed
  */
 public function fire()
 {
     parent::fire();
     switch ($_command = trim(strtolower($this->argument('operation')))) {
         case 'create':
         case 'update':
         case 'delete':
             if (empty($_mountId = $this->argument('mount-id'))) {
                 throw new \InvalidArgumentException('No "mount-id" provided.');
             }
             return $this->{'_' . $_command . 'Mount'}($this->argument('mount-id'));
         case 'show':
             return $this->showMounts();
     }
     throw new \InvalidArgumentException('The "' . $_command . '" operation is not valid');
 }
Ejemplo n.º 2
0
 /** @inheritdoc */
 protected function getOptions()
 {
     return array_merge(parent::getOptions(), [['all', 'a', InputOption::VALUE_NONE, 'Migrate *all* cluster instances'], ['cluster-id', 'c', InputOption::VALUE_REQUIRED, 'If specified with "--all", will migrate only instances managed by "cluster-id".'], ['seed', 's', InputOption::VALUE_NONE, 'If specified, "--seed" will be passed to any "migrate" commands']]);
 }
Ejemplo n.º 3
0
 /** @inheritdoc */
 protected function getOptions()
 {
     return array_merge(parent::getOptions(), [['no-composer', null, InputOption::VALUE_NONE, 'If specified, a "composer update" will NOT be performed after an update.'], ['no-clear', null, InputOption::VALUE_NONE, 'If specified, the caches will not be cleared after an update.']]);
 }
Ejemplo n.º 4
0
 /** @inheritdoc */
 protected function getOptions()
 {
     return array_merge(parent::getOptions(), [['no-commit', null, InputOption::VALUE_NONE, 'Do not commit the result to the repo'], ['dump', 'd', InputOption::VALUE_NONE, 'Dump the blueprint to stdout']]);
 }
Ejemplo n.º 5
0
 /** @inheritdoc */
 protected function getOptions()
 {
     return array_merge(parent::getOptions(), [['create', 'c', InputOption::VALUE_NONE, 'Create a new manifest file. This is the default.'], ['no-keys', 'k', InputOption::VALUE_NONE, 'If specified, no application keys will be generated.'], ['show', 's', InputOption::VALUE_NONE, 'If specified, show the contents of an installation\'s manifest.'], ['owner-id', null, InputOption::VALUE_REQUIRED, 'The owner id for the manifest key if not 0', 0], ['owner-type', null, InputOption::VALUE_REQUIRED, 'The owner type for the manifest key if not "dashboard"', 'dashboard']]);
 }
Ejemplo n.º 6
0
 /** @inheritdoc */
 protected function getOptions()
 {
     return array_merge(parent::getOptions(), [['force', null, InputOption::VALUE_NONE, 'Use to force re-initialization of system.'], ['no-manifest', null, InputOption::VALUE_NONE, 'Do not create a manifest file.'], ['no-keys', null, InputOption::VALUE_NONE, 'Do not create initialization keys.'], ['admin-password', null, InputOption::VALUE_OPTIONAL, 'The admin account password to use.', 'dfe.admin'], ['api-secret', null, InputOption::VALUE_OPTIONAL, 'The API secret to use. If not specified, one will be generated']]);
 }
Ejemplo n.º 7
0
 /**
  * Get the console command options.
  *
  * @return array
  */
 protected function getOptions()
 {
     return array_merge(parent::getOptions(), [['cluster-id', 'c', InputOption::VALUE_OPTIONAL, 'The cluster where this instance is to be placed.', config('provisioning.default-cluster-id')]]);
 }
Ejemplo n.º 8
0
 /**
  * Get the console command arguments.
  *
  * @return array
  */
 protected function getArguments()
 {
     return array_merge(parent::getArguments(), [['instance-id', InputArgument::REQUIRED, 'The instance id']]);
 }
Ejemplo n.º 9
0
 /**
  * Get the console command options.
  *
  * @return array
  */
 protected function getOptions()
 {
     return array_merge(parent::getOptions(), [['cluster-id', 'c', InputOption::VALUE_OPTIONAL, 'The cluster containing the instance', config('provisioning.default-cluster-id')]]);
 }
Ejemplo n.º 10
0
 /** @inheritdoc */
 protected function getOptions()
 {
     return array_merge(parent::getOptions(), [['owner-id', null, InputOption::VALUE_REQUIRED, 'The "owner-id" of this cluster'], ['owner-type', null, InputOption::VALUE_REQUIRED, 'The type of owner: ' . implode(', ', OwnerTypes::getDefinedConstants(true))], ['subdomain', null, InputOption::VALUE_REQUIRED, 'The subdomain in which this cluster resides'], ['max-instances', 'm', InputOption::VALUE_REQUIRED, 'The maximum number of instances allowed, if any.'], ['server-id', null, InputOption::VALUE_REQUIRED, 'The "server-id" to "add" or "remove"']]);
 }
Ejemplo n.º 11
0
 /** @inheritdoc */
 protected function getOptions()
 {
     return array_merge(parent::getOptions(), [['gather', null, InputOption::VALUE_NONE, 'When specified, all metrics are gathered and written to the database. Use when scheduling jobs.'], ['to-file', 'f', InputOption::VALUE_REQUIRED, 'Write metrics to a file.'], ['console-only', null, InputOption::VALUE_NONE, 'Only gather "console" metrics'], ['dashboard-only', null, InputOption::VALUE_NONE, 'Only gather "dashboard" metrics'], ['instance-only', null, InputOption::VALUE_NONE, 'Only gather "dashboard" metrics']]);
 }
Ejemplo n.º 12
0
 /**
  * Get the console command arguments.
  *
  * @return array
  */
 protected function getArguments()
 {
     return array_merge(parent::getArguments(), [['owner-id', InputArgument::REQUIRED, 'The id of the owner of this key'], ['owner-type', InputArgument::REQUIRED, 'One of the following owner types: ' . OwnerTypes::prettyList()]]);
 }
Ejemplo n.º 13
0
 /** @inheritdoc */
 protected function getOptions()
 {
     return array_merge(parent::getOptions(), [['destroy', 'd', InputOption::VALUE_NONE, 'Destroys a previously created capsule.']]);
 }
Ejemplo n.º 14
0
 /**
  * Get the console command options.
  *
  * @return array
  */
 protected function getOptions()
 {
     return array_merge(parent::getOptions(), [['cluster-id', 'c', InputOption::VALUE_OPTIONAL, 'The cluster where this instance is to be placed.', config('provisioning.default-cluster-id')], ['snapshot-id', 'i', InputOption::VALUE_NONE, 'If specified, the "snapshot" value is a snapshot-id not a path'], ['owner-type', null, InputOption::VALUE_REQUIRED, 'The owner-id of the new instance']]);
 }