Add cli delete syncrule
This commit is contained in:
parent
bcd0882e9f
commit
f792ec6464
|
@ -77,6 +77,23 @@ class SyncruleCommand extends Command
|
||||||
exit($this->getSyncStateExitCode($rule));
|
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)
|
protected function getExpectedModificationCounts(SyncRule $rule)
|
||||||
{
|
{
|
||||||
$modifications = $rule->getExpectedModifications();
|
$modifications = $rule->getExpectedModifications();
|
||||||
|
|
Loading…
Reference in New Issue