r1423 + added LVS config tab
[racktables] / inc / triggers.php
index 85a5d40b6be64b0b80d736ade05083a41dc7c61c..b3f3300ecf9390a0c4b7011ecf3b0ee7be109178 100644 (file)
@@ -60,4 +60,14 @@ function trigger_emptyRackspace ()
        return (count (readChapter ('RackRow')) == 0);
 }
 
+function trigger_lvsconfig ()
+{
+       assertUIntArg ('object_id');
+       $object_id = $_REQUEST['object_id'];
+       $object = getObjectInfo ($object_id);
+       if ($object['objtype_id'] != 4) // server
+               return FALSE;
+       return (count (getObjectForwards ($object_id)) > 1);
+}
+
 ?>