From ffe39a2145bb7fb6affea122c2150e314ea208c8 Mon Sep 17 00:00:00 2001 From: Anders Einar Hilden Date: Thu, 22 Feb 2024 12:49:08 +0100 Subject: [PATCH] Update ServerShell.php --- app/Console/Command/ServerShell.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/app/Console/Command/ServerShell.php b/app/Console/Command/ServerShell.php index a82b9d97d..1aae03e60 100644 --- a/app/Console/Command/ServerShell.php +++ b/app/Console/Command/ServerShell.php @@ -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; }