[icinga-checkins] icinga.org: icingaweb2-module-director/master: BenchmarkCommand: remove api instantiation logic

git at icinga.org git at icinga.org
Wed Feb 17 16:44:59 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: b6a8ce7acc99984e354e7053cdf3667ab353a84b
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=b6a8ce7acc99984e354e7053cdf3667ab353a84b

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Feb 17 16:44:23 2016 +0100

BenchmarkCommand: remove api instantiation logic

---

 application/clicommands/BenchmarkCommand.php |   17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/application/clicommands/BenchmarkCommand.php b/application/clicommands/BenchmarkCommand.php
index 1389999..0d15018 100644
--- a/application/clicommands/BenchmarkCommand.php
+++ b/application/clicommands/BenchmarkCommand.php
@@ -8,11 +8,6 @@ use Icinga\Module\Director\Cli\Command;
 use Icinga\Module\Director\Objects\IcingaHost;
 use Icinga\Module\Director\Objects\IcingaHostVar;
 
-
-use Icinga\Module\Director\Core\RestApiClient;
-use Icinga\Module\Director\Core\CoreApi;
-
-
 class BenchmarkCommand extends Command
 {
     public function streamAction()
@@ -57,16 +52,4 @@ class BenchmarkCommand extends Command
 
         Benchmark::measure('all done');
     }
-
-
-
-    protected function api()
-    {
-        $apiconfig = $this->Config()->getSection('api');
-        $client = new RestApiClient($apiconfig->get('address'), $apiconfig->get('port'));
-        $client->setCredentials($apiconfig->get('username'), $apiconfig->get('password'));
-        $api = new CoreApi($client);
-        return $api;
-    }
-
 }



More information about the icinga-checkins mailing list