summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Wagner2011-08-17 16:20:03 +0200
committerSebastian Wagner2011-08-17 16:20:03 +0200
commit23be7a88dbf0d97320ab0488aeb361fd8f5b2211 (patch)
treee9f014d446e0badc72ad66a3f569a3646ddd26bc
parentmore statusText messages (diff)
downloadpoolctrl-23be7a88dbf0d97320ab0488aeb361fd8f5b2211.tar.gz
poolctrl-23be7a88dbf0d97320ab0488aeb361fd8f5b2211.tar.xz
poolctrl-23be7a88dbf0d97320ab0488aeb361fd8f5b2211.zip
some ips and macs of pool-113 added
-rw-r--r--application/controllers/GearmanController.php41
-rw-r--r--scripts/getMacPool-113.sh6
2 files changed, 42 insertions, 5 deletions
diff --git a/application/controllers/GearmanController.php b/application/controllers/GearmanController.php
index 1afc48e..696e48e 100644
--- a/application/controllers/GearmanController.php
+++ b/application/controllers/GearmanController.php
@@ -99,7 +99,7 @@ class GearmanController extends Zend_Controller_Action
'updateRate' => $updateRate,
'waitTime' => $waitTime,
'clients' => array(
- 0 => array('id' => '1', 'ip' =>'132.230.4.50', 'mac' =>'00:1b:78:3c:27:8a'),
+ 0 => array('id' => '1', 'ip' =>'132.230.4.24', 'mac' =>'00:13:72:C7:FD:A1'),
),
);
@@ -122,7 +122,44 @@ class GearmanController extends Zend_Controller_Action
'updateRate' => $updateRate,
'waitTime' => $waitTime,
'clients' => array(
- 0 => array('id' => '1', 'ip' =>'132.230.4.50', 'mac' =>'00:1b:78:3c:27:8a'),
+ 0 => array('id' => '1', 'ip' =>'132.230.4.24', 'mac' =>'00:13:72:C7:FD:A1'),
+ ),
+ );
+
+ $ipString = json_encode($clients);
+ $result = $this->gearmanClient->do("shutdown", $ipString, 'shutdown' . $eventName);
+ if (! $this->gearmanClient->runTasks())
+ {
+ echo "ERROR " . $gmc->error() . "\n";
+ exit;
+ }
+ $this->view->result = $result;
+ }
+
+ public function maintenanceAction() {
+ $eventName = 'maintenance_pool-113'; //maintenance of pool-113
+ $updateRate = 1;
+ $waitTime = 120;
+ $clients = array(
+ 'eventName' => $eventName,
+ 'updateRate' => $updateRate,
+ 'waitTime' => $waitTime,
+ 'clients' => array(
+ 0 => array('id' => '1', 'ip' =>'132.230.4.121', 'mac' =>'00:1e:0b:a6:f8:19'),
+ 0 => array('id' => '2', 'ip' =>'132.230.4.122', 'mac' =>'00:1e:0b:a6:'), // unvollständig
+ 0 => array('id' => '3', 'ip' =>'132.230.4.123', 'mac' =>'00:1e:0b:a6:d5:8e'),
+ 0 => array('id' => '4', 'ip' =>'132.230.4.124', 'mac' =>'00:1e:0b:a6:f8:2c'),
+ 0 => array('id' => '5', 'ip' =>'132.230.4.125', 'mac' =>'00:1e:0b:a6:d5:e9'),
+ 0 => array('id' => '6', 'ip' =>'132.230.4.126', 'mac' =>'00:1e:0b:a6:d5:07'),
+ 0 => array('id' => '7', 'ip' =>'132.230.4.127', 'mac' =>'00:1e:0b:a6:'), // unvollständig
+ 0 => array('id' => '8', 'ip' =>'132.230.4.128', 'mac' =>'00:1e:0b:a6:'), // unvollständig
+ 0 => array('id' => '9', 'ip' =>'132.230.4.129', 'mac' =>'00:1e:0b:a6:'), // unvollständig
+ 0 => array('id' => '10', 'ip' =>'132.230.4.130', 'mac' =>'00:1e:0b:a6:f7:eb'),
+ 0 => array('id' => '11', 'ip' =>'132.230.4.131', 'mac' =>'00:1e:0b:a6:f8:a7'),
+ 0 => array('id' => '12', 'ip' =>'132.230.4.132', 'mac' =>'00:1e:0b:a6:d5:e4'),
+ 0 => array('id' => '13', 'ip' =>'132.230.4.133', 'mac' =>'00:1e:0b:a6:'), // unvollständig
+ 0 => array('id' => '14', 'ip' =>'132.230.4.134', 'mac' =>'00:1e:0b:a6:'), // unvollständig
+ 0 => array('id' => '15', 'ip' =>'132.230.4.135', 'mac' =>'00:1e:0b:a6:'), // unvollständig
),
);
diff --git a/scripts/getMacPool-113.sh b/scripts/getMacPool-113.sh
index 0f335a7..d3ff8d7 100644
--- a/scripts/getMacPool-113.sh
+++ b/scripts/getMacPool-113.sh
@@ -1,4 +1,4 @@
#!/bin/bash
-sudo apt-get update
-sudo apt-get install fping
-fping -s -g 132.230.4.121 132.230.4.135 -r 1 | arp -a | grep -io '(132.230.4.[0-9][0-9][0-9]) auf [0-9A-F]\{2\}\(:[0-9A-F]\{2\}\)\{5\}' > macPool-113.txt \ No newline at end of file
+#sudo apt-get update
+#sudo apt-get install fping
+fping -s -g 132.230.4.121 132.230.4.135 -r 1 | arp -a | grep -io '(132.230.4.[0-9][0-9][0-9]) auf [0-9A-F]\{2\}\(:[0-9A-F]\{2\}\)\{5\}' > macPool-113.txt