Add cli delete syncrule

This commit is contained in:
Gianluca Piccolo 2023-02-13 16:54:36 +01:00
parent bcd0882e9f
commit f792ec6464
1 changed files with 17 additions and 0 deletions

View File

@ -77,6 +77,23 @@ class SyncruleCommand extends Command
exit($this->getSyncStateExitCode($rule));
}
/**
* This command deletes a Sync Rule.
*
* USAGE
*
* icingacli director syncrule delete --id <id>
*
* OPTIONS
*
* --id <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();