diff --git a/application/clicommands/ImportsourceCommand.php b/application/clicommands/ImportsourceCommand.php index 477fdf592..6bee37d05 100644 --- a/application/clicommands/ImportsourceCommand.php +++ b/application/clicommands/ImportsourceCommand.php @@ -67,6 +67,23 @@ public function checkAction() $this->showImportStateDetails($source); } + /** + * This command deletes the given Import Source. + * + * USAGE + * + * icingacli director importsource delete --id + * + * OPTIONS + * + * --id An Import Source ID. Use the list command to figure out + */ + public function deleteAction() + { + $source = $this->getImportSource(); + $source->delete(); + } + /** * Fetch current data from a given Import Source * diff --git a/application/clicommands/SyncruleCommand.php b/application/clicommands/SyncruleCommand.php index 37a3f0e93..4556ae48d 100644 --- a/application/clicommands/SyncruleCommand.php +++ b/application/clicommands/SyncruleCommand.php @@ -77,6 +77,23 @@ public function checkAction() exit($this->getSyncStateExitCode($rule)); } + /** + * This command deletes a Sync Rule. + * + * USAGE + * + * icingacli director syncrule delete --id + * + * OPTIONS + * + * --id A Sync Rule ID. Use the list command to figure out + */ + public function deleteAction() + { + $rule = $this->getSyncRule(); + $rule->delete(); + } + protected function getExpectedModificationCounts(SyncRule $rule) { $modifications = $rule->getExpectedModifications();