Update ServerShell.php

Kagee-better-servershell-docs
Anders Einar Hilden 2024-02-22 12:49:08 +01:00 committed by GitHub
parent b2cb4faedc
commit ffe39a2145
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 29 additions and 0 deletions

View File

@ -24,6 +24,35 @@ class ServerShell extends AppShell
),
)
]);
$parser->addSubcommand('list', [
'help' => __('List configured servers (human readable).'),
]);
$parser->addSubcommand('listservers', [
'help' => __('List configures servers (id, name, url as json).'),
]);
$parser->addSubcommand('test', [
'help' => __('Test connection and retrieve basic info about server.'),
'parser' => array(
'arguments' => array(
'server_id' => ['help' => __('Remote server ID.'), 'required' => true],
),
)
]);
$parser->addSubcommand('pull', [
'help' => __('Initial pull from server.'),
'parser' => array(
'arguments' => array(
'user_id' => ['help' => __('MISP user ID to attribute pull to.'), 'required' => true],
'server_id' => ['help' => __('Remote server ID.'), 'required' => true],
'type' => ['help' => __('Pull type, full or update.'), 'required' => false],
'job_id' => ['help' => __('Job id to query for status.'), 'required' => false],
),
)
]);
return $parser;
}