Drop support for external_info and extra_info flag

This commit is contained in:
Sukhwinder Dhillon 2023-07-11 16:49:31 +02:00 committed by Johannes Meyer
parent 9455704b0b
commit 83194e4942
2 changed files with 2 additions and 36 deletions

View file

@ -15,8 +15,9 @@ class BpNode extends Node
const OP_DEGRADED = '%';
protected $operator = '&';
protected $url;
protected $info_command;
protected $display = 0;
/** @var Node[] */
@ -336,21 +337,6 @@ class BpNode extends Node
return $this->url;
}
public function setInfoCommand($cmd)
{
$this->info_command = $cmd;
}
public function hasInfoCommand()
{
return $this->info_command !== null;
}
public function getInfoCommand()
{
return $this->info_command;
}
public function setStateOverrides(array $overrides, $name = null)
{
if ($name === null) {

View file

@ -237,23 +237,6 @@ class LegacyConfigParser
}
}
/**
* @param $line
* @param BpConfig $bp
*/
protected function parseExternalInfo(&$line, BpConfig $bp)
{
list($name, $script) = preg_split('~\s*;\s*~', substr($line, 14), 2);
$bp->getBpNode($name)->setInfoCommand($script);
}
protected function parseExtraInfo(&$line, BpConfig $bp)
{
// TODO: Not yet
// list($name, $script) = preg_split('~\s*;\s*~', substr($line, 14), 2);
// $this->getNode($name)->setExtraInfo($script);
}
protected function parseInfoUrl(&$line, BpConfig $bp)
{
list($name, $url) = preg_split('~\s*;\s*~', substr($line, 9), 2);
@ -288,10 +271,7 @@ class LegacyConfigParser
switch ($type) {
case 'external_info':
$this->parseExternalInfo($line, $bp);
break;
case 'extra_info':
$this->parseExtraInfo($line, $bp);
break;
case 'info_url':
$this->parseInfoUrl($line, $bp);