r1746 + new feature: SSV format for RS import
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 29 Feb 2008 16:53:08 +0000 (16:53 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Fri, 29 Feb 2008 16:53:08 +0000 (16:53 +0000)
ChangeLog
inc/interface.php
inc/ophandlers.php

index 9820f151f27f44df7d660bb240945b7a82228fcc..7c7ece4d051de473b0d09b0b6eb0ae0a012e8a40 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+0.14.13
+       new feature: SSV format for RS import
 0.14.12 2008-02-29
        new feature: default value for RS inservice status
        new feature: AutoPorts feature
index 8a6b0813ca5c1e8758670c111f01ead125341b7d..7cbf6378e50be693ffd2fa348af66c26afdec9b5 100644 (file)
@@ -3978,7 +3978,12 @@ function renderRSPoolServerForm ($pool_id = 0)
        else
                printImageHREF ('notinservice', 'NOT in service');
        echo "</td><td>Format: ";
-       $formats = array ('ipvs_2' => 'ipvsadm -l -n (address and port)', 'ipvs_3' => 'ipvsadm -l -n (address, port and weight)');
+       $formats = array
+       (
+               'ipvs_2' => 'ipvsadm -l -n (address and port)',
+               'ipvs_3' => 'ipvsadm -l -n (address, port and weight)',
+               'ssv_2' => 'SSV: &lt;IP address&gt; &lt;port&gt;'
+       );
        printSelect ($formats, 'format');
        echo "</td><td><input type=submit value=Parse></td></tr>\n";
        echo "<tr><td colspan=3><textarea name=rawtext cols=100 rows=50></textarea></td></tr>\n";
index 454428d7ff4b4b69a2d365394f04c2b25e6e9c63..cb6f12aeef056b7fd2c29428a450d4dd8d97555a 100644 (file)
@@ -982,6 +982,14 @@ function addRealServers ()
                                else
                                        $nbad++;
                                break;
+                       case 'ssv_2': // IP address and port
+                               if (!preg_match ('/^([0-9\.]+) ([0-9]+)$/', $line, $match))
+                                       continue;
+                               if (addRStoRSPool ($pool_id, $match[1], $match[2], getConfigVar ('DEFAULT_IPV4_RS_INSERVICE'), ''))
+                                       $ngood++;
+                               else
+                                       $nbad++;
+                               break;
                        default:
                                return "${root}?page=${pageno}&tab=${tabno}&id=${pool_id}&error=" . urlencode (__FUNCTION__ . ': invalid format requested');
                                break;