diff --git a/.gitignore b/.gitignore index b043da4a6..f4b06b662 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ wwwroot/inc/secret.php wwwroot/inc/local.php +/.idea /.project tags -plugins/* # vim [._]*.s[a-w][a-z] diff --git a/.travis.yml b/.travis.yml index db094fc66..a7ffca9d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,17 +5,15 @@ git: depth: 3 php: - - 5.4 - 5.5 - 5.6 - # In Travis CI PHP 7.0.15 comes with PHPUnit 5.7.6, which is compatible with - # earlier versions of itself hence RackTables tests can work on older PHP - # versions too (a major advantage of the test matrix). Later PHP versions come - # with PHPUnit 6, which is compatible with itself only due to namespaces. - - 7.0.15 + - 7.0 + - 7.1 matrix: fast_finish: true + allow_failures: + - php: 7.1 services: - mysql diff --git a/ChangeLog b/ChangeLog index c22e2f5f8..fe9164bb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +0.21.0 + update: display MySQL warnings in debug mode + update: better display objects that have no common name + update: highlight RackCode syntax in the Permissions viewer too + update: refine delivery of rack thumb images + update: new plugin architecture + update: add support for IP-over-InfiniBand L2 addresses + bugfix: put dictionary-based attributes formatting right + bugfix: date attributes now can be set for racks, rows and locations + new feature: tag colors (GH#158 by Maik Ehinger) +0.20.14 2017-08-10 + update: cover comments too in IPv4 & IPv6 search (Mantis#1773 by Fred Stuck) + update: suppress the rackspace portlet column if it is empty + update: refine items in the dictionary (e.g. SuperMicro and EMC) + update: adjust some code for easier customization + update: improve some error messages 0.20.13 2017-05-12 update: fix performance for pages with images (GH#190 by Michael A. Mikhailov) update: improve SNMP support for Brocade devices (GH#180 by Chris Jones) diff --git a/README.Fedora b/README.Fedora index b7a846ed5..47ff1c079 100644 --- a/README.Fedora +++ b/README.Fedora @@ -47,13 +47,12 @@ The configuration directories could be: The "wwwroot" directories will require a short PHP wrapper file each. The wrappers will differ only in the value of $racktables_confdir setting: -# cat > /var/www/vhosts/racktables.example1.com/index.php << /var/www/vhosts/racktables.example1.com/index.php < EOF Once the wrapper files are installed, setup of each instance must be diff --git a/README.md b/README.md index 42713ce27..1c3eba551 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ look for the respective links at [project's web-site](http://racktables.org). ## 1. Prepare the server -RackTables uses a web-server with PHP (5.2.10 or newer) for front-end and a +RackTables uses a web-server with PHP (5.5.0 or newer) for front-end and a MySQL/MariaDB server version 5 for back-end. The most commonly used web-server for RackTables is Apache httpd. @@ -18,7 +18,7 @@ for RackTables is Apache httpd. | Debian 6 | `aptitude install mysql-server-5.1` | | Debian 7 | `aptitude install mysql-server-5.1` | | Fedora 8-16 | `yum install mysql-server mysql` | -| Fedora 23 | `dnf install mariadb-server mariadb` | +| Fedora 23-26 | `dnf install mariadb-server mariadb` | | FreeBSD 10 | `pkg install mysql56-server` | | openSUSE 42.1 | `zypper install mysql-community-server` | | Scientific Linux 6 | `yum install mysql-server mysql` | @@ -32,7 +32,7 @@ for RackTables is Apache httpd. | Debian 6 | add `character-set-server=utf8` line to `[mysqld]` section of `/etc/mysql/my.cnf` file and restart mysqld | | Debian 7 | add `character-set-server=utf8` line to `[mysqld]` section of `/etc/mysql/my.cnf` file and restart mysqld | | Fedora 8-16 | add `character-set-server=utf8` line to `[mysqld]` section of `/etc/my.cnf` file and restart mysqld | -| Fedora 23 | ```printf "[mysqld]\ncharacter-set-server=utf8\n" > /etc/my.cnf.d/mysqld-charset.cnf; systemctl restart mariadb``` | +| Fedora 23-26 | ```printf "[mysqld]\ncharacter-set-server=utf8\n" > /etc/my.cnf.d/mysqld-charset.cnf; systemctl restart mariadb``` | | openSUSE 42.1 | No action required, comes configured for UTF-8 by default. | | Scientific Linux 6 | add `character-set-server=utf8` line to `[mysqld]` section of `/etc/my.cnf` file and restart mysqld | | Ubuntu 14.04 | ```printf "[mysqld]\ncharacter-set-server=utf8\n" > /etc/mysql/conf.d/charset.cnf; service mysql restart``` | @@ -46,6 +46,7 @@ for RackTables is Apache httpd. | Debian 7 (nginx) | `aptitude install nginx php5-fpm` **(see note below)** | | Fedora 8-16 | `yum install httpd php php-mysql php-pdo php-gd php-snmp php-mbstring php-bcmath` | | Fedora 23 | `dnf install httpd php php-mysql php-pdo php-gd php-snmp php-mbstring php-bcmath` | +| Fedora 26 | `dnf install httpd php php-mysqlnd php-pdo php-gd php-snmp php-mbstring php-bcmath` | | FreeBSD 10 | see note 1.3.c | | openSUSE 42.1 | `zypper install apache2-mod_php5 php5-gd php5-mbstring php5-mysql php5-bcmath` | | Scientific Linux 6 | `yum install httpd php php-mysql php-pdo php-gd php-mbstring php-bcmath` | @@ -132,7 +133,7 @@ Note: set `secret.php` permissions when prompted. Unpack the tar.gz/zip archive to a directory of your choice and configure Apache httpd to use `wwwroot` subdirectory as a new DocumentRoot. Alternatively, symlinks to `wwwroot` or even to `index.php` from an existing DocumentRoot are -also possible and often adisable (see `README.Fedora`). +also possible and often advisable (see `README.Fedora`). ## 3. Run the installer Open the configured RackTables URL and you will be prompted to configure @@ -140,7 +141,7 @@ and initialize the application. | Distribution | Apache httpd UID:GID | MySQL UNIX socket path | | --------------- | ----------------------- | -------------------------------- | -| Fedora 23 | `apache:apache` | `/var/lib/mysql/mysql.sock` | +| Fedora 23-26 | `apache:apache` | `/var/lib/mysql/mysql.sock` | | openSUSE 42.1 | `wwwrun:www` | `/var/run/mysql/mysql.sock` | | Ubuntu 14.04 | `www-data:www-data` | `/var/run/mysqld/mysqld.sock` | | Ubuntu 16.04 | `www-data:www-data` | `/var/run/mysqld/mysqld.sock` | @@ -159,6 +160,16 @@ and initialize the application. ## Release notes +### Upgrading to 0.21.0 + +From now on the minimum (oldest) release of PHP that can run RackTables is +5.5.0. + +This release introduces a new plugin architecture. If you experience issues +after the upgrade, try disabling plugins. +Refer to http://wiki.racktables.org/index.php/RackTablesAdminGuide#Plugins +for more information. + ### Upgrading to 0.20.11 New `IPV4_TREE_SHOW_UNALLOCATED` configuration option introduced to disable diff --git a/gateways/git-commit b/gateways/git-commit index f1a692d9c..7fd1738b0 100755 --- a/gateways/git-commit +++ b/gateways/git-commit @@ -21,6 +21,10 @@ # able to write to the repository and run "git pull", "git commit" and "git push" # without any user interaction (i.e. the git remote must be on a local # filesystem or be configured to use SSH keys). +# +# This script uses sudo to switch between the pseudo-users and requires an +# entry in sudoers along the following lines: +# httpduser ALL=(racktablesuser) NOPASSWD:/path/to/racktables/gateways/git-commit [ $# -eq 4 ] || { echo "Usage: $0 " >&2 diff --git a/gateways/ucssdk b/gateways/ucssdk index 10db0471a..e0329cc1d 100755 --- a/gateways/ucssdk +++ b/gateways/ucssdk @@ -32,6 +32,7 @@ try: from ucsmsdk.mometa.compute.ComputeRackUnit import ComputeRackUnit except Exception, err: sys.stderr.write('UCS Python SDK is missing %s (Path: %s)\n' % (str(err), sys.path)) + sys.stderr.write('

Available at https://communities.cisco.com/docs/DOC-64378

\n') sys.exit(2) loggedin = 0 diff --git a/plugins/README b/plugins/README index 868b7e316..a48b4cdfd 100644 --- a/plugins/README +++ b/plugins/README @@ -1,3 +1,13 @@ +*** New Plugin Architecture *** + +Each plugin should reside in its own directory and contain a file named +plugin.php housing certain mandatory functions. + +Refer to http://wiki.racktables.org/index.php/RackTablesAdminGuide#Plugins +for more information. + +*** Old Plugin Architecture *** + Put your custom RackTables add-ons into this folder. Old local.php file is the sample of such add-ons and should be put here diff --git a/plugins/cacti/plugin.php b/plugins/cacti/plugin.php new file mode 100644 index 000000000..e64f0e4f6 --- /dev/null +++ b/plugins/cacti/plugin.php @@ -0,0 +1,391 @@ + 'cacti', + 'longname' => 'Cacti', + 'version' => '1.0', + 'home_url' => 'http://www.racktables.org/' + ); +} + +function plugin_cacti_init () +{ + global $interface_requires, $opspec_list, $page, $tab, $trigger; + $tab['object']['cacti'] = 'Cacti Graphs'; + registerTabHandler ('object', 'cacti', 'renderObjectCactiGraphs'); + $trigger['object']['cacti'] = 'triggerCactiGraphs'; + registerOpHandler ('object', 'cacti', 'add', 'tableHandler'); + registerOpHandler ('object', 'cacti', 'del', 'tableHandler'); + + $page['cacti']['title'] = 'Cacti'; + $page['cacti']['parent'] = 'config'; + $tab['cacti']['default'] = 'View'; + $tab['cacti']['servers'] = 'Manage servers'; + registerTabHandler ('cacti', 'default', 'renderCactiConfig'); + registerTabHandler ('cacti', 'servers', 'renderCactiServersEditor'); + registerOpHandler ('cacti', 'servers', 'add', 'tableHandler'); + registerOpHandler ('cacti', 'servers', 'del', 'tableHandler'); + registerOpHandler ('cacti', 'servers', 'upd', 'tableHandler'); + $interface_requires['cacti-*'] = 'interface-config.php'; + + registerHook ('dispatchImageRequest_hook', 'plugin_cacti_dispatchImageRequest'); + registerHook ('resetObject_hook', 'plugin_cacti_resetObject'); + registerHook ('resetUIConfig_hook', 'plugin_cacti_resetUIConfig'); + + $opspec_list['object-cacti-add'] = array + ( + 'table' => 'CactiGraph', + 'action' => 'INSERT', + 'arglist' => array + ( + array ('url_argname' => 'object_id', 'assertion' => 'uint'), + array ('url_argname' => 'server_id', 'assertion' => 'uint'), + array ('url_argname' => 'graph_id', 'assertion' => 'uint'), + array ('url_argname' => 'caption', 'assertion' => 'string0'), + ), + ); + $opspec_list['object-cacti-del'] = array + ( + 'table' => 'CactiGraph', + 'action' => 'DELETE', + 'arglist' => array + ( + array ('url_argname' => 'object_id', 'assertion' => 'uint'), + array ('url_argname' => 'server_id', 'assertion' => 'uint'), + array ('url_argname' => 'graph_id', 'assertion' => 'uint'), + ), + ); + $opspec_list['cacti-servers-add'] = array + ( + 'table' => 'CactiServer', + 'action' => 'INSERT', + 'arglist' => array + ( + array ('url_argname' => 'base_url', 'assertion' => 'string'), + array ('url_argname' => 'username', 'assertion' => 'string0'), + array ('url_argname' => 'password', 'assertion' => 'string0'), + ), + ); + $opspec_list['cacti-servers-del'] = array + ( + 'table' => 'CactiServer', + 'action' => 'DELETE', + 'arglist' => array + ( + array ('url_argname' => 'id', 'assertion' => 'uint'), + ), + ); + $opspec_list['cacti-servers-upd'] = array + ( + 'table' => 'CactiServer', + 'action' => 'UPDATE', + 'set_arglist' => array + ( + array ('url_argname' => 'base_url', 'assertion' => 'string'), + array ('url_argname' => 'username', 'assertion' => 'string0'), + array ('url_argname' => 'password', 'assertion' => 'string0'), + ), + 'where_arglist' => array + ( + array ('url_argname' => 'id', 'assertion' => 'uint'), + ), + ); + + global $plugin_cacti_fkeys; + $plugin_cacti_fkeys = array ( + array ('fkey_name' => 'CactiGraph-FK-object_id', 'table_name' => 'CactiGraph'), + array ('fkey_name' => 'CactiGraph-FK-server_id', 'table_name' => 'CactiGraph'), + ); +} + +function plugin_cacti_install () +{ + if (extension_loaded ('curl') === FALSE) + throw new RackTablesError ('cURL PHP module is not installed', RackTablesError::MISCONFIGURED); + + global $dbxlink; + + $dbxlink->query ( +"CREATE TABLE `CactiServer` ( + `id` int(10) unsigned NOT NULL auto_increment, + `base_url` char(255) DEFAULT NULL, + `username` char(64) DEFAULT NULL, + `password` char(64) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB"); + + $dbxlink->query ( +"CREATE TABLE `CactiGraph` ( + `object_id` int(10) unsigned NOT NULL, + `server_id` int(10) unsigned NOT NULL, + `graph_id` int(10) unsigned NOT NULL, + `caption` char(255) DEFAULT NULL, + PRIMARY KEY (`object_id`,`server_id`,`graph_id`), + KEY `graph_id` (`graph_id`), + KEY `server_id` (`server_id`), + CONSTRAINT `CactiGraph-FK-server_id` FOREIGN KEY (`server_id`) REFERENCES `CactiServer` (`id`), + CONSTRAINT `CactiGraph-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB"); + + addConfigVar ('CACTI_LISTSRC', 'false', 'string', 'yes', 'no', 'no', 'List of object with Cacti graphs'); + addConfigVar ('CACTI_RRA_ID', '1', 'uint', 'no', 'no', 'yes', 'RRA ID for Cacti graphs displayed in RackTables'); + + return TRUE; +} + +function plugin_cacti_uninstall () +{ + deleteConfigVar ('CACTI_LISTSRC'); + deleteConfigVar ('CACTI_RRA_ID'); + + global $dbxlink; + $dbxlink->query ("DROP TABLE `CactiGraph`"); + $dbxlink->query ("DROP TABLE `CactiServer`"); + + return TRUE; +} + +function plugin_cacti_upgrade () +{ + return TRUE; +} + +function plugin_cacti_dispatchImageRequest () +{ + global $pageno, $tabno; + + if ($_REQUEST['img'] == 'cactigraph') + { + $pageno = 'object'; + $tabno = 'cacti'; + fixContext (); + assertPermission (); + $graph_id = genericAssertion ('graph_id', 'uint'); + if (! array_key_exists ($graph_id, getCactiGraphsForObject (getBypassValue()))) + throw new InvalidRequestArgException ('graph_id', $graph_id); + proxyCactiRequest (genericAssertion ('server_id', 'uint'), $graph_id); + } + return TRUE; +} + +function plugin_cacti_resetObject ($object_id) +{ + usePreparedDeleteBlade ('CactiGraph', array ('object_id' => $object_id)); +} + +function plugin_cacti_resetUIConfig () +{ + setConfigVar ('CACTI_LISTSRC', 'false'); + setConfigVar ('CACTI_RRA_ID', '1'); +} + +function getCactiGraphsForObject ($object_id) +{ + $result = usePreparedSelectBlade + ( + 'SELECT server_id, graph_id, caption FROM CactiGraph WHERE object_id = ? ORDER BY server_id, graph_id', + array ($object_id) + ); + return reindexById ($result->fetchAll (PDO::FETCH_ASSOC), 'graph_id'); +} + +function getCactiServers () +{ + $result = usePreparedSelectBlade + ( + 'SELECT id, base_url, username, password, COUNT(graph_id) AS num_graphs ' . + 'FROM CactiServer AS CS LEFT JOIN CactiGraph AS CG ON CS.id = CG.server_id GROUP BY id' + ); + return reindexById ($result->fetchAll (PDO::FETCH_ASSOC)); +} + +function renderCactiConfig () +{ + $columns = array + ( + array ('th_text' => 'base URL', 'row_key' => 'base_url'), + array ('th_text' => 'username', 'row_key' => 'username'), + array ('th_text' => 'graph(s)', 'row_key' => 'num_graphs', 'td_class' => 'tdright'), + ); + $servers = getCactiServers (); + startPortlet ('Cacti servers (' . count ($servers) . ')'); + renderTableViewer ($columns, $servers); + finishPortlet (); +} + +function renderCactiServersEditor () +{ + function printNewItemTR () + { + printOpFormIntro ('add'); + echo '' . + '' . getImageHREF ('create', 'add a new server', TRUE) . '' . + '' . + '' . + '' . + ' ' . + '' . getImageHREF ('create', 'add a new server', TRUE) . '' . + ''; + } + echo ''; + echo '' . + '' . + '' . + '' . + '' . + '' . + '' . + ''; + if (getConfigVar ('ADDNEW_AT_TOP') == 'yes') + printNewItemTR (); + foreach (getCactiServers () as $server) + { + printOpFormIntro ('upd', array ('id' => $server['id'])); + echo ''; + echo ''; + echo ''; + echo ''; + echo ""; + echo ''; + echo ''; + } + if (getConfigVar ('ADDNEW_AT_TOP') != 'yes') + printNewItemTR (); + echo '
 base URLusernamepasswordgraph(s) 
'; + if ($server['num_graphs']) + printImageHREF ('nodestroy', 'cannot delete, graphs exist'); + else + echo getOpLink (array ('op' => 'del', 'id' => $server['id']), '', 'destroy', 'delete this server'); + echo '${server['num_graphs']}' . getImageHREF ('save', 'update this server', TRUE) . '
'; +} + +function renderObjectCactiGraphs ($object_id) +{ + function printNewItemTR ($options) + { + echo ""; + echo "\n"; + printOpFormIntro ('add'); + echo ""; + echo "
 ServerGraph IDCaption 
"; + printImageHREF ('Attach', 'Link new graph', TRUE); + echo '' . getSelect ($options, array ('name' => 'server_id')); + echo ""; + printImageHREF ('Attach', 'Link new graph', TRUE); + echo "
"; + echo "

\n"; + } + if (! extension_loaded ('curl')) + throw new RackTablesError ('The PHP cURL extension is not loaded.', RackTablesError::MISCONFIGURED); + + $servers = getCactiServers (); + $options = array (); + foreach ($servers as $server) + $options[$server['id']] = "${server['id']}: ${server['base_url']}"; + startPortlet ('Cacti Graphs'); + if (getConfigVar ('ADDNEW_AT_TOP') == 'yes' && permitted ('object', 'cacti', 'add')) + printNewItemTR ($options); + echo "\n"; + foreach (getCactiGraphsForObject ($object_id) as $graph_id => $graph) + { + $cacti_url = $servers[$graph['server_id']]['base_url']; + $text = "(graph ${graph_id} on server ${graph['server_id']})"; + echo "\n"; + } + echo "
"; + echo ""; + echo "${text}"; + if(permitted ('object', 'cacti', 'del')) + echo getOpLink (array ('op' => 'del', 'server_id' => $graph['server_id'], 'graph_id' => $graph_id), '', 'Cut', 'Unlink graph', 'need-confirmation'); + echo "   ${graph['caption']}"; + echo "
\n"; + if (getConfigVar ('ADDNEW_AT_TOP') != 'yes' && permitted ('object', 'cacti', 'add')) + printNewItemTR ($options); + finishPortlet (); +} + +function proxyCactiRequest ($server_id, $graph_id) +{ + $ret = array (); + $servers = getCactiServers (); + if (! array_key_exists ($server_id, $servers)) + throw new InvalidRequestArgException ('server_id', $server_id); + $cacti_url = $servers[$server_id]['base_url']; + $url = "${cacti_url}/graph_image.php?action=view&local_graph_id=${graph_id}&rra_id=" . getConfigVar ('CACTI_RRA_ID'); + $postvars = 'action=login&login_username=' . $servers[$server_id]['username']; + $postvars .= '&login_password=' . $servers[$server_id]['password']; + + $session = curl_init (); + + // Initial options up here so a specific type can override them + curl_setopt ($session, CURLOPT_FOLLOWLOCATION, FALSE); + curl_setopt ($session, CURLOPT_TIMEOUT, 10); + curl_setopt ($session, CURLOPT_RETURNTRANSFER, TRUE); + curl_setopt ($session, CURLOPT_URL, $url); + + if (isset ($_SESSION['CACTICOOKIE'][$cacti_url])) + curl_setopt ($session, CURLOPT_COOKIE, $_SESSION['CACTICOOKIE'][$cacti_url]); + + // Request the image + $ret['contents'] = curl_exec ($session); + $ret['type'] = curl_getinfo ($session, CURLINFO_CONTENT_TYPE); + $ret['size'] = curl_getinfo ($session, CURLINFO_SIZE_DOWNLOAD); + + // Not an image, probably the login page + if (preg_match ('/^text\/html.*/i', $ret['type'])) + { + // Request to set the cookies + curl_setopt ($session, CURLOPT_HEADER, TRUE); + curl_setopt ($session, CURLOPT_COOKIE, ""); // clear the old cookie + $headers = curl_exec ($session); + + // Get the cookies from the headers + preg_match ('/Set-Cookie: ([^;]*)/i', $headers, $cookies); + array_shift ($cookies); // Remove 'Set-Cookie: ...' value + $cookie_header = implode (";", $cookies); + $_SESSION['CACTICOOKIE'][$cacti_url] = $cookie_header; // store for later use by this user + + // CSRF security in 0.8.8h, regexp version + if (preg_match ("/sid:([a-z0-9,]+)\"/", $ret['contents'], $csf_output)) + if (array_key_exists (1, $csf_output)) + $postvars .= "&__csrf_magic=$csf_output[1]"; + + // POST Login + curl_setopt ($session, CURLOPT_COOKIE, $cookie_header); + curl_setopt ($session, CURLOPT_HEADER, FALSE); + curl_setopt ($session, CURLOPT_POST, TRUE); + curl_setopt ($session, CURLOPT_POSTFIELDS, $postvars); + curl_exec ($session); + + // Request the image + curl_setopt ($session, CURLOPT_HTTPGET, TRUE); + $ret['contents'] = curl_exec ($session); + $ret['type'] = curl_getinfo ($session, CURLINFO_CONTENT_TYPE); + $ret['size'] = curl_getinfo ($session, CURLINFO_SIZE_DOWNLOAD); + } + + curl_close ($session); + + if ($ret['type'] != NULL) + header ("Content-Type: {$ret['type']}"); + if ($ret['size'] > 0) + header ("Content-Length: {$ret['size']}"); + + echo $ret['contents']; +} + +function triggerCactiGraphs () +{ + if (! count (getCactiServers ())) + return ''; + if + ( + count (getCactiGraphsForObject (getBypassValue ())) or + considerConfiguredConstraint (spotEntity ('object', getBypassValue ()), 'CACTI_LISTSRC') + ) + return 'std'; + return ''; +} diff --git a/plugins/munin/plugin.php b/plugins/munin/plugin.php new file mode 100644 index 000000000..b47ffefc9 --- /dev/null +++ b/plugins/munin/plugin.php @@ -0,0 +1,373 @@ + 'munin', + 'longname' => 'Munin', + 'version' => '1.0', + 'home_url' => 'http://www.racktables.org/' + ); +} + +function plugin_munin_init () +{ + global $interface_requires, $opspec_list, $page, $tab, $trigger; + $tab['object']['munin'] = 'Munin Graphs'; + registerTabHandler ('object', 'munin', 'renderObjectMuninGraphs'); + $trigger['object']['munin'] = 'triggerMuninGraphs'; + $ophandler['object']['munin']['add'] = 'tableHandler'; + $ophandler['object']['munin']['del'] = 'tableHandler'; + + $page['munin']['title'] = 'Munin'; + $page['munin']['parent'] = 'config'; + $tab['munin']['default'] = 'View'; + $tab['munin']['servers'] = 'Manage servers'; + registerTabHandler ('munin', 'default', 'renderMuninConfig'); + registerTabHandler ('munin', 'servers', 'renderMuninServersEditor'); + registerOpHandler ('munin', 'servers', 'add', 'tableHandler'); + registerOpHandler ('munin', 'servers', 'del', 'tableHandler'); + registerOpHandler ('munin', 'servers', 'upd', 'tableHandler'); + $interface_requires['munin-*'] = 'interface-config.php'; + + registerHook ('dispatchImageRequest_hook', 'plugin_munin_dispatchImageRequest'); + registerHook ('resetObject_hook', 'plugin_munin_resetObject'); + registerHook ('resetUIConfig_hook', 'plugin_munin_resetUIConfig'); + + $opspec_list['object-munin-add'] = array + ( + 'table' => 'MuninGraph', + 'action' => 'INSERT', + 'arglist' => array + ( + array ('url_argname' => 'object_id', 'assertion' => 'uint'), + array ('url_argname' => 'server_id', 'assertion' => 'uint'), + array ('url_argname' => 'graph', 'assertion' => 'string'), + array ('url_argname' => 'caption', 'assertion' => 'string0'), + ), + ); + $opspec_list['object-munin-del'] = array + ( + 'table' => 'MuninGraph', + 'action' => 'DELETE', + 'arglist' => array + ( + array ('url_argname' => 'object_id', 'assertion' => 'uint'), + array ('url_argname' => 'server_id', 'assertion' => 'uint'), + array ('url_argname' => 'graph', 'assertion' => 'string'), + ), + ); + $opspec_list['munin-servers-add'] = array + ( + 'table' => 'MuninServer', + 'action' => 'INSERT', + 'arglist' => array + ( + array ('url_argname' => 'base_url', 'assertion' => 'string') + ), + ); + $opspec_list['munin-servers-del'] = array + ( + 'table' => 'MuninServer', + 'action' => 'DELETE', + 'arglist' => array + ( + array ('url_argname' => 'id', 'assertion' => 'uint'), + ), + ); + $opspec_list['munin-servers-upd'] = array + ( + 'table' => 'MuninServer', + 'action' => 'UPDATE', + 'set_arglist' => array + ( + array ('url_argname' => 'base_url', 'assertion' => 'string'), + ), + 'where_arglist' => array + ( + array ('url_argname' => 'id', 'assertion' => 'uint'), + ), + ); + + global $plugin_munin_fkeys; + $plugin_munin_fkeys = array ( + array ('fkey_name' => 'MuninGraph-FK-object_id', 'table_name' => 'MuninGraph'), + array ('fkey_name' => 'MuninGraph-FK-server_id', 'table_name' => 'MuninGraph'), + ); +} + +function plugin_munin_install () +{ + if (extension_loaded ('curl') === FALSE) + throw new RackTablesError ('cURL PHP module is not installed', RackTablesError::MISCONFIGURED); + + global $dbxlink; + + $dbxlink->query( +"CREATE TABLE `MuninServer` ( + `id` int(10) unsigned NOT NULL auto_increment, + `base_url` char(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB"); + + $dbxlink->query ( +"CREATE TABLE `MuninGraph` ( + `object_id` int(10) unsigned NOT NULL, + `server_id` int(10) unsigned NOT NULL, + `graph` char(255) NOT NULL, + `caption` char(255) DEFAULT NULL, + PRIMARY KEY (`object_id`,`server_id`,`graph`), + KEY `server_id` (`server_id`), + KEY `graph` (`graph`), + CONSTRAINT `MuninGraph-FK-server_id` FOREIGN KEY (`server_id`) REFERENCES `MuninServer` (`id`), + CONSTRAINT `MuninGraph-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB"); + + addConfigVar ('MUNIN_LISTSRC', 'false', 'string', 'yes', 'no', 'no', 'List of object with Munin graphs'); + + return TRUE; +} + +function plugin_munin_uninstall () +{ + deleteConfigVar ('MUNIN_LISTSRC'); + + global $dbxlink; + $dbxlink->query ("DROP TABLE `MuninGraph`"); + $dbxlink->query ("DROP TABLE `MuninServer`"); + + return TRUE; +} + +function plugin_munin_upgrade () +{ + return TRUE; +} + +function plugin_munin_dispatchImageRequest () +{ + global $pageno, $tabno; + + if ($_REQUEST['img'] == 'muningraph') + { + $pageno = 'object'; + $tabno = 'munin'; + fixContext (); + assertPermission (); + $graph = genericAssertion ('graph', 'string'); + if (! array_key_exists ($graph, getMuninGraphsForObject (getBypassValue()))) + throw new InvalidRequestArgException ('graph', $graph); + proxyMuninRequest (genericAssertion ('server_id', 'uint'), $graph); + } + return TRUE; +} + +function plugin_munin_resetObject ($object_id) +{ + usePreparedDeleteBlade ('MuninGraph', array ('object_id' => $object_id)); +} + +function plugin_munin_resetUIConfig () +{ + setConfigVar ('MUNIN_LISTSRC', 'false'); +} + +function getMuninGraphsForObject ($object_id) +{ + $result = usePreparedSelectBlade + ( + 'SELECT server_id, graph, caption FROM MuninGraph WHERE object_id = ? ORDER BY server_id, graph', + array ($object_id) + ); + return reindexById ($result->fetchAll (PDO::FETCH_ASSOC), 'graph'); +} + +// Split object's FQDN (or the common name if FQDN is not set) into the +// hostname and domain name in Munin convention (using the first period as the +// separator), and return the pair. Throw an exception on error. +function getMuninNameAndDomain ($object_id) +{ + $o = spotEntity ('object', $object_id); + $hd = $o['name']; + // FQDN overrides the common name for Munin purposes. + $attrs = getAttrValues ($object_id); + if (array_key_exists (3, $attrs) && $attrs[3]['value'] != '') + $hd = $attrs[3]['value']; + if (2 != count ($ret = preg_split ('/\./', $hd, 2))) + throw new InvalidArgException ('$object_id', $object_id, 'the name is not in the host.do.ma.in format'); + return $ret; +} + +function getMuninServers () +{ + $result = usePreparedSelectBlade + ( + 'SELECT id, base_url, COUNT(MG.object_id) AS num_graphs ' . + 'FROM MuninServer AS MS LEFT JOIN MuninGraph AS MG ON MS.id = MG.server_id GROUP BY id' + ); + return reindexById ($result->fetchAll (PDO::FETCH_ASSOC)); +} + +function renderMuninConfig () +{ + $columns = array + ( + array ('th_text' => 'base URL', 'row_key' => 'base_url', 'td_maxlen' => 150), + array ('th_text' => 'graph(s)', 'row_key' => 'num_graphs', 'td_class' => 'tdright'), + ); + $servers = getMuninServers (); + startPortlet ('Munin servers (' . count ($servers) . ')'); + renderTableViewer ($columns, $servers); + finishPortlet (); +} + +function renderMuninServersEditor () +{ + function printNewItemTR () + { + printOpFormIntro ('add'); + echo ''; + echo '' . getImageHREF ('create', 'add a new server', TRUE) . ''; + echo ''; + echo ' '; + echo '' . getImageHREF ('create', 'add a new server', TRUE) . ''; + echo ''; + } + echo ''; + echo ''; + if (getConfigVar ('ADDNEW_AT_TOP') == 'yes') + printNewItemTR (); + foreach (getMuninServers () as $server) + { + printOpFormIntro ('upd', array ('id' => $server['id'])); + echo ''; + echo ''; + echo ""; + echo ''; + echo ''; + } + if (getConfigVar ('ADDNEW_AT_TOP') != 'yes') + printNewItemTR (); + echo '
 base URLgraph(s) 
'; + if ($server['num_graphs']) + printImageHREF ('nodestroy', 'cannot delete, graphs exist'); + else + echo getOpLink (array ('op' => 'del', 'id' => $server['id']), '', 'destroy', 'delete this server'); + echo '${server['num_graphs']}' . getImageHREF ('save', 'update this server', TRUE) . '
'; +} + +function renderObjectMuninGraphs ($object_id) +{ + function printNewItem ($options) + { + echo ""; + echo "\n"; + printOpFormIntro ('add'); + echo ""; + echo "
 ServerGraphCaption 
"; + printImageHREF ('Attach', 'Link new graph', TRUE); + echo '' . getSelect ($options, array ('name' => 'server_id')); + echo ""; + printImageHREF ('Attach', 'Link new graph', TRUE); + echo "
"; + echo "

\n"; + } + if (! extension_loaded ('curl')) + { + showError ('The PHP cURL extension is not loaded.'); + return; + } + try + { + list ($host, $domain) = getMuninNameAndDomain ($object_id); + } + catch (InvalidArgException $e) + { + showError ('This object does not have the FQDN or the common name in the host.do.ma.in format.'); + return; + } + + $servers = getMuninServers (); + $options = array (); + foreach ($servers as $server) + $options[$server['id']] = "${server['id']}: ${server['base_url']}"; + startPortlet ('Munin Graphs'); + if (getConfigVar ('ADDNEW_AT_TOP') == 'yes') + printNewItem ($options); + echo "\n"; + + foreach (getMuninGraphsForObject ($object_id) as $graph_name => $graph) + { + $munin_url = $servers[$graph['server_id']]['base_url']; + $text = "(graph ${graph_name} on server ${graph['server_id']})"; + echo ""; + echo "\n"; + } + echo "
"; + echo ""; + echo "${text}"; + echo getOpLink (array ('op' => 'del', 'server_id' => $graph['server_id'], 'graph' => $graph_name), '', 'Cut', 'Unlink graph', 'need-confirmation'); + echo "   ${graph['caption']}"; + echo "
\n"; + if (getConfigVar ('ADDNEW_AT_TOP') != 'yes') + printNewItem ($options); + finishPortlet (); +} + +function proxyMuninRequest ($server_id, $graph) +{ + try + { + list ($host, $domain) = getMuninNameAndDomain (getBypassValue ()); + } + catch (InvalidArgException $e) + { + throw new RTImageError ('munin_graph'); + } + + $ret = array (); + $servers = getMuninServers (); + if (! array_key_exists ($server_id, $servers)) + throw new InvalidRequestArgException ('server_id', $server_id); + $munin_url = $servers[$server_id]['base_url']; + $url = "${munin_url}/${domain}/${host}.${domain}/${graph}-day.png"; + + $session = curl_init (); + + // Initial options up here so a specific type can override them + curl_setopt ($session, CURLOPT_FOLLOWLOCATION, FALSE); + curl_setopt ($session, CURLOPT_TIMEOUT, 10); + curl_setopt ($session, CURLOPT_RETURNTRANSFER, TRUE); + curl_setopt ($session, CURLOPT_URL, $url); + + if (isset($_SESSION['MUNINCOOKIE'][$munin_url])) + curl_setopt ($session, CURLOPT_COOKIE, $_SESSION['MUNINCOOKIE'][$munin_url]); + + // Request the image + $ret['contents'] = curl_exec ($session); + $ret['type'] = curl_getinfo ($session, CURLINFO_CONTENT_TYPE); + $ret['size'] = curl_getinfo ($session, CURLINFO_SIZE_DOWNLOAD); + + curl_close ($session); + + if ($ret['type'] != NULL) + header ("Content-Type: {$ret['type']}"); + if ($ret['size'] > 0) + header ("Content-Length: {$ret['size']}"); + + echo $ret['contents']; +} + +function triggerMuninGraphs() +{ + if (! count (getMuninServers ())) + return ''; + if + ( + count (getMuninGraphsForObject (getBypassValue ())) or + considerConfiguredConstraint (spotEntity ('object', getBypassValue ()), 'MUNIN_LISTSRC') + ) + return 'std'; + return ''; +} diff --git a/scripts/cleanup_ldap_cache.php b/scripts/cleanup_ldap_cache.php index 77b31daf6..cacca66ba 100755 --- a/scripts/cleanup_ldap_cache.php +++ b/scripts/cleanup_ldap_cache.php @@ -19,5 +19,3 @@ constructLDAPOptions(); discardLDAPCache ($LDAP_options['cache_expiry']); } - -?> diff --git a/scripts/init-sample-racks.sql b/scripts/init-sample-racks.sql index bc551c940..79dd93100 100644 --- a/scripts/init-sample-racks.sql +++ b/scripts/init-sample-racks.sql @@ -1023,10 +1023,10 @@ INSERT INTO `PortInterfaceCompat` (`iif_id`, `oif_id`) VALUES (1,32); INSERT INTO `Port` (`id`, `object_id`, `name`, `iif_id`, `type`, `l2address`, `reservation_comment`, `label`) VALUES -(3057,905,'se1/0',1,32,NULL,NULL,''), -(3058,905,'se1/1',1,32,NULL,NULL,''), -(3059,905,'fa2/0',1,19,'00000000A001',NULL,''), -(3060,905,'fa2/1',1,19,'00000000A002','ISP uplink',''), +(3057,905,'se1/0',1,32,NULL,NULL,NULL), +(3058,905,'se1/1',1,32,NULL,NULL,NULL), +(3059,905,'fa2/0',1,19,'00000000A001',NULL,NULL), +(3060,905,'fa2/1',1,19,'00000000A002','ISP uplink',NULL), (3063,906,'gi1',1,24,'00000000B001',NULL,'1'), (3062,906,'gi2',1,24,'00000000B002',NULL,'2'), (3064,906,'gi3',1,24,'00000000B003',NULL,'3'), @@ -1035,8 +1035,8 @@ INSERT INTO `Port` (`id`, `object_id`, `name`, `iif_id`, `type`, `l2address`, `r (3067,906,'gi6',1,24,'00000000B006',NULL,'6'), (3068,906,'gi7',1,24,'00000000B007',NULL,'7'), (3069,906,'gi8',1,24,'00000000B008',NULL,'8'), -(3070,907,'se1/0',1,32,NULL,NULL,''), -(3071,907,'se1/1',1,32,NULL,NULL,''), +(3070,907,'se1/0',1,32,NULL,NULL,NULL), +(3071,907,'se1/1',1,32,NULL,NULL,NULL), (3072,915,'e1',1,19,NULL,NULL,'1'), (3073,915,'e2',1,19,NULL,NULL,'2'), (3074,915,'e3',1,19,NULL,NULL,'3'), @@ -1047,10 +1047,10 @@ INSERT INTO `Port` (`id`, `object_id`, `name`, `iif_id`, `type`, `l2address`, `r (3079,915,'e8',1,19,NULL,NULL,'8'), (3080,910,'eth0',1,24,NULL,NULL,'1'), (3081,910,'eth1',1,24,NULL,NULL,'2'), -(3082,909,'se1/0',1,32,NULL,NULL,''), -(3083,909,'se1/1',1,32,NULL,NULL,''), -(3084,908,'se1/0',1,32,NULL,NULL,''), -(3085,908,'se1/1',1,32,NULL,NULL,''), +(3082,909,'se1/0',1,32,NULL,NULL,NULL), +(3083,909,'se1/1',1,32,NULL,NULL,NULL), +(3084,908,'se1/0',1,32,NULL,NULL,NULL), +(3085,908,'se1/1',1,32,NULL,NULL,NULL), (3086,911,'eth0',1,24,NULL,NULL,'1'), (3087,911,'eth1',1,24,NULL,NULL,'2'), (3088,912,'eth0',1,24,NULL,NULL,'1'), @@ -1059,13 +1059,13 @@ INSERT INTO `Port` (`id`, `object_id`, `name`, `iif_id`, `type`, `l2address`, `r (3091,913,'eth1',1,24,NULL,NULL,'2'), (3092,914,'eth0',1,24,NULL,NULL,'1'), (3093,914,'eth1',1,24,NULL,NULL,'2'), -(3094,917,'fa0/0',1,19,NULL,NULL,''), -(3095,919,'bge0',1,24,NULL,NULL,''), -(3096,919,'bge1',1,24,NULL,NULL,''), -(3097,918,'bge0',1,24,NULL,NULL,''), -(3098,918,'bge1',1,24,NULL,NULL,''), -(3099,909,'fa2/0',1,19,NULL,NULL,''), -(3100,909,'fa2/1',1,19,NULL,'ISP uplink',''), +(3094,917,'fa0/0',1,19,NULL,NULL,NULL), +(3095,919,'bge0',1,24,NULL,NULL,NULL), +(3096,919,'bge1',1,24,NULL,NULL,NULL), +(3097,918,'bge0',1,24,NULL,NULL,NULL), +(3098,918,'bge1',1,24,NULL,NULL,NULL), +(3099,909,'fa2/0',1,19,NULL,NULL,NULL), +(3100,909,'fa2/1',1,19,NULL,'ISP uplink',NULL), (3101,926,'fa1',1,19,NULL,NULL,'1'), (3102,926,'fa2',1,19,NULL,NULL,'2'), (3103,926,'fa3',1,19,NULL,NULL,'3'), @@ -1084,156 +1084,156 @@ INSERT INTO `Port` (`id`, `object_id`, `name`, `iif_id`, `type`, `l2address`, `r (3116,924,'eth1',1,24,NULL,NULL,'2'), (3117,925,'eth0',1,24,NULL,NULL,'1'), (3118,925,'eth1',1,24,NULL,NULL,'2'), -(3119,908,'fa2/0',1,19,NULL,NULL,''), -(3120,908,'fa2/1',1,19,NULL,'ISP uplink',''), -(3121,907,'fa2/0',1,19,NULL,NULL,''), -(3122,907,'fa2/1',1,19,NULL,NULL,''), -(3123,927,'gi3/0',3,1202,NULL,'ISP uplink',''), -(3124,927,'gi4/0',3,1202,NULL,NULL,''), -(3125,907,'gi3/0',3,1202,NULL,'ISP uplink',''), -(3126,907,'gi4/0',3,1202,NULL,NULL,''), -(3127,956,'kvm',1,33,NULL,NULL,''), -(3128,956,'eth0',1,24,NULL,NULL,''), -(3129,956,'eth1',1,24,NULL,NULL,''), -(3130,957,'kvm',1,33,NULL,NULL,''), -(3131,957,'eth0',1,24,NULL,NULL,''), -(3132,957,'eth1',1,24,NULL,NULL,''), -(3133,958,'kvm',1,33,NULL,NULL,''), -(3134,958,'eth0',1,24,NULL,NULL,''), -(3135,958,'eth1',1,24,NULL,NULL,''), -(3136,959,'kvm',1,33,NULL,NULL,''), -(3137,959,'eth0',1,24,NULL,NULL,''), -(3138,959,'eth1',1,24,NULL,NULL,''), -(3139,960,'kvm',1,33,NULL,NULL,''), -(3140,960,'eth0',1,24,NULL,NULL,''), -(3141,960,'eth1',1,24,NULL,NULL,''), +(3119,908,'fa2/0',1,19,NULL,NULL,NULL), +(3120,908,'fa2/1',1,19,NULL,'ISP uplink',NULL), +(3121,907,'fa2/0',1,19,NULL,NULL,NULL), +(3122,907,'fa2/1',1,19,NULL,NULL,NULL), +(3123,927,'gi3/0',3,1202,NULL,'ISP uplink',NULL), +(3124,927,'gi4/0',3,1202,NULL,NULL,NULL), +(3125,907,'gi3/0',3,1202,NULL,'ISP uplink',NULL), +(3126,907,'gi4/0',3,1202,NULL,NULL,NULL), +(3127,956,'kvm',1,33,NULL,NULL,NULL), +(3128,956,'eth0',1,24,NULL,NULL,NULL), +(3129,956,'eth1',1,24,NULL,NULL,NULL), +(3130,957,'kvm',1,33,NULL,NULL,NULL), +(3131,957,'eth0',1,24,NULL,NULL,NULL), +(3132,957,'eth1',1,24,NULL,NULL,NULL), +(3133,958,'kvm',1,33,NULL,NULL,NULL), +(3134,958,'eth0',1,24,NULL,NULL,NULL), +(3135,958,'eth1',1,24,NULL,NULL,NULL), +(3136,959,'kvm',1,33,NULL,NULL,NULL), +(3137,959,'eth0',1,24,NULL,NULL,NULL), +(3138,959,'eth1',1,24,NULL,NULL,NULL), +(3139,960,'kvm',1,33,NULL,NULL,NULL), +(3140,960,'eth0',1,24,NULL,NULL,NULL), +(3141,960,'eth1',1,24,NULL,NULL,NULL), (3142,908,'con0',1,29,NULL,NULL,'console'), -(3143,961,'1',1,24,'01040104AA00',NULL,''), -(3144,961,'2',1,24,'01040104AA01','for field engineer',''), -(3145,961,'3',1,24,'01040104AA02',NULL,''), -(3146,961,'4',1,24,'01040104AA03',NULL,''), -(3147,961,'5',1,24,'01040104AA04',NULL,''), -(3148,961,'6',1,24,'01040104AA05',NULL,''), -(3149,961,'7',1,24,'01040104AA06',NULL,''), -(3150,961,'8',1,24,'01040104AA07',NULL,''), -(3151,961,'9',1,24,'01040104AA08',NULL,''), -(3152,961,'10',1,24,'01040104AA09',NULL,''), -(3153,961,'11',1,24,'01040104AA0A',NULL,''), -(3154,961,'12',1,24,'01040104AA0B',NULL,''), -(3155,961,'13',1,24,'01040104AA0C',NULL,''), -(3156,961,'14',1,24,'01040104AA0D',NULL,''), -(3157,961,'15',1,24,'01040104AA0E',NULL,''), -(3158,961,'16',1,24,'01040104AA0F',NULL,''), +(3143,961,'1',1,24,'01040104AA00',NULL,NULL), +(3144,961,'2',1,24,'01040104AA01','for field engineer',NULL), +(3145,961,'3',1,24,'01040104AA02',NULL,NULL), +(3146,961,'4',1,24,'01040104AA03',NULL,NULL), +(3147,961,'5',1,24,'01040104AA04',NULL,NULL), +(3148,961,'6',1,24,'01040104AA05',NULL,NULL), +(3149,961,'7',1,24,'01040104AA06',NULL,NULL), +(3150,961,'8',1,24,'01040104AA07',NULL,NULL), +(3151,961,'9',1,24,'01040104AA08',NULL,NULL), +(3152,961,'10',1,24,'01040104AA09',NULL,NULL), +(3153,961,'11',1,24,'01040104AA0A',NULL,NULL), +(3154,961,'12',1,24,'01040104AA0B',NULL,NULL), +(3155,961,'13',1,24,'01040104AA0C',NULL,NULL), +(3156,961,'14',1,24,'01040104AA0D',NULL,NULL), +(3157,961,'15',1,24,'01040104AA0E',NULL,NULL), +(3158,961,'16',1,24,'01040104AA0F',NULL,NULL), (3159,961,'con',1,681,NULL,NULL,'console'), (3160,956,'ttyS0',1,681,NULL,NULL,'serial A'), (3161,956,'ttyS1',1,681,NULL,NULL,'serial B'), -(3162,962,'tail1',1,446,NULL,NULL,''), -(3163,962,'tail2',1,446,NULL,NULL,''), -(3164,962,'tail3',1,446,NULL,NULL,''), -(3165,962,'tail4',1,446,NULL,NULL,''), -(3166,962,'tail5',1,446,NULL,NULL,''), -(3167,962,'tail6',1,446,NULL,NULL,''), -(3168,962,'tail7',1,446,NULL,NULL,''), -(3169,962,'tail8',1,446,NULL,NULL,''), -(3170,962,'head',1,33,NULL,'monitor connected',''), -(3171,962,'net',1,19,'020002003333',NULL,''), -(3178,927,'fa1/0',1,19,NULL,NULL,''), -(3179,908,'fa1/0',1,19,NULL,NULL,''), -(3180,955,'in',1,16,NULL,'from local distribution',''), -(3181,955,'out1',1,1322,NULL,NULL,''), -(3182,955,'out2',1,1322,NULL,NULL,''), -(3183,955,'out3',1,1322,NULL,NULL,''), -(3184,955,'out4',1,1322,NULL,NULL,''), -(3185,955,'out5',1,1322,NULL,NULL,''), -(3186,923,'ps',1,16,NULL,NULL,''), -(3187,924,'ps',1,16,NULL,NULL,''), -(3188,925,'ps',1,16,NULL,NULL,''), -(3189,926,'ps',1,16,NULL,NULL,''), -(3190,909,'ps',1,16,NULL,NULL,''), -(3191,979,'gi0/1',1,24,NULL,NULL,''), -(3192,979,'gi0/2',1,24,NULL,NULL,''), -(3193,979,'gi0/3',1,24,NULL,NULL,''), -(3194,979,'gi0/4',1,24,NULL,NULL,''), -(3195,979,'gi0/5',1,24,NULL,NULL,''), -(3196,979,'gi0/6',1,24,NULL,NULL,''), -(3197,979,'gi0/7',1,24,NULL,NULL,''), -(3198,979,'gi0/8',1,24,NULL,NULL,''), -(3199,979,'gi0/9',1,24,NULL,NULL,''), -(3200,979,'gi0/10',1,24,NULL,NULL,''), -(3201,979,'gi0/11',1,24,NULL,NULL,''), -(3202,979,'gi0/12',1,24,NULL,NULL,''), -(3203,979,'gi0/13',1,24,NULL,NULL,''), -(3204,979,'gi0/14',1,24,NULL,NULL,''), -(3205,979,'gi0/15',1,24,NULL,NULL,''), -(3206,979,'gi0/16',1,24,NULL,NULL,''), -(3207,979,'gi0/17',1,24,NULL,NULL,''), -(3208,979,'gi0/18',1,24,NULL,NULL,''), -(3209,979,'gi0/19',1,24,NULL,NULL,''), -(3210,979,'gi0/20',1,24,NULL,NULL,''), -(3211,979,'gi0/21',1,24,NULL,NULL,''), -(3212,979,'gi0/22',1,24,NULL,NULL,''), -(3213,979,'gi0/23',1,24,NULL,NULL,''), -(3214,979,'gi0/24',1,24,NULL,NULL,''), -(3215,980,'gi0/0/1',1,24,NULL,NULL,''), -(3216,980,'gi0/0/2',1,24,NULL,NULL,''), -(3217,980,'gi0/0/3',1,24,NULL,NULL,''), -(3218,980,'gi0/0/4',1,24,NULL,NULL,''), -(3219,980,'gi0/0/5',1,24,NULL,NULL,''), -(3220,980,'gi0/0/6',1,24,NULL,NULL,''), -(3221,980,'gi0/0/7',1,24,NULL,NULL,''), -(3222,980,'gi0/0/8',1,24,NULL,NULL,''), -(3223,980,'gi0/0/9',1,24,NULL,NULL,''), -(3224,980,'gi0/0/10',1,24,NULL,NULL,''), -(3225,980,'gi0/0/11',1,24,NULL,NULL,''), -(3226,980,'gi0/0/12',1,24,NULL,NULL,''), -(3227,980,'gi0/0/13',1,24,NULL,NULL,''), -(3228,980,'gi0/0/14',1,24,NULL,NULL,''), -(3229,980,'gi0/0/15',1,24,NULL,NULL,''), -(3230,980,'gi0/0/16',1,24,NULL,NULL,''), -(3231,980,'gi0/0/17',1,24,NULL,NULL,''), -(3232,980,'gi0/0/18',1,24,NULL,NULL,''), -(3233,980,'gi0/0/19',1,24,NULL,NULL,''), -(3234,980,'gi0/0/20',1,24,NULL,NULL,''), -(3235,980,'gi0/0/21',1,24,NULL,NULL,''), -(3236,980,'gi0/0/22',1,24,NULL,NULL,''), -(3237,980,'gi0/0/23',1,24,NULL,NULL,''), -(3238,980,'gi0/0/24',1,24,NULL,NULL,''), -(3239,980,'gi0/0/25',1,24,NULL,NULL,''), -(3240,980,'gi0/0/26',1,24,NULL,NULL,''), -(3241,980,'gi0/0/27',1,24,NULL,NULL,''), -(3242,980,'gi0/0/28',1,24,NULL,NULL,''), -(3243,980,'gi0/0/29',1,24,NULL,NULL,''), -(3244,980,'gi0/0/30',1,24,NULL,NULL,''), -(3245,980,'gi0/0/31',1,24,NULL,NULL,''), -(3246,980,'gi0/0/32',1,24,NULL,NULL,''), -(3247,980,'gi0/0/33',1,24,NULL,NULL,''), -(3248,980,'gi0/0/34',1,24,NULL,NULL,''), -(3249,980,'gi0/0/35',1,24,NULL,NULL,''), -(3250,980,'gi0/0/36',1,24,NULL,NULL,''), -(3251,980,'gi0/0/37',1,24,NULL,NULL,''), -(3252,980,'gi0/0/38',1,24,NULL,NULL,''), -(3253,980,'gi0/0/39',1,24,NULL,NULL,''), -(3254,980,'gi0/0/40',1,24,NULL,NULL,''), -(3255,980,'gi0/0/41',1,24,NULL,NULL,''), -(3256,980,'gi0/0/42',1,24,NULL,NULL,''), -(3257,980,'gi0/0/43',1,24,NULL,NULL,''), -(3258,980,'gi0/0/44',1,24,NULL,NULL,''), -(3259,980,'gi0/0/45',1,24,NULL,NULL,''), -(3260,980,'gi0/0/46',1,24,NULL,NULL,''), -(3261,980,'gi0/0/47',1,24,NULL,NULL,''), -(3262,980,'gi0/0/48',1,24,NULL,NULL,''), -(3263,981,'gi0/1',1,24,NULL,NULL,''), -(3264,981,'gi0/2',1,24,NULL,NULL,''), -(3265,981,'gi0/3',1,24,NULL,NULL,''), -(3266,981,'gi0/4',1,24,NULL,NULL,''), -(3267,981,'gi0/5',1,24,NULL,NULL,''), -(3268,981,'gi0/6',1,24,NULL,NULL,''), -(3269,981,'gi0/7',1,24,NULL,NULL,''), -(3270,981,'gi0/8',1,24,NULL,NULL,''), -(3271,981,'gi0/9',1,24,NULL,NULL,''), -(3272,981,'gi0/10',1,24,NULL,NULL,''), -(3273,981,'gi0/11',1,24,NULL,NULL,''), -(3274,981,'gi0/12',1,24,NULL,NULL,''); +(3162,962,'tail1',1,446,NULL,NULL,NULL), +(3163,962,'tail2',1,446,NULL,NULL,NULL), +(3164,962,'tail3',1,446,NULL,NULL,NULL), +(3165,962,'tail4',1,446,NULL,NULL,NULL), +(3166,962,'tail5',1,446,NULL,NULL,NULL), +(3167,962,'tail6',1,446,NULL,NULL,NULL), +(3168,962,'tail7',1,446,NULL,NULL,NULL), +(3169,962,'tail8',1,446,NULL,NULL,NULL), +(3170,962,'head',1,33,NULL,'monitor connected',NULL), +(3171,962,'net',1,19,'020002003333',NULL,NULL), +(3178,927,'fa1/0',1,19,NULL,NULL,NULL), +(3179,908,'fa1/0',1,19,NULL,NULL,NULL), +(3180,955,'in',1,16,NULL,'from local distribution',NULL), +(3181,955,'out1',1,1322,NULL,NULL,NULL), +(3182,955,'out2',1,1322,NULL,NULL,NULL), +(3183,955,'out3',1,1322,NULL,NULL,NULL), +(3184,955,'out4',1,1322,NULL,NULL,NULL), +(3185,955,'out5',1,1322,NULL,NULL,NULL), +(3186,923,'ps',1,16,NULL,NULL,NULL), +(3187,924,'ps',1,16,NULL,NULL,NULL), +(3188,925,'ps',1,16,NULL,NULL,NULL), +(3189,926,'ps',1,16,NULL,NULL,NULL), +(3190,909,'ps',1,16,NULL,NULL,NULL), +(3191,979,'gi0/1',1,24,NULL,NULL,NULL), +(3192,979,'gi0/2',1,24,NULL,NULL,NULL), +(3193,979,'gi0/3',1,24,NULL,NULL,NULL), +(3194,979,'gi0/4',1,24,NULL,NULL,NULL), +(3195,979,'gi0/5',1,24,NULL,NULL,NULL), +(3196,979,'gi0/6',1,24,NULL,NULL,NULL), +(3197,979,'gi0/7',1,24,NULL,NULL,NULL), +(3198,979,'gi0/8',1,24,NULL,NULL,NULL), +(3199,979,'gi0/9',1,24,NULL,NULL,NULL), +(3200,979,'gi0/10',1,24,NULL,NULL,NULL), +(3201,979,'gi0/11',1,24,NULL,NULL,NULL), +(3202,979,'gi0/12',1,24,NULL,NULL,NULL), +(3203,979,'gi0/13',1,24,NULL,NULL,NULL), +(3204,979,'gi0/14',1,24,NULL,NULL,NULL), +(3205,979,'gi0/15',1,24,NULL,NULL,NULL), +(3206,979,'gi0/16',1,24,NULL,NULL,NULL), +(3207,979,'gi0/17',1,24,NULL,NULL,NULL), +(3208,979,'gi0/18',1,24,NULL,NULL,NULL), +(3209,979,'gi0/19',1,24,NULL,NULL,NULL), +(3210,979,'gi0/20',1,24,NULL,NULL,NULL), +(3211,979,'gi0/21',1,24,NULL,NULL,NULL), +(3212,979,'gi0/22',1,24,NULL,NULL,NULL), +(3213,979,'gi0/23',1,24,NULL,NULL,NULL), +(3214,979,'gi0/24',1,24,NULL,NULL,NULL), +(3215,980,'gi0/0/1',1,24,NULL,NULL,NULL), +(3216,980,'gi0/0/2',1,24,NULL,NULL,NULL), +(3217,980,'gi0/0/3',1,24,NULL,NULL,NULL), +(3218,980,'gi0/0/4',1,24,NULL,NULL,NULL), +(3219,980,'gi0/0/5',1,24,NULL,NULL,NULL), +(3220,980,'gi0/0/6',1,24,NULL,NULL,NULL), +(3221,980,'gi0/0/7',1,24,NULL,NULL,NULL), +(3222,980,'gi0/0/8',1,24,NULL,NULL,NULL), +(3223,980,'gi0/0/9',1,24,NULL,NULL,NULL), +(3224,980,'gi0/0/10',1,24,NULL,NULL,NULL), +(3225,980,'gi0/0/11',1,24,NULL,NULL,NULL), +(3226,980,'gi0/0/12',1,24,NULL,NULL,NULL), +(3227,980,'gi0/0/13',1,24,NULL,NULL,NULL), +(3228,980,'gi0/0/14',1,24,NULL,NULL,NULL), +(3229,980,'gi0/0/15',1,24,NULL,NULL,NULL), +(3230,980,'gi0/0/16',1,24,NULL,NULL,NULL), +(3231,980,'gi0/0/17',1,24,NULL,NULL,NULL), +(3232,980,'gi0/0/18',1,24,NULL,NULL,NULL), +(3233,980,'gi0/0/19',1,24,NULL,NULL,NULL), +(3234,980,'gi0/0/20',1,24,NULL,NULL,NULL), +(3235,980,'gi0/0/21',1,24,NULL,NULL,NULL), +(3236,980,'gi0/0/22',1,24,NULL,NULL,NULL), +(3237,980,'gi0/0/23',1,24,NULL,NULL,NULL), +(3238,980,'gi0/0/24',1,24,NULL,NULL,NULL), +(3239,980,'gi0/0/25',1,24,NULL,NULL,NULL), +(3240,980,'gi0/0/26',1,24,NULL,NULL,NULL), +(3241,980,'gi0/0/27',1,24,NULL,NULL,NULL), +(3242,980,'gi0/0/28',1,24,NULL,NULL,NULL), +(3243,980,'gi0/0/29',1,24,NULL,NULL,NULL), +(3244,980,'gi0/0/30',1,24,NULL,NULL,NULL), +(3245,980,'gi0/0/31',1,24,NULL,NULL,NULL), +(3246,980,'gi0/0/32',1,24,NULL,NULL,NULL), +(3247,980,'gi0/0/33',1,24,NULL,NULL,NULL), +(3248,980,'gi0/0/34',1,24,NULL,NULL,NULL), +(3249,980,'gi0/0/35',1,24,NULL,NULL,NULL), +(3250,980,'gi0/0/36',1,24,NULL,NULL,NULL), +(3251,980,'gi0/0/37',1,24,NULL,NULL,NULL), +(3252,980,'gi0/0/38',1,24,NULL,NULL,NULL), +(3253,980,'gi0/0/39',1,24,NULL,NULL,NULL), +(3254,980,'gi0/0/40',1,24,NULL,NULL,NULL), +(3255,980,'gi0/0/41',1,24,NULL,NULL,NULL), +(3256,980,'gi0/0/42',1,24,NULL,NULL,NULL), +(3257,980,'gi0/0/43',1,24,NULL,NULL,NULL), +(3258,980,'gi0/0/44',1,24,NULL,NULL,NULL), +(3259,980,'gi0/0/45',1,24,NULL,NULL,NULL), +(3260,980,'gi0/0/46',1,24,NULL,NULL,NULL), +(3261,980,'gi0/0/47',1,24,NULL,NULL,NULL), +(3262,980,'gi0/0/48',1,24,NULL,NULL,NULL), +(3263,981,'gi0/1',1,24,NULL,NULL,NULL), +(3264,981,'gi0/2',1,24,NULL,NULL,NULL), +(3265,981,'gi0/3',1,24,NULL,NULL,NULL), +(3266,981,'gi0/4',1,24,NULL,NULL,NULL), +(3267,981,'gi0/5',1,24,NULL,NULL,NULL), +(3268,981,'gi0/6',1,24,NULL,NULL,NULL), +(3269,981,'gi0/7',1,24,NULL,NULL,NULL), +(3270,981,'gi0/8',1,24,NULL,NULL,NULL), +(3271,981,'gi0/9',1,24,NULL,NULL,NULL), +(3272,981,'gi0/10',1,24,NULL,NULL,NULL), +(3273,981,'gi0/11',1,24,NULL,NULL,NULL), +(3274,981,'gi0/12',1,24,NULL,NULL,NULL); INSERT INTO `Link` (`porta`, `portb`) VALUES (3057,3071), diff --git a/scripts/syncdomain.php b/scripts/syncdomain.php index b4a8cb494..221d0006d 100755 --- a/scripts/syncdomain.php +++ b/scripts/syncdomain.php @@ -200,4 +200,3 @@ function print_message_line($text, $flags = 0) } } exit (0); -?> diff --git a/tests/ConfigVarTest.php b/tests/ConfigVarTest.php index c198012bb..37276e296 100644 --- a/tests/ConfigVarTest.php +++ b/tests/ConfigVarTest.php @@ -1,12 +1,12 @@ varname = sprintf ('testvar-%s-%u', get_class(), getmypid()); + $this->varname = $this->myString ('testvar'); usePreparedInsertBlade ( 'Config', @@ -153,5 +153,3 @@ public function providerIAE1 () ); } } - -?> diff --git a/tests/DBMutexTest.php b/tests/DBMutexTest.php index b356d18e7..5b7700fdf 100644 --- a/tests/DBMutexTest.php +++ b/tests/DBMutexTest.php @@ -1,13 +1,13 @@ myString ('mutex1'); $this->assertSame (TRUE, setDBMutex ($name)); $this->assertSame (TRUE, releaseDBMutex ($name)); } @@ -17,8 +17,6 @@ public function testExisting () */ public function testNonExisting () { - $this->assertSame (FALSE, releaseDBMutex (get_class() . getmypid())); + $this->assertSame (FALSE, releaseDBMutex ($this->myString ('mutex2'))); } } - -?> diff --git a/tests/DictionaryAttributeTest.php b/tests/DictionaryAttributeTest.php index 75dd2fd92..c2433bb99 100644 --- a/tests/DictionaryAttributeTest.php +++ b/tests/DictionaryAttributeTest.php @@ -1,6 +1,6 @@ attr_types = array(); foreach (array ('string', 'uint', 'float', 'dict', 'date') as $attr_type) { - usePreparedInsertBlade ('Attribute', array ('type' => $attr_type, 'name' => "${attr_type}_${sig}")); + usePreparedInsertBlade ('Attribute', array ('type' => $attr_type, 'name' => $this->myString ($attr_type))); $this->attr_types[lastInsertID()] = $attr_type; } - usePreparedInsertBlade ('Chapter', array ('name' => $sig)); + usePreparedInsertBlade ('Chapter', array ('name' => $this->myString ('chapter'))); $this->new_chapter_id = lastInsertId(); $this->new_word_ids = array(); foreach (array ('A', 'B', 'C', 'D', 'E') as $word) { - usePreparedInsertBlade ('Dictionary', array ('chapter_id' => $this->new_chapter_id, 'dict_value' => "${word} ${sig}")); + usePreparedInsertBlade ('Dictionary', array ('chapter_id' => $this->new_chapter_id, 'dict_value' => $this->myString ($word))); $this->new_word_ids[$word] = lastInsertId(); } $this->new_object_types = array(); foreach (array ('none', 'obj', 'map', 'obj_map', 'obj_map_val') as $code) { - usePreparedInsertBlade ('Dictionary', array ('chapter_id' => CHAP_OBJTYPE, 'dict_value' => "${code} ${sig}")); + usePreparedInsertBlade ('Dictionary', array ('chapter_id' => CHAP_OBJTYPE, 'dict_value' => $this->myString ($code))); $this->new_object_types[$code] = lastInsertId(); } $this->new_object_ids = array(); foreach ($this->new_object_types as $code => $type_id) if ($code != 'none' && $code != 'map') - $this->new_object_ids[$code] = commitAddObject ("${code} ${sig}", NULL, $type_id, NULL); + $this->new_object_ids[$code] = commitAddObject ($this->myString ($code), NULL, $type_id, NULL); $this->new_attr_ids = array(); foreach (array ('F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O') as $each) { - usePreparedInsertBlade ('Attribute', array ('type' => 'dict', 'name' => "${each} ${sig}")); + usePreparedInsertBlade ('Attribute', array ('type' => 'dict', 'name' => $this->myString ($each))); $this->new_attr_ids[$each] = lastInsertId(); } @@ -182,5 +180,3 @@ public function tearDown () usePreparedDeleteBlade ('Attribute', array ('id' => array_keys ($this->attr_types))); } } - -?> diff --git a/tests/EmptySQLWhereTest.php b/tests/EmptySQLWhereTest.php index 89e2f3d9a..7eb25c08a 100644 --- a/tests/EmptySQLWhereTest.php +++ b/tests/EmptySQLWhereTest.php @@ -1,6 +1,6 @@ 'yes')); + usePreparedUpdateBlade ('TagTree', array ('is_assignable' => 'yes'), NULL); } /** @@ -39,8 +39,6 @@ public function testMalformedUpdate1 () */ public function testMalformedUpdate2 () { - usePreparedUpdateBlade ('TagTree'); + usePreparedUpdateBlade ('TagTree', NULL, NULL); } } - -?> \ No newline at end of file diff --git a/tests/EntityLinkTriggerTest.php b/tests/EntityLinkTriggerTest.php index e7aa94d76..458b9c763 100644 --- a/tests/EntityLinkTriggerTest.php +++ b/tests/EntityLinkTriggerTest.php @@ -4,7 +4,7 @@ // - if parent and child entities are the same, parent_id != child_id // - if both parent and child are objects, an ObjectParentCompat rule must exist // - in some scenarios, only one-to-one links are allowed -class EntityLinkTriggerTest extends PHPUnit_Framework_TestCase +class EntityLinkTriggerTest extends RTTestCase { protected static $objtypea_id, $objtypeb_id, $objtypec_id, $objtyped_id; protected static $objecta_id, $objectb_id, $objectc_id, $objectd_id; @@ -55,10 +55,7 @@ public static function tearDownAfterClass () commitReduceOPC (self::$objtypeb_id, self::$objtypec_id); commitReduceOPC (self::$objtypec_id, self::$objtypea_id); commitReduceOPC (self::$objtypec_id, self::$objtypeb_id); - usePreparedDeleteBlade ('Dictionary', array ('dict_key' => self::$objtypea_id)); - usePreparedDeleteBlade ('Dictionary', array ('dict_key' => self::$objtypeb_id)); - usePreparedDeleteBlade ('Dictionary', array ('dict_key' => self::$objtypec_id)); - usePreparedDeleteBlade ('Dictionary', array ('dict_key' => self::$objtyped_id)); + usePreparedDeleteBlade ('Dictionary', array ('dict_key' => array (self::$objtypea_id, self::$objtypeb_id, self::$objtypec_id, self::$objtyped_id))); commitDeleteObject (self::$locationa_id); commitDeleteObject (self::$locationb_id); commitDeleteObject (self::$locationc_id); @@ -499,4 +496,3 @@ public function testInvalidateRackLink () ); } } -?> diff --git a/tests/GetChildrenListTest.php b/tests/GetChildrenListTest.php index 3fe411c04..8ec0f4e4c 100644 --- a/tests/GetChildrenListTest.php +++ b/tests/GetChildrenListTest.php @@ -1,7 +1,7 @@ assertCount (self::$num_children, $children); } } -?> diff --git a/tests/GetRowsCountTest.php b/tests/GetRowsCountTest.php index 26b84062e..316f7cf84 100644 --- a/tests/GetRowsCountTest.php +++ b/tests/GetRowsCountTest.php @@ -1,12 +1,12 @@ table_name = sprintf ('tmptest_%s_%u', get_class(), getmypid()); + $this->table_name = $this->myString ('tmptest'); usePreparedExecuteBlade ( 'CREATE TABLE `' . $this->table_name . '` (' . @@ -42,5 +42,3 @@ public function tearDown () usePreparedExecuteBlade ('DROP TABLE `' . $this->table_name . '`'); } } - -?> diff --git a/tests/LinkTriggerTest.php b/tests/LinkTriggerTest.php index 2740fcc9e..e100721a0 100644 --- a/tests/LinkTriggerTest.php +++ b/tests/LinkTriggerTest.php @@ -4,7 +4,7 @@ // - porta != portb // - porta < portb // - porta is compatibile with portb -class LinkTriggerTest extends PHPUnit_Framework_TestCase +class LinkTriggerTest extends RTTestCase { protected static $autoports_config_var; protected static $object_id; @@ -162,4 +162,3 @@ public function testUpdateLinkBetweenIncompatiblePorts () ); } } -?> diff --git a/tests/ObjectAttributesTest.php b/tests/ObjectAttributesTest.php index 077a8907f..f0a351297 100644 --- a/tests/ObjectAttributesTest.php +++ b/tests/ObjectAttributesTest.php @@ -1,13 +1,13 @@ server_id = commitAddObject (sprintf ('server-%s-%u', get_class(), getmypid()), NULL, 4, NULL); - $this->switch_id = commitAddObject (sprintf ('switch-%s-%u', get_class(), getmypid()), NULL, 8, NULL); + $this->server_id = commitAddObject ($this->myString ('server'), NULL, 4, NULL); + $this->switch_id = commitAddObject ($this->myString ('switch'), NULL, 8, NULL); } public function tearDown () @@ -84,5 +84,3 @@ public function testIncompatible2 () } } - -?> diff --git a/tests/ObjectCircularReferenceTest.php b/tests/ObjectCircularReferenceTest.php index aba6a9cc0..90e87773b 100644 --- a/tests/ObjectCircularReferenceTest.php +++ b/tests/ObjectCircularReferenceTest.php @@ -3,7 +3,7 @@ // An object's parent may not be one of its children. // The same principle applies to locations, which are stored in the DB as objects. // commitLinkEntities and commitUpdateEntityLink should each detect this and raise an exception -class ObjectCircularReferenceTest extends PHPUnit_Framework_TestCase +class ObjectCircularReferenceTest extends RTTestCase { protected static $objtype_id; protected static $objecta_id, $objectb_id, $objectc_id; @@ -121,4 +121,3 @@ public function testUpdateLocationCircularReference () ); } } -?> diff --git a/tests/ObjectLogTest.php b/tests/ObjectLogTest.php index c82163514..7c76ba6f3 100644 --- a/tests/ObjectLogTest.php +++ b/tests/ObjectLogTest.php @@ -2,7 +2,7 @@ // Create logs associated with various entities, make sure the report still works // Inspired by ticket #1443 -class ObjectLogTest extends PHPUnit_Framework_TestCase +class ObjectLogTest extends RTTestCase { protected static $rack_id, $row_id, $location_id, $object_id; protected $rack_log_id = NULL; @@ -84,16 +84,6 @@ public function testAddObjectLogEntry () */ public function testRenderLogRecords () { - try { - ob_start (); - allObjectLogs (); - ob_end_clean (); - $this->assertTrue (TRUE); - } - catch (Exception $e) { - ob_end_clean (); - $this->assertTrue (FALSE); - } + $this->assertNotEquals ('', getOutputOf ('allObjectLogs')); } } -?> diff --git a/tests/ObjectPortsTest.php b/tests/ObjectPortsTest.php index 8d1b709ae..b49508be2 100644 --- a/tests/ObjectPortsTest.php +++ b/tests/ObjectPortsTest.php @@ -1,13 +1,13 @@ object_id = commitAddObject (sprintf ('testobject-%s-%u', get_class(), getmypid()), '', 4, ''); + $this->object_id = commitAddObject ($this->myString ('testobject'), '', 4, ''); } /** @@ -152,8 +152,7 @@ public function testTwoPorts () $this->assertEquals (4, $ports[$key2]['iif_id']); $this->assertEquals (1202, $ports[$key2]['oif_id']); - usePreparedDeleteBlade ('Port', array ('id' => $port1_id)); - usePreparedDeleteBlade ('Port', array ('id' => $port2_id)); + usePreparedDeleteBlade ('Port', array ('id' => array ($port1_id, $port2_id))); } public function providerAddAndVerify () @@ -192,5 +191,3 @@ public function tearDown () commitDeleteObject ($this->object_id); } } - -?> diff --git a/tests/PortTriggerTest.php b/tests/PortTriggerTest.php index a058a89fb..5fa814123 100644 --- a/tests/PortTriggerTest.php +++ b/tests/PortTriggerTest.php @@ -1,7 +1,9 @@ object2_id = commitAddObject ('unit test object 2', NULL, 1, NULL); $this->port1_1_id = commitAddPort ($this->object1_id, 'port 1', '1-24', 'label 1', 'aabbccddee01'); $this->port1_2_id = commitAddPort ($this->object1_id, 'port 2', '1-24', 'label 2', 'aabbccddee02'); + $this->port1_3_id = commitAddPort ($this->object1_id, 'port 8', '1-24', 'label 8', 'aabbccddee000008'); // WWN + $this->port1_4_id = commitAddPort ($this->object1_id, 'port 5', '1-24', 'label 5', 'aabbccddee000000000000000000000000000005'); // IPoIB $this->port2_1_id = commitAddPort ($this->object2_id, 'port 1', '1-24', 'label 1', 'aabbccddee03'); } @@ -23,7 +27,9 @@ public function tearDown () */ public function testUniqueMacAddSame() { - $port1_3_id = commitAddPort ($this->object1_id, 'port 3', '1-24', 'label 3', 'aabbccddee01'); + $this->assertGreaterThan (0, commitAddPort ($this->object1_id, 'port 3', '1-24', 'label 3', 'aabbccddee01')); + $this->assertGreaterThan (0, commitAddPort ($this->object1_id, 'port 9', '1-24', 'label 9', 'aabbccddee000008')); + $this->assertGreaterThan (0, commitAddPort ($this->object1_id, 'port 4', '1-24', 'label 4', 'aabbccddee000000000000000000000000000005')); } /** @@ -31,7 +37,9 @@ public function testUniqueMacAddSame() */ public function testUniqueMacUpdateSame() { - commitUpdatePort ($this->object1_id, $this->port1_2_id, 'port 2', '1-24', 'label 1', 'aabbccddee01', ''); + $this->assertNull (commitUpdatePort ($this->object1_id, $this->port1_2_id, 'port 2', '1-24', 'label 1', 'aabbccddee01', '')); + $this->assertNull (commitUpdatePort ($this->object1_id, $this->port1_2_id, 'port 2', '1-24', 'label 1', 'aabbccddee000008', '')); + $this->assertNull (commitUpdatePort ($this->object1_id, $this->port1_2_id, 'port 2', '1-24', 'label 1', 'aabbccddee000000000000000000000000000005', '')); } /** @@ -43,6 +51,24 @@ public function testUniqueMacAdd() $port2_2_id = commitAddPort ($this->object2_id, 'port 2', '1-24', 'label 1', 'aabbccddee01'); } + /** + * @group small + * @expectedException InvalidArgException + */ + public function testUniqueWWNAdd() + { + $port2_2_id = commitAddPort ($this->object2_id, 'port 2', '1-24', 'label 1', 'aabbccddee000008'); + } + + /** + * @group small + * @expectedException InvalidArgException + */ + public function testUniqueIPoIBAdd() + { + $port2_2_id = commitAddPort ($this->object2_id, 'port 2', '1-24', 'label 1', 'aabbccddee000000000000000000000000000005'); + } + /** * @group small * @expectedException InvalidArgException @@ -51,4 +77,22 @@ public function testUniqueMacUpdate() { commitUpdatePort ($this->object2_id, $this->port2_1_id, 'port 1', '1-24', 'label 1', 'aabbccddee01', ''); } + + /** + * @group small + * @expectedException InvalidArgException + */ + public function testUniqueWWNUpdate() + { + commitUpdatePort ($this->object2_id, $this->port2_1_id, 'port 1', '1-24', 'label 1', 'aabbccddee000008', ''); + } + + /** + * @group small + * @expectedException InvalidArgException + */ + public function testUniqueIPoIBUpdate() + { + commitUpdatePort ($this->object2_id, $this->port2_1_id, 'port 1', '1-24', 'label 1', 'aabbccddee000000000000000000000000000005', ''); + } } diff --git a/tests/PureFunctionTest.php b/tests/PureFunctionTest.php index 883e6c152..9e51bdc67 100644 --- a/tests/PureFunctionTest.php +++ b/tests/PureFunctionTest.php @@ -11,7 +11,7 @@ identical (assertSame) to the expected return value. */ -class PureFunctionTest extends PHPUnit_Framework_TestCase +class PureFunctionTest extends RTTestCase { /** * @group small @@ -91,6 +91,17 @@ public function testMakeWhereSQL ($where_columns, $conjunction, $expected_str, $ $this->assertSame ($expected_params, $actual_params); } + /** + * @group small + * @dataProvider providerMakeWhereSQLIAE + * @expectedException InvalidArgException + */ + public function testMakeWhereSQLIAE ($where_columns, $conjunction) + { + $dummy_params = array(); + makeWhereSQL ($where_columns, $conjunction, $dummy_params); + } + // This test requires a custom function to pass a parameter by reference. /** @@ -144,9 +155,9 @@ public function providerUnaryEquals () array ('questionMarks', 2, '?, ?'), array ('questionMarks', 3, '?, ?, ?'), - array ('makeSetSQL', array ('one'), 'one=?'), - array ('makeSetSQL', array ('one', 'two'), 'one=?, two=?'), - array ('makeSetSQL', array ('one', 'two', 'three'), 'one=?, two=?, three=?'), + array ('makeSetSQL', array ('one'), '`one` = ?'), + array ('makeSetSQL', array ('one', 'two'), '`one` = ?, `two` = ?'), + array ('makeSetSQL', array ('one', 'two', 'three'), '`one` = ?, `two` = ?, `three` = ?'), array ( @@ -218,14 +229,41 @@ public function providerUnaryEquals () array ('l2addressForDatabase', '', ''), array ('l2addressForDatabase', ' ', ''), array ('l2addressForDatabase', ' 010203abcdef ', '010203ABCDEF'), // RE_L2_SOLID - array ('l2addressForDatabase', '1:2:3:ab:cd:ef ', '010203ABCDEF'), // RE_L2_IFCFG + array ('l2addressForDatabase', '1:2:3:ab:cd:ef ', '010203ABCDEF'), // RE_L2_IFCFG_SUNOS array ('l2addressForDatabase', ' 0102.03ab.cdef', '010203ABCDEF'), // RE_L2_CISCO array ('l2addressForDatabase', '0102-03ab-cdef', '010203ABCDEF'), // RE_L2_HUAWEI array ('l2addressForDatabase', '01-02-03-ab-cd-ef', '010203ABCDEF'), // RE_L2_IPCFG array ('l2addressForDatabase', '000000000000', ''), // a special case array ('l2addressForDatabase', '0102030405abcdef ', '0102030405ABCDEF'), // RE_L2_WWN_SOLID array ('l2addressForDatabase', ' 01-02-03-04-05-ab-cd-ef', '0102030405ABCDEF'), // RE_L2_WWN_HYPHEN - array ('l2addressForDatabase', ' 1:2:3:4:5:ab:cd:ef ', '0102030405ABCDEF'), // RE_L2_WWN_COLON + array ('l2addressForDatabase', ' 01:02:03:04:05:ab:cd:ef ', '0102030405ABCDEF'), // RE_L2_WWN_COLON + array + ( + 'l2addressForDatabase', + ' 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f:10:11:12:13 ', + '000102030405060708090A0B0C0D0E0F10111213' + ), // RE_L2_IPOIB_COLON + array + ( + 'l2addressForDatabase', + ' 00-01-02-03-04-05-06-07-08-09-0a-0b-0c-0d-0e-0f-10-11-12-13 ', + '000102030405060708090A0B0C0D0E0F10111213' + ), // RE_L2_IPOIB_HYPHEN + array + ( + 'l2addressForDatabase', + ' 000102030405060708090a0b0c0d0e0f10111213 ', + '000102030405060708090A0B0C0D0E0F10111213' + ), // RE_L2_IPOIB_SOLID + + array ('l2addressFromDatabase', '001122334455', '00:11:22:33:44:55'), // RE_L2_SOLID + array ('l2addressFromDatabase', '0011223344556677', '00:11:22:33:44:55:66:77'), // RE_L2_WWN_SOLID + array + ( + 'l2addressFromDatabase', + '000102030405060708090A0B0C0D0E0F10111213', + '00:01:02:03:04:05:06:07:08:09:0A:0B:0C:0D:0E:0F:10:11:12:13' + ), // RE_L2_IPOIB_SOLID array ('nextMACAddress', '', ''), array ('nextMACAddress', '12:34:56:78:90:ab', '12:34:56:78:90:AC'), @@ -311,6 +349,108 @@ public function providerUnaryEquals () array ('formatAgeSeconds', 63115199, '1y 12m ago'), array ('formatAgeSeconds', 63115200, '2y ago'), array ('formatAgeSeconds', 63115201, '2y ago'), + + array ('isInteger', -2, TRUE), + array ('isInteger', -1.5, FALSE), + array ('isInteger', -1, TRUE), + array ('isInteger', 0, FALSE), // implicit 2nd argument + array ('isInteger', 0.0, FALSE), + array ('isInteger', 1, TRUE), + array ('isInteger', 1.5, FALSE), + array ('isInteger', 2, TRUE), + array ('isInteger', NULL, FALSE), + array ('isInteger', FALSE, FALSE), + array ('isInteger', TRUE, FALSE), + array ('isInteger', '', FALSE), + array ('isInteger', '-2', TRUE), + array ('isInteger', '-1.5', FALSE), + array ('isInteger', '-1', TRUE), + array ('isInteger', '0', FALSE), // implicit 2nd argument + array ('isInteger', '0.0', FALSE), + array ('isInteger', '1', TRUE), + array ('isInteger', '1.5', FALSE), + array ('isInteger', '2', TRUE), + array ('isInteger', '0x1234', FALSE), + array ('isInteger', '+123e4', FALSE), + array ('isInteger', '+123e-4', FALSE), + array ('isInteger', '123e4', FALSE), + array ('isInteger', '123e-4', FALSE), + array ('isInteger', '-123e4', FALSE), + array ('isInteger', '-123e-4', FALSE), + array ('isInteger', '+123.1e4', FALSE), + array ('isInteger', '+123.1e-4', FALSE), + array ('isInteger', '123.1e4', FALSE), + array ('isInteger', '123.1e-4', FALSE), + array ('isInteger', '-123.1e4', FALSE), + array ('isInteger', '-123.1e-4', FALSE), + + array ('isUnsignedInteger', -2, FALSE), + array ('isUnsignedInteger', -1.5, FALSE), + array ('isUnsignedInteger', -1, FALSE), + array ('isUnsignedInteger', 0, FALSE), // implicit 2nd argument + array ('isUnsignedInteger', 0.0, FALSE), + array ('isUnsignedInteger', 1, TRUE), + array ('isUnsignedInteger', 1.5, FALSE), + array ('isUnsignedInteger', 2, TRUE), + array ('isUnsignedInteger', NULL, FALSE), + array ('isUnsignedInteger', FALSE, FALSE), + array ('isUnsignedInteger', TRUE, FALSE), + array ('isUnsignedInteger', '', FALSE), + array ('isUnsignedInteger', '-2', FALSE), + array ('isUnsignedInteger', '-1.5', FALSE), + array ('isUnsignedInteger', '-1', FALSE), + array ('isUnsignedInteger', '0', FALSE), // implicit 2nd argument + array ('isUnsignedInteger', '0.0', FALSE), + array ('isUnsignedInteger', '1', TRUE), + array ('isUnsignedInteger', '1.5', FALSE), + array ('isUnsignedInteger', '2', TRUE), + + array ('isHTMLColor', FALSE, FALSE), + array ('isHTMLColor', TRUE, FALSE), + array ('isHTMLColor', NULL, FALSE), + array ('isHTMLColor', 0, FALSE), + array ('isHTMLColor', '#ABCDEF', FALSE), + array ('isHTMLColor', '#ABC', FALSE), + array ('isHTMLColor', '#abc', FALSE), + array ('isHTMLColor', 'green', FALSE), + array ('isHTMLColor', '', FALSE), + array ('isHTMLColor', 'A', FALSE), + array ('isHTMLColor', 'AB', FALSE), + array ('isHTMLColor', 'ABC', FALSE), + array ('isHTMLColor', 'ABCD', FALSE), + array ('isHTMLColor', 'ABCDE', FALSE), + array ('isHTMLColor', 'ABCDEF', TRUE), + array ('isHTMLColor', 'a', FALSE), + array ('isHTMLColor', 'ab', FALSE), + array ('isHTMLColor', 'abc', FALSE), + array ('isHTMLColor', 'abcd', FALSE), + array ('isHTMLColor', 'abcde', FALSE), + array ('isHTMLColor', 'abcdef', TRUE), + array ('isHTMLColor', 'AABBCC', TRUE), + array ('isHTMLColor', 'DDEEFF', TRUE), + array ('isHTMLColor', '000000', TRUE), + array ('isHTMLColor', 'FFFFFF', TRUE), + array ('isHTMLColor', 'FF00FG', FALSE), + + array ('HTMLColorForDatabase', '', NULL), + array ('HTMLColorForDatabase', NULL, NULL), + array ('HTMLColorForDatabase', '000000', 0), + array ('HTMLColorForDatabase', 'abcdef', 0xabcdef), + array ('HTMLColorForDatabase', 'FFFFFF', 0xffffff), + + array ('HTMLColorFromDatabase', NULL, ''), + array ('HTMLColorFromDatabase', 0, '000000'), + array ('HTMLColorFromDatabase', '0', '000000'), + array ('HTMLColorFromDatabase', 0xffffff, 'FFFFFF'), + array ('HTMLColorFromDatabase', 0xabcdef, 'ABCDEF'), + array ('HTMLColorFromDatabase', '11259375', 'ABCDEF'), + + // implicit 2nd argument + array ('colorHex2Rgb', '000000', '0,0,0'), + array ('colorHex2Rgb', 'FFFFFF', '255,255,255'), + array ('colorHex2Rgb', '800000', '128,0,0'), + array ('colorHex2Rgb', '008000', '0,128,0'), + array ('colorHex2Rgb', '000080', '0,0,128'), ); } @@ -347,6 +487,19 @@ public function providerUnarySame () array ('nullIfZero', NULL, NULL), // type conversion: NULL == 0 array ('nullIfZero', FALSE, NULL), // type conversion: FALSE == 0 + array ('emptyStrIfZero', 0, ''), + array ('emptyStrIfZero', '0', ''), + array ('emptyStrIfZero', '', ''), + array ('emptyStrIfZero', FALSE, FALSE), + array ('emptyStrIfZero', TRUE, TRUE), + array ('emptyStrIfZero', NULL, NULL), + array ('emptyStrIfZero', 1, 1), + array ('emptyStrIfZero', -1, -1), + array ('emptyStrIfZero', ' 0', ' 0'), + array ('emptyStrIfZero', '0 ', '0 '), + array ('emptyStrIfZero', ' 0 ', ' 0 '), + array ('emptyStrIfZero', 0.0, 0.0), + array ('array_first', array (1, 2, 3), 1), array ('array_first', array (FALSE, NULL, 0), FALSE), array ('array_first', array (-1, 0, 1), -1), @@ -858,6 +1011,132 @@ public function providerBinaryEquals () array ('goodModeForVSTRole', 'trunk', 'anymode', TRUE), array ('goodModeForVSTRole', 'trunk', 'uplink', TRUE), array ('goodModeForVSTRole', 'trunk', 'downlink', TRUE), + + array ('isInteger', -2, FALSE, TRUE), + array ('isInteger', -1.5, FALSE, FALSE), + array ('isInteger', -1, FALSE, TRUE), + array ('isInteger', 0, FALSE, FALSE), // explicit 2nd argument + array ('isInteger', 0.0, FALSE, FALSE), + array ('isInteger', 1, FALSE, TRUE), + array ('isInteger', 1.5, FALSE, FALSE), + array ('isInteger', 2, FALSE, TRUE), + array ('isInteger', NULL, FALSE, FALSE), + array ('isInteger', FALSE, FALSE, FALSE), + array ('isInteger', TRUE, FALSE, FALSE), + array ('isInteger', '', FALSE, FALSE), + array ('isInteger', '-2', FALSE, TRUE), + array ('isInteger', '-1.5', FALSE, FALSE), + array ('isInteger', '-1', FALSE, TRUE), + array ('isInteger', '0', FALSE, FALSE), // explicit 2nd argument + array ('isInteger', '0.0', FALSE, FALSE), + array ('isInteger', '1', FALSE, TRUE), + array ('isInteger', '1.5', FALSE, FALSE), + array ('isInteger', '2', FALSE, TRUE), + array ('isInteger', -2, TRUE, TRUE), + array ('isInteger', -1.5, TRUE, FALSE), + array ('isInteger', -1, TRUE, TRUE), + array ('isInteger', 0, TRUE, TRUE), // explicit 2nd argument + array ('isInteger', 0.0, TRUE, FALSE), + array ('isInteger', 1, TRUE, TRUE), + array ('isInteger', 1.5, TRUE, FALSE), + array ('isInteger', 2, TRUE, TRUE), + array ('isInteger', NULL, TRUE, FALSE), + array ('isInteger', FALSE, TRUE, FALSE), + array ('isInteger', TRUE, TRUE, FALSE), + array ('isInteger', '', TRUE, FALSE), + array ('isInteger', '-2', TRUE, TRUE), + array ('isInteger', '-1.5', TRUE, FALSE), + array ('isInteger', '-1', TRUE, TRUE), + array ('isInteger', '0', TRUE, TRUE), // explicit 2nd argument + array ('isInteger', '0.0', TRUE, FALSE), + array ('isInteger', '1', TRUE, TRUE), + array ('isInteger', '1.5', TRUE, FALSE), + array ('isInteger', '2', TRUE, TRUE), + + array ('isUnsignedInteger', -2, FALSE, FALSE), + array ('isUnsignedInteger', -1.5, FALSE, FALSE), + array ('isUnsignedInteger', -1, FALSE, FALSE), + array ('isUnsignedInteger', 0, FALSE, FALSE), // explicit 2nd argument + array ('isUnsignedInteger', 0.0, FALSE, FALSE), + array ('isUnsignedInteger', 1, FALSE, TRUE), + array ('isUnsignedInteger', 1.5, FALSE, FALSE), + array ('isUnsignedInteger', 2, FALSE, TRUE), + array ('isUnsignedInteger', NULL, FALSE, FALSE), + array ('isUnsignedInteger', FALSE, FALSE, FALSE), + array ('isUnsignedInteger', TRUE, FALSE, FALSE), + array ('isUnsignedInteger', '', FALSE, FALSE), + array ('isUnsignedInteger', '-2', FALSE, FALSE), + array ('isUnsignedInteger', '-1.5', FALSE, FALSE), + array ('isUnsignedInteger', '-1', FALSE, FALSE), + array ('isUnsignedInteger', '0', FALSE, FALSE), // explicit 2nd argument + array ('isUnsignedInteger', '0.0', FALSE, FALSE), + array ('isUnsignedInteger', '1', FALSE, TRUE), + array ('isUnsignedInteger', '1.5', FALSE, FALSE), + array ('isUnsignedInteger', '2', FALSE, TRUE), + array ('isUnsignedInteger', -2, TRUE, FALSE), + array ('isUnsignedInteger', -1.5, TRUE, FALSE), + array ('isUnsignedInteger', -1, TRUE, FALSE), + array ('isUnsignedInteger', 0, TRUE, TRUE), // explicit 2nd argument + array ('isUnsignedInteger', 0.0, TRUE, FALSE), + array ('isUnsignedInteger', 1, TRUE, TRUE), + array ('isUnsignedInteger', 1.5, TRUE, FALSE), + array ('isUnsignedInteger', 2, TRUE, TRUE), + array ('isUnsignedInteger', NULL, TRUE, FALSE), + array ('isUnsignedInteger', FALSE, TRUE, FALSE), + array ('isUnsignedInteger', TRUE, TRUE, FALSE), + array ('isUnsignedInteger', '', TRUE, FALSE), + array ('isUnsignedInteger', '-2', TRUE, FALSE), + array ('isUnsignedInteger', '-1.5', TRUE, FALSE), + array ('isUnsignedInteger', '-1', TRUE, FALSE), + array ('isUnsignedInteger', '0', TRUE, TRUE), // explicit 2nd argument + array ('isUnsignedInteger', '0.0', TRUE, FALSE), + array ('isUnsignedInteger', '1', TRUE, TRUE), + array ('isUnsignedInteger', '1.5', TRUE, FALSE), + array ('isUnsignedInteger', '2', TRUE, TRUE), + + // explicit 2nd argument + array ('colorHex2Rgb', '000000', FALSE, '0,0,0'), + array ('colorHex2Rgb', 'FFFFFF', FALSE, '255,255,255'), + array ('colorHex2Rgb', '800000', FALSE, '128,0,0'), + array ('colorHex2Rgb', '008000', FALSE, '0,128,0'), + array ('colorHex2Rgb', '000080', FALSE, '0,0,128'), + array ('colorHex2Rgb', '000000', TRUE, '128,128,128'), + array ('colorHex2Rgb', 'FFFFFF', TRUE, '255,255,255'), + array ('colorHex2Rgb', '800000', TRUE, '192,128,128'), + array ('colorHex2Rgb', '008000', TRUE, '128,192,128'), + array ('colorHex2Rgb', '000080', TRUE, '128,128,192'), + + array ('SQLDateFromDateStr', '11/12/13', '%d/%m/%y', '2013-12-11'), + array ('SQLDateFromDateStr', '2.3.4', '%d.%m.%y', '2004-03-02'), + array ('SQLDateFromDateStr', '08.07.1983', '%d.%m.%Y', '1983-07-08'), + + array ('cmpSQLDates', '1927-05-17', '2013-09-21', -1), + array ('cmpSQLDates', '1927-05-17', '2013-09-17', -1), + array ('cmpSQLDates', '1927-05-21', '2013-09-17', -1), + array ('cmpSQLDates', '1927-05-17', '2013-05-21', -1), + array ('cmpSQLDates', '1927-05-17', '2013-05-17', -1), + array ('cmpSQLDates', '1927-05-21', '2013-05-17', -1), + array ('cmpSQLDates', '1927-09-17', '2013-05-21', -1), + array ('cmpSQLDates', '1927-09-17', '2013-05-17', -1), + array ('cmpSQLDates', '1927-09-21', '2013-05-17', -1), + array ('cmpSQLDates', '1927-05-17', '1927-09-21', -1), + array ('cmpSQLDates', '1927-05-17', '1927-09-17', -1), + array ('cmpSQLDates', '1927-05-21', '1927-09-17', -1), + array ('cmpSQLDates', '1927-05-17', '1927-05-21', -1), + array ('cmpSQLDates', '1927-05-17', '1927-05-17', 0), + array ('cmpSQLDates', '1927-05-21', '1927-05-17', 1), + array ('cmpSQLDates', '1927-09-17', '1927-05-21', 1), + array ('cmpSQLDates', '1927-09-17', '1927-05-17', 1), + array ('cmpSQLDates', '1927-09-21', '1927-05-17', 1), + array ('cmpSQLDates', '2013-05-17', '1927-09-21', 1), + array ('cmpSQLDates', '2013-05-17', '1927-09-17', 1), + array ('cmpSQLDates', '2013-05-21', '1927-09-17', 1), + array ('cmpSQLDates', '2013-05-17', '1927-05-21', 1), + array ('cmpSQLDates', '2013-05-17', '1927-05-17', 1), + array ('cmpSQLDates', '2013-05-21', '1927-05-17', 1), + array ('cmpSQLDates', '2013-09-17', '1927-05-21', 1), + array ('cmpSQLDates', '2013-09-17', '1927-05-17', 1), + array ('cmpSQLDates', '2013-09-21', '1927-05-17', 1), ); } @@ -1174,10 +1453,34 @@ public function providerNaryIAE () array ('l2addressForDatabase', array ('010203abcd')), // invalid length array ('l2addressForDatabase', array ('010203abcdefff')), // invalid length array ('l2addressForDatabase', array ('010203abcdeh')), // length OK but not hexadecimal + array ('l2addressForDatabase', array ('010203abcdehffff')), // idem + array ('l2addressForDatabase', array ('0102030405060708090a0b0c0d0e0f10111213zz')), // idem + array ('l2addressForDatabase', array ('00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f:10:11:12:zz')), // idem + array ('l2addressForDatabase', array ('00-01-02-03-04-05-06-07-08-09-0a-0b-0c-0d-0e-0f-10-11-12-zz')), // idem array ('l2addressForDatabase', array ('0102:03ab:cdef')), // not a known format array ('l2addressForDatabase', array ('01.02.03.ab.cd.ef')), // not a known format array ('l2addressForDatabase', array (' 1. 2. 3.ab.cd.ef')), // not a known format array ('l2addressForDatabase', array ('01.02.03-ab-cd:ef')), // not a known format + array ('l2addressForDatabase', array ('3-4-5-ab-cd-ef')), // SunOS notation uses colons, not hyphens. + array ('l2addressForDatabase', array ('1:2:3:4:5:ab:cd:ef')), // SunOS notation is for MAC addresses only. + array ('l2addressForDatabase', array ('0:1:2:3:4:5:6:7:8:9:a:b:c:d:e:f:10:11:12:13:14')), // idem + array ('l2addressForDatabase', array ('0-1-2-3-4-5-6-7-8-9-a-b-c-d-e-f-10-11-12-13-14')), // idem + + array ('l2addressFromDatabase', array (' ')), + array ('l2addressFromDatabase', array (FALSE)), + array ('l2addressFromDatabase', array (TRUE)), + array ('l2addressFromDatabase', array (0)), + array ('l2addressFromDatabase', array (-1)), + array ('l2addressFromDatabase', array (1)), + array ('l2addressFromDatabase', array ('1')), + array ('l2addressFromDatabase', array ('001122')), + array ('l2addressFromDatabase', array ('00112233')), + array ('l2addressFromDatabase', array ('0011223344')), + array ('l2addressFromDatabase', array ('001122334455zz')), // not hex + array ('l2addressFromDatabase', array ('00112233445566')), + array ('l2addressFromDatabase', array ('00112233445566zz')), // not hex + array ('l2addressFromDatabase', array ('001122334455667788')), + array ('l2addressFromDatabase', array ('000102030405060708090A0B0C0D0E0F101112zz')), // not hex array ('nextMACAddress', array ('010203abcdef')), array ('nextMACAddress', array ('0102.03ab.cdef')), @@ -1187,9 +1490,6 @@ public function providerNaryIAE () array ('nextMACAddress', array ('01:02:03:ab:cd')), array ('nextMACAddress', array ('1:2:3:ab:cd:ef')), - array ('makeWhereSQL', array (array ('abc' => NULL), 'NOT')), - array ('makeWhereSQL', array (array(), 'AND')), - array ('ip_get_arpa', array ("\xAC\x11\xBB")), array ('ip_get_arpa', array ("\xAC\x11\xBB\x00\x00")), @@ -1200,6 +1500,17 @@ public function providerNaryIAE () array ('makeSetSQL', array (array())), + array ('assertListOfColumnNames', array (NULL)), + array ('assertListOfColumnNames', array (FALSE)), + array ('assertListOfColumnNames', array (TRUE)), + array ('assertListOfColumnNames', array (0)), + array ('assertListOfColumnNames', array ('')), + array ('assertListOfColumnNames', array (array())), + array ('assertListOfColumnNames', array (1)), + array ('assertListOfColumnNames', array ('one', 2)), + array ('assertListOfColumnNames', array ('a', 'b', '')), + array ('assertListOfColumnNames', array ('z', 1.2)), + // not an array array ('reindexById', array (NULL)), array ('reindexById', array (FALSE)), @@ -1231,6 +1542,35 @@ public function providerNaryIAE () array ('parseSearchTerms', array ('one "two" "three')), array ('parseSearchTerms', array ('one "" three')), array ('parseSearchTerms', array ('""')), + + array ('array_fetch', array (-1, 0, 0)), + array ('array_fetch', array (0, 0, 0)), + array ('array_fetch', array (1, 0, 0)), + array ('array_fetch', array (FALSE, 0, 0)), + array ('array_fetch', array (NULL, 0, 0)), + array ('array_fetch', array ('', 0, 0)), + + array ('HTMLColorForDatabase', array (FALSE)), + array ('HTMLColorForDatabase', array (TRUE)), + array ('HTMLColorForDatabase', array (0)), + + array ('HTMLColorFromDatabase', array ('')), + array ('HTMLColorFromDatabase', array (FALSE)), + array ('HTMLColorFromDatabase', array (TRUE)), + array ('HTMLColorFromDatabase', array (-1)), + array ('HTMLColorFromDatabase', array (1.0)), + array ('HTMLColorFromDatabase', array (10.5)), + array ('HTMLColorFromDatabase', array (0x01000000)), + array ('HTMLColorFromDatabase', array ('0x123456')), + + array ('cmpSQLDates', array ('', '2010-04-05')), + array ('cmpSQLDates', array ('aaaa-bb-cc', '2010-04-05')), + array ('cmpSQLDates', array ('0000-00-00', '2010-04-05')), + array ('cmpSQLDates', array ('2010-13-32', '2010-04-05')), + array ('cmpSQLDates', array ('2010-04-05', '')), + array ('cmpSQLDates', array ('2010-04-05', 'aaaa-bb-cc')), + array ('cmpSQLDates', array ('2010-04-05', '0000-00-00')), + array ('cmpSQLDates', array ('2010-04-05', '2010-13-32')), ); } @@ -1238,21 +1578,30 @@ public function providerMakeWhereSQL () { return array ( - array (array ('one' => 1), 'AND', 'one=?', array (1)), - array (array ('one' => NULL), 'AND', 'one IS NULL', array()), - array (array ('one' => 1, 'two' => 2), 'AND', 'one=? AND two=?', array (1, 2)), - array (array ('one' => NULL, 'two' => 2), 'AND', 'one IS NULL AND two=?', array (2)), - array (array ('one' => 1, 'two' => 2, 'three' => 3), 'OR', 'one=? OR two=? OR three=?', array (1, 2, 3)), + array (array ('one' => 1), 'AND', '`one` = ?', array (1)), + array (array ('one' => NULL), 'AND', '`one` IS NULL', array()), + array (array ('one' => 1, 'two' => 2), 'AND', '`one` = ? AND `two` = ?', array (1, 2)), + array (array ('one' => NULL, 'two' => 2), 'AND', '`one` IS NULL AND `two` = ?', array (2)), + array (array ('one' => 1, 'two' => 2, 'three' => 3), 'OR', '`one` = ? OR `two` = ? OR `three` = ?', array (1, 2, 3)), array ( array ('a' => array ('a.1', 'a.2', 'a.3'), 'b' => array (0, 10, 20, 30)), 'OR', - 'a IN(?, ?, ?) OR b IN(?, ?, ?, ?)', + '`a` IN(?, ?, ?) OR `b` IN(?, ?, ?, ?)', array ('a.1', 'a.2', 'a.3', 0, 10, 20, 30) ), ); } + public function providerMakeWhereSQLIAE () + { + return array + ( + array (array ('abc' => NULL), 'NOT'), + array (array(), 'AND'), + ); + } + public function providerTreeApplyFuncIAE () { return array @@ -1263,4 +1612,3 @@ public function providerTreeApplyFuncIAE () ); } } -?> diff --git a/tests/RackspaceFunctionsTest.php b/tests/RackspaceFunctionsTest.php index 85376b956..f81396849 100644 --- a/tests/RackspaceFunctionsTest.php +++ b/tests/RackspaceFunctionsTest.php @@ -1,21 +1,24 @@ row_name = sprintf ('testrow-%s-%u', get_class(), getmypid()); - $this->row_id = commitAddObject ($this->row_name, NULL, 1561, NULL); + // This method is static and thus cannot call myString(), which uses $this. + self::$row_name = sprintf ('testrow-%s-%u', get_class(), getmypid()); + self::$row_id = commitAddObject (self::$row_name, NULL, 1561, NULL); } private function createObjectInRack ($prefix, $type_id, $rack_id, $unit_nos) { - $object_id = commitAddObject (sprintf ('%s-%s-%u', $prefix, get_class(), getmypid()), NULL, $type_id, NULL); + $object_id = commitAddObject ($this->myString ($prefix), NULL, $type_id, NULL); if (! count ($unit_nos)) commitLinkEntities ('rack', $rack_id, 'object', $object_id); else @@ -40,12 +43,12 @@ private function createSampleRacksAndObjects ($racklist) { $ret = array(); $i = 0; - foreach ($racklist as $rack_id => $objectlist) + foreach ($racklist as $objectlist) { - $rack_name = sprintf ('rack%u-%s-%s', $i, get_class(), getmypid()); + $rack_name = $this->myString ('rack'); $rack_id = commitAddObject ($rack_name, NULL, 1560, NULL); commitUpdateAttrValue ($rack_id, 27, self::UNITS_PER_RACK); - commitLinkEntities ('row', $this->row_id, 'rack', $rack_id); + commitLinkEntities ('row', self::$row_id, 'rack', $rack_id); $ret[$rack_id] = array(); foreach ($objectlist as $each) { @@ -73,20 +76,44 @@ private function deleteSampleRacksAndObjects ($created) */ public function testGeneral () { - $row = getRowInfo ($this->row_id); - $this->assertEquals ($this->row_id, $row['id']); - $this->assertEquals ($this->row_name, $row['name']); + $row = getRowInfo (self::$row_id); + $this->assertEquals (self::$row_id, $row['id']); + $this->assertEquals (self::$row_name, $row['name']); $this->assertNull ($row['location_id']); $this->assertNull ($row['location']); } + /** + * @group small + */ + public function testThumbnails () + { + $racklist = array // one rack + ( + array // one 4U object + ( + array ('server1', 4, array (8, 11)), + ), + ); + $created = $this->createSampleRacksAndObjects ($racklist); + $rack_id = key ($created); + $this->assertNull (loadRackThumbCache ($rack_id)); + // The call below should populate the cache. + $thumbnail = getCachedMiniRackThumbImage ($rack_id); + $this->assertNotEquals ('', $thumbnail); + $this->assertSame ($thumbnail, loadRackThumbCache ($rack_id)); + $this->deleteSampleRacksAndObjects ($created); + // ON DELETE CASCADE + $this->assertNull (loadRackThumbCache ($rack_id)); + } + /** * @group small * @dataProvider providerSampleRows */ public function testSpecific ($racklist) { - $this->assertEquals (0, getRowMountsCount ($this->row_id)); + $this->assertEquals (0, getRowMountsCount (self::$row_id)); $created = $this->createSampleRacksAndObjects ($racklist); $row_units = 0; $row_data = array(); @@ -103,12 +130,12 @@ public function testSpecific ($racklist) $row_total_units = count ($created) * self::UNITS_PER_RACK; $row_rsu = $row_total_units == 0 ? 0 : ($row_units / $row_total_units); $this->assertEquals ($row_rsu, getRSUForRow ($row_data)); - $this->assertEquals (array_sum (array_map ('count', $created)), getRowMountsCount ($this->row_id)); - $row = getRowInfo ($this->row_id); + $this->assertEquals (array_sum (array_map ('count', $created)), getRowMountsCount (self::$row_id)); + $row = getRowInfo (self::$row_id); $this->assertEquals (count ($created), $row['count']); $this->assertEquals ($row_total_units, $row['sum']); $this->deleteSampleRacksAndObjects ($created); - $this->assertEquals (0, getRowMountsCount ($this->row_id)); + $this->assertEquals (0, getRowMountsCount (self::$row_id)); } public function providerSampleRows() @@ -204,10 +231,8 @@ public function providerSampleRows() ); } - public function tearDown () + public static function tearDownAfterClass () { - commitDeleteRow ($this->row_id); + commitDeleteRow (self::$row_id); } } - -?> diff --git a/tests/RenderDepotTest.php b/tests/RenderDepotTest.php index 06a2a0b4f..55b557d7d 100644 --- a/tests/RenderDepotTest.php +++ b/tests/RenderDepotTest.php @@ -1,7 +1,7 @@ assertTrue (TRUE); - } - catch (Exception $e) { - ob_end_clean (); - $this->assertTrue (FALSE); - } + $this->assertNotEquals ('', getOutputOf ('renderDepot')); } } -?> diff --git a/tests/SQLDateFromDateStrTest.php b/tests/SQLDateFromDateStrTest.php new file mode 100644 index 000000000..002ad60f2 --- /dev/null +++ b/tests/SQLDateFromDateStrTest.php @@ -0,0 +1,64 @@ +assertEquals ($output, SQLDateFromDateStr ($input)); + } + + /** + * @group small + * @dataProvider providerUnaryIAE + * @expectedException InvalidArgException + */ + public function testUnaryIAE ($input) + { + SQLDateFromDateStr ($input); + } + + public function providerNormal () + { + return array + ( + array ('2017-1-1', '2017-01-01'), + array ('2017-01-01', '2017-01-01'), + ); + } + + public function providerUnaryIAE () + { + return array + ( + array (NULL), + array (0), + array (''), + array ('abcdef'), + array ('12/21/2000'), + array ('20.05.1973'), + array ('2001-19-4'), + array ('2001-02-29'), + array ('768-11-15'), + ); + } +} +?> diff --git a/tests/ScriptFunctionsTest.php b/tests/ScriptFunctionsTest.php index 0b0dcde31..e778366c8 100644 --- a/tests/ScriptFunctionsTest.php +++ b/tests/ScriptFunctionsTest.php @@ -1,6 +1,6 @@ diff --git a/tests/StringInsertHrefsTest.php b/tests/StringInsertHrefsTest.php index 7ca7c673b..4dfa1cf30 100644 --- a/tests/StringInsertHrefsTest.php +++ b/tests/StringInsertHrefsTest.php @@ -1,6 +1,6 @@ diff --git a/tests/TagFunctionsTest.php b/tests/TagFunctionsTest.php index 0ff37d2d0..9db1f2205 100644 --- a/tests/TagFunctionsTest.php +++ b/tests/TagFunctionsTest.php @@ -1,30 +1,40 @@ assertEquals ($html_colors, $obj['colors']); + } public function setUp() { global $taglist; - $sfx = get_class() . '-' . getmypid(); $this->a_tag_ids = array(); $this->b_tag_ids = array(); for ($i = 0; $i < self::NUM_TAGS; $i++) { - usePreparedInsertBlade ('TagTree', array ('tag' => "tag a${i} ${sfx}")); + usePreparedInsertBlade ('TagTree', array ('tag' => $this->myString ("tag a${i}"), 'color' => self::COLOR_A + $i)); $this->a_tag_ids[] = lastInsertID(); - usePreparedInsertBlade ('TagTree', array ('tag' => "tag b${i} ${sfx}")); + usePreparedInsertBlade ('TagTree', array ('tag' => $this->myString ("tag b${i}"), 'color' => self::COLOR_B)); $this->b_tag_ids[] = lastInsertID(); } $taglist = addTraceToNodes (getTagList()); - $this->a_obj_id = commitAddObject ("server a ${sfx}", NULL, 4, NULL, $this->a_tag_ids); - $this->b_obj_id = commitAddObject ("server b ${sfx}", NULL, 4, NULL, $this->b_tag_ids); - $this->ab_obj_id = commitAddObject ("server ab ${sfx}", NULL, 4, NULL, array_merge ($this->a_tag_ids, $this->b_tag_ids)); + $this->a_obj_id = commitAddObject ($this->myString ('server a'), NULL, 4, NULL, $this->a_tag_ids); + $this->b_obj_id = commitAddObject ($this->myString ('server b'), NULL, 4, NULL, $this->b_tag_ids); + $this->ab_obj_id = commitAddObject ($this->myString ('server ab'), NULL, 4, NULL, array_merge ($this->a_tag_ids, $this->b_tag_ids)); } public function tearDown() @@ -33,36 +43,32 @@ public function tearDown() commitDeleteObject ($this->a_obj_id); commitDeleteObject ($this->b_obj_id); commitDeleteObject ($this->ab_obj_id); - foreach (array_merge ($this->a_tag_ids, $this->b_tag_ids) as $tag_id) - usePreparedDeleteBlade ('TagTree', array ('id' => $tag_id)); + usePreparedDeleteBlade ('TagTree', array ('id' => array_merge ($this->a_tag_ids, $this->b_tag_ids))); } /** * @group small */ - public function testFixtures() + public function testReadOnly() { + // fixtures $this->assertEquals (self::NUM_TAGS, count ($this->a_tag_ids)); $this->assertEquals (self::NUM_TAGS, count ($this->b_tag_ids)); - } - /** - * @group small - */ - public function testLoad() - { + // loading $this->assertEquals (array_values ($this->a_tag_ids), array_values (reduceSubarraysToColumn (loadEntityTags ('object', $this->a_obj_id), 'id'))); $this->assertEquals (array_values ($this->b_tag_ids), array_values (reduceSubarraysToColumn (loadEntityTags ('object', $this->b_obj_id), 'id'))); $this->assertEquals (array_values (array_merge ($this->a_tag_ids, $this->b_tag_ids)), array_values (reduceSubarraysToColumn (loadEntityTags ('object', $this->ab_obj_id), 'id'))); - } - /** - * @group small - */ - public function testTransform() - { + // transforming $this->assertEquals ($this->a_tag_ids, buildTagIdsFromChain (buildTagChainFromIds ($this->a_tag_ids))); + + // colors + $a_colors = range (self::COLOR_A, self::COLOR_A + self::NUM_TAGS - 1); + $this->assertObjectColors ($this->a_obj_id, $a_colors); + $b_colors = array (self::COLOR_B); + $this->assertObjectColors ($this->b_obj_id, $b_colors); + $ab_colors = array_merge ($a_colors, $b_colors); + $this->assertObjectColors ($this->ab_obj_id, $ab_colors); } } - -?> diff --git a/tests/TagTreeCircularReferenceTest.php b/tests/TagTreeCircularReferenceTest.php index 3964eeb46..d88c600e0 100644 --- a/tests/TagTreeCircularReferenceTest.php +++ b/tests/TagTreeCircularReferenceTest.php @@ -2,7 +2,7 @@ // a tag's parent may not be one of its children // commitUpdateTag should detect this and raise an exception -class TagTreeCircularReferenceTest extends PHPUnit_Framework_TestCase +class TagTreeCircularReferenceTest extends RTTestCase { protected $taga_id, $tagb_id, $tagc_id; @@ -20,14 +20,9 @@ public function setUp () public function tearDown () { // remove sample data - usePreparedExecuteBlade - ( - 'UPDATE TagTree SET parent_id = NULL WHERE id IN (?,?,?)', - array ($this->taga_id, $this->tagb_id, $this->tagc_id) - ); - usePreparedDeleteBlade ('TagTree', array ('id' => $this->taga_id)); - usePreparedDeleteBlade ('TagTree', array ('id' => $this->tagb_id)); - usePreparedDeleteBlade ('TagTree', array ('id' => $this->tagc_id)); + $ids = array ($this->taga_id, $this->tagb_id, $this->tagc_id); + usePreparedUpdateBlade ('TagTree', array ('parent_id' => NULL), array ('id' => $ids)); + usePreparedDeleteBlade ('TagTree', array ('id' => $ids)); } /** @@ -43,4 +38,3 @@ public function testCreateCircularReference () commitUpdateTag ($this->taga_id, 'unit test tag a', $this->tagc_id, 'yes'); } } -?> diff --git a/tests/TestHelper.php b/tests/TestHelper.php index c5d22bc0a..d836eb5d6 100644 --- a/tests/TestHelper.php +++ b/tests/TestHelper.php @@ -13,4 +13,3 @@ public static function ensureUsingUnitTestDatabase () throw new Exception ('Test must connect to unit testing database (see tests/README).'); } } -?> diff --git a/tests/UpgradeTest.php b/tests/UpgradeTest.php index fdefdc4c4..a98904899 100644 --- a/tests/UpgradeTest.php +++ b/tests/UpgradeTest.php @@ -5,7 +5,7 @@ // The 'data' directory contains an SQL dump file for each version, including both schema and sample data. // Developers should generate a dump file as part of the release process. Instructions are in the wiki. // For each version, this test will drop & re-create the database, then attempt to upgrade to the current version. -class UpgradeTest extends PHPUnit_Framework_TestCase +class UpgradeTest extends RTTestCase { protected static $versions = NULL; @@ -62,4 +62,3 @@ public function testUpgrades () } } } -?> diff --git a/tests/UserAccountTest.php b/tests/UserAccountTest.php index 1154a7307..4a3662ae1 100644 --- a/tests/UserAccountTest.php +++ b/tests/UserAccountTest.php @@ -1,6 +1,6 @@ user_name = sprintf ('testuser-%s-%u', get_class(), getmypid()); + $this->user_name = $this->myString ('testuser'); $this->user_id = commitCreateUserAccount ($this->user_name, self::REALNAME, self::PSWDHASH); } @@ -52,5 +52,3 @@ public function testDuplicate () commitCreateUserAccount ($this->user_name, 'x' . self::REALNAME, sha1 (self::PSWDHASH)); } } - -?> diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 0a0cac6d1..000000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 120000 index 000000000..edaacad5d --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1 @@ +bootstrap_v4v5.php \ No newline at end of file diff --git a/tests/bootstrap_common.php b/tests/bootstrap_common.php new file mode 100644 index 000000000..76715c7b2 --- /dev/null +++ b/tests/bootstrap_common.php @@ -0,0 +1,13 @@ + 0 THEN + SET NEW.parent_entity_id = NULL; + LEAVE EntityLinkTrigger; + END IF; + + IF NEW.parent_entity_type = 'object' AND NEW.child_entity_type = 'object' THEN + # lock objects to prevent concurrent link establishment + SELECT objtype_id INTO parent_objtype FROM Object WHERE id = NEW.parent_entity_id FOR UPDATE; + SELECT objtype_id INTO child_objtype FROM Object WHERE id = NEW.child_entity_id FOR UPDATE; + + # only permit the link if object types are compatibile + SELECT COUNT(*) INTO count FROM ObjectParentCompat WHERE parent_objtype_id = parent_objtype AND child_objtype_id = child_objtype; + IF count = 0 THEN + SET NEW.parent_entity_id = NULL; + END IF; + END IF; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`racktables`@`localhost`*/ /*!50003 TRIGGER `EntityLink-before-update` BEFORE UPDATE ON `EntityLink` FOR EACH ROW +EntityLinkTrigger:BEGIN + DECLARE parent_objtype, child_objtype, count INTEGER; + + # forbid linking an entity to itself + IF NEW.parent_entity_type = NEW.child_entity_type AND NEW.parent_entity_id = NEW.child_entity_id THEN + SET NEW.parent_entity_id = NULL; + LEAVE EntityLinkTrigger; + END IF; + + # in some scenarios, only one parent is allowed + CASE CONCAT(NEW.parent_entity_type, '.', NEW.child_entity_type) + WHEN 'location.location' THEN + SELECT COUNT(*) INTO count FROM EntityLink WHERE parent_entity_type = 'location' AND child_entity_type = 'location' AND child_entity_id = NEW.child_entity_id AND id != NEW.id; + WHEN 'location.row' THEN + SELECT COUNT(*) INTO count FROM EntityLink WHERE parent_entity_type = 'location' AND child_entity_type = 'row' AND child_entity_id = NEW.child_entity_id AND id != NEW.id; + WHEN 'row.rack' THEN + SELECT COUNT(*) INTO count FROM EntityLink WHERE parent_entity_type = 'row' AND child_entity_type = 'rack' AND child_entity_id = NEW.child_entity_id AND id != NEW.id; + ELSE + # some other scenario, assume it is valid + SET count = 0; + END CASE; + IF count > 0 THEN + SET NEW.parent_entity_id = NULL; + LEAVE EntityLinkTrigger; + END IF; + + IF NEW.parent_entity_type = 'object' AND NEW.child_entity_type = 'object' THEN + # lock objects to prevent concurrent link establishment + SELECT objtype_id INTO parent_objtype FROM Object WHERE id = NEW.parent_entity_id FOR UPDATE; + SELECT objtype_id INTO child_objtype FROM Object WHERE id = NEW.child_entity_id FOR UPDATE; + + # only permit the link if object types are compatibile + SELECT COUNT(*) INTO count FROM ObjectParentCompat WHERE parent_objtype_id = parent_objtype AND child_objtype_id = child_objtype; + IF count = 0 THEN + SET NEW.parent_entity_id = NULL; + END IF; + END IF; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +DROP TABLE IF EXISTS `File`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `File` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` char(255) COLLATE utf8_unicode_ci NOT NULL, + `type` char(255) COLLATE utf8_unicode_ci NOT NULL, + `size` int(10) unsigned NOT NULL, + `ctime` datetime NOT NULL, + `mtime` datetime NOT NULL, + `atime` datetime NOT NULL, + `thumbnail` longblob, + `contents` longblob NOT NULL, + `comment` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `File` WRITE; +/*!40000 ALTER TABLE `File` DISABLE KEYS */; +/*!40000 ALTER TABLE `File` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `FileLink`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `FileLink` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `file_id` int(10) unsigned NOT NULL, + `entity_type` enum('ipv4net','ipv4rspool','ipv4vs','ipvs','ipv6net','location','object','rack','row','user') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'object', + `entity_id` int(10) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `FileLink-unique` (`file_id`,`entity_type`,`entity_id`), + KEY `FileLink-file_id` (`file_id`), + CONSTRAINT `FileLink-File_fkey` FOREIGN KEY (`file_id`) REFERENCES `File` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `FileLink` WRITE; +/*!40000 ALTER TABLE `FileLink` DISABLE KEYS */; +/*!40000 ALTER TABLE `FileLink` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv4Address`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv4Address` ( + `ip` int(10) unsigned NOT NULL DEFAULT '0', + `name` char(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `comment` char(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `reserved` enum('yes','no') COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`ip`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv4Address` WRITE; +/*!40000 ALTER TABLE `IPv4Address` DISABLE KEYS */; +INSERT INTO `IPv4Address` VALUES (180879360,'','',NULL),(180879361,'','',NULL),(180879616,'network','','yes'),(180879617,'','',NULL),(180879618,'','',NULL),(180879675,'','',NULL),(180879676,'','',NULL),(180879677,'','',NULL),(180879678,'default gw','','no'),(180879679,'broadcast','','yes'),(180879680,'network','','yes'),(180879681,'','',NULL),(180879683,'','',NULL),(180879684,'','',NULL),(180879685,'','',NULL),(180879686,'','',NULL),(180879687,'','',NULL),(180879743,'broadcast','','yes'),(180879872,'network','','yes'),(180879935,'broadcast','','yes'),(180879936,'network','','yes'),(180879999,'broadcast','','yes'),(180880128,'network','','no'),(180880191,'broadcast','','no'),(180880192,'network','','yes'),(180880193,'','',NULL),(180880194,'','',NULL),(180880195,'','',NULL),(180880254,'','',NULL),(180880255,'broadcast','','yes'),(180880384,'network','','yes'),(180880447,'broadcast','','yes'),(180880448,'network','','yes'),(180880504,'for field engineer','','yes'),(180880511,'broadcast','','yes'); +/*!40000 ALTER TABLE `IPv4Address` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv4Allocation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv4Allocation` ( + `object_id` int(10) unsigned NOT NULL DEFAULT '0', + `ip` int(10) unsigned NOT NULL DEFAULT '0', + `name` char(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `type` enum('regular','shared','virtual','router','point2point') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'regular', + PRIMARY KEY (`object_id`,`ip`), + KEY `ip` (`ip`), + CONSTRAINT `IPv4Allocation-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv4Allocation` WRITE; +/*!40000 ALTER TABLE `IPv4Allocation` DISABLE KEYS */; +INSERT INTO `IPv4Allocation` VALUES (905,180879361,'se1/1','regular'),(905,180879362,'se1/0','regular'),(905,180879678,'fa2/0','router'),(906,180879617,'','regular'),(907,180879363,'se1/1','regular'),(907,180879364,'se1/0','regular'),(907,180879998,'','shared'),(908,180879360,'se1/0','regular'),(908,180879367,'se1/1','regular'),(908,180880446,'fa1/0','router'),(908,180880510,'fa2/0','router'),(909,180879365,'se1/1','regular'),(909,180879366,'se1/0','regular'),(909,180880254,'fa2/0','router'),(910,180879675,'','virtual'),(910,180879681,'eth0','regular'),(911,180879675,'','virtual'),(911,180879682,'eth0','regular'),(912,180879675,'','virtual'),(912,180879683,'eth0','regular'),(913,180879676,'','virtual'),(913,180879684,'eth0','regular'),(914,180879676,'','virtual'),(914,180879685,'eth0','regular'),(915,180879618,'telnet access','regular'),(915,180879675,'VIP1','regular'),(915,180879676,'VIP2','regular'),(915,180879677,'VIP3','regular'),(918,180879677,'','virtual'),(918,180879686,'bge0','regular'),(919,180879677,'','virtual'),(919,180879687,'bge0','regular'),(923,180880193,'eth0','regular'),(924,180880194,'eth0','regular'),(925,180880195,'eth0','regular'),(927,180879998,'','shared'),(928,180879877,'','regular'),(929,180879878,'','regular'),(932,180879973,'','regular'),(933,180879978,'','regular'),(934,180879974,'','regular'),(935,180879979,'','regular'),(936,180879975,'','regular'),(937,180879980,'','regular'),(938,180879976,'','regular'),(939,180879981,'','regular'),(940,180879977,'','regular'),(941,180879982,'','regular'),(956,180880449,'eth0','regular'),(957,180880450,'eth0','regular'),(958,180880451,'eth0','regular'),(959,180880452,'eth0','regular'),(960,180880453,'eth0','regular'),(961,180880385,'','regular'),(962,180880386,'','regular'); +/*!40000 ALTER TABLE `IPv4Allocation` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv4LB`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv4LB` ( + `object_id` int(10) unsigned DEFAULT NULL, + `rspool_id` int(10) unsigned DEFAULT NULL, + `vs_id` int(10) unsigned DEFAULT NULL, + `prio` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `vsconfig` text COLLATE utf8_unicode_ci, + `rsconfig` text COLLATE utf8_unicode_ci, + UNIQUE KEY `LB-VS` (`object_id`,`vs_id`), + KEY `IPv4LB-FK-rspool_id` (`rspool_id`), + KEY `IPv4LB-FK-vs_id` (`vs_id`), + CONSTRAINT `IPv4LB-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`), + CONSTRAINT `IPv4LB-FK-rspool_id` FOREIGN KEY (`rspool_id`) REFERENCES `IPv4RSPool` (`id`), + CONSTRAINT `IPv4LB-FK-vs_id` FOREIGN KEY (`vs_id`) REFERENCES `IPv4VS` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv4LB` WRITE; +/*!40000 ALTER TABLE `IPv4LB` DISABLE KEYS */; +INSERT INTO `IPv4LB` VALUES (928,1,1,NULL,NULL,NULL),(929,1,1,NULL,NULL,NULL),(929,2,2,NULL,NULL,NULL); +/*!40000 ALTER TABLE `IPv4LB` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv4Log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv4Log` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `ip` int(10) unsigned NOT NULL, + `date` datetime NOT NULL, + `user` varchar(64) COLLATE utf8_unicode_ci NOT NULL, + `message` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `ip-date` (`ip`,`date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv4Log` WRITE; +/*!40000 ALTER TABLE `IPv4Log` DISABLE KEYS */; +/*!40000 ALTER TABLE `IPv4Log` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv4NAT`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv4NAT` ( + `object_id` int(10) unsigned NOT NULL DEFAULT '0', + `proto` enum('TCP','UDP','ALL') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'TCP', + `localip` int(10) unsigned NOT NULL DEFAULT '0', + `localport` smallint(5) unsigned NOT NULL DEFAULT '0', + `remoteip` int(10) unsigned NOT NULL DEFAULT '0', + `remoteport` smallint(5) unsigned NOT NULL DEFAULT '0', + `description` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`object_id`,`proto`,`localip`,`localport`,`remoteip`,`remoteport`), + KEY `localip` (`localip`), + KEY `remoteip` (`remoteip`), + KEY `object_id` (`object_id`), + CONSTRAINT `IPv4NAT-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv4NAT` WRITE; +/*!40000 ALTER TABLE `IPv4NAT` DISABLE KEYS */; +INSERT INTO `IPv4NAT` VALUES (915,'TCP',180879675,80,180879681,80,''),(915,'TCP',180879675,80,180879682,80,''),(915,'TCP',180879675,80,180879683,80,''),(915,'TCP',180879677,443,180879686,443,''),(915,'TCP',180879677,443,180879687,443,''),(915,'UDP',180879676,53,180879684,53,''),(915,'UDP',180879676,53,180879685,53,''); +/*!40000 ALTER TABLE `IPv4NAT` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv4Network`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv4Network` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `ip` int(10) unsigned NOT NULL DEFAULT '0', + `mask` int(10) unsigned NOT NULL DEFAULT '0', + `name` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `comment` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`id`), + UNIQUE KEY `base-len` (`ip`,`mask`) +) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv4Network` WRITE; +/*!40000 ALTER TABLE `IPv4Network` DISABLE KEYS */; +INSERT INTO `IPv4Network` VALUES (96,180879616,26,'London network devices and VIPs',NULL),(97,180879680,26,'London HA server farm',NULL),(98,180879872,26,'New-York network devices',NULL),(99,180879936,26,'New-York servers',NULL),(102,180879360,31,'M-L P2P',NULL),(103,180879362,31,'L-NY P2P',NULL),(104,180879364,31,'NY-T P2P',NULL),(105,180879366,31,'T-M P2P',NULL),(106,180880384,26,'Moscow network devices',NULL),(107,180880448,26,'Moscow servers',NULL),(108,180880192,26,'Tokyo server farm',NULL); +/*!40000 ALTER TABLE `IPv4Network` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv4RS`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv4RS` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `inservice` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no', + `rsip` varbinary(16) NOT NULL, + `rsport` smallint(5) unsigned DEFAULT NULL, + `rspool_id` int(10) unsigned DEFAULT NULL, + `rsconfig` text COLLATE utf8_unicode_ci, + `comment` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `pool-endpoint` (`rspool_id`,`rsip`,`rsport`), + KEY `rsip` (`rsip`), + CONSTRAINT `IPv4RS-FK` FOREIGN KEY (`rspool_id`) REFERENCES `IPv4RSPool` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv4RS` WRITE; +/*!40000 ALTER TABLE `IPv4RS` DISABLE KEYS */; +INSERT INTO `IPv4RS` VALUES (1,'yes','\n\Èe',80,1,NULL,NULL),(2,'yes','\n\Èf',80,1,NULL,NULL),(3,'no','\n\Èg',80,1,NULL,NULL),(4,'yes','\n\Èh',80,1,NULL,NULL),(5,'yes','\n\Èi',80,1,NULL,NULL),(6,'no','\n\Èj',8080,2,NULL,NULL),(7,'yes','\n\Èk',8080,2,NULL,NULL),(8,'yes','\n\Èl',8080,2,NULL,NULL),(9,'yes','\n\Èm',8080,2,NULL,NULL),(10,'yes','\n\Èn',8080,2,NULL,NULL); +/*!40000 ALTER TABLE `IPv4RS` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv4RSPool`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv4RSPool` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `vsconfig` text COLLATE utf8_unicode_ci, + `rsconfig` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv4RSPool` WRITE; +/*!40000 ALTER TABLE `IPv4RSPool` DISABLE KEYS */; +INSERT INTO `IPv4RSPool` VALUES (1,'Apache servers',NULL,NULL),(2,'Resin servers',NULL,NULL); +/*!40000 ALTER TABLE `IPv4RSPool` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv4VS`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv4VS` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `vip` varbinary(16) NOT NULL, + `vport` smallint(5) unsigned DEFAULT NULL, + `proto` enum('TCP','UDP','MARK') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'TCP', + `name` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `vsconfig` text COLLATE utf8_unicode_ci, + `rsconfig` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`id`), + KEY `vip` (`vip`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv4VS` WRITE; +/*!40000 ALTER TABLE `IPv4VS` DISABLE KEYS */; +INSERT INTO `IPv4VS` VALUES (1,'\n\È',80,'TCP','virtual web','lvs_sched wlc\ndelay_loop 3\nalpha\nomega\nquorum 3\nhysteresis 1\n\n# this is a comment\n# VS name is %VNAME%\n#\n','CHECK=%CHECK_TCP%\n'),(2,'\n\È',80,'TCP','virtual app','lvs_sched wlc\r\nlvs_method NAT\r\ndelay_loop 3\r\nalpha\r\nomega\r\nquorum 3\r\nhysteresis 1\r\n\r\n','HTTP_GET {\r\nurl {\r\npath /\r\nstatus_code 200\r\n}\r\nconnect_timeout 1\r\n}'),(3,'\0\0\0 ',NULL,'MARK','test fwmark service','lvs_sched wrr\nVIP=10.200.2.5\nMETHOD=TUN\nDELAY_LOOP=10','CHECK=%CHECK_TCP%'); +/*!40000 ALTER TABLE `IPv4VS` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv6Address`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv6Address` ( + `ip` binary(16) NOT NULL, + `name` char(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `comment` char(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `reserved` enum('yes','no') COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`ip`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv6Address` WRITE; +/*!40000 ALTER TABLE `IPv6Address` DISABLE KEYS */; +/*!40000 ALTER TABLE `IPv6Address` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv6Allocation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv6Allocation` ( + `object_id` int(10) unsigned NOT NULL DEFAULT '0', + `ip` binary(16) NOT NULL, + `name` char(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `type` enum('regular','shared','virtual','router','point2point') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'regular', + PRIMARY KEY (`object_id`,`ip`), + KEY `ip` (`ip`), + CONSTRAINT `IPv6Allocation-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv6Allocation` WRITE; +/*!40000 ALTER TABLE `IPv6Allocation` DISABLE KEYS */; +INSERT INTO `IPv6Allocation` VALUES (908,'ü\0P\0¾\ï\0\0\0\0\0\0\0','fa1/0','router'),(919,'ü\0P\0Þ­\0\0\0\0\0\0\0','bge1','router'); +/*!40000 ALTER TABLE `IPv6Allocation` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv6Log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv6Log` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `ip` binary(16) NOT NULL, + `date` datetime NOT NULL, + `user` varchar(64) COLLATE utf8_unicode_ci NOT NULL, + `message` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `ip-date` (`ip`,`date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv6Log` WRITE; +/*!40000 ALTER TABLE `IPv6Log` DISABLE KEYS */; +/*!40000 ALTER TABLE `IPv6Log` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `IPv6Network`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `IPv6Network` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `ip` binary(16) NOT NULL, + `mask` int(10) unsigned NOT NULL, + `last_ip` binary(16) NOT NULL, + `name` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `comment` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`id`), + UNIQUE KEY `ip` (`ip`,`mask`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `IPv6Network` WRITE; +/*!40000 ALTER TABLE `IPv6Network` DISABLE KEYS */; +INSERT INTO `IPv6Network` VALUES (1,'ü\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',7,'ýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ','Local IPv6',NULL),(2,'ü\0P\0\0\0\0\0\0\0\0\0\0\0',48,'ü\0P\0ÿÿÿÿÿÿÿÿÿÿ','v6 Suballoc 1',NULL),(3,'ü\0P\0\0\0\0\0\0\0\0\0\0\0',48,'ü\0P\0ÿÿÿÿÿÿÿÿÿÿ','v6 Suballoc 2',NULL),(4,'ü\0P\0Þ­\0\0\0\0\0\0\0\0',64,'ü\0P\0Þ­ÿÿÿÿÿÿÿÿ','dead net',NULL),(5,'ü\0P\0¾\ï\0\0\0\0\0\0\0\0',64,'ü\0P\0¾\ïÿÿÿÿÿÿÿÿ','beef net',NULL); +/*!40000 ALTER TABLE `IPv6Network` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `LDAPCache`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `LDAPCache` ( + `presented_username` char(64) COLLATE utf8_unicode_ci NOT NULL, + `successful_hash` char(40) COLLATE utf8_unicode_ci NOT NULL, + `first_success` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `last_retry` timestamp NULL DEFAULT NULL, + `displayed_name` char(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `memberof` text COLLATE utf8_unicode_ci, + UNIQUE KEY `presented_username` (`presented_username`), + KEY `scanidx` (`presented_username`,`successful_hash`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `LDAPCache` WRITE; +/*!40000 ALTER TABLE `LDAPCache` DISABLE KEYS */; +/*!40000 ALTER TABLE `LDAPCache` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `Link`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Link` ( + `porta` int(10) unsigned NOT NULL DEFAULT '0', + `portb` int(10) unsigned NOT NULL DEFAULT '0', + `cable` char(64) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`porta`,`portb`), + UNIQUE KEY `porta` (`porta`), + UNIQUE KEY `portb` (`portb`), + CONSTRAINT `Link-FK-a` FOREIGN KEY (`porta`) REFERENCES `Port` (`id`) ON DELETE CASCADE, + CONSTRAINT `Link-FK-b` FOREIGN KEY (`portb`) REFERENCES `Port` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `Link` WRITE; +/*!40000 ALTER TABLE `Link` DISABLE KEYS */; +INSERT INTO `Link` VALUES (3057,3071,NULL),(3058,3084,NULL),(3059,3069,NULL),(3062,3094,NULL),(3063,3079,NULL),(3070,3083,NULL),(3072,3080,NULL),(3073,3086,NULL),(3074,3088,NULL),(3075,3090,NULL),(3076,3092,NULL),(3077,3097,NULL),(3078,3095,NULL),(3082,3085,NULL),(3096,3219,NULL),(3098,3191,NULL),(3099,3112,NULL),(3101,3113,NULL),(3102,3114,NULL),(3103,3115,NULL),(3104,3116,NULL),(3105,3117,NULL),(3106,3118,NULL),(3119,3147,NULL),(3124,3126,NULL),(3127,3162,NULL),(3128,3158,NULL),(3130,3163,NULL),(3131,3148,NULL),(3133,3164,NULL),(3134,3143,NULL),(3136,3165,NULL),(3137,3151,NULL),(3139,3168,NULL),(3140,3154,NULL),(3142,3160,NULL),(3145,3171,NULL),(3159,3161,NULL),(3181,3186,NULL),(3182,3187,NULL),(3183,3190,NULL),(3184,3188,NULL),(3185,3189,NULL),(3214,3263,NULL),(3262,3265,NULL); +/*!40000 ALTER TABLE `Link` ENABLE KEYS */; +UNLOCK TABLES; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`racktables`@`localhost`*/ /*!50003 TRIGGER `Link-before-insert` BEFORE INSERT ON `Link` FOR EACH ROW LinkTrigger:BEGIN + DECLARE tmp, porta_type, portb_type, count INTEGER; + + IF NEW.porta = NEW.portb THEN + # forbid connecting a port to itself + SET NEW.porta = NULL; + LEAVE LinkTrigger; + ELSEIF NEW.porta > NEW.portb THEN + # force porta < portb + SET tmp = NEW.porta; + SET NEW.porta = NEW.portb; + SET NEW.portb = tmp; + END IF; + + # lock ports to prevent concurrent link establishment + SELECT type INTO porta_type FROM Port WHERE id = NEW.porta FOR UPDATE; + SELECT type INTO portb_type FROM Port WHERE id = NEW.portb FOR UPDATE; + + # only permit the link if ports are compatibile + SELECT COUNT(*) INTO count FROM PortCompat WHERE (type1 = porta_type AND type2 = portb_type) OR (type1 = portb_type AND type2 = porta_type); + IF count = 0 THEN + SET NEW.porta = NULL; + END IF; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`racktables`@`localhost`*/ /*!50003 TRIGGER `Link-before-update` BEFORE UPDATE ON `Link` FOR EACH ROW LinkTrigger:BEGIN + DECLARE tmp, porta_type, portb_type, count INTEGER; + + IF NEW.porta = NEW.portb THEN + # forbid connecting a port to itself + SET NEW.porta = NULL; + LEAVE LinkTrigger; + ELSEIF NEW.porta > NEW.portb THEN + # force porta < portb + SET tmp = NEW.porta; + SET NEW.porta = NEW.portb; + SET NEW.portb = tmp; + END IF; + + # lock ports to prevent concurrent link establishment + SELECT type INTO porta_type FROM Port WHERE id = NEW.porta FOR UPDATE; + SELECT type INTO portb_type FROM Port WHERE id = NEW.portb FOR UPDATE; + + # only permit the link if ports are compatibile + SELECT COUNT(*) INTO count FROM PortCompat WHERE (type1 = porta_type AND type2 = portb_type) OR (type1 = portb_type AND type2 = porta_type); + IF count = 0 THEN + SET NEW.porta = NULL; + END IF; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +DROP TABLE IF EXISTS `Location`; +/*!50001 DROP VIEW IF EXISTS `Location`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `Location` AS SELECT + 1 AS `id`, + 1 AS `name`, + 1 AS `has_problems`, + 1 AS `comment`, + 1 AS `parent_id`, + 1 AS `parent_name`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `Molecule`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Molecule` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `Molecule` WRITE; +/*!40000 ALTER TABLE `Molecule` DISABLE KEYS */; +INSERT INTO `Molecule` VALUES (1); +/*!40000 ALTER TABLE `Molecule` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `MountOperation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `MountOperation` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `object_id` int(10) unsigned NOT NULL DEFAULT '0', + `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `user_name` char(64) COLLATE utf8_unicode_ci DEFAULT NULL, + `old_molecule_id` int(10) unsigned DEFAULT NULL, + `new_molecule_id` int(10) unsigned DEFAULT NULL, + `comment` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`id`), + KEY `object_id` (`object_id`), + KEY `MountOperation-FK-old_molecule_id` (`old_molecule_id`), + KEY `MountOperation-FK-new_molecule_id` (`new_molecule_id`), + CONSTRAINT `MountOperation-FK-new_molecule_id` FOREIGN KEY (`new_molecule_id`) REFERENCES `Molecule` (`id`) ON DELETE CASCADE, + CONSTRAINT `MountOperation-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE, + CONSTRAINT `MountOperation-FK-old_molecule_id` FOREIGN KEY (`old_molecule_id`) REFERENCES `Molecule` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `MountOperation` WRITE; +/*!40000 ALTER TABLE `MountOperation` DISABLE KEYS */; +/*!40000 ALTER TABLE `MountOperation` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `MuninGraph`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `MuninGraph` ( + `object_id` int(10) unsigned NOT NULL, + `server_id` int(10) unsigned NOT NULL, + `graph` char(255) COLLATE utf8_unicode_ci NOT NULL, + `caption` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`object_id`,`server_id`,`graph`), + KEY `server_id` (`server_id`), + KEY `graph` (`graph`), + CONSTRAINT `MuninGraph-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE, + CONSTRAINT `MuninGraph-FK-server_id` FOREIGN KEY (`server_id`) REFERENCES `MuninServer` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `MuninGraph` WRITE; +/*!40000 ALTER TABLE `MuninGraph` DISABLE KEYS */; +/*!40000 ALTER TABLE `MuninGraph` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `MuninServer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `MuninServer` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `base_url` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `MuninServer` WRITE; +/*!40000 ALTER TABLE `MuninServer` DISABLE KEYS */; +/*!40000 ALTER TABLE `MuninServer` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `Object`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Object` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `objtype_id` int(10) unsigned NOT NULL DEFAULT '1', + `asset_no` char(64) COLLATE utf8_unicode_ci DEFAULT NULL, + `has_problems` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no', + `comment` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`id`), + UNIQUE KEY `asset_no` (`asset_no`), + KEY `id-tid` (`id`,`objtype_id`), + KEY `type_id` (`objtype_id`,`id`) +) ENGINE=InnoDB AUTO_INCREMENT=984 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `Object` WRITE; +/*!40000 ALTER TABLE `Object` DISABLE KEYS */; +INSERT INTO `Object` VALUES (905,'london router','bbrtr1',7,'net247','no',NULL),(906,'londonswitch1','',8,NULL,'no',NULL),(907,'New-York router 1','bbrtr2a',7,'net55','no',NULL),(908,'moscow router','bbrtr3',7,NULL,'no',NULL),(909,'tokyo router','bbrtr4',7,NULL,'no',NULL),(910,'London server 1','lserver01',4,'srv500','no',NULL),(911,'London server 2','lserver02',4,'srv501','no',NULL),(912,'London server 3','lserver03',4,'srv502','no',NULL),(913,'London server 4','lserver04',4,'srv503','yes','this one needs replacement'),(914,'London server 5','lserver05',4,'srv504','no',NULL),(915,'london LB','llb',8,'net1000','no',NULL),(916,'shared storage','',5,NULL,'no',NULL),(917,'london-NAS','',7,'net1001','no',NULL),(918,'London server 6','lserver06',4,'srv505','no',NULL),(919,'London server 7','lserver07',4,'srv506','no',NULL),(920,'backup library','lbackup',6,'misc200','no',NULL),(921,'lserver06 array','lserver06 array',5,NULL,'no',NULL),(922,'lserver07 array','lserver07 array',5,NULL,'no',NULL),(923,'Tokyo server 1','tserver01',4,'srv654','no',NULL),(924,'Tokyo server 2','tserver02',4,'srv848','no',NULL),(925,'Tokyo server 3','tserver03',4,'srv139','no',NULL),(926,'Tokyo switch','tswitch',8,'net385','no',NULL),(927,'New-York router 2','bbrtr2b',7,'net498','no',NULL),(928,'New-York IPVS LB A','nylba',4,'net554','no',NULL),(929,'New-York IPVS LB B','nylbb',4,'net555','no',NULL),(930,'New-York server switch A','nyswitcha',8,'net084','no',NULL),(931,'New-York server switch B','nyswitchb',8,'net486','no',NULL),(932,'New-York server 1A','nysrv1a',4,'srv287','no',NULL),(933,'New-York server 1B','nysrv1b',4,'srv288','no',NULL),(934,'New-York server 2A','nysrv2a',4,NULL,'no',NULL),(935,'New-York server 2B','nysrv2b',4,NULL,'no',NULL),(936,'New-York server 3A','nysrv3a',4,NULL,'no',NULL),(937,'New-York server 3B','nysrv3b',4,NULL,'no',NULL),(938,'New-York server 4A','nysrv4a',4,NULL,'no',NULL),(939,'New-York server 4B','nysrv4b',4,NULL,'no',NULL),(940,'New-York server 5A','nysrv5a',4,NULL,'no',NULL),(941,'New-York server 5B','nysrv5b',4,NULL,'no',NULL),(942,'wing A UPS',NULL,12,NULL,'no',NULL),(943,'wing B UPS',NULL,12,NULL,'no',NULL),(944,'network UPS',NULL,12,NULL,'no',NULL),(945,NULL,NULL,9,NULL,'no',NULL),(946,NULL,NULL,9,NULL,'no',NULL),(947,NULL,NULL,2,NULL,'no',NULL),(948,NULL,NULL,2,NULL,'no',NULL),(949,NULL,NULL,2,NULL,'no',NULL),(950,NULL,NULL,2,NULL,'no',NULL),(951,NULL,NULL,2,NULL,'no',NULL),(952,NULL,NULL,2,NULL,'no',NULL),(953,NULL,NULL,2,NULL,'no',NULL),(954,NULL,NULL,2,NULL,'no',NULL),(955,NULL,NULL,2,NULL,'no',NULL),(956,'mps1',NULL,4,NULL,'no',NULL),(957,'mps2',NULL,4,NULL,'no',NULL),(958,'mps3',NULL,4,NULL,'no',NULL),(959,'mps4',NULL,4,NULL,'no',NULL),(960,'mps5',NULL,4,NULL,'no',NULL),(961,'mskswitch',NULL,8,'sw0001','no',NULL),(962,'moscow kvm switch',NULL,445,'sw0002','no',NULL),(963,'Row 1',NULL,1561,NULL,'no',NULL),(964,'Row A',NULL,1561,NULL,'no',NULL),(965,'CF-4',NULL,1561,NULL,'no',NULL),(966,'Row 1',NULL,1561,NULL,'no',NULL),(967,'L01',NULL,1560,NULL,'no','test'),(968,'L02',NULL,1560,NULL,'no','network equipment mini-rack'),(969,'L03',NULL,1560,NULL,'no',NULL),(970,'NY100',NULL,1560,NULL,'no',NULL),(971,'NY101',NULL,1560,NULL,'no','server farm wing A'),(972,'M01',NULL,1560,NULL,'no',NULL),(973,'NY102',NULL,1560,NULL,'no','server farm wing B'),(974,'T01',NULL,1560,NULL,'no',NULL),(975,'Moscow',NULL,1562,NULL,'no',NULL),(976,'Tokyo',NULL,1562,NULL,'no',NULL),(977,'New-York',NULL,1562,NULL,'no',NULL),(978,'London',NULL,1562,NULL,'no',NULL),(979,'sw-a1',NULL,8,NULL,'no',NULL),(980,'sw-a2',NULL,8,NULL,'no',NULL),(981,'sw-d1',NULL,8,NULL,'no',NULL),(982,NULL,NULL,3,NULL,'no',NULL),(983,'London modem 1',NULL,13,NULL,'no',NULL); +/*!40000 ALTER TABLE `Object` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `ObjectHistory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ObjectHistory` ( + `id` int(10) unsigned DEFAULT NULL, + `name` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `objtype_id` int(10) unsigned DEFAULT NULL, + `asset_no` char(64) COLLATE utf8_unicode_ci DEFAULT NULL, + `has_problems` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no', + `comment` text COLLATE utf8_unicode_ci, + `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `user_name` char(64) COLLATE utf8_unicode_ci DEFAULT NULL, + KEY `id` (`id`), + CONSTRAINT `ObjectHistory-FK-object_id` FOREIGN KEY (`id`) REFERENCES `Object` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `ObjectHistory` WRITE; +/*!40000 ALTER TABLE `ObjectHistory` DISABLE KEYS */; +/*!40000 ALTER TABLE `ObjectHistory` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `ObjectLog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ObjectLog` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `object_id` int(10) unsigned NOT NULL, + `user` char(64) COLLATE utf8_unicode_ci NOT NULL, + `date` datetime NOT NULL, + `content` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `object_id` (`object_id`), + KEY `date` (`date`), + CONSTRAINT `ObjectLog-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `ObjectLog` WRITE; +/*!40000 ALTER TABLE `ObjectLog` DISABLE KEYS */; +/*!40000 ALTER TABLE `ObjectLog` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `ObjectParentCompat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ObjectParentCompat` ( + `parent_objtype_id` int(10) unsigned NOT NULL, + `child_objtype_id` int(10) unsigned NOT NULL, + UNIQUE KEY `parent_child` (`parent_objtype_id`,`child_objtype_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `ObjectParentCompat` WRITE; +/*!40000 ALTER TABLE `ObjectParentCompat` DISABLE KEYS */; +INSERT INTO `ObjectParentCompat` VALUES (3,13),(4,1504),(4,1507),(1397,1398),(1502,4),(1503,8),(1505,4),(1505,1504),(1505,1506),(1505,1507),(1506,4),(1506,1504),(1787,4),(1787,8),(1787,1502); +/*!40000 ALTER TABLE `ObjectParentCompat` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PatchCableConnector`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PatchCableConnector` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `origin` enum('default','custom') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'custom', + `connector` char(32) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `connector_per_origin` (`connector`,`origin`) +) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PatchCableConnector` WRITE; +/*!40000 ALTER TABLE `PatchCableConnector` DISABLE KEYS */; +INSERT INTO `PatchCableConnector` VALUES (999,'default','CX4/SFF-8470'),(2,'default','FC/APC'),(1,'default','FC/PC'),(4,'default','LC/APC'),(3,'default','LC/PC'),(6,'default','MPO-12/APC'),(5,'default','MPO-12/PC'),(8,'default','MPO-24/APC'),(7,'default','MPO-24/PC'),(10,'default','SC/APC'),(9,'default','SC/PC'),(14,'default','SFP-1000'),(15,'default','SFP+'),(12,'default','ST/APC'),(11,'default','ST/PC'),(13,'default','T568/8P8C/RJ45'); +/*!40000 ALTER TABLE `PatchCableConnector` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PatchCableConnectorCompat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PatchCableConnectorCompat` ( + `pctype_id` int(10) unsigned NOT NULL, + `connector_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`pctype_id`,`connector_id`), + KEY `connector_id` (`connector_id`), + CONSTRAINT `PatchCableConnectorCompat-FK-connector_id` FOREIGN KEY (`connector_id`) REFERENCES `PatchCableConnector` (`id`), + CONSTRAINT `PatchCableConnectorCompat-FK-pctype_id` FOREIGN KEY (`pctype_id`) REFERENCES `PatchCableType` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PatchCableConnectorCompat` WRITE; +/*!40000 ALTER TABLE `PatchCableConnectorCompat` DISABLE KEYS */; +INSERT INTO `PatchCableConnectorCompat` VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(1,2),(2,2),(3,2),(4,2),(5,2),(6,2),(7,2),(8,2),(9,2),(10,2),(11,2),(12,2),(1,3),(2,3),(3,3),(4,3),(5,3),(6,3),(7,3),(8,3),(9,3),(10,3),(11,3),(12,3),(1,4),(2,4),(3,4),(4,4),(5,4),(6,4),(7,4),(8,4),(9,4),(10,4),(11,4),(12,4),(18,5),(19,5),(18,6),(19,6),(21,7),(22,7),(21,8),(22,8),(1,9),(2,9),(3,9),(4,9),(5,9),(6,9),(7,9),(8,9),(9,9),(10,9),(11,9),(12,9),(1,10),(2,10),(3,10),(4,10),(5,10),(6,10),(7,10),(8,10),(9,10),(10,10),(11,10),(12,10),(1,11),(2,11),(3,11),(4,11),(5,11),(6,11),(7,11),(8,11),(9,11),(10,11),(11,11),(12,11),(1,12),(2,12),(3,12),(4,12),(5,12),(6,12),(7,12),(8,12),(9,12),(10,12),(11,12),(12,12),(13,13),(14,13),(15,13),(16,13),(17,13),(999,13),(23,14),(24,15),(25,15),(26,15),(27,15),(20,999); +/*!40000 ALTER TABLE `PatchCableConnectorCompat` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PatchCableHeap`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PatchCableHeap` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `pctype_id` int(10) unsigned NOT NULL, + `end1_conn_id` int(10) unsigned NOT NULL, + `end2_conn_id` int(10) unsigned NOT NULL, + `amount` smallint(5) unsigned NOT NULL DEFAULT '0', + `length` decimal(5,2) unsigned NOT NULL DEFAULT '1.00', + `description` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `compat1` (`pctype_id`,`end1_conn_id`), + KEY `compat2` (`pctype_id`,`end2_conn_id`), + CONSTRAINT `PatchCableHeap-FK-compat1` FOREIGN KEY (`pctype_id`, `end1_conn_id`) REFERENCES `PatchCableConnectorCompat` (`pctype_id`, `connector_id`), + CONSTRAINT `PatchCableHeap-FK-compat2` FOREIGN KEY (`pctype_id`, `end2_conn_id`) REFERENCES `PatchCableConnectorCompat` (`pctype_id`, `connector_id`) +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PatchCableHeap` WRITE; +/*!40000 ALTER TABLE `PatchCableHeap` DISABLE KEYS */; +INSERT INTO `PatchCableHeap` VALUES (1,2,9,9,97,2.00,''),(2,2,9,3,98,2.00,''),(3,13,13,13,100,1.00,'blue'),(4,13,13,13,100,1.00,'green'),(5,13,13,13,98,1.00,'yellow'),(6,13,13,13,49,2.00,'gray'),(7,27,15,15,10,0.50,'direct attach'),(8,25,15,15,20,2.00,'direct attach'),(9,24,15,15,15,7.00,'direct attach'),(10,20,999,999,5,2.00,''),(11,18,5,5,9,5.00,'fiber ribbon'),(12,22,7,7,11,10.00,'fiber ribbon'),(13,11,1,11,5,0.50,'converter'),(14,11,1,9,4,1.00,'converter'); +/*!40000 ALTER TABLE `PatchCableHeap` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PatchCableHeapLog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PatchCableHeapLog` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `heap_id` int(10) unsigned NOT NULL, + `date` datetime NOT NULL, + `user` char(64) COLLATE utf8_unicode_ci NOT NULL, + `message` char(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `heap_id-date` (`heap_id`,`date`), + CONSTRAINT `PatchCableHeapLog-FK-heap_id` FOREIGN KEY (`heap_id`) REFERENCES `PatchCableHeap` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PatchCableHeapLog` WRITE; +/*!40000 ALTER TABLE `PatchCableHeapLog` DISABLE KEYS */; +INSERT INTO `PatchCableHeapLog` VALUES (1,14,'2014-06-15 00:10:24','admin','amount set to 5'),(2,13,'2014-06-15 00:10:28','admin','amount set to 5'),(3,2,'2014-06-15 00:10:34','admin','amount set to 100'),(4,1,'2014-06-15 00:10:42','admin','amount set to 100'),(5,3,'2014-06-15 00:10:49','admin','amount set to 100'),(6,6,'2014-06-15 00:10:56','admin','amount set to 50'),(7,4,'2014-06-15 00:10:59','admin','amount set to 100'),(8,5,'2014-06-15 00:11:01','admin','amount set to 100'),(9,12,'2014-06-15 00:11:07','admin','amount set to 10'),(10,11,'2014-06-15 00:11:09','admin','amount set to 10'),(11,10,'2014-06-15 00:11:12','admin','amount set to 5'),(12,7,'2014-06-15 00:11:16','admin','amount set to 2'),(13,8,'2014-06-15 00:11:28','admin','amount set to 20'),(14,9,'2014-06-15 00:11:34','admin','amount set to 15'),(15,7,'2014-06-15 00:14:22','admin','amount adjusted by 1'),(16,7,'2014-06-15 00:14:24','admin','amount adjusted by 1'),(17,7,'2014-06-15 00:14:25','admin','amount adjusted by 1'),(18,7,'2014-06-15 00:14:26','admin','amount adjusted by 1'),(19,7,'2014-06-15 00:14:27','admin','amount adjusted by 1'),(20,7,'2014-06-15 00:14:29','admin','amount adjusted by 1'),(21,7,'2014-06-15 00:14:30','admin','amount adjusted by 1'),(22,7,'2014-06-15 00:14:31','admin','amount adjusted by 1'),(23,6,'2014-06-15 00:14:35','admin','amount adjusted by -1'),(24,12,'2014-06-15 00:14:38','admin','amount adjusted by 1'),(25,11,'2014-06-15 00:14:40','admin','amount adjusted by -1'),(26,1,'2014-06-15 00:14:42','admin','amount adjusted by -1'),(27,1,'2014-06-15 00:14:44','admin','amount adjusted by -1'),(28,1,'2014-06-15 00:14:45','admin','amount adjusted by -1'),(29,2,'2014-06-15 00:14:47','admin','amount adjusted by -1'),(30,2,'2014-06-15 00:14:50','admin','amount adjusted by -1'),(31,5,'2014-06-15 00:14:51','admin','amount adjusted by -1'),(32,5,'2014-06-15 00:14:52','admin','amount adjusted by -1'),(33,14,'2014-06-15 00:14:57','admin','amount adjusted by -1'); +/*!40000 ALTER TABLE `PatchCableHeapLog` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PatchCableOIFCompat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PatchCableOIFCompat` ( + `pctype_id` int(10) unsigned NOT NULL, + `oif_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`pctype_id`,`oif_id`), + KEY `oif_id` (`oif_id`), + CONSTRAINT `PatchCableOIFCompat-FK-oif_id` FOREIGN KEY (`oif_id`) REFERENCES `PortOuterInterface` (`id`), + CONSTRAINT `PatchCableOIFCompat-FK-pctype_id` FOREIGN KEY (`pctype_id`) REFERENCES `PatchCableType` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PatchCableOIFCompat` WRITE; +/*!40000 ALTER TABLE `PatchCableOIFCompat` DISABLE KEYS */; +INSERT INTO `PatchCableOIFCompat` VALUES (13,18),(14,18),(15,18),(16,18),(17,18),(999,18),(13,19),(14,19),(15,19),(16,19),(17,19),(13,24),(14,24),(15,24),(16,24),(17,24),(1,30),(2,30),(3,30),(4,30),(5,34),(6,34),(5,35),(6,35),(5,36),(6,36),(1,37),(2,37),(3,37),(4,37),(5,38),(6,38),(1,39),(2,39),(3,39),(4,39),(5,39),(6,39),(20,40),(23,1077),(24,1084),(25,1084),(26,1084),(27,1084),(11,1088),(12,1088),(11,1089),(12,1089),(11,1090),(12,1090),(11,1091),(12,1091),(1,1195),(2,1195),(3,1195),(4,1195),(1,1196),(2,1196),(3,1196),(4,1196),(5,1197),(6,1197),(11,1198),(12,1198),(11,1199),(12,1199),(5,1200),(6,1200),(5,1201),(6,1201),(1,1202),(2,1202),(3,1202),(4,1202),(1,1203),(2,1203),(3,1203),(4,1203),(5,1204),(6,1204),(5,1205),(6,1205),(11,1206),(12,1206),(11,1207),(12,1207),(14,1642),(15,1642),(16,1642),(17,1642),(5,1660),(6,1660),(5,1662),(6,1662),(18,1663),(19,1663),(5,1664),(6,1664),(21,1669),(22,1669),(5,1670),(6,1670),(5,1671),(6,1671),(18,1672),(19,1672),(5,1675),(6,1675),(5,1676),(6,1676); +/*!40000 ALTER TABLE `PatchCableOIFCompat` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PatchCableType`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PatchCableType` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `origin` enum('default','custom') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'custom', + `pctype` char(64) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `pctype_per_origin` (`pctype`,`origin`) +) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PatchCableType` WRITE; +/*!40000 ALTER TABLE `PatchCableType` DISABLE KEYS */; +INSERT INTO `PatchCableType` VALUES (24,'default','10Gb/s 24AWG twinax'),(25,'default','10Gb/s 26AWG twinax'),(26,'default','10Gb/s 28AWG twinax'),(27,'default','10Gb/s 30AWG twinax'),(20,'default','10Gb/s CX4 coax'),(18,'default','12-fiber OM3'),(19,'default','12-fiber OM4'),(23,'default','1Gb/s 50cm shielded'),(21,'default','24-fiber OM3'),(22,'default','24-fiber OM4'),(999,'default','Cat.3 TP'),(13,'default','Cat.5 TP'),(14,'default','Cat.6 TP'),(15,'default','Cat.6a TP'),(16,'default','Cat.7 TP'),(17,'default','Cat.7a TP'),(1,'default','duplex OM1'),(2,'default','duplex OM2'),(3,'default','duplex OM3'),(4,'default','duplex OM4'),(5,'default','duplex OS1'),(6,'default','duplex OS2'),(7,'default','simplex OM1'),(8,'default','simplex OM2'),(9,'default','simplex OM3'),(10,'default','simplex OM4'),(11,'default','simplex OS1'),(12,'default','simplex OS2'); +/*!40000 ALTER TABLE `PatchCableType` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `Port`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Port` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `object_id` int(10) unsigned NOT NULL DEFAULT '0', + `name` char(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `iif_id` int(10) unsigned NOT NULL, + `type` int(10) unsigned NOT NULL DEFAULT '0', + `l2address` char(64) COLLATE utf8_unicode_ci DEFAULT NULL, + `reservation_comment` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `object_iif_oif_name` (`object_id`,`iif_id`,`type`,`name`), + KEY `type` (`type`), + KEY `comment` (`reservation_comment`), + KEY `l2address` (`l2address`), + KEY `Port-FK-iif-oif` (`iif_id`,`type`), + CONSTRAINT `Port-FK-iif-oif` FOREIGN KEY (`iif_id`, `type`) REFERENCES `PortInterfaceCompat` (`iif_id`, `oif_id`), + CONSTRAINT `Port-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3275 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `Port` WRITE; +/*!40000 ALTER TABLE `Port` DISABLE KEYS */; +INSERT INTO `Port` VALUES (3057,905,'se1/0',1,32,NULL,NULL,''),(3058,905,'se1/1',1,32,NULL,NULL,''),(3059,905,'fa2/0',1,19,'00000000A001',NULL,''),(3060,905,'fa2/1',1,19,'00000000A002','ISP uplink',''),(3062,906,'gi2',1,24,'00000000B002',NULL,'2'),(3063,906,'gi1',1,24,'00000000B001',NULL,'1'),(3064,906,'gi3',1,24,'00000000B003',NULL,'3'),(3065,906,'gi4',1,24,'00000000B004',NULL,'4'),(3066,906,'gi5',1,24,'00000000B005',NULL,'5'),(3067,906,'gi6',1,24,'00000000B006',NULL,'6'),(3068,906,'gi7',1,24,'00000000B007',NULL,'7'),(3069,906,'gi8',1,24,'00000000B008',NULL,'8'),(3070,907,'se1/0',1,32,NULL,NULL,''),(3071,907,'se1/1',1,32,NULL,NULL,''),(3072,915,'e1',1,19,NULL,NULL,'1'),(3073,915,'e2',1,19,NULL,NULL,'2'),(3074,915,'e3',1,19,NULL,NULL,'3'),(3075,915,'e4',1,19,NULL,NULL,'4'),(3076,915,'e5',1,19,NULL,NULL,'5'),(3077,915,'e6',1,19,NULL,NULL,'6'),(3078,915,'e7',1,19,NULL,NULL,'7'),(3079,915,'e8',1,19,NULL,NULL,'8'),(3080,910,'eth0',1,24,NULL,NULL,'1'),(3081,910,'eth1',1,24,NULL,NULL,'2'),(3082,909,'se1/0',1,32,NULL,NULL,''),(3083,909,'se1/1',1,32,NULL,NULL,''),(3084,908,'se1/0',1,32,NULL,NULL,''),(3085,908,'se1/1',1,32,NULL,NULL,''),(3086,911,'eth0',1,24,NULL,NULL,'1'),(3087,911,'eth1',1,24,NULL,NULL,'2'),(3088,912,'eth0',1,24,NULL,NULL,'1'),(3089,912,'eth1',1,24,NULL,NULL,'2'),(3090,913,'eth0',1,24,NULL,NULL,'1'),(3091,913,'eth1',1,24,NULL,NULL,'2'),(3092,914,'eth0',1,24,NULL,NULL,'1'),(3093,914,'eth1',1,24,NULL,NULL,'2'),(3094,917,'fa0/0',1,19,NULL,NULL,''),(3095,919,'bge0',1,24,NULL,NULL,''),(3096,919,'bge1',1,24,NULL,NULL,''),(3097,918,'bge0',1,24,NULL,NULL,''),(3098,918,'bge1',1,24,NULL,NULL,''),(3099,909,'fa2/0',1,19,NULL,NULL,''),(3100,909,'fa2/1',1,19,NULL,'ISP uplink',''),(3101,926,'fa1',1,19,NULL,NULL,'1'),(3102,926,'fa2',1,19,NULL,NULL,'2'),(3103,926,'fa3',1,19,NULL,NULL,'3'),(3104,926,'fa4',1,19,NULL,NULL,'4'),(3105,926,'fa5',1,19,NULL,NULL,'5'),(3106,926,'fa6',1,19,NULL,NULL,'6'),(3107,926,'fa7',1,19,NULL,NULL,'7'),(3108,926,'fa8',1,19,NULL,NULL,'8'),(3109,926,'fa9',1,19,NULL,NULL,'9'),(3110,926,'fa10',1,19,NULL,NULL,'10'),(3111,926,'fa11',1,19,NULL,NULL,'11'),(3112,926,'fa12',1,19,NULL,NULL,'12'),(3113,923,'eth0',1,24,NULL,NULL,'1'),(3114,923,'eth1',1,24,NULL,NULL,'2'),(3115,924,'eth0',1,24,NULL,NULL,'1'),(3116,924,'eth1',1,24,NULL,NULL,'2'),(3117,925,'eth0',1,24,NULL,NULL,'1'),(3118,925,'eth1',1,24,NULL,NULL,'2'),(3119,908,'fa2/0',1,19,NULL,NULL,''),(3120,908,'fa2/1',1,19,NULL,'ISP uplink',''),(3121,907,'fa2/0',1,19,NULL,NULL,''),(3122,907,'fa2/1',1,19,NULL,NULL,''),(3123,927,'gi3/0',3,1202,NULL,'ISP uplink',''),(3124,927,'gi4/0',3,1202,NULL,NULL,''),(3125,907,'gi3/0',3,1202,NULL,'ISP uplink',''),(3126,907,'gi4/0',3,1202,NULL,NULL,''),(3127,956,'kvm',1,33,NULL,NULL,''),(3128,956,'eth0',1,24,NULL,NULL,''),(3129,956,'eth1',1,24,NULL,NULL,''),(3130,957,'kvm',1,33,NULL,NULL,''),(3131,957,'eth0',1,24,NULL,NULL,''),(3132,957,'eth1',1,24,NULL,NULL,''),(3133,958,'kvm',1,33,NULL,NULL,''),(3134,958,'eth0',1,24,NULL,NULL,''),(3135,958,'eth1',1,24,NULL,NULL,''),(3136,959,'kvm',1,33,NULL,NULL,''),(3137,959,'eth0',1,24,NULL,NULL,''),(3138,959,'eth1',1,24,NULL,NULL,''),(3139,960,'kvm',1,33,NULL,NULL,''),(3140,960,'eth0',1,24,NULL,NULL,''),(3141,960,'eth1',1,24,NULL,NULL,''),(3142,908,'con0',1,29,NULL,NULL,'console'),(3143,961,'1',1,24,'01040104AA00',NULL,''),(3144,961,'2',1,24,'01040104AA01','for field engineer',''),(3145,961,'3',1,24,'01040104AA02',NULL,''),(3146,961,'4',1,24,'01040104AA03',NULL,''),(3147,961,'5',1,24,'01040104AA04',NULL,''),(3148,961,'6',1,24,'01040104AA05',NULL,''),(3149,961,'7',1,24,'01040104AA06',NULL,''),(3150,961,'8',1,24,'01040104AA07',NULL,''),(3151,961,'9',1,24,'01040104AA08',NULL,''),(3152,961,'10',1,24,'01040104AA09',NULL,''),(3153,961,'11',1,24,'01040104AA0A',NULL,''),(3154,961,'12',1,24,'01040104AA0B',NULL,''),(3155,961,'13',1,24,'01040104AA0C',NULL,''),(3156,961,'14',1,24,'01040104AA0D',NULL,''),(3157,961,'15',1,24,'01040104AA0E',NULL,''),(3158,961,'16',1,24,'01040104AA0F',NULL,''),(3159,961,'con',1,681,NULL,NULL,'console'),(3160,956,'ttyS0',1,681,NULL,NULL,'serial A'),(3161,956,'ttyS1',1,681,NULL,NULL,'serial B'),(3162,962,'tail1',1,446,NULL,NULL,''),(3163,962,'tail2',1,446,NULL,NULL,''),(3164,962,'tail3',1,446,NULL,NULL,''),(3165,962,'tail4',1,446,NULL,NULL,''),(3166,962,'tail5',1,446,NULL,NULL,''),(3167,962,'tail6',1,446,NULL,NULL,''),(3168,962,'tail7',1,446,NULL,NULL,''),(3169,962,'tail8',1,446,NULL,NULL,''),(3170,962,'head',1,33,NULL,'monitor connected',''),(3171,962,'net',1,19,'020002003333',NULL,''),(3178,927,'fa1/0',1,19,NULL,NULL,''),(3179,908,'fa1/0',1,19,NULL,NULL,''),(3180,955,'in',1,16,NULL,'from local distribution',''),(3181,955,'out1',1,1322,NULL,NULL,''),(3182,955,'out2',1,1322,NULL,NULL,''),(3183,955,'out3',1,1322,NULL,NULL,''),(3184,955,'out4',1,1322,NULL,NULL,''),(3185,955,'out5',1,1322,NULL,NULL,''),(3186,923,'ps',1,16,NULL,NULL,''),(3187,924,'ps',1,16,NULL,NULL,''),(3188,925,'ps',1,16,NULL,NULL,''),(3189,926,'ps',1,16,NULL,NULL,''),(3190,909,'ps',1,16,NULL,NULL,''),(3191,979,'gi0/1',1,24,NULL,NULL,''),(3192,979,'gi0/2',1,24,NULL,NULL,''),(3193,979,'gi0/3',1,24,NULL,NULL,''),(3194,979,'gi0/4',1,24,NULL,NULL,''),(3195,979,'gi0/5',1,24,NULL,NULL,''),(3196,979,'gi0/6',1,24,NULL,NULL,''),(3197,979,'gi0/7',1,24,NULL,NULL,''),(3198,979,'gi0/8',1,24,NULL,NULL,''),(3199,979,'gi0/9',1,24,NULL,NULL,''),(3200,979,'gi0/10',1,24,NULL,NULL,''),(3201,979,'gi0/11',1,24,NULL,NULL,''),(3202,979,'gi0/12',1,24,NULL,NULL,''),(3203,979,'gi0/13',1,24,NULL,NULL,''),(3204,979,'gi0/14',1,24,NULL,NULL,''),(3205,979,'gi0/15',1,24,NULL,NULL,''),(3206,979,'gi0/16',1,24,NULL,NULL,''),(3207,979,'gi0/17',1,24,NULL,NULL,''),(3208,979,'gi0/18',1,24,NULL,NULL,''),(3209,979,'gi0/19',1,24,NULL,NULL,''),(3210,979,'gi0/20',1,24,NULL,NULL,''),(3211,979,'gi0/21',1,24,NULL,NULL,''),(3212,979,'gi0/22',1,24,NULL,NULL,''),(3213,979,'gi0/23',1,24,NULL,NULL,''),(3214,979,'gi0/24',1,24,NULL,NULL,''),(3215,980,'gi0/0/1',1,24,NULL,NULL,''),(3216,980,'gi0/0/2',1,24,NULL,NULL,''),(3217,980,'gi0/0/3',1,24,NULL,NULL,''),(3218,980,'gi0/0/4',1,24,NULL,NULL,''),(3219,980,'gi0/0/5',1,24,NULL,NULL,''),(3220,980,'gi0/0/6',1,24,NULL,NULL,''),(3221,980,'gi0/0/7',1,24,NULL,NULL,''),(3222,980,'gi0/0/8',1,24,NULL,NULL,''),(3223,980,'gi0/0/9',1,24,NULL,NULL,''),(3224,980,'gi0/0/10',1,24,NULL,NULL,''),(3225,980,'gi0/0/11',1,24,NULL,NULL,''),(3226,980,'gi0/0/12',1,24,NULL,NULL,''),(3227,980,'gi0/0/13',1,24,NULL,NULL,''),(3228,980,'gi0/0/14',1,24,NULL,NULL,''),(3229,980,'gi0/0/15',1,24,NULL,NULL,''),(3230,980,'gi0/0/16',1,24,NULL,NULL,''),(3231,980,'gi0/0/17',1,24,NULL,NULL,''),(3232,980,'gi0/0/18',1,24,NULL,NULL,''),(3233,980,'gi0/0/19',1,24,NULL,NULL,''),(3234,980,'gi0/0/20',1,24,NULL,NULL,''),(3235,980,'gi0/0/21',1,24,NULL,NULL,''),(3236,980,'gi0/0/22',1,24,NULL,NULL,''),(3237,980,'gi0/0/23',1,24,NULL,NULL,''),(3238,980,'gi0/0/24',1,24,NULL,NULL,''),(3239,980,'gi0/0/25',1,24,NULL,NULL,''),(3240,980,'gi0/0/26',1,24,NULL,NULL,''),(3241,980,'gi0/0/27',1,24,NULL,NULL,''),(3242,980,'gi0/0/28',1,24,NULL,NULL,''),(3243,980,'gi0/0/29',1,24,NULL,NULL,''),(3244,980,'gi0/0/30',1,24,NULL,NULL,''),(3245,980,'gi0/0/31',1,24,NULL,NULL,''),(3246,980,'gi0/0/32',1,24,NULL,NULL,''),(3247,980,'gi0/0/33',1,24,NULL,NULL,''),(3248,980,'gi0/0/34',1,24,NULL,NULL,''),(3249,980,'gi0/0/35',1,24,NULL,NULL,''),(3250,980,'gi0/0/36',1,24,NULL,NULL,''),(3251,980,'gi0/0/37',1,24,NULL,NULL,''),(3252,980,'gi0/0/38',1,24,NULL,NULL,''),(3253,980,'gi0/0/39',1,24,NULL,NULL,''),(3254,980,'gi0/0/40',1,24,NULL,NULL,''),(3255,980,'gi0/0/41',1,24,NULL,NULL,''),(3256,980,'gi0/0/42',1,24,NULL,NULL,''),(3257,980,'gi0/0/43',1,24,NULL,NULL,''),(3258,980,'gi0/0/44',1,24,NULL,NULL,''),(3259,980,'gi0/0/45',1,24,NULL,NULL,''),(3260,980,'gi0/0/46',1,24,NULL,NULL,''),(3261,980,'gi0/0/47',1,24,NULL,NULL,''),(3262,980,'gi0/0/48',1,24,NULL,NULL,''),(3263,981,'gi0/1',1,24,NULL,NULL,''),(3264,981,'gi0/2',1,24,NULL,NULL,''),(3265,981,'gi0/3',1,24,NULL,NULL,''),(3266,981,'gi0/4',1,24,NULL,NULL,''),(3267,981,'gi0/5',1,24,NULL,NULL,''),(3268,981,'gi0/6',1,24,NULL,NULL,''),(3269,981,'gi0/7',1,24,NULL,NULL,''),(3270,981,'gi0/8',1,24,NULL,NULL,''),(3271,981,'gi0/9',1,24,NULL,NULL,''),(3272,981,'gi0/10',1,24,NULL,NULL,''),(3273,981,'gi0/11',1,24,NULL,NULL,''),(3274,981,'gi0/12',1,24,NULL,NULL,''); +/*!40000 ALTER TABLE `Port` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PortAllowedVLAN`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PortAllowedVLAN` ( + `object_id` int(10) unsigned NOT NULL, + `port_name` char(255) COLLATE utf8_unicode_ci NOT NULL, + `vlan_id` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`object_id`,`port_name`,`vlan_id`), + KEY `vlan_id` (`vlan_id`), + CONSTRAINT `PortAllowedVLAN-FK-object-port` FOREIGN KEY (`object_id`, `port_name`) REFERENCES `PortVLANMode` (`object_id`, `port_name`) ON DELETE CASCADE, + CONSTRAINT `PortAllowedVLAN-FK-vlan_id` FOREIGN KEY (`vlan_id`) REFERENCES `VLANValidID` (`vlan_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PortAllowedVLAN` WRITE; +/*!40000 ALTER TABLE `PortAllowedVLAN` DISABLE KEYS */; +INSERT INTO `PortAllowedVLAN` VALUES (980,'gi0/0/1',1),(980,'gi0/0/10',1),(980,'gi0/0/11',1),(980,'gi0/0/12',1),(980,'gi0/0/13',1),(980,'gi0/0/14',1),(980,'gi0/0/15',1),(980,'gi0/0/16',1),(980,'gi0/0/17',1),(980,'gi0/0/18',1),(980,'gi0/0/19',1),(980,'gi0/0/2',1),(980,'gi0/0/20',1),(980,'gi0/0/21',1),(980,'gi0/0/22',1),(980,'gi0/0/23',1),(980,'gi0/0/24',1),(980,'gi0/0/25',1),(980,'gi0/0/26',1),(980,'gi0/0/27',1),(980,'gi0/0/28',1),(980,'gi0/0/29',1),(980,'gi0/0/3',1),(980,'gi0/0/30',1),(980,'gi0/0/31',1),(980,'gi0/0/32',1),(980,'gi0/0/33',1),(980,'gi0/0/34',1),(980,'gi0/0/35',1),(980,'gi0/0/36',1),(980,'gi0/0/37',1),(980,'gi0/0/38',1),(980,'gi0/0/39',1),(980,'gi0/0/40',1),(980,'gi0/0/41',1),(980,'gi0/0/42',1),(980,'gi0/0/43',1),(980,'gi0/0/44',1),(980,'gi0/0/45',1),(980,'gi0/0/46',1),(980,'gi0/0/47',1),(980,'gi0/0/6',1),(980,'gi0/0/7',1),(980,'gi0/0/8',1),(980,'gi0/0/9',1),(981,'gi0/10',1),(981,'gi0/11',1),(981,'gi0/12',1),(981,'gi0/2',1),(981,'gi0/4',1),(981,'gi0/5',1),(981,'gi0/6',1),(981,'gi0/7',1),(981,'gi0/8',1),(981,'gi0/9',1),(979,'gi0/13',3),(979,'gi0/24',3),(980,'gi0/0/4',3),(980,'gi0/0/48',3),(981,'gi0/1',3),(981,'gi0/3',3),(980,'gi0/0/48',5),(980,'gi0/0/5',5),(981,'gi0/3',5),(979,'gi0/1',7),(979,'gi0/2',7),(979,'gi0/24',7),(981,'gi0/1',7),(979,'gi0/1',8),(979,'gi0/2',8),(979,'gi0/24',8),(981,'gi0/1',8),(979,'gi0/1',9),(979,'gi0/10',9),(979,'gi0/11',9),(979,'gi0/12',9),(979,'gi0/14',9),(979,'gi0/15',9),(979,'gi0/16',9),(979,'gi0/17',9),(979,'gi0/18',9),(979,'gi0/19',9),(979,'gi0/2',9),(979,'gi0/20',9),(979,'gi0/21',9),(979,'gi0/22',9),(979,'gi0/23',9),(979,'gi0/24',9),(979,'gi0/3',9),(979,'gi0/4',9),(979,'gi0/5',9),(979,'gi0/6',9),(979,'gi0/7',9),(979,'gi0/8',9),(979,'gi0/9',9),(981,'gi0/1',9),(980,'gi0/0/1',11),(980,'gi0/0/48',11),(981,'gi0/3',11),(980,'gi0/0/1',12),(980,'gi0/0/48',12),(981,'gi0/3',12),(980,'gi0/0/1',13),(980,'gi0/0/48',13),(981,'gi0/3',13); +/*!40000 ALTER TABLE `PortAllowedVLAN` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PortCompat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PortCompat` ( + `type1` int(10) unsigned NOT NULL DEFAULT '0', + `type2` int(10) unsigned NOT NULL DEFAULT '0', + UNIQUE KEY `type1_2` (`type1`,`type2`), + KEY `type2` (`type2`), + CONSTRAINT `PortCompat-FK-oif_id1` FOREIGN KEY (`type1`) REFERENCES `PortOuterInterface` (`id`), + CONSTRAINT `PortCompat-FK-oif_id2` FOREIGN KEY (`type2`) REFERENCES `PortOuterInterface` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PortCompat` WRITE; +/*!40000 ALTER TABLE `PortCompat` DISABLE KEYS */; +INSERT INTO `PortCompat` VALUES (1322,16),(17,17),(18,18),(19,18),(24,18),(18,19),(19,19),(24,19),(18,24),(19,24),(24,24),(29,29),(681,29),(682,29),(30,30),(32,32),(446,33),(34,34),(35,35),(36,36),(37,37),(38,38),(39,39),(40,40),(41,41),(42,42),(439,439),(33,446),(29,681),(681,681),(682,681),(29,682),(681,682),(682,682),(1077,1077),(1084,1084),(1087,1087),(1089,1088),(1088,1089),(1091,1090),(1090,1091),(1195,1195),(1196,1196),(1197,1197),(1199,1198),(1198,1199),(1200,1200),(1201,1201),(1202,1202),(1203,1203),(1204,1204),(1205,1205),(1207,1206),(1206,1207),(1209,1209),(1210,1210),(1211,1211),(1212,1212),(1213,1213),(1214,1214),(1215,1215),(1216,1216),(1217,1217),(1218,1218),(1219,1219),(1220,1220),(1221,1221),(1222,1222),(1223,1223),(1224,1224),(1225,1225),(1226,1226),(1227,1227),(1228,1228),(1229,1229),(1230,1230),(1231,1231),(1232,1232),(1233,1233),(1234,1234),(1235,1235),(1236,1236),(1237,1237),(1238,1238),(1239,1239),(1240,1240),(1241,1241),(1242,1242),(1243,1243),(1244,1244),(1245,1245),(1246,1246),(1247,1247),(1248,1248),(1249,1249),(1250,1250),(1251,1251),(1252,1252),(1253,1253),(1254,1254),(1255,1255),(1256,1256),(1257,1257),(1258,1258),(1259,1259),(1260,1260),(1261,1261),(1262,1262),(1263,1263),(1264,1264),(1265,1265),(1266,1266),(1267,1267),(1268,1268),(1269,1269),(1270,1270),(1271,1271),(1272,1272),(1273,1273),(1274,1274),(1275,1275),(1276,1276),(1277,1277),(1278,1278),(1279,1279),(1280,1280),(1281,1281),(1282,1282),(1283,1283),(1284,1284),(1285,1285),(1286,1286),(1287,1287),(1288,1288),(1289,1289),(1290,1290),(1291,1291),(1292,1292),(1293,1293),(1294,1294),(1295,1295),(1296,1296),(1297,1297),(1298,1298),(1299,1299),(1300,1300),(1316,1316),(16,1322),(1399,1399),(1424,1424),(1425,1425),(1426,1426),(1427,1427),(1428,1428),(1429,1429),(1430,1430),(1431,1431),(1432,1432),(1433,1433),(1434,1434),(1435,1435),(1436,1436),(1437,1437),(1438,1438),(1439,1439),(1440,1440),(1441,1441),(1442,1442),(1443,1443),(1444,1444),(1445,1445),(1446,1446),(1447,1447),(1448,1448),(1449,1449),(1450,1450),(1451,1451),(1452,1452),(1453,1453),(1454,1454),(1455,1455),(1456,1456),(1457,1457),(1458,1458),(1459,1459),(1460,1460),(1461,1461),(1462,1462),(1463,1463),(1464,1464),(1465,1465),(1466,1466),(1469,1469),(1588,1588),(1589,1588),(1590,1588),(1588,1589),(1589,1589),(1590,1589),(1588,1590),(1589,1590),(1590,1590),(1591,1591),(1603,1603),(1642,1642),(1660,1660),(1661,1661),(1662,1662),(1663,1663),(1664,1664),(1668,1668),(1669,1669),(1670,1670),(1671,1671),(1672,1672),(1673,1673),(1674,1674),(1675,1675),(1676,1676),(1677,1677),(1678,1678),(1999,1999); +/*!40000 ALTER TABLE `PortCompat` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PortInnerInterface`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PortInnerInterface` ( + `id` int(10) unsigned NOT NULL, + `iif_name` char(16) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `iif_name` (`iif_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PortInnerInterface` WRITE; +/*!40000 ALTER TABLE `PortInnerInterface` DISABLE KEYS */; +INSERT INTO `PortInnerInterface` VALUES (11,'CFP'),(12,'CFP2'),(13,'CPAK'),(14,'CXP'),(3,'GBIC'),(1,'hardwired'),(10,'QSFP+'),(15,'QSFP28'),(2,'SFP-100'),(4,'SFP-1000'),(9,'SFP+'),(6,'X2'),(5,'XENPAK'),(8,'XFP'),(7,'XPAK'); +/*!40000 ALTER TABLE `PortInnerInterface` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PortInterfaceCompat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PortInterfaceCompat` ( + `iif_id` int(10) unsigned NOT NULL, + `oif_id` int(10) unsigned NOT NULL, + UNIQUE KEY `pair` (`iif_id`,`oif_id`), + KEY `PortInterfaceCompat-FK-oif_id` (`oif_id`), + CONSTRAINT `PortInterfaceCompat-FK-iif_id` FOREIGN KEY (`iif_id`) REFERENCES `PortInnerInterface` (`id`), + CONSTRAINT `PortInterfaceCompat-FK-oif_id` FOREIGN KEY (`oif_id`) REFERENCES `PortOuterInterface` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PortInterfaceCompat` WRITE; +/*!40000 ALTER TABLE `PortInterfaceCompat` DISABLE KEYS */; +INSERT INTO `PortInterfaceCompat` VALUES (1,16),(1,19),(1,24),(3,24),(4,24),(1,29),(5,30),(6,30),(7,30),(8,30),(9,30),(1,31),(1,32),(1,33),(3,34),(4,34),(5,35),(6,35),(7,35),(8,35),(9,35),(5,36),(6,36),(7,36),(8,36),(9,36),(5,37),(6,37),(7,37),(8,37),(9,37),(5,38),(6,38),(7,38),(8,38),(9,38),(5,39),(6,39),(7,39),(8,39),(9,39),(5,40),(6,40),(7,40),(8,40),(9,40),(3,42),(4,42),(1,446),(1,681),(1,682),(4,1077),(3,1078),(5,1079),(6,1080),(7,1081),(8,1082),(9,1084),(4,1088),(4,1089),(4,1090),(4,1091),(2,1195),(2,1196),(2,1197),(2,1198),(2,1199),(2,1200),(2,1201),(3,1202),(4,1202),(3,1203),(4,1203),(3,1204),(4,1204),(3,1205),(4,1205),(3,1206),(4,1206),(3,1207),(4,1207),(2,1208),(1,1322),(1,1399),(1,1469),(10,1588),(15,1588),(12,1589),(13,1590),(14,1591),(10,1660),(15,1660),(10,1662),(15,1662),(10,1663),(15,1663),(10,1664),(15,1664),(11,1668),(11,1669),(12,1669),(13,1669),(11,1670),(12,1670),(13,1670),(15,1670),(11,1671),(12,1671),(13,1671),(15,1671),(11,1672),(12,1672),(13,1672),(15,1672),(11,1673),(12,1673),(13,1673),(15,1673),(11,1674),(12,1674),(13,1674),(15,1674),(11,1675),(12,1675),(13,1675),(11,1676),(12,1676),(13,1676),(14,1677),(14,1678); +/*!40000 ALTER TABLE `PortInterfaceCompat` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PortLog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PortLog` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `port_id` int(10) unsigned NOT NULL, + `date` datetime NOT NULL, + `user` varchar(64) COLLATE utf8_unicode_ci NOT NULL, + `message` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `port_id-date` (`port_id`,`date`), + CONSTRAINT `PortLog_ibfk_1` FOREIGN KEY (`port_id`) REFERENCES `Port` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PortLog` WRITE; +/*!40000 ALTER TABLE `PortLog` DISABLE KEYS */; +/*!40000 ALTER TABLE `PortLog` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PortNativeVLAN`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PortNativeVLAN` ( + `object_id` int(10) unsigned NOT NULL, + `port_name` char(255) COLLATE utf8_unicode_ci NOT NULL, + `vlan_id` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`object_id`,`port_name`,`vlan_id`), + UNIQUE KEY `port_id` (`object_id`,`port_name`), + CONSTRAINT `PortNativeVLAN-FK-compound` FOREIGN KEY (`object_id`, `port_name`, `vlan_id`) REFERENCES `PortAllowedVLAN` (`object_id`, `port_name`, `vlan_id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PortNativeVLAN` WRITE; +/*!40000 ALTER TABLE `PortNativeVLAN` DISABLE KEYS */; +INSERT INTO `PortNativeVLAN` VALUES (979,'gi0/1',9),(979,'gi0/10',9),(979,'gi0/11',9),(979,'gi0/12',9),(979,'gi0/13',3),(979,'gi0/14',9),(979,'gi0/15',9),(979,'gi0/16',9),(979,'gi0/17',9),(979,'gi0/18',9),(979,'gi0/19',9),(979,'gi0/2',9),(979,'gi0/20',9),(979,'gi0/21',9),(979,'gi0/22',9),(979,'gi0/23',9),(979,'gi0/3',9),(979,'gi0/4',9),(979,'gi0/5',9),(979,'gi0/6',9),(979,'gi0/7',9),(979,'gi0/8',9),(979,'gi0/9',9),(980,'gi0/0/1',1),(980,'gi0/0/10',1),(980,'gi0/0/11',1),(980,'gi0/0/12',1),(980,'gi0/0/13',1),(980,'gi0/0/14',1),(980,'gi0/0/15',1),(980,'gi0/0/16',1),(980,'gi0/0/17',1),(980,'gi0/0/18',1),(980,'gi0/0/19',1),(980,'gi0/0/2',1),(980,'gi0/0/20',1),(980,'gi0/0/21',1),(980,'gi0/0/22',1),(980,'gi0/0/23',1),(980,'gi0/0/24',1),(980,'gi0/0/25',1),(980,'gi0/0/26',1),(980,'gi0/0/27',1),(980,'gi0/0/28',1),(980,'gi0/0/29',1),(980,'gi0/0/3',1),(980,'gi0/0/30',1),(980,'gi0/0/31',1),(980,'gi0/0/32',1),(980,'gi0/0/33',1),(980,'gi0/0/34',1),(980,'gi0/0/35',1),(980,'gi0/0/36',1),(980,'gi0/0/37',1),(980,'gi0/0/38',1),(980,'gi0/0/39',1),(980,'gi0/0/4',3),(980,'gi0/0/40',1),(980,'gi0/0/41',1),(980,'gi0/0/42',1),(980,'gi0/0/43',1),(980,'gi0/0/44',1),(980,'gi0/0/45',1),(980,'gi0/0/46',1),(980,'gi0/0/47',1),(980,'gi0/0/5',5),(980,'gi0/0/6',1),(980,'gi0/0/7',1),(980,'gi0/0/8',1),(980,'gi0/0/9',1),(981,'gi0/10',1),(981,'gi0/11',1),(981,'gi0/12',1),(981,'gi0/2',1),(981,'gi0/4',1),(981,'gi0/5',1),(981,'gi0/6',1),(981,'gi0/7',1),(981,'gi0/8',1),(981,'gi0/9',1); +/*!40000 ALTER TABLE `PortNativeVLAN` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PortOuterInterface`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PortOuterInterface` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `oif_name` char(48) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `oif_name` (`oif_name`) +) ENGINE=InnoDB AUTO_INCREMENT=2000 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PortOuterInterface` WRITE; +/*!40000 ALTER TABLE `PortOuterInterface` DISABLE KEYS */; +INSERT INTO `PortOuterInterface` VALUES (1206,'1000Base-BX10-D'),(1207,'1000Base-BX10-U'),(1088,'1000Base-BX40-D'),(1089,'1000Base-BX40-U'),(1090,'1000Base-BX80-D'),(1091,'1000Base-BX80-U'),(1209,'1000Base-CWDM80-1470 (gray)'),(1210,'1000Base-CWDM80-1490 (violet)'),(1211,'1000Base-CWDM80-1510 (blue)'),(1212,'1000Base-CWDM80-1530 (green)'),(1213,'1000Base-CWDM80-1550 (yellow)'),(1214,'1000Base-CWDM80-1570 (orange)'),(1215,'1000Base-CWDM80-1590 (red)'),(1216,'1000Base-CWDM80-1610 (brown)'),(1424,'1000Base-CX'),(1258,'1000Base-DWDM80-28.77 (ITU 61)'),(1257,'1000Base-DWDM80-29.55 (ITU 60)'),(1256,'1000Base-DWDM80-30.33 (ITU 59)'),(1255,'1000Base-DWDM80-31.12 (ITU 58)'),(1254,'1000Base-DWDM80-31.90 (ITU 57)'),(1253,'1000Base-DWDM80-32.68 (ITU 56)'),(1252,'1000Base-DWDM80-33.47 (ITU 55)'),(1251,'1000Base-DWDM80-34.25 (ITU 54)'),(1250,'1000Base-DWDM80-35.04 (ITU 53)'),(1249,'1000Base-DWDM80-35.82 (ITU 52)'),(1248,'1000Base-DWDM80-36.61 (ITU 51)'),(1247,'1000Base-DWDM80-37.40 (ITU 50)'),(1246,'1000Base-DWDM80-38.19 (ITU 49)'),(1245,'1000Base-DWDM80-38.98 (ITU 48)'),(1244,'1000Base-DWDM80-39.77 (ITU 47)'),(1243,'1000Base-DWDM80-40.56 (ITU 46)'),(1242,'1000Base-DWDM80-41.35 (ITU 45)'),(1241,'1000Base-DWDM80-42.14 (ITU 44)'),(1240,'1000Base-DWDM80-42.94 (ITU 43)'),(1239,'1000Base-DWDM80-43.73 (ITU 42)'),(1238,'1000Base-DWDM80-44.53 (ITU 41)'),(1237,'1000Base-DWDM80-45.32 (ITU 40)'),(1236,'1000Base-DWDM80-46.12 (ITU 39)'),(1235,'1000Base-DWDM80-46.92 (ITU 38)'),(1234,'1000Base-DWDM80-47.72 (ITU 37)'),(1233,'1000Base-DWDM80-48.51 (ITU 36)'),(1232,'1000Base-DWDM80-49.32 (ITU 35)'),(1231,'1000Base-DWDM80-50.12 (ITU 34)'),(1230,'1000Base-DWDM80-50.92 (ITU 33)'),(1229,'1000Base-DWDM80-51.72 (ITU 32)'),(1228,'1000Base-DWDM80-52.52 (ITU 31)'),(1227,'1000Base-DWDM80-53.33 (ITU 30)'),(1226,'1000Base-DWDM80-54.13 (ITU 29)'),(1225,'1000Base-DWDM80-54.94 (ITU 28)'),(1224,'1000Base-DWDM80-55.75 (ITU 27)'),(1223,'1000Base-DWDM80-56.55 (ITU 26)'),(1222,'1000Base-DWDM80-57.36 (ITU 25)'),(1221,'1000Base-DWDM80-58.17 (ITU 24)'),(1220,'1000Base-DWDM80-58.98 (ITU 23)'),(1219,'1000Base-DWDM80-59.79 (ITU 22)'),(1218,'1000Base-DWDM80-60.61 (ITU 21)'),(1217,'1000Base-DWDM80-61.42 (ITU 20)'),(42,'1000Base-EX'),(1204,'1000Base-LX'),(1205,'1000Base-LX10'),(1202,'1000Base-SX'),(1203,'1000Base-SX+'),(24,'1000Base-T'),(1087,'1000Base-T (Dell 1855)'),(1316,'1000Base-T (Dell M1000e)'),(1603,'1000Base-T (HP c-Class)'),(34,'1000Base-ZX'),(1198,'100Base-BX10-D'),(1199,'100Base-BX10-U'),(1200,'100Base-EX'),(1195,'100Base-FX'),(1197,'100Base-LX10'),(1196,'100Base-SX'),(19,'100Base-TX'),(1604,'100Base-TX (HP c-Class)'),(1201,'100Base-ZX'),(1678,'100GBase-CR10'),(1677,'100GBase-CR4'),(1676,'100GBase-ER10'),(1671,'100GBase-ER4'),(1674,'100GBase-KP4'),(1673,'100GBase-KR4'),(1675,'100GBase-LR10'),(1670,'100GBase-LR4'),(1669,'100GBase-SR10'),(1672,'100GBase-SR4'),(18,'10Base-T'),(17,'10Base2'),(40,'10GBase-CX4'),(35,'10GBase-ER'),(1466,'10GBase-ER-DWDM40-28.77 (ITU 61)'),(1465,'10GBase-ER-DWDM40-29.55 (ITU 60)'),(1464,'10GBase-ER-DWDM40-30.33 (ITU 59)'),(1463,'10GBase-ER-DWDM40-31.12 (ITU 58)'),(1462,'10GBase-ER-DWDM40-31.90 (ITU 57)'),(1461,'10GBase-ER-DWDM40-32.68 (ITU 56)'),(1460,'10GBase-ER-DWDM40-33.47 (ITU 55)'),(1459,'10GBase-ER-DWDM40-34.25 (ITU 54)'),(1458,'10GBase-ER-DWDM40-35.04 (ITU 53)'),(1457,'10GBase-ER-DWDM40-35.82 (ITU 52)'),(1456,'10GBase-ER-DWDM40-36.61 (ITU 51)'),(1455,'10GBase-ER-DWDM40-37.40 (ITU 50)'),(1454,'10GBase-ER-DWDM40-38.19 (ITU 49)'),(1453,'10GBase-ER-DWDM40-38.98 (ITU 48)'),(1452,'10GBase-ER-DWDM40-39.77 (ITU 47)'),(1451,'10GBase-ER-DWDM40-40.56 (ITU 46)'),(1450,'10GBase-ER-DWDM40-41.35 (ITU 45)'),(1449,'10GBase-ER-DWDM40-42.14 (ITU 44)'),(1448,'10GBase-ER-DWDM40-42.94 (ITU 43)'),(1447,'10GBase-ER-DWDM40-43.73 (ITU 42)'),(1446,'10GBase-ER-DWDM40-44.53 (ITU 41)'),(1445,'10GBase-ER-DWDM40-45.32 (ITU 40)'),(1444,'10GBase-ER-DWDM40-46.12 (ITU 39)'),(1443,'10GBase-ER-DWDM40-46.92 (ITU 38)'),(1442,'10GBase-ER-DWDM40-47.72 (ITU 37)'),(1441,'10GBase-ER-DWDM40-48.51 (ITU 36)'),(1440,'10GBase-ER-DWDM40-49.32 (ITU 35)'),(1439,'10GBase-ER-DWDM40-50.12 (ITU 34)'),(1438,'10GBase-ER-DWDM40-50.92 (ITU 33)'),(1437,'10GBase-ER-DWDM40-51.72 (ITU 32)'),(1436,'10GBase-ER-DWDM40-52.52 (ITU 31)'),(1435,'10GBase-ER-DWDM40-53.33 (ITU 30)'),(1434,'10GBase-ER-DWDM40-54.13 (ITU 29)'),(1433,'10GBase-ER-DWDM40-54.94 (ITU 28)'),(1432,'10GBase-ER-DWDM40-55.75 (ITU 27)'),(1431,'10GBase-ER-DWDM40-56.55 (ITU 26)'),(1430,'10GBase-ER-DWDM40-57.36 (ITU 25)'),(1429,'10GBase-ER-DWDM40-58.17 (ITU 24)'),(1428,'10GBase-ER-DWDM40-58.98 (ITU 23)'),(1427,'10GBase-ER-DWDM40-59.79 (ITU 22)'),(1426,'10GBase-ER-DWDM40-60.61 (ITU 21)'),(1425,'10GBase-ER-DWDM40-61.42 (ITU 20)'),(1999,'10GBase-KR'),(41,'10GBase-KX4'),(36,'10GBase-LR'),(37,'10GBase-LRM'),(39,'10GBase-LX4'),(30,'10GBase-SR'),(1642,'10GBase-T'),(38,'10GBase-ZR'),(1300,'10GBase-ZR-DWDM80-28.77 (ITU 61)'),(1299,'10GBase-ZR-DWDM80-29.55 (ITU 60)'),(1298,'10GBase-ZR-DWDM80-30.33 (ITU 59)'),(1297,'10GBase-ZR-DWDM80-31.12 (ITU 58)'),(1296,'10GBase-ZR-DWDM80-31.90 (ITU 57)'),(1295,'10GBase-ZR-DWDM80-32.68 (ITU 56)'),(1294,'10GBase-ZR-DWDM80-33.47 (ITU 55)'),(1293,'10GBase-ZR-DWDM80-34.25 (ITU 54)'),(1292,'10GBase-ZR-DWDM80-35.04 (ITU 53)'),(1291,'10GBase-ZR-DWDM80-35.82 (ITU 52)'),(1290,'10GBase-ZR-DWDM80-36.61 (ITU 51)'),(1289,'10GBase-ZR-DWDM80-37.40 (ITU 50)'),(1288,'10GBase-ZR-DWDM80-38.19 (ITU 49)'),(1287,'10GBase-ZR-DWDM80-38.98 (ITU 48)'),(1286,'10GBase-ZR-DWDM80-39.77 (ITU 47)'),(1285,'10GBase-ZR-DWDM80-40.56 (ITU 46)'),(1284,'10GBase-ZR-DWDM80-41.35 (ITU 45)'),(1283,'10GBase-ZR-DWDM80-42.14 (ITU 44)'),(1282,'10GBase-ZR-DWDM80-42.94 (ITU 43)'),(1281,'10GBase-ZR-DWDM80-43.73 (ITU 42)'),(1280,'10GBase-ZR-DWDM80-44.53 (ITU 41)'),(1279,'10GBase-ZR-DWDM80-45.32 (ITU 40)'),(1278,'10GBase-ZR-DWDM80-46.12 (ITU 39)'),(1277,'10GBase-ZR-DWDM80-46.92 (ITU 38)'),(1276,'10GBase-ZR-DWDM80-47.72 (ITU 37)'),(1275,'10GBase-ZR-DWDM80-48.51 (ITU 36)'),(1274,'10GBase-ZR-DWDM80-49.32 (ITU 35)'),(1273,'10GBase-ZR-DWDM80-50.12 (ITU 34)'),(1272,'10GBase-ZR-DWDM80-50.92 (ITU 33)'),(1271,'10GBase-ZR-DWDM80-51.72 (ITU 32)'),(1270,'10GBase-ZR-DWDM80-52.52 (ITU 31)'),(1269,'10GBase-ZR-DWDM80-53.33 (ITU 30)'),(1268,'10GBase-ZR-DWDM80-54.13 (ITU 29)'),(1267,'10GBase-ZR-DWDM80-54.94 (ITU 28)'),(1266,'10GBase-ZR-DWDM80-55.75 (ITU 27)'),(1265,'10GBase-ZR-DWDM80-56.55 (ITU 26)'),(1264,'10GBase-ZR-DWDM80-57.36 (ITU 25)'),(1263,'10GBase-ZR-DWDM80-58.17 (ITU 24)'),(1262,'10GBase-ZR-DWDM80-58.98 (ITU 23)'),(1261,'10GBase-ZR-DWDM80-59.79 (ITU 22)'),(1260,'10GBase-ZR-DWDM80-60.61 (ITU 21)'),(1259,'10GBase-ZR-DWDM80-61.42 (ITU 20)'),(1662,'40GBase-ER4'),(1660,'40GBase-FR'),(1661,'40GBase-KR4'),(1664,'40GBase-LR4'),(1663,'40GBase-SR4'),(16,'AC-in'),(1322,'AC-out'),(1399,'DC'),(439,'dry contact'),(1668,'empty CFP'),(1589,'empty CFP2'),(1590,'empty CPAK'),(1591,'empty CXP'),(1078,'empty GBIC'),(1588,'empty QSFP'),(1208,'empty SFP-100'),(1077,'empty SFP-1000'),(1084,'empty SFP+'),(1080,'empty X2'),(1079,'empty XENPAK'),(1082,'empty XFP'),(1081,'empty XPAK'),(446,'KVM (console)'),(33,'KVM (host)'),(682,'RS-232 (DB-25)'),(681,'RS-232 (DB-9)'),(29,'RS-232 (RJ-45)'),(32,'sync serial'),(440,'unknown'),(31,'virtual bridge'),(1469,'virtual port'); +/*!40000 ALTER TABLE `PortOuterInterface` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `PortVLANMode`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PortVLANMode` ( + `object_id` int(10) unsigned NOT NULL, + `port_name` char(255) COLLATE utf8_unicode_ci NOT NULL, + `vlan_mode` enum('access','trunk') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'access', + PRIMARY KEY (`object_id`,`port_name`), + CONSTRAINT `PortVLANMode-FK-object-port` FOREIGN KEY (`object_id`, `port_name`) REFERENCES `CachedPVM` (`object_id`, `port_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `PortVLANMode` WRITE; +/*!40000 ALTER TABLE `PortVLANMode` DISABLE KEYS */; +INSERT INTO `PortVLANMode` VALUES (979,'gi0/1','trunk'),(979,'gi0/10','access'),(979,'gi0/11','access'),(979,'gi0/12','access'),(979,'gi0/13','access'),(979,'gi0/14','access'),(979,'gi0/15','access'),(979,'gi0/16','access'),(979,'gi0/17','access'),(979,'gi0/18','access'),(979,'gi0/19','access'),(979,'gi0/2','trunk'),(979,'gi0/20','access'),(979,'gi0/21','access'),(979,'gi0/22','access'),(979,'gi0/23','access'),(979,'gi0/24','trunk'),(979,'gi0/3','access'),(979,'gi0/4','access'),(979,'gi0/5','access'),(979,'gi0/6','access'),(979,'gi0/7','access'),(979,'gi0/8','access'),(979,'gi0/9','access'),(980,'gi0/0/1','trunk'),(980,'gi0/0/10','access'),(980,'gi0/0/11','access'),(980,'gi0/0/12','access'),(980,'gi0/0/13','access'),(980,'gi0/0/14','access'),(980,'gi0/0/15','access'),(980,'gi0/0/16','access'),(980,'gi0/0/17','access'),(980,'gi0/0/18','access'),(980,'gi0/0/19','access'),(980,'gi0/0/2','access'),(980,'gi0/0/20','access'),(980,'gi0/0/21','access'),(980,'gi0/0/22','access'),(980,'gi0/0/23','access'),(980,'gi0/0/24','access'),(980,'gi0/0/25','access'),(980,'gi0/0/26','access'),(980,'gi0/0/27','access'),(980,'gi0/0/28','access'),(980,'gi0/0/29','access'),(980,'gi0/0/3','access'),(980,'gi0/0/30','access'),(980,'gi0/0/31','access'),(980,'gi0/0/32','access'),(980,'gi0/0/33','access'),(980,'gi0/0/34','access'),(980,'gi0/0/35','access'),(980,'gi0/0/36','access'),(980,'gi0/0/37','access'),(980,'gi0/0/38','access'),(980,'gi0/0/39','access'),(980,'gi0/0/4','access'),(980,'gi0/0/40','access'),(980,'gi0/0/41','access'),(980,'gi0/0/42','access'),(980,'gi0/0/43','access'),(980,'gi0/0/44','access'),(980,'gi0/0/45','access'),(980,'gi0/0/46','access'),(980,'gi0/0/47','access'),(980,'gi0/0/48','trunk'),(980,'gi0/0/5','access'),(980,'gi0/0/6','access'),(980,'gi0/0/7','access'),(980,'gi0/0/8','access'),(980,'gi0/0/9','access'),(981,'gi0/1','trunk'),(981,'gi0/10','trunk'),(981,'gi0/11','trunk'),(981,'gi0/12','trunk'),(981,'gi0/2','trunk'),(981,'gi0/3','trunk'),(981,'gi0/4','trunk'),(981,'gi0/5','trunk'),(981,'gi0/6','trunk'),(981,'gi0/7','trunk'),(981,'gi0/8','trunk'),(981,'gi0/9','trunk'); +/*!40000 ALTER TABLE `PortVLANMode` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `Rack`; +/*!50001 DROP VIEW IF EXISTS `Rack`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `Rack` AS SELECT + 1 AS `id`, + 1 AS `name`, + 1 AS `asset_no`, + 1 AS `has_problems`, + 1 AS `comment`, + 1 AS `height`, + 1 AS `sort_order`, + 1 AS `thumb_data`, + 1 AS `row_id`, + 1 AS `row_name`, + 1 AS `location_id`, + 1 AS `location_name`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `RackObject`; +/*!50001 DROP VIEW IF EXISTS `RackObject`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `RackObject` AS SELECT + 1 AS `id`, + 1 AS `name`, + 1 AS `label`, + 1 AS `objtype_id`, + 1 AS `asset_no`, + 1 AS `has_problems`, + 1 AS `comment`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `RackSpace`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `RackSpace` ( + `rack_id` int(10) unsigned NOT NULL DEFAULT '0', + `unit_no` int(10) unsigned NOT NULL DEFAULT '0', + `atom` enum('front','interior','rear') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'interior', + `state` enum('A','U','T') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'A', + `object_id` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`rack_id`,`unit_no`,`atom`), + KEY `RackSpace_object_id` (`object_id`), + CONSTRAINT `RackSpace-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE, + CONSTRAINT `RackSpace-FK-rack_id` FOREIGN KEY (`rack_id`) REFERENCES `Object` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `RackSpace` WRITE; +/*!40000 ALTER TABLE `RackSpace` DISABLE KEYS */; +INSERT INTO `RackSpace` VALUES (967,1,'rear','T',949),(967,2,'front','T',910),(967,2,'interior','T',910),(967,2,'rear','T',910),(967,4,'front','T',911),(967,4,'interior','T',911),(967,4,'rear','T',911),(967,6,'front','T',912),(967,6,'interior','T',912),(967,6,'rear','T',912),(967,8,'front','T',913),(967,8,'interior','T',913),(967,8,'rear','T',913),(967,10,'front','T',914),(967,10,'interior','T',914),(967,10,'rear','T',914),(967,17,'front','T',982),(967,17,'interior','T',982),(967,17,'rear','T',982),(967,22,'front','T',916),(967,22,'interior','T',916),(967,22,'rear','T',916),(967,23,'front','T',916),(967,23,'interior','T',916),(967,23,'rear','T',916),(967,35,'front','T',981),(967,35,'interior','T',981),(968,1,'front','T',917),(968,1,'interior','T',917),(968,1,'rear','A',NULL),(968,2,'front','T',917),(968,2,'interior','T',917),(968,2,'rear','A',NULL),(968,3,'rear','A',NULL),(968,4,'front','T',915),(968,4,'interior','T',915),(968,4,'rear','A',NULL),(968,5,'front','T',915),(968,5,'interior','T',915),(968,5,'rear','A',NULL),(968,6,'front','T',952),(968,6,'rear','A',NULL),(968,7,'front','T',906),(968,7,'interior','T',906),(968,7,'rear','A',NULL),(968,8,'rear','A',NULL),(968,9,'front','T',905),(968,9,'interior','T',905),(968,9,'rear','A',NULL),(968,10,'front','T',905),(968,10,'interior','T',905),(968,10,'rear','A',NULL),(968,11,'front','T',905),(968,11,'interior','T',905),(968,11,'rear','A',NULL),(968,12,'rear','A',NULL),(969,2,'rear','T',947),(969,3,'front','T',918),(969,3,'interior','T',918),(969,3,'rear','T',918),(969,4,'front','T',918),(969,4,'interior','T',918),(969,4,'rear','T',918),(969,5,'front','T',918),(969,5,'interior','T',918),(969,5,'rear','T',918),(969,6,'front','T',918),(969,6,'interior','T',918),(969,6,'rear','T',918),(969,7,'front','T',918),(969,7,'interior','T',918),(969,7,'rear','T',918),(969,9,'front','T',919),(969,9,'interior','T',919),(969,9,'rear','T',919),(969,10,'front','T',919),(969,10,'interior','T',919),(969,10,'rear','T',919),(969,11,'front','T',919),(969,11,'interior','T',919),(969,11,'rear','T',919),(969,12,'front','T',919),(969,12,'interior','T',919),(969,12,'rear','T',919),(969,13,'front','T',919),(969,13,'interior','T',919),(969,13,'rear','T',919),(969,14,'rear','T',950),(969,15,'front','T',921),(969,15,'interior','T',921),(969,15,'rear','T',921),(969,16,'front','T',921),(969,16,'interior','T',921),(969,16,'rear','T',921),(969,17,'front','T',922),(969,17,'interior','T',922),(969,17,'rear','T',922),(969,18,'front','T',922),(969,18,'interior','T',922),(969,18,'rear','T',922),(969,30,'front','T',920),(969,30,'interior','T',920),(969,30,'rear','T',920),(969,31,'front','T',920),(969,31,'interior','T',920),(969,31,'rear','T',920),(969,32,'front','T',920),(969,32,'interior','T',920),(969,32,'rear','T',920),(969,33,'front','T',920),(969,33,'interior','T',920),(969,33,'rear','T',920),(969,34,'front','T',920),(969,34,'interior','T',920),(969,34,'rear','T',920),(969,35,'front','T',920),(969,35,'interior','T',920),(969,35,'rear','T',920),(969,36,'front','T',920),(969,36,'interior','T',920),(969,36,'rear','T',920),(969,37,'front','T',920),(969,37,'interior','T',920),(969,37,'rear','T',920),(970,1,'front','T',944),(970,1,'interior','T',944),(970,1,'rear','T',944),(970,2,'front','T',944),(970,2,'interior','T',944),(970,2,'rear','T',944),(970,9,'rear','T',948),(970,10,'interior','T',927),(970,10,'rear','T',927),(970,11,'interior','T',927),(970,11,'rear','T',927),(970,12,'interior','T',927),(970,12,'rear','T',927),(970,13,'rear','T',945),(970,14,'interior','T',907),(970,14,'rear','T',907),(970,15,'interior','T',907),(970,15,'rear','T',907),(970,16,'interior','T',907),(970,16,'rear','T',907),(971,1,'front','T',942),(971,1,'interior','T',942),(971,1,'rear','T',942),(971,2,'front','T',942),(971,2,'interior','T',942),(971,2,'rear','T',942),(971,3,'front','T',942),(971,3,'interior','T',942),(971,3,'rear','T',942),(971,4,'front','T',942),(971,4,'interior','T',942),(971,4,'rear','T',942),(971,5,'front','T',942),(971,5,'interior','T',942),(971,5,'rear','T',942),(971,6,'front','U',NULL),(971,6,'interior','U',NULL),(971,6,'rear','U',NULL),(971,7,'front','T',932),(971,7,'interior','T',932),(971,7,'rear','T',932),(971,9,'front','T',934),(971,9,'interior','T',934),(971,9,'rear','T',934),(971,11,'front','T',936),(971,11,'interior','T',936),(971,11,'rear','T',936),(971,13,'front','T',938),(971,13,'interior','T',938),(971,13,'rear','T',938),(971,15,'front','T',940),(971,15,'interior','T',940),(971,15,'rear','T',940),(971,17,'rear','T',951),(971,37,'interior','T',930),(971,37,'rear','T',930),(971,38,'interior','T',930),(971,38,'rear','T',930),(971,40,'interior','T',928),(971,40,'rear','T',928),(971,41,'interior','T',928),(971,41,'rear','T',928),(972,2,'front','T',956),(972,2,'interior','T',956),(972,2,'rear','T',956),(972,4,'front','T',957),(972,4,'interior','T',957),(972,4,'rear','T',957),(972,6,'front','T',958),(972,6,'interior','T',958),(972,6,'rear','T',958),(972,8,'front','T',959),(972,8,'interior','T',959),(972,8,'rear','T',959),(972,10,'front','T',960),(972,10,'interior','T',960),(972,10,'rear','T',960),(972,18,'interior','T',908),(972,18,'rear','T',908),(972,19,'interior','T',908),(972,19,'rear','T',908),(972,20,'front','T',953),(972,20,'interior','T',908),(972,20,'rear','T',908),(972,34,'interior','T',962),(972,34,'rear','T',962),(972,35,'interior','T',961),(972,35,'rear','T',961),(973,1,'front','T',943),(973,1,'interior','T',943),(973,1,'rear','T',943),(973,2,'front','T',943),(973,2,'interior','T',943),(973,2,'rear','T',943),(973,3,'front','T',943),(973,3,'interior','T',943),(973,3,'rear','T',943),(973,4,'front','T',943),(973,4,'interior','T',943),(973,4,'rear','T',943),(973,5,'front','T',943),(973,5,'interior','T',943),(973,5,'rear','T',943),(973,6,'front','U',NULL),(973,6,'interior','U',NULL),(973,6,'rear','U',NULL),(973,7,'front','T',933),(973,7,'interior','T',933),(973,7,'rear','T',933),(973,9,'front','T',935),(973,9,'interior','T',935),(973,9,'rear','T',935),(973,11,'front','T',937),(973,11,'interior','T',937),(973,11,'rear','T',937),(973,13,'front','T',939),(973,13,'interior','T',939),(973,13,'rear','T',939),(973,15,'front','T',941),(973,15,'interior','T',941),(973,15,'rear','T',941),(973,17,'rear','T',954),(973,37,'interior','T',931),(973,37,'rear','T',931),(973,38,'interior','T',931),(973,38,'rear','T',931),(973,40,'interior','T',929),(973,40,'rear','T',929),(973,41,'interior','T',929),(973,41,'rear','T',929),(974,1,'front','T',923),(974,1,'interior','T',923),(974,1,'rear','T',923),(974,3,'front','T',924),(974,3,'interior','T',924),(974,3,'rear','T',924),(974,5,'front','T',925),(974,5,'interior','T',925),(974,5,'rear','T',925),(974,9,'rear','T',955),(974,11,'interior','T',926),(974,11,'rear','T',926),(974,13,'interior','T',909),(974,13,'rear','T',909),(974,14,'interior','T',909),(974,14,'rear','T',909),(974,15,'interior','T',909),(974,15,'rear','T',909),(974,16,'rear','T',946); +/*!40000 ALTER TABLE `RackSpace` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `RackThumbnail`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `RackThumbnail` ( + `rack_id` int(10) unsigned NOT NULL, + `thumb_data` blob, + UNIQUE KEY `rack_id` (`rack_id`), + CONSTRAINT `RackThumbnail-FK-rack_id` FOREIGN KEY (`rack_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `RackThumbnail` WRITE; +/*!40000 ALTER TABLE `RackThumbnail` DISABLE KEYS */; +/*!40000 ALTER TABLE `RackThumbnail` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `Row`; +/*!50001 DROP VIEW IF EXISTS `Row`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `Row` AS SELECT + 1 AS `id`, + 1 AS `name`, + 1 AS `location_id`, + 1 AS `location_name`*/; +SET character_set_client = @saved_cs_client; +DROP TABLE IF EXISTS `Script`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Script` ( + `script_name` char(64) COLLATE utf8_unicode_ci NOT NULL, + `script_text` longtext COLLATE utf8_unicode_ci, + PRIMARY KEY (`script_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `Script` WRITE; +/*!40000 ALTER TABLE `Script` DISABLE KEYS */; +INSERT INTO `Script` VALUES ('DefaultRSConfig','CONNECT_TIMEOUT=1\nCONNECT_PORT=%RSPORT%\nCHECK_TCP=`TCP_CHECK {\n connect_port %CONNECT_PORT%\n connect_timeout %CONNECT_TIMEOUT% \n}\'\n%CHECK%\n'),('DefaultVSConfig','METHOD=NAT\nlvs_method %METHOD%\n'),('RackCode','allow {$userid_1}'),('RackCodeCache','YTozOntzOjY6InJlc3VsdCI7czozOiJBQ0siO3M6NzoiQUJJX3ZlciI7aToyO3M6NDoibG9hZCI7YToxOntpOjA7YTo0OntzOjQ6InR5cGUiO3M6MTA6IlNZTlRfR1JBTlQiO3M6OToiY29uZGl0aW9uIjthOjM6e3M6NDoidHlwZSI7czo3OiJMRVhfVEFHIjtzOjQ6ImxvYWQiO3M6OToiJHVzZXJpZF8xIjtzOjY6ImxpbmVubyI7aToxO31zOjg6ImRlY2lzaW9uIjtiOjE7czo2OiJsaW5lbm8iO2k6MTt9fX0='); +/*!40000 ALTER TABLE `Script` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `TagStorage`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `TagStorage` ( + `entity_realm` enum('file','ipv4net','ipv4rspool','ipv4vs','ipvs','ipv6net','location','object','rack','user','vst') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'object', + `entity_id` int(10) unsigned NOT NULL, + `tag_id` int(10) unsigned NOT NULL DEFAULT '0', + `tag_is_assignable` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'yes', + `user` char(64) COLLATE utf8_unicode_ci DEFAULT NULL, + `date` datetime DEFAULT NULL, + UNIQUE KEY `entity_tag` (`entity_realm`,`entity_id`,`tag_id`), + KEY `entity_id` (`entity_id`), + KEY `TagStorage-FK-tag_id` (`tag_id`), + KEY `tag_id-tag_is_assignable` (`tag_id`,`tag_is_assignable`), + CONSTRAINT `TagStorage-FK-TagTree` FOREIGN KEY (`tag_id`, `tag_is_assignable`) REFERENCES `TagTree` (`id`, `is_assignable`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `TagStorage` WRITE; +/*!40000 ALTER TABLE `TagStorage` DISABLE KEYS */; +INSERT INTO `TagStorage` VALUES ('ipv4net',96,12,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',97,12,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',98,12,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',99,12,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',102,5,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',102,11,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',103,5,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',103,11,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',104,5,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',104,11,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',105,5,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',105,11,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',106,12,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',107,12,'yes','john_doe','2012-06-01 00:00:00'),('ipv4net',108,12,'yes','john_doe','2012-06-01 00:00:00'),('ipvs',1,2,'yes','admin','2013-06-23 23:48:52'),('ipv6net',1,10,'yes','john_doe','2012-06-01 00:00:00'),('ipv6net',2,12,'yes','john_doe','2012-06-01 00:00:00'),('ipv6net',3,12,'yes','john_doe','2012-06-01 00:00:00'),('ipv6net',4,18,'yes','john_doe','2012-06-01 00:00:00'),('ipv6net',5,18,'yes','john_doe','2012-06-01 00:00:00'),('object',905,1,'yes','john_doe','2012-06-01 00:00:00'),('object',908,2,'yes','john_doe','2012-06-01 00:00:00'),('object',909,1,'yes','john_doe','2012-06-01 00:00:00'),('object',928,9,'yes','john_doe','2012-06-01 00:00:00'),('object',929,9,'yes','john_doe','2012-06-01 00:00:00'),('object',956,2,'yes','john_doe','2012-06-01 00:00:00'),('object',957,2,'yes','john_doe','2012-06-01 00:00:00'),('object',958,2,'yes','john_doe','2012-06-01 00:00:00'),('object',959,2,'yes','john_doe','2012-06-01 00:00:00'),('object',960,2,'yes','john_doe','2012-06-01 00:00:00'),('object',961,2,'yes','john_doe','2012-06-01 00:00:00'),('object',962,2,'yes','john_doe','2012-06-01 00:00:00'),('object',979,12,'yes','john_doe','2012-06-01 00:00:00'),('object',980,12,'yes','john_doe','2012-06-01 00:00:00'),('object',981,12,'yes','john_doe','2012-06-01 00:00:00'),('rack',967,7,'yes','john_doe','2012-06-01 00:00:00'),('rack',968,8,'yes','john_doe','2012-06-01 00:00:00'),('rack',969,7,'yes','john_doe','2012-06-01 00:00:00'),('rack',970,8,'yes','john_doe','2012-06-01 00:00:00'),('rack',971,7,'yes','john_doe','2012-06-01 00:00:00'),('rack',972,7,'yes','john_doe','2012-06-01 00:00:00'),('rack',973,7,'yes','john_doe','2012-06-01 00:00:00'),('rack',974,8,'yes','john_doe','2012-06-01 00:00:00'),('vst',1,22,'yes','john_doe','2012-06-01 00:00:00'),('vst',2,22,'yes','john_doe','2012-06-01 00:00:00'),('vst',3,23,'yes','john_doe','2012-06-01 00:00:00'); +/*!40000 ALTER TABLE `TagStorage` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `TagTree`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `TagTree` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `parent_id` int(10) unsigned DEFAULT NULL, + `is_assignable` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'yes', + `tag` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `tag` (`tag`), + KEY `TagTree-K-parent_id` (`parent_id`), + KEY `id-is_assignable` (`id`,`is_assignable`), + CONSTRAINT `TagTree-K-parent_id` FOREIGN KEY (`parent_id`) REFERENCES `TagTree` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `TagTree` WRITE; +/*!40000 ALTER TABLE `TagTree` DISABLE KEYS */; +INSERT INTO `TagTree` VALUES (1,NULL,'yes','testing'),(2,NULL,'yes','production'),(5,10,'yes','WAN link'),(6,NULL,'yes','racks'),(7,6,'yes','tall racks'),(8,6,'yes','low racks'),(9,NULL,'yes','load balancer'),(10,NULL,'yes','network'),(11,10,'yes','small network'),(12,10,'yes','medium network'),(16,NULL,'yes','XKCD'),(17,16,'yes','romance'),(18,16,'yes','sarcasm'),(19,16,'yes','math'),(20,16,'yes','language'),(21,NULL,'yes','vlan template'),(22,21,'yes','access switch template'),(23,21,'yes','distribution switch template'); +/*!40000 ALTER TABLE `TagTree` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `UserAccount`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `UserAccount` ( + `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_name` char(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `user_password_hash` char(40) COLLATE utf8_unicode_ci DEFAULT NULL, + `user_realname` char(64) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`user_id`), + UNIQUE KEY `user_name` (`user_name`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `UserAccount` WRITE; +/*!40000 ALTER TABLE `UserAccount` DISABLE KEYS */; +INSERT INTO `UserAccount` VALUES (1,'admin','d033e22ae348aeb5660fc2140aec35850c4da997','RackTables Administrator'); +/*!40000 ALTER TABLE `UserAccount` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `UserConfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `UserConfig` ( + `varname` char(32) COLLATE utf8_unicode_ci NOT NULL, + `varvalue` text COLLATE utf8_unicode_ci NOT NULL, + `user` char(64) COLLATE utf8_unicode_ci NOT NULL, + UNIQUE KEY `user_varname` (`user`,`varname`), + KEY `varname` (`varname`), + CONSTRAINT `UserConfig-FK-varname` FOREIGN KEY (`varname`) REFERENCES `Config` (`varname`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `UserConfig` WRITE; +/*!40000 ALTER TABLE `UserConfig` DISABLE KEYS */; +/*!40000 ALTER TABLE `UserConfig` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VLANDescription`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VLANDescription` ( + `domain_id` int(10) unsigned NOT NULL, + `vlan_id` int(10) unsigned NOT NULL DEFAULT '0', + `vlan_type` enum('ondemand','compulsory','alien') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'ondemand', + `vlan_descr` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`domain_id`,`vlan_id`), + KEY `vlan_id` (`vlan_id`), + CONSTRAINT `VLANDescription-FK-domain_id` FOREIGN KEY (`domain_id`) REFERENCES `VLANDomain` (`id`) ON DELETE CASCADE, + CONSTRAINT `VLANDescription-FK-vlan_id` FOREIGN KEY (`vlan_id`) REFERENCES `VLANValidID` (`vlan_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VLANDescription` WRITE; +/*!40000 ALTER TABLE `VLANDescription` DISABLE KEYS */; +INSERT INTO `VLANDescription` VALUES (1,1,'compulsory','default'),(1,2,'ondemand','второй'),(1,3,'ondemand','третий'),(1,4,'ondemand','четвёртый'),(1,5,'ondemand','пÑтый'),(1,6,'ondemand','шеÑтой'),(1,7,'ondemand','Ñедьмой'),(1,8,'ondemand','воÑьмой'),(1,9,'ondemand','девÑтый'),(1,10,'ondemand','деÑÑтый'),(1,11,'ondemand','одиннадцатый'),(1,12,'ondemand','двенадцатый'),(1,13,'ondemand','тринадцатый'),(1,14,'ondemand','четырнадцатый'),(1,15,'ondemand','пÑтнадцатый'),(2,1,'compulsory','default'),(2,2,'ondemand','second'),(2,3,'ondemand','third'),(2,4,'ondemand','fourth'),(2,5,'ondemand','fifth'),(2,6,'ondemand','sixth'),(2,7,'ondemand','seventh'),(2,8,'ondemand','eighth'),(2,9,'ondemand','ninth'),(2,10,'ondemand','tenth'),(2,11,'ondemand','eleventh'),(2,12,'ondemand','twelfth'),(2,13,'ondemand','thirteenth'),(2,14,'ondemand','fourteenth'),(2,15,'ondemand','fifteenth'),(3,1,'compulsory','default'),(3,2,'ondemand','другий'),(3,3,'ondemand','третій'),(3,4,'ondemand','четвертий'),(3,5,'ondemand','п\'Ñтий'),(3,6,'ondemand','шоÑтий'),(3,7,'ondemand','Ñьомий'),(3,8,'ondemand','воÑьмий'),(3,9,'ondemand','дев\'Ñтий'),(3,10,'ondemand','деÑÑтий'),(3,11,'ondemand','одинадцÑтий'),(3,12,'ondemand','дванадцÑтий'),(3,13,'ondemand','тринадцÑтий'),(3,14,'ondemand','чотирнадцÑтий'),(3,15,'ondemand','п\'ÑтнадцÑтий'),(4,1,'compulsory','default'),(4,2,'ondemand','第二'),(4,3,'ondemand','第三'),(4,4,'ondemand','第四'),(4,5,'ondemand','第五'),(4,6,'ondemand','第六'),(4,7,'ondemand','第七'),(4,8,'ondemand','第八'),(4,9,'ondemand','第ä¹'),(4,10,'ondemand','第å'),(4,11,'ondemand','第å一'),(4,12,'ondemand','第å二'),(4,13,'ondemand','第å三'),(4,14,'ondemand','第åå››'),(4,15,'ondemand','第å五'); +/*!40000 ALTER TABLE `VLANDescription` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VLANDomain`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VLANDomain` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `group_id` int(10) unsigned DEFAULT NULL, + `description` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `description` (`description`), + KEY `VLANDomain-FK-group_id` (`group_id`), + CONSTRAINT `VLANDomain-FK-group_id` FOREIGN KEY (`group_id`) REFERENCES `VLANDomain` (`id`) ON DELETE SET NULL +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VLANDomain` WRITE; +/*!40000 ALTER TABLE `VLANDomain` DISABLE KEYS */; +INSERT INTO `VLANDomain` VALUES (1,NULL,'руÑÑкий'),(2,NULL,'English'),(3,NULL,'українÑька'),(4,NULL,'日本語'); +/*!40000 ALTER TABLE `VLANDomain` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VLANIPv4`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VLANIPv4` ( + `domain_id` int(10) unsigned NOT NULL, + `vlan_id` int(10) unsigned NOT NULL, + `ipv4net_id` int(10) unsigned NOT NULL, + UNIQUE KEY `network-domain-vlan` (`ipv4net_id`,`domain_id`,`vlan_id`), + KEY `VLANIPv4-FK-compound` (`domain_id`,`vlan_id`), + CONSTRAINT `VLANIPv4-FK-compound` FOREIGN KEY (`domain_id`, `vlan_id`) REFERENCES `VLANDescription` (`domain_id`, `vlan_id`) ON DELETE CASCADE, + CONSTRAINT `VLANIPv4-FK-ipv4net_id` FOREIGN KEY (`ipv4net_id`) REFERENCES `IPv4Network` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VLANIPv4` WRITE; +/*!40000 ALTER TABLE `VLANIPv4` DISABLE KEYS */; +/*!40000 ALTER TABLE `VLANIPv4` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VLANIPv6`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VLANIPv6` ( + `domain_id` int(10) unsigned NOT NULL, + `vlan_id` int(10) unsigned NOT NULL, + `ipv6net_id` int(10) unsigned NOT NULL, + UNIQUE KEY `network-domain-vlan` (`ipv6net_id`,`domain_id`,`vlan_id`), + KEY `VLANIPv6-FK-compound` (`domain_id`,`vlan_id`), + CONSTRAINT `VLANIPv6-FK-compound` FOREIGN KEY (`domain_id`, `vlan_id`) REFERENCES `VLANDescription` (`domain_id`, `vlan_id`) ON DELETE CASCADE, + CONSTRAINT `VLANIPv6-FK-ipv6net_id` FOREIGN KEY (`ipv6net_id`) REFERENCES `IPv6Network` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VLANIPv6` WRITE; +/*!40000 ALTER TABLE `VLANIPv6` DISABLE KEYS */; +/*!40000 ALTER TABLE `VLANIPv6` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VLANSTRule`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VLANSTRule` ( + `vst_id` int(10) unsigned NOT NULL, + `rule_no` int(10) unsigned NOT NULL, + `port_pcre` char(255) COLLATE utf8_unicode_ci NOT NULL, + `port_role` enum('access','trunk','anymode','uplink','downlink','none') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'none', + `wrt_vlans` text COLLATE utf8_unicode_ci, + `description` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + UNIQUE KEY `vst-rule` (`vst_id`,`rule_no`), + CONSTRAINT `VLANSTRule-FK-vst_id` FOREIGN KEY (`vst_id`) REFERENCES `VLANSwitchTemplate` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VLANSTRule` WRITE; +/*!40000 ALTER TABLE `VLANSTRule` DISABLE KEYS */; +INSERT INTO `VLANSTRule` VALUES (1,100,'#[^\\d]24#','uplink','','uplink'),(1,999,'#.#','anymode','','user-defined'),(2,100,'#[^\\d]48#','uplink','','uplink'),(2,999,'#.#','anymode','','user-defined'),(3,999,'/./','downlink','','access switches'); +/*!40000 ALTER TABLE `VLANSTRule` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VLANSwitch`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VLANSwitch` ( + `object_id` int(10) unsigned NOT NULL, + `domain_id` int(10) unsigned NOT NULL, + `template_id` int(10) unsigned NOT NULL, + `mutex_rev` int(10) unsigned NOT NULL DEFAULT '0', + `out_of_sync` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'yes', + `last_errno` int(10) unsigned NOT NULL DEFAULT '0', + `last_change` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_push_started` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_push_finished` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_error_ts` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + UNIQUE KEY `object_id` (`object_id`), + KEY `domain_id` (`domain_id`), + KEY `template_id` (`template_id`), + KEY `out_of_sync` (`out_of_sync`), + KEY `last_errno` (`last_errno`), + CONSTRAINT `VLANSwitch-FK-domain_id` FOREIGN KEY (`domain_id`) REFERENCES `VLANDomain` (`id`), + CONSTRAINT `VLANSwitch-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`), + CONSTRAINT `VLANSwitch-FK-template_id` FOREIGN KEY (`template_id`) REFERENCES `VLANSwitchTemplate` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VLANSwitch` WRITE; +/*!40000 ALTER TABLE `VLANSwitch` DISABLE KEYS */; +INSERT INTO `VLANSwitch` VALUES (979,2,1,4,'no',0,'2012-09-09 15:11:57','0000-00-00 00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00'),(980,2,2,4,'no',0,'2012-09-09 15:16:22','0000-00-00 00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00'),(981,2,3,1,'no',0,'2012-09-09 15:16:53','0000-00-00 00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00'); +/*!40000 ALTER TABLE `VLANSwitch` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VLANSwitchTemplate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VLANSwitchTemplate` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `mutex_rev` int(10) NOT NULL, + `description` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `saved_by` char(64) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `description` (`description`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VLANSwitchTemplate` WRITE; +/*!40000 ALTER TABLE `VLANSwitchTemplate` DISABLE KEYS */; +INSERT INTO `VLANSwitchTemplate` VALUES (1,1,'24 ports switch','admin'),(2,1,'48 ports switch','admin'),(3,1,'distribution switch','admin'); +/*!40000 ALTER TABLE `VLANSwitchTemplate` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VLANValidID`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VLANValidID` ( + `vlan_id` int(10) unsigned NOT NULL DEFAULT '1', + PRIMARY KEY (`vlan_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VLANValidID` WRITE; +/*!40000 ALTER TABLE `VLANValidID` DISABLE KEYS */; +INSERT INTO `VLANValidID` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20),(21),(22),(23),(24),(25),(26),(27),(28),(29),(30),(31),(32),(33),(34),(35),(36),(37),(38),(39),(40),(41),(42),(43),(44),(45),(46),(47),(48),(49),(50),(51),(52),(53),(54),(55),(56),(57),(58),(59),(60),(61),(62),(63),(64),(65),(66),(67),(68),(69),(70),(71),(72),(73),(74),(75),(76),(77),(78),(79),(80),(81),(82),(83),(84),(85),(86),(87),(88),(89),(90),(91),(92),(93),(94),(95),(96),(97),(98),(99),(100),(101),(102),(103),(104),(105),(106),(107),(108),(109),(110),(111),(112),(113),(114),(115),(116),(117),(118),(119),(120),(121),(122),(123),(124),(125),(126),(127),(128),(129),(130),(131),(132),(133),(134),(135),(136),(137),(138),(139),(140),(141),(142),(143),(144),(145),(146),(147),(148),(149),(150),(151),(152),(153),(154),(155),(156),(157),(158),(159),(160),(161),(162),(163),(164),(165),(166),(167),(168),(169),(170),(171),(172),(173),(174),(175),(176),(177),(178),(179),(180),(181),(182),(183),(184),(185),(186),(187),(188),(189),(190),(191),(192),(193),(194),(195),(196),(197),(198),(199),(200),(201),(202),(203),(204),(205),(206),(207),(208),(209),(210),(211),(212),(213),(214),(215),(216),(217),(218),(219),(220),(221),(222),(223),(224),(225),(226),(227),(228),(229),(230),(231),(232),(233),(234),(235),(236),(237),(238),(239),(240),(241),(242),(243),(244),(245),(246),(247),(248),(249),(250),(251),(252),(253),(254),(255),(256),(257),(258),(259),(260),(261),(262),(263),(264),(265),(266),(267),(268),(269),(270),(271),(272),(273),(274),(275),(276),(277),(278),(279),(280),(281),(282),(283),(284),(285),(286),(287),(288),(289),(290),(291),(292),(293),(294),(295),(296),(297),(298),(299),(300),(301),(302),(303),(304),(305),(306),(307),(308),(309),(310),(311),(312),(313),(314),(315),(316),(317),(318),(319),(320),(321),(322),(323),(324),(325),(326),(327),(328),(329),(330),(331),(332),(333),(334),(335),(336),(337),(338),(339),(340),(341),(342),(343),(344),(345),(346),(347),(348),(349),(350),(351),(352),(353),(354),(355),(356),(357),(358),(359),(360),(361),(362),(363),(364),(365),(366),(367),(368),(369),(370),(371),(372),(373),(374),(375),(376),(377),(378),(379),(380),(381),(382),(383),(384),(385),(386),(387),(388),(389),(390),(391),(392),(393),(394),(395),(396),(397),(398),(399),(400),(401),(402),(403),(404),(405),(406),(407),(408),(409),(410),(411),(412),(413),(414),(415),(416),(417),(418),(419),(420),(421),(422),(423),(424),(425),(426),(427),(428),(429),(430),(431),(432),(433),(434),(435),(436),(437),(438),(439),(440),(441),(442),(443),(444),(445),(446),(447),(448),(449),(450),(451),(452),(453),(454),(455),(456),(457),(458),(459),(460),(461),(462),(463),(464),(465),(466),(467),(468),(469),(470),(471),(472),(473),(474),(475),(476),(477),(478),(479),(480),(481),(482),(483),(484),(485),(486),(487),(488),(489),(490),(491),(492),(493),(494),(495),(496),(497),(498),(499),(500),(501),(502),(503),(504),(505),(506),(507),(508),(509),(510),(511),(512),(513),(514),(515),(516),(517),(518),(519),(520),(521),(522),(523),(524),(525),(526),(527),(528),(529),(530),(531),(532),(533),(534),(535),(536),(537),(538),(539),(540),(541),(542),(543),(544),(545),(546),(547),(548),(549),(550),(551),(552),(553),(554),(555),(556),(557),(558),(559),(560),(561),(562),(563),(564),(565),(566),(567),(568),(569),(570),(571),(572),(573),(574),(575),(576),(577),(578),(579),(580),(581),(582),(583),(584),(585),(586),(587),(588),(589),(590),(591),(592),(593),(594),(595),(596),(597),(598),(599),(600),(601),(602),(603),(604),(605),(606),(607),(608),(609),(610),(611),(612),(613),(614),(615),(616),(617),(618),(619),(620),(621),(622),(623),(624),(625),(626),(627),(628),(629),(630),(631),(632),(633),(634),(635),(636),(637),(638),(639),(640),(641),(642),(643),(644),(645),(646),(647),(648),(649),(650),(651),(652),(653),(654),(655),(656),(657),(658),(659),(660),(661),(662),(663),(664),(665),(666),(667),(668),(669),(670),(671),(672),(673),(674),(675),(676),(677),(678),(679),(680),(681),(682),(683),(684),(685),(686),(687),(688),(689),(690),(691),(692),(693),(694),(695),(696),(697),(698),(699),(700),(701),(702),(703),(704),(705),(706),(707),(708),(709),(710),(711),(712),(713),(714),(715),(716),(717),(718),(719),(720),(721),(722),(723),(724),(725),(726),(727),(728),(729),(730),(731),(732),(733),(734),(735),(736),(737),(738),(739),(740),(741),(742),(743),(744),(745),(746),(747),(748),(749),(750),(751),(752),(753),(754),(755),(756),(757),(758),(759),(760),(761),(762),(763),(764),(765),(766),(767),(768),(769),(770),(771),(772),(773),(774),(775),(776),(777),(778),(779),(780),(781),(782),(783),(784),(785),(786),(787),(788),(789),(790),(791),(792),(793),(794),(795),(796),(797),(798),(799),(800),(801),(802),(803),(804),(805),(806),(807),(808),(809),(810),(811),(812),(813),(814),(815),(816),(817),(818),(819),(820),(821),(822),(823),(824),(825),(826),(827),(828),(829),(830),(831),(832),(833),(834),(835),(836),(837),(838),(839),(840),(841),(842),(843),(844),(845),(846),(847),(848),(849),(850),(851),(852),(853),(854),(855),(856),(857),(858),(859),(860),(861),(862),(863),(864),(865),(866),(867),(868),(869),(870),(871),(872),(873),(874),(875),(876),(877),(878),(879),(880),(881),(882),(883),(884),(885),(886),(887),(888),(889),(890),(891),(892),(893),(894),(895),(896),(897),(898),(899),(900),(901),(902),(903),(904),(905),(906),(907),(908),(909),(910),(911),(912),(913),(914),(915),(916),(917),(918),(919),(920),(921),(922),(923),(924),(925),(926),(927),(928),(929),(930),(931),(932),(933),(934),(935),(936),(937),(938),(939),(940),(941),(942),(943),(944),(945),(946),(947),(948),(949),(950),(951),(952),(953),(954),(955),(956),(957),(958),(959),(960),(961),(962),(963),(964),(965),(966),(967),(968),(969),(970),(971),(972),(973),(974),(975),(976),(977),(978),(979),(980),(981),(982),(983),(984),(985),(986),(987),(988),(989),(990),(991),(992),(993),(994),(995),(996),(997),(998),(999),(1000),(1001),(1002),(1003),(1004),(1005),(1006),(1007),(1008),(1009),(1010),(1011),(1012),(1013),(1014),(1015),(1016),(1017),(1018),(1019),(1020),(1021),(1022),(1023),(1024),(1025),(1026),(1027),(1028),(1029),(1030),(1031),(1032),(1033),(1034),(1035),(1036),(1037),(1038),(1039),(1040),(1041),(1042),(1043),(1044),(1045),(1046),(1047),(1048),(1049),(1050),(1051),(1052),(1053),(1054),(1055),(1056),(1057),(1058),(1059),(1060),(1061),(1062),(1063),(1064),(1065),(1066),(1067),(1068),(1069),(1070),(1071),(1072),(1073),(1074),(1075),(1076),(1077),(1078),(1079),(1080),(1081),(1082),(1083),(1084),(1085),(1086),(1087),(1088),(1089),(1090),(1091),(1092),(1093),(1094),(1095),(1096),(1097),(1098),(1099),(1100),(1101),(1102),(1103),(1104),(1105),(1106),(1107),(1108),(1109),(1110),(1111),(1112),(1113),(1114),(1115),(1116),(1117),(1118),(1119),(1120),(1121),(1122),(1123),(1124),(1125),(1126),(1127),(1128),(1129),(1130),(1131),(1132),(1133),(1134),(1135),(1136),(1137),(1138),(1139),(1140),(1141),(1142),(1143),(1144),(1145),(1146),(1147),(1148),(1149),(1150),(1151),(1152),(1153),(1154),(1155),(1156),(1157),(1158),(1159),(1160),(1161),(1162),(1163),(1164),(1165),(1166),(1167),(1168),(1169),(1170),(1171),(1172),(1173),(1174),(1175),(1176),(1177),(1178),(1179),(1180),(1181),(1182),(1183),(1184),(1185),(1186),(1187),(1188),(1189),(1190),(1191),(1192),(1193),(1194),(1195),(1196),(1197),(1198),(1199),(1200),(1201),(1202),(1203),(1204),(1205),(1206),(1207),(1208),(1209),(1210),(1211),(1212),(1213),(1214),(1215),(1216),(1217),(1218),(1219),(1220),(1221),(1222),(1223),(1224),(1225),(1226),(1227),(1228),(1229),(1230),(1231),(1232),(1233),(1234),(1235),(1236),(1237),(1238),(1239),(1240),(1241),(1242),(1243),(1244),(1245),(1246),(1247),(1248),(1249),(1250),(1251),(1252),(1253),(1254),(1255),(1256),(1257),(1258),(1259),(1260),(1261),(1262),(1263),(1264),(1265),(1266),(1267),(1268),(1269),(1270),(1271),(1272),(1273),(1274),(1275),(1276),(1277),(1278),(1279),(1280),(1281),(1282),(1283),(1284),(1285),(1286),(1287),(1288),(1289),(1290),(1291),(1292),(1293),(1294),(1295),(1296),(1297),(1298),(1299),(1300),(1301),(1302),(1303),(1304),(1305),(1306),(1307),(1308),(1309),(1310),(1311),(1312),(1313),(1314),(1315),(1316),(1317),(1318),(1319),(1320),(1321),(1322),(1323),(1324),(1325),(1326),(1327),(1328),(1329),(1330),(1331),(1332),(1333),(1334),(1335),(1336),(1337),(1338),(1339),(1340),(1341),(1342),(1343),(1344),(1345),(1346),(1347),(1348),(1349),(1350),(1351),(1352),(1353),(1354),(1355),(1356),(1357),(1358),(1359),(1360),(1361),(1362),(1363),(1364),(1365),(1366),(1367),(1368),(1369),(1370),(1371),(1372),(1373),(1374),(1375),(1376),(1377),(1378),(1379),(1380),(1381),(1382),(1383),(1384),(1385),(1386),(1387),(1388),(1389),(1390),(1391),(1392),(1393),(1394),(1395),(1396),(1397),(1398),(1399),(1400),(1401),(1402),(1403),(1404),(1405),(1406),(1407),(1408),(1409),(1410),(1411),(1412),(1413),(1414),(1415),(1416),(1417),(1418),(1419),(1420),(1421),(1422),(1423),(1424),(1425),(1426),(1427),(1428),(1429),(1430),(1431),(1432),(1433),(1434),(1435),(1436),(1437),(1438),(1439),(1440),(1441),(1442),(1443),(1444),(1445),(1446),(1447),(1448),(1449),(1450),(1451),(1452),(1453),(1454),(1455),(1456),(1457),(1458),(1459),(1460),(1461),(1462),(1463),(1464),(1465),(1466),(1467),(1468),(1469),(1470),(1471),(1472),(1473),(1474),(1475),(1476),(1477),(1478),(1479),(1480),(1481),(1482),(1483),(1484),(1485),(1486),(1487),(1488),(1489),(1490),(1491),(1492),(1493),(1494),(1495),(1496),(1497),(1498),(1499),(1500),(1501),(1502),(1503),(1504),(1505),(1506),(1507),(1508),(1509),(1510),(1511),(1512),(1513),(1514),(1515),(1516),(1517),(1518),(1519),(1520),(1521),(1522),(1523),(1524),(1525),(1526),(1527),(1528),(1529),(1530),(1531),(1532),(1533),(1534),(1535),(1536),(1537),(1538),(1539),(1540),(1541),(1542),(1543),(1544),(1545),(1546),(1547),(1548),(1549),(1550),(1551),(1552),(1553),(1554),(1555),(1556),(1557),(1558),(1559),(1560),(1561),(1562),(1563),(1564),(1565),(1566),(1567),(1568),(1569),(1570),(1571),(1572),(1573),(1574),(1575),(1576),(1577),(1578),(1579),(1580),(1581),(1582),(1583),(1584),(1585),(1586),(1587),(1588),(1589),(1590),(1591),(1592),(1593),(1594),(1595),(1596),(1597),(1598),(1599),(1600),(1601),(1602),(1603),(1604),(1605),(1606),(1607),(1608),(1609),(1610),(1611),(1612),(1613),(1614),(1615),(1616),(1617),(1618),(1619),(1620),(1621),(1622),(1623),(1624),(1625),(1626),(1627),(1628),(1629),(1630),(1631),(1632),(1633),(1634),(1635),(1636),(1637),(1638),(1639),(1640),(1641),(1642),(1643),(1644),(1645),(1646),(1647),(1648),(1649),(1650),(1651),(1652),(1653),(1654),(1655),(1656),(1657),(1658),(1659),(1660),(1661),(1662),(1663),(1664),(1665),(1666),(1667),(1668),(1669),(1670),(1671),(1672),(1673),(1674),(1675),(1676),(1677),(1678),(1679),(1680),(1681),(1682),(1683),(1684),(1685),(1686),(1687),(1688),(1689),(1690),(1691),(1692),(1693),(1694),(1695),(1696),(1697),(1698),(1699),(1700),(1701),(1702),(1703),(1704),(1705),(1706),(1707),(1708),(1709),(1710),(1711),(1712),(1713),(1714),(1715),(1716),(1717),(1718),(1719),(1720),(1721),(1722),(1723),(1724),(1725),(1726),(1727),(1728),(1729),(1730),(1731),(1732),(1733),(1734),(1735),(1736),(1737),(1738),(1739),(1740),(1741),(1742),(1743),(1744),(1745),(1746),(1747),(1748),(1749),(1750),(1751),(1752),(1753),(1754),(1755),(1756),(1757),(1758),(1759),(1760),(1761),(1762),(1763),(1764),(1765),(1766),(1767),(1768),(1769),(1770),(1771),(1772),(1773),(1774),(1775),(1776),(1777),(1778),(1779),(1780),(1781),(1782),(1783),(1784),(1785),(1786),(1787),(1788),(1789),(1790),(1791),(1792),(1793),(1794),(1795),(1796),(1797),(1798),(1799),(1800),(1801),(1802),(1803),(1804),(1805),(1806),(1807),(1808),(1809),(1810),(1811),(1812),(1813),(1814),(1815),(1816),(1817),(1818),(1819),(1820),(1821),(1822),(1823),(1824),(1825),(1826),(1827),(1828),(1829),(1830),(1831),(1832),(1833),(1834),(1835),(1836),(1837),(1838),(1839),(1840),(1841),(1842),(1843),(1844),(1845),(1846),(1847),(1848),(1849),(1850),(1851),(1852),(1853),(1854),(1855),(1856),(1857),(1858),(1859),(1860),(1861),(1862),(1863),(1864),(1865),(1866),(1867),(1868),(1869),(1870),(1871),(1872),(1873),(1874),(1875),(1876),(1877),(1878),(1879),(1880),(1881),(1882),(1883),(1884),(1885),(1886),(1887),(1888),(1889),(1890),(1891),(1892),(1893),(1894),(1895),(1896),(1897),(1898),(1899),(1900),(1901),(1902),(1903),(1904),(1905),(1906),(1907),(1908),(1909),(1910),(1911),(1912),(1913),(1914),(1915),(1916),(1917),(1918),(1919),(1920),(1921),(1922),(1923),(1924),(1925),(1926),(1927),(1928),(1929),(1930),(1931),(1932),(1933),(1934),(1935),(1936),(1937),(1938),(1939),(1940),(1941),(1942),(1943),(1944),(1945),(1946),(1947),(1948),(1949),(1950),(1951),(1952),(1953),(1954),(1955),(1956),(1957),(1958),(1959),(1960),(1961),(1962),(1963),(1964),(1965),(1966),(1967),(1968),(1969),(1970),(1971),(1972),(1973),(1974),(1975),(1976),(1977),(1978),(1979),(1980),(1981),(1982),(1983),(1984),(1985),(1986),(1987),(1988),(1989),(1990),(1991),(1992),(1993),(1994),(1995),(1996),(1997),(1998),(1999),(2000),(2001),(2002),(2003),(2004),(2005),(2006),(2007),(2008),(2009),(2010),(2011),(2012),(2013),(2014),(2015),(2016),(2017),(2018),(2019),(2020),(2021),(2022),(2023),(2024),(2025),(2026),(2027),(2028),(2029),(2030),(2031),(2032),(2033),(2034),(2035),(2036),(2037),(2038),(2039),(2040),(2041),(2042),(2043),(2044),(2045),(2046),(2047),(2048),(2049),(2050),(2051),(2052),(2053),(2054),(2055),(2056),(2057),(2058),(2059),(2060),(2061),(2062),(2063),(2064),(2065),(2066),(2067),(2068),(2069),(2070),(2071),(2072),(2073),(2074),(2075),(2076),(2077),(2078),(2079),(2080),(2081),(2082),(2083),(2084),(2085),(2086),(2087),(2088),(2089),(2090),(2091),(2092),(2093),(2094),(2095),(2096),(2097),(2098),(2099),(2100),(2101),(2102),(2103),(2104),(2105),(2106),(2107),(2108),(2109),(2110),(2111),(2112),(2113),(2114),(2115),(2116),(2117),(2118),(2119),(2120),(2121),(2122),(2123),(2124),(2125),(2126),(2127),(2128),(2129),(2130),(2131),(2132),(2133),(2134),(2135),(2136),(2137),(2138),(2139),(2140),(2141),(2142),(2143),(2144),(2145),(2146),(2147),(2148),(2149),(2150),(2151),(2152),(2153),(2154),(2155),(2156),(2157),(2158),(2159),(2160),(2161),(2162),(2163),(2164),(2165),(2166),(2167),(2168),(2169),(2170),(2171),(2172),(2173),(2174),(2175),(2176),(2177),(2178),(2179),(2180),(2181),(2182),(2183),(2184),(2185),(2186),(2187),(2188),(2189),(2190),(2191),(2192),(2193),(2194),(2195),(2196),(2197),(2198),(2199),(2200),(2201),(2202),(2203),(2204),(2205),(2206),(2207),(2208),(2209),(2210),(2211),(2212),(2213),(2214),(2215),(2216),(2217),(2218),(2219),(2220),(2221),(2222),(2223),(2224),(2225),(2226),(2227),(2228),(2229),(2230),(2231),(2232),(2233),(2234),(2235),(2236),(2237),(2238),(2239),(2240),(2241),(2242),(2243),(2244),(2245),(2246),(2247),(2248),(2249),(2250),(2251),(2252),(2253),(2254),(2255),(2256),(2257),(2258),(2259),(2260),(2261),(2262),(2263),(2264),(2265),(2266),(2267),(2268),(2269),(2270),(2271),(2272),(2273),(2274),(2275),(2276),(2277),(2278),(2279),(2280),(2281),(2282),(2283),(2284),(2285),(2286),(2287),(2288),(2289),(2290),(2291),(2292),(2293),(2294),(2295),(2296),(2297),(2298),(2299),(2300),(2301),(2302),(2303),(2304),(2305),(2306),(2307),(2308),(2309),(2310),(2311),(2312),(2313),(2314),(2315),(2316),(2317),(2318),(2319),(2320),(2321),(2322),(2323),(2324),(2325),(2326),(2327),(2328),(2329),(2330),(2331),(2332),(2333),(2334),(2335),(2336),(2337),(2338),(2339),(2340),(2341),(2342),(2343),(2344),(2345),(2346),(2347),(2348),(2349),(2350),(2351),(2352),(2353),(2354),(2355),(2356),(2357),(2358),(2359),(2360),(2361),(2362),(2363),(2364),(2365),(2366),(2367),(2368),(2369),(2370),(2371),(2372),(2373),(2374),(2375),(2376),(2377),(2378),(2379),(2380),(2381),(2382),(2383),(2384),(2385),(2386),(2387),(2388),(2389),(2390),(2391),(2392),(2393),(2394),(2395),(2396),(2397),(2398),(2399),(2400),(2401),(2402),(2403),(2404),(2405),(2406),(2407),(2408),(2409),(2410),(2411),(2412),(2413),(2414),(2415),(2416),(2417),(2418),(2419),(2420),(2421),(2422),(2423),(2424),(2425),(2426),(2427),(2428),(2429),(2430),(2431),(2432),(2433),(2434),(2435),(2436),(2437),(2438),(2439),(2440),(2441),(2442),(2443),(2444),(2445),(2446),(2447),(2448),(2449),(2450),(2451),(2452),(2453),(2454),(2455),(2456),(2457),(2458),(2459),(2460),(2461),(2462),(2463),(2464),(2465),(2466),(2467),(2468),(2469),(2470),(2471),(2472),(2473),(2474),(2475),(2476),(2477),(2478),(2479),(2480),(2481),(2482),(2483),(2484),(2485),(2486),(2487),(2488),(2489),(2490),(2491),(2492),(2493),(2494),(2495),(2496),(2497),(2498),(2499),(2500),(2501),(2502),(2503),(2504),(2505),(2506),(2507),(2508),(2509),(2510),(2511),(2512),(2513),(2514),(2515),(2516),(2517),(2518),(2519),(2520),(2521),(2522),(2523),(2524),(2525),(2526),(2527),(2528),(2529),(2530),(2531),(2532),(2533),(2534),(2535),(2536),(2537),(2538),(2539),(2540),(2541),(2542),(2543),(2544),(2545),(2546),(2547),(2548),(2549),(2550),(2551),(2552),(2553),(2554),(2555),(2556),(2557),(2558),(2559),(2560),(2561),(2562),(2563),(2564),(2565),(2566),(2567),(2568),(2569),(2570),(2571),(2572),(2573),(2574),(2575),(2576),(2577),(2578),(2579),(2580),(2581),(2582),(2583),(2584),(2585),(2586),(2587),(2588),(2589),(2590),(2591),(2592),(2593),(2594),(2595),(2596),(2597),(2598),(2599),(2600),(2601),(2602),(2603),(2604),(2605),(2606),(2607),(2608),(2609),(2610),(2611),(2612),(2613),(2614),(2615),(2616),(2617),(2618),(2619),(2620),(2621),(2622),(2623),(2624),(2625),(2626),(2627),(2628),(2629),(2630),(2631),(2632),(2633),(2634),(2635),(2636),(2637),(2638),(2639),(2640),(2641),(2642),(2643),(2644),(2645),(2646),(2647),(2648),(2649),(2650),(2651),(2652),(2653),(2654),(2655),(2656),(2657),(2658),(2659),(2660),(2661),(2662),(2663),(2664),(2665),(2666),(2667),(2668),(2669),(2670),(2671),(2672),(2673),(2674),(2675),(2676),(2677),(2678),(2679),(2680),(2681),(2682),(2683),(2684),(2685),(2686),(2687),(2688),(2689),(2690),(2691),(2692),(2693),(2694),(2695),(2696),(2697),(2698),(2699),(2700),(2701),(2702),(2703),(2704),(2705),(2706),(2707),(2708),(2709),(2710),(2711),(2712),(2713),(2714),(2715),(2716),(2717),(2718),(2719),(2720),(2721),(2722),(2723),(2724),(2725),(2726),(2727),(2728),(2729),(2730),(2731),(2732),(2733),(2734),(2735),(2736),(2737),(2738),(2739),(2740),(2741),(2742),(2743),(2744),(2745),(2746),(2747),(2748),(2749),(2750),(2751),(2752),(2753),(2754),(2755),(2756),(2757),(2758),(2759),(2760),(2761),(2762),(2763),(2764),(2765),(2766),(2767),(2768),(2769),(2770),(2771),(2772),(2773),(2774),(2775),(2776),(2777),(2778),(2779),(2780),(2781),(2782),(2783),(2784),(2785),(2786),(2787),(2788),(2789),(2790),(2791),(2792),(2793),(2794),(2795),(2796),(2797),(2798),(2799),(2800),(2801),(2802),(2803),(2804),(2805),(2806),(2807),(2808),(2809),(2810),(2811),(2812),(2813),(2814),(2815),(2816),(2817),(2818),(2819),(2820),(2821),(2822),(2823),(2824),(2825),(2826),(2827),(2828),(2829),(2830),(2831),(2832),(2833),(2834),(2835),(2836),(2837),(2838),(2839),(2840),(2841),(2842),(2843),(2844),(2845),(2846),(2847),(2848),(2849),(2850),(2851),(2852),(2853),(2854),(2855),(2856),(2857),(2858),(2859),(2860),(2861),(2862),(2863),(2864),(2865),(2866),(2867),(2868),(2869),(2870),(2871),(2872),(2873),(2874),(2875),(2876),(2877),(2878),(2879),(2880),(2881),(2882),(2883),(2884),(2885),(2886),(2887),(2888),(2889),(2890),(2891),(2892),(2893),(2894),(2895),(2896),(2897),(2898),(2899),(2900),(2901),(2902),(2903),(2904),(2905),(2906),(2907),(2908),(2909),(2910),(2911),(2912),(2913),(2914),(2915),(2916),(2917),(2918),(2919),(2920),(2921),(2922),(2923),(2924),(2925),(2926),(2927),(2928),(2929),(2930),(2931),(2932),(2933),(2934),(2935),(2936),(2937),(2938),(2939),(2940),(2941),(2942),(2943),(2944),(2945),(2946),(2947),(2948),(2949),(2950),(2951),(2952),(2953),(2954),(2955),(2956),(2957),(2958),(2959),(2960),(2961),(2962),(2963),(2964),(2965),(2966),(2967),(2968),(2969),(2970),(2971),(2972),(2973),(2974),(2975),(2976),(2977),(2978),(2979),(2980),(2981),(2982),(2983),(2984),(2985),(2986),(2987),(2988),(2989),(2990),(2991),(2992),(2993),(2994),(2995),(2996),(2997),(2998),(2999),(3000),(3001),(3002),(3003),(3004),(3005),(3006),(3007),(3008),(3009),(3010),(3011),(3012),(3013),(3014),(3015),(3016),(3017),(3018),(3019),(3020),(3021),(3022),(3023),(3024),(3025),(3026),(3027),(3028),(3029),(3030),(3031),(3032),(3033),(3034),(3035),(3036),(3037),(3038),(3039),(3040),(3041),(3042),(3043),(3044),(3045),(3046),(3047),(3048),(3049),(3050),(3051),(3052),(3053),(3054),(3055),(3056),(3057),(3058),(3059),(3060),(3061),(3062),(3063),(3064),(3065),(3066),(3067),(3068),(3069),(3070),(3071),(3072),(3073),(3074),(3075),(3076),(3077),(3078),(3079),(3080),(3081),(3082),(3083),(3084),(3085),(3086),(3087),(3088),(3089),(3090),(3091),(3092),(3093),(3094),(3095),(3096),(3097),(3098),(3099),(3100),(3101),(3102),(3103),(3104),(3105),(3106),(3107),(3108),(3109),(3110),(3111),(3112),(3113),(3114),(3115),(3116),(3117),(3118),(3119),(3120),(3121),(3122),(3123),(3124),(3125),(3126),(3127),(3128),(3129),(3130),(3131),(3132),(3133),(3134),(3135),(3136),(3137),(3138),(3139),(3140),(3141),(3142),(3143),(3144),(3145),(3146),(3147),(3148),(3149),(3150),(3151),(3152),(3153),(3154),(3155),(3156),(3157),(3158),(3159),(3160),(3161),(3162),(3163),(3164),(3165),(3166),(3167),(3168),(3169),(3170),(3171),(3172),(3173),(3174),(3175),(3176),(3177),(3178),(3179),(3180),(3181),(3182),(3183),(3184),(3185),(3186),(3187),(3188),(3189),(3190),(3191),(3192),(3193),(3194),(3195),(3196),(3197),(3198),(3199),(3200),(3201),(3202),(3203),(3204),(3205),(3206),(3207),(3208),(3209),(3210),(3211),(3212),(3213),(3214),(3215),(3216),(3217),(3218),(3219),(3220),(3221),(3222),(3223),(3224),(3225),(3226),(3227),(3228),(3229),(3230),(3231),(3232),(3233),(3234),(3235),(3236),(3237),(3238),(3239),(3240),(3241),(3242),(3243),(3244),(3245),(3246),(3247),(3248),(3249),(3250),(3251),(3252),(3253),(3254),(3255),(3256),(3257),(3258),(3259),(3260),(3261),(3262),(3263),(3264),(3265),(3266),(3267),(3268),(3269),(3270),(3271),(3272),(3273),(3274),(3275),(3276),(3277),(3278),(3279),(3280),(3281),(3282),(3283),(3284),(3285),(3286),(3287),(3288),(3289),(3290),(3291),(3292),(3293),(3294),(3295),(3296),(3297),(3298),(3299),(3300),(3301),(3302),(3303),(3304),(3305),(3306),(3307),(3308),(3309),(3310),(3311),(3312),(3313),(3314),(3315),(3316),(3317),(3318),(3319),(3320),(3321),(3322),(3323),(3324),(3325),(3326),(3327),(3328),(3329),(3330),(3331),(3332),(3333),(3334),(3335),(3336),(3337),(3338),(3339),(3340),(3341),(3342),(3343),(3344),(3345),(3346),(3347),(3348),(3349),(3350),(3351),(3352),(3353),(3354),(3355),(3356),(3357),(3358),(3359),(3360),(3361),(3362),(3363),(3364),(3365),(3366),(3367),(3368),(3369),(3370),(3371),(3372),(3373),(3374),(3375),(3376),(3377),(3378),(3379),(3380),(3381),(3382),(3383),(3384),(3385),(3386),(3387),(3388),(3389),(3390),(3391),(3392),(3393),(3394),(3395),(3396),(3397),(3398),(3399),(3400),(3401),(3402),(3403),(3404),(3405),(3406),(3407),(3408),(3409),(3410),(3411),(3412),(3413),(3414),(3415),(3416),(3417),(3418),(3419),(3420),(3421),(3422),(3423),(3424),(3425),(3426),(3427),(3428),(3429),(3430),(3431),(3432),(3433),(3434),(3435),(3436),(3437),(3438),(3439),(3440),(3441),(3442),(3443),(3444),(3445),(3446),(3447),(3448),(3449),(3450),(3451),(3452),(3453),(3454),(3455),(3456),(3457),(3458),(3459),(3460),(3461),(3462),(3463),(3464),(3465),(3466),(3467),(3468),(3469),(3470),(3471),(3472),(3473),(3474),(3475),(3476),(3477),(3478),(3479),(3480),(3481),(3482),(3483),(3484),(3485),(3486),(3487),(3488),(3489),(3490),(3491),(3492),(3493),(3494),(3495),(3496),(3497),(3498),(3499),(3500),(3501),(3502),(3503),(3504),(3505),(3506),(3507),(3508),(3509),(3510),(3511),(3512),(3513),(3514),(3515),(3516),(3517),(3518),(3519),(3520),(3521),(3522),(3523),(3524),(3525),(3526),(3527),(3528),(3529),(3530),(3531),(3532),(3533),(3534),(3535),(3536),(3537),(3538),(3539),(3540),(3541),(3542),(3543),(3544),(3545),(3546),(3547),(3548),(3549),(3550),(3551),(3552),(3553),(3554),(3555),(3556),(3557),(3558),(3559),(3560),(3561),(3562),(3563),(3564),(3565),(3566),(3567),(3568),(3569),(3570),(3571),(3572),(3573),(3574),(3575),(3576),(3577),(3578),(3579),(3580),(3581),(3582),(3583),(3584),(3585),(3586),(3587),(3588),(3589),(3590),(3591),(3592),(3593),(3594),(3595),(3596),(3597),(3598),(3599),(3600),(3601),(3602),(3603),(3604),(3605),(3606),(3607),(3608),(3609),(3610),(3611),(3612),(3613),(3614),(3615),(3616),(3617),(3618),(3619),(3620),(3621),(3622),(3623),(3624),(3625),(3626),(3627),(3628),(3629),(3630),(3631),(3632),(3633),(3634),(3635),(3636),(3637),(3638),(3639),(3640),(3641),(3642),(3643),(3644),(3645),(3646),(3647),(3648),(3649),(3650),(3651),(3652),(3653),(3654),(3655),(3656),(3657),(3658),(3659),(3660),(3661),(3662),(3663),(3664),(3665),(3666),(3667),(3668),(3669),(3670),(3671),(3672),(3673),(3674),(3675),(3676),(3677),(3678),(3679),(3680),(3681),(3682),(3683),(3684),(3685),(3686),(3687),(3688),(3689),(3690),(3691),(3692),(3693),(3694),(3695),(3696),(3697),(3698),(3699),(3700),(3701),(3702),(3703),(3704),(3705),(3706),(3707),(3708),(3709),(3710),(3711),(3712),(3713),(3714),(3715),(3716),(3717),(3718),(3719),(3720),(3721),(3722),(3723),(3724),(3725),(3726),(3727),(3728),(3729),(3730),(3731),(3732),(3733),(3734),(3735),(3736),(3737),(3738),(3739),(3740),(3741),(3742),(3743),(3744),(3745),(3746),(3747),(3748),(3749),(3750),(3751),(3752),(3753),(3754),(3755),(3756),(3757),(3758),(3759),(3760),(3761),(3762),(3763),(3764),(3765),(3766),(3767),(3768),(3769),(3770),(3771),(3772),(3773),(3774),(3775),(3776),(3777),(3778),(3779),(3780),(3781),(3782),(3783),(3784),(3785),(3786),(3787),(3788),(3789),(3790),(3791),(3792),(3793),(3794),(3795),(3796),(3797),(3798),(3799),(3800),(3801),(3802),(3803),(3804),(3805),(3806),(3807),(3808),(3809),(3810),(3811),(3812),(3813),(3814),(3815),(3816),(3817),(3818),(3819),(3820),(3821),(3822),(3823),(3824),(3825),(3826),(3827),(3828),(3829),(3830),(3831),(3832),(3833),(3834),(3835),(3836),(3837),(3838),(3839),(3840),(3841),(3842),(3843),(3844),(3845),(3846),(3847),(3848),(3849),(3850),(3851),(3852),(3853),(3854),(3855),(3856),(3857),(3858),(3859),(3860),(3861),(3862),(3863),(3864),(3865),(3866),(3867),(3868),(3869),(3870),(3871),(3872),(3873),(3874),(3875),(3876),(3877),(3878),(3879),(3880),(3881),(3882),(3883),(3884),(3885),(3886),(3887),(3888),(3889),(3890),(3891),(3892),(3893),(3894),(3895),(3896),(3897),(3898),(3899),(3900),(3901),(3902),(3903),(3904),(3905),(3906),(3907),(3908),(3909),(3910),(3911),(3912),(3913),(3914),(3915),(3916),(3917),(3918),(3919),(3920),(3921),(3922),(3923),(3924),(3925),(3926),(3927),(3928),(3929),(3930),(3931),(3932),(3933),(3934),(3935),(3936),(3937),(3938),(3939),(3940),(3941),(3942),(3943),(3944),(3945),(3946),(3947),(3948),(3949),(3950),(3951),(3952),(3953),(3954),(3955),(3956),(3957),(3958),(3959),(3960),(3961),(3962),(3963),(3964),(3965),(3966),(3967),(3968),(3969),(3970),(3971),(3972),(3973),(3974),(3975),(3976),(3977),(3978),(3979),(3980),(3981),(3982),(3983),(3984),(3985),(3986),(3987),(3988),(3989),(3990),(3991),(3992),(3993),(3994),(3995),(3996),(3997),(3998),(3999),(4000),(4001),(4002),(4003),(4004),(4005),(4006),(4007),(4008),(4009),(4010),(4011),(4012),(4013),(4014),(4015),(4016),(4017),(4018),(4019),(4020),(4021),(4022),(4023),(4024),(4025),(4026),(4027),(4028),(4029),(4030),(4031),(4032),(4033),(4034),(4035),(4036),(4037),(4038),(4039),(4040),(4041),(4042),(4043),(4044),(4045),(4046),(4047),(4048),(4049),(4050),(4051),(4052),(4053),(4054),(4055),(4056),(4057),(4058),(4059),(4060),(4061),(4062),(4063),(4064),(4065),(4066),(4067),(4068),(4069),(4070),(4071),(4072),(4073),(4074),(4075),(4076),(4077),(4078),(4079),(4080),(4081),(4082),(4083),(4084),(4085),(4086),(4087),(4088),(4089),(4090),(4091),(4092),(4093),(4094); +/*!40000 ALTER TABLE `VLANValidID` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VS`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VS` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` char(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `vsconfig` text COLLATE utf8_unicode_ci, + `rsconfig` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VS` WRITE; +/*!40000 ALTER TABLE `VS` DISABLE KEYS */; +INSERT INTO `VS` VALUES (1,'service1',NULL,NULL); +/*!40000 ALTER TABLE `VS` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VSEnabledIPs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VSEnabledIPs` ( + `object_id` int(10) unsigned NOT NULL, + `vs_id` int(10) unsigned NOT NULL, + `vip` varbinary(16) NOT NULL, + `rspool_id` int(10) unsigned NOT NULL, + `prio` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `vsconfig` text COLLATE utf8_unicode_ci, + `rsconfig` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`object_id`,`vs_id`,`vip`,`rspool_id`), + KEY `vip` (`vip`), + KEY `VSEnabledIPs-FK-vs_id-vip` (`vs_id`,`vip`), + KEY `VSEnabledIPs-FK-rspool_id` (`rspool_id`), + CONSTRAINT `VSEnabledIPs-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE, + CONSTRAINT `VSEnabledIPs-FK-rspool_id` FOREIGN KEY (`rspool_id`) REFERENCES `IPv4RSPool` (`id`) ON DELETE CASCADE, + CONSTRAINT `VSEnabledIPs-FK-vs_id-vip` FOREIGN KEY (`vs_id`, `vip`) REFERENCES `VSIPs` (`vs_id`, `vip`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VSEnabledIPs` WRITE; +/*!40000 ALTER TABLE `VSEnabledIPs` DISABLE KEYS */; +INSERT INTO `VSEnabledIPs` VALUES (928,1,'\n\È9',1,'100',NULL,NULL),(928,1,'\n\È:',1,'200',NULL,NULL),(928,1,'ü\0P\0\0\0\0\0\0\0\0\0\09',1,NULL,NULL,NULL),(929,1,'\n\È9',1,'200',NULL,NULL),(929,1,'\n\È:',1,'100',NULL,NULL),(929,1,'ü\0P\0\0\0\0\0\0\0\0\0\09',1,NULL,NULL,NULL); +/*!40000 ALTER TABLE `VSEnabledIPs` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VSEnabledPorts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VSEnabledPorts` ( + `object_id` int(10) unsigned NOT NULL, + `vs_id` int(10) unsigned NOT NULL, + `proto` enum('TCP','UDP','MARK') COLLATE utf8_unicode_ci NOT NULL, + `vport` int(10) unsigned NOT NULL, + `rspool_id` int(10) unsigned NOT NULL, + `vsconfig` text COLLATE utf8_unicode_ci, + `rsconfig` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`object_id`,`vs_id`,`proto`,`vport`,`rspool_id`), + KEY `VSEnabledPorts-FK-vs_id-proto-vport` (`vs_id`,`proto`,`vport`), + KEY `VSEnabledPorts-FK-rspool_id` (`rspool_id`), + CONSTRAINT `VSEnabledPorts-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE, + CONSTRAINT `VSEnabledPorts-FK-rspool_id` FOREIGN KEY (`rspool_id`) REFERENCES `IPv4RSPool` (`id`) ON DELETE CASCADE, + CONSTRAINT `VSEnabledPorts-FK-vs_id-proto-vport` FOREIGN KEY (`vs_id`, `proto`, `vport`) REFERENCES `VSPorts` (`vs_id`, `proto`, `vport`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VSEnabledPorts` WRITE; +/*!40000 ALTER TABLE `VSEnabledPorts` DISABLE KEYS */; +INSERT INTO `VSEnabledPorts` VALUES (928,1,'TCP',80,1,NULL,NULL),(928,1,'TCP',443,1,NULL,NULL),(929,1,'TCP',80,1,NULL,NULL),(929,1,'TCP',443,1,NULL,NULL); +/*!40000 ALTER TABLE `VSEnabledPorts` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VSIPs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VSIPs` ( + `vs_id` int(10) unsigned NOT NULL, + `vip` varbinary(16) NOT NULL, + `vsconfig` text COLLATE utf8_unicode_ci, + `rsconfig` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`vs_id`,`vip`), + KEY `vip` (`vip`), + CONSTRAINT `VSIPs-vs_id` FOREIGN KEY (`vs_id`) REFERENCES `VS` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VSIPs` WRITE; +/*!40000 ALTER TABLE `VSIPs` DISABLE KEYS */; +INSERT INTO `VSIPs` VALUES (1,'\n\È9',NULL,NULL),(1,'\n\È:',NULL,NULL),(1,'ü\0P\0\0\0\0\0\0\0\0\0\09',NULL,NULL); +/*!40000 ALTER TABLE `VSIPs` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `VSPorts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `VSPorts` ( + `vs_id` int(10) unsigned NOT NULL, + `proto` enum('TCP','UDP','MARK') COLLATE utf8_unicode_ci NOT NULL, + `vport` int(10) unsigned NOT NULL, + `vsconfig` text COLLATE utf8_unicode_ci, + `rsconfig` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`vs_id`,`proto`,`vport`), + KEY `proto-vport` (`proto`,`vport`), + CONSTRAINT `VS-vs_id` FOREIGN KEY (`vs_id`) REFERENCES `VS` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `VSPorts` WRITE; +/*!40000 ALTER TABLE `VSPorts` DISABLE KEYS */; +INSERT INTO `VSPorts` VALUES (1,'TCP',80,NULL,'CHECK_HTTP {\n url /ping\n status_code 200\n}'),(1,'TCP',443,NULL,'CHECK_SSL {\n url /ping\n status_code 200\n}'); +/*!40000 ALTER TABLE `VSPorts` ENABLE KEYS */; +UNLOCK TABLES; +/*!50001 DROP VIEW IF EXISTS `Location`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`racktables`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `Location` AS select `O`.`id` AS `id`,`O`.`name` AS `name`,`O`.`has_problems` AS `has_problems`,`O`.`comment` AS `comment`,`P`.`id` AS `parent_id`,`P`.`name` AS `parent_name` from (`Object` `O` left join (`Object` `P` join `EntityLink` `EL` on(((`EL`.`parent_entity_id` = `P`.`id`) and (`P`.`objtype_id` = 1562) and (`EL`.`parent_entity_type` = 'location') and (`EL`.`child_entity_type` = 'location')))) on((`EL`.`child_entity_id` = `O`.`id`))) where (`O`.`objtype_id` = 1562) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `Rack`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`racktables`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `Rack` AS select `O`.`id` AS `id`,`O`.`name` AS `name`,`O`.`asset_no` AS `asset_no`,`O`.`has_problems` AS `has_problems`,`O`.`comment` AS `comment`,`AV_H`.`uint_value` AS `height`,`AV_S`.`uint_value` AS `sort_order`,`RT`.`thumb_data` AS `thumb_data`,`R`.`id` AS `row_id`,`R`.`name` AS `row_name`,`L`.`id` AS `location_id`,`L`.`name` AS `location_name` from (((((((`Object` `O` left join `AttributeValue` `AV_H` on(((`O`.`id` = `AV_H`.`object_id`) and (`AV_H`.`attr_id` = 27)))) left join `AttributeValue` `AV_S` on(((`O`.`id` = `AV_S`.`object_id`) and (`AV_S`.`attr_id` = 29)))) left join `RackThumbnail` `RT` on((`O`.`id` = `RT`.`rack_id`))) left join `EntityLink` `RL` on(((`O`.`id` = `RL`.`child_entity_id`) and (`RL`.`parent_entity_type` = 'row') and (`RL`.`child_entity_type` = 'rack')))) join `Object` `R` on((`R`.`id` = `RL`.`parent_entity_id`))) left join `EntityLink` `LL` on(((`R`.`id` = `LL`.`child_entity_id`) and (`LL`.`parent_entity_type` = 'location') and (`LL`.`child_entity_type` = 'row')))) left join `Object` `L` on((`L`.`id` = `LL`.`parent_entity_id`))) where (`O`.`objtype_id` = 1560) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `RackObject`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`racktables`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `RackObject` AS select `Object`.`id` AS `id`,`Object`.`name` AS `name`,`Object`.`label` AS `label`,`Object`.`objtype_id` AS `objtype_id`,`Object`.`asset_no` AS `asset_no`,`Object`.`has_problems` AS `has_problems`,`Object`.`comment` AS `comment` from `Object` where (`Object`.`objtype_id` not in (1560,1561,1562)) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `Row`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`racktables`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `Row` AS select `O`.`id` AS `id`,`O`.`name` AS `name`,`L`.`id` AS `location_id`,`L`.`name` AS `location_name` from ((`Object` `O` left join `EntityLink` `EL` on(((`O`.`id` = `EL`.`child_entity_id`) and (`EL`.`parent_entity_type` = 'location') and (`EL`.`child_entity_type` = 'row')))) left join `Object` `L` on(((`EL`.`parent_entity_id` = `L`.`id`) and (`L`.`objtype_id` = 1562)))) where (`O`.`objtype_id` = 1561) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + diff --git a/tests/express.sh b/tests/express.sh index 727ff37a6..23d24f90e 100755 --- a/tests/express.sh +++ b/tests/express.sh @@ -2,21 +2,40 @@ THISDIR=`dirname $0` BASEDIR=`readlink -f "$THISDIR/.."` +: ${PHPUNIT:=phpunit} + +case `"$PHPUNIT" --version` in + 'PHPUnit 4.'*|'PHPUnit 5.'*) + BOOTSTRAP_FILE=bootstrap_v4v5.php + ;; + 'PHPUnit 6.'*) + BOOTSTRAP_FILE=bootstrap_v6.php + ;; + *) + echo 'ERROR: failed to find a known version of PHPUnit' + exit 5 +esac echo "Running express tests using the base directory '$BASEDIR'" +echo "and PHPUnit bootstrap file '$BOOTSTRAP_FILE'." # Every file in wwwroot/inc/ must be a valid PHP input file and must not # produce any output when parsed by PHP (because, for instance, a plain text # file is a valid PHP input file). echo -cd "$BASEDIR/wwwroot/inc" +cd "$BASEDIR" files=0 errors=0 TEMPFILE=`mktemp /tmp/racktables_unittest.XXXXXX` -FORMAT='%-25s : %s\n' -for f in *.php; do - [ "$f" = "init.php" ] && continue # see below - php "$f" > "$TEMPFILE" +FORMAT='%-40s : %s\n' +for f in wwwroot/inc/*.php plugins/*/plugin.php; do + if [ "$f" = "wwwroot/inc/init.php" ]; then + printf "$FORMAT" "$f" 'not tested' + continue # see below + fi + fname=`basename "$f"` + cd `dirname "$f"` + php "$fname" > "$TEMPFILE" rc=$? if [ $rc -eq 0 -a ! -s "$TEMPFILE" ]; then printf "$FORMAT" "$f" 'OK' @@ -31,8 +50,9 @@ for f in *.php; do fi fi files=`expr $files + 1` + cd "$BASEDIR" done -echo '------------------------------------' +echo '---------------------------------------------------' echo "Files parsed: $files, failed tests: $errors" rm -f "$TEMPFILE" [ $errors -eq 0 ] || exit 1 @@ -40,9 +60,10 @@ rm -f "$TEMPFILE" # A side effect of syncdomain.php is testing whether init.php is functional. echo cd "$BASEDIR/wwwroot" -../scripts/syncdomain.php --help || exit 1 +echo 'Testing syncdomain.php'; ../scripts/syncdomain.php --help || exit 1 +echo 'Testing cleanup_ldap_cache.php'; ../scripts/cleanup_ldap_cache.php || exit 1 # At this point it makes sense to test specific functions. echo cd "$BASEDIR/tests" -phpunit --group small || exit 1 +"$PHPUNIT" --group small --bootstrap $BOOTSTRAP_FILE --stderr || exit 1 diff --git a/tests/travis_setup_mysql.sh b/tests/travis_setup_mysql.sh index 56fc2f904..24da256cc 100755 --- a/tests/travis_setup_mysql.sh +++ b/tests/travis_setup_mysql.sh @@ -10,14 +10,16 @@ fi DBNAME="$1" USERNAME="$2" PASSWORD="$3" +THISDIR=`dirname $0` +BASEDIR=`readlink -f "$THISDIR/.."` if mysql -u root -e "SHOW TABLES FROM $DBNAME" >/dev/null 2>&1; then echo "Error: database $DBNAME already exists!" exit 1 fi -if [ -e wwwroot/inc/secret.php ]; then - echo "Error: wwwroot/inc/secret.php already exists!" +if [ -e "$BASEDIR/wwwroot/inc/secret.php" ]; then + echo "Error: '$BASEDIR/wwwroot/inc/secret.php' already exists!" exit 1 fi @@ -31,15 +33,14 @@ mysql -u root mysql -e "CREATE DATABASE ${DBNAME} CHARACTER SET utf8 COLLATE utf mysql -u root -e "CREATE USER ${USERNAME}@localhost IDENTIFIED BY '${PASSWORD}';" || exit 2 mysql -u root -e "GRANT ALL PRIVILEGES ON ${DBNAME}.* TO ${USERNAME}@localhost;" || exit 2 -cat >wwwroot/inc/secret.php < "$BASEDIR/wwwroot/inc/secret.php" < EOF -cat >cli_install.php < "$BASEDIR/cli_install.php" < EOF +cd "$BASEDIR" php cli_install.php || exit 3 -mysql -u "$USERNAME" -p"$PASSWORD" "$DBNAME" -e "INSERT INTO UserAccount (user_id, user_name, user_password_hash) VALUES (1, 'admin', SHA1('${PASSWORD}'));" || exit 3 +mysql -u root "$DBNAME" -e "INSERT INTO UserAccount (user_id, user_name, user_password_hash) VALUES (1, 'admin', SHA1('${PASSWORD}'));" || exit 3 diff --git a/wwwroot/js/codemirror/codemirror.css b/wwwroot/css/codemirror/codemirror.css similarity index 61% rename from wwwroot/js/codemirror/codemirror.css rename to wwwroot/css/codemirror/codemirror.css index f87c24569..b008351a6 100644 --- a/wwwroot/js/codemirror/codemirror.css +++ b/wwwroot/css/codemirror/codemirror.css @@ -3,12 +3,8 @@ .CodeMirror { /* Set height, width, borders, and global font properties here */ font-family: monospace; - height: 500px; - width: 100%; -} -.CodeMirror-scroll { - /* Set scrolling behaviour here */ - overflow: auto; + height: 300px; + color: black; } /* PADDING */ @@ -37,48 +33,93 @@ min-width: 20px; text-align: right; color: #999; - -moz-box-sizing: content-box; - box-sizing: content-box; + white-space: nowrap; } +.CodeMirror-guttermarker { color: black; } +.CodeMirror-guttermarker-subtle { color: #999; } + /* CURSOR */ -.CodeMirror div.CodeMirror-cursor { +.CodeMirror-cursor { border-left: 1px solid black; - z-index: 3; + border-right: none; + width: 0; } /* Shown when moving in bi-directional text */ .CodeMirror div.CodeMirror-secondarycursor { border-left: 1px solid silver; } -.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor { +.cm-fat-cursor .CodeMirror-cursor { width: auto; - border: 0; + border: 0 !important; background: #7e7; +} +.cm-fat-cursor div.CodeMirror-cursors { z-index: 1; } + +.cm-animate-fat-cursor { + width: auto; + border: 0; + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; + background-color: #7e7; +} +@-moz-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} +@-webkit-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} +@keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} + /* Can style cursor different in overwrite (non-insert) mode */ -.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {} +.CodeMirror-overwrite .CodeMirror-cursor {} -.cm-tab { display: inline-block; } +.cm-tab { display: inline-block; text-decoration: inherit; } +.CodeMirror-rulers { + position: absolute; + left: 0; right: 0; top: -50px; bottom: -20px; + overflow: hidden; +} .CodeMirror-ruler { border-left: 1px solid #ccc; + top: 0; bottom: 0; position: absolute; } /* DEFAULT THEME */ +.cm-s-default .cm-header {color: blue;} +.cm-s-default .cm-quote {color: #090;} +.cm-negative {color: #d44;} +.cm-positive {color: #292;} +.cm-header, .cm-strong {font-weight: bold;} +.cm-em {font-style: italic;} +.cm-link {text-decoration: underline;} +.cm-strikethrough {text-decoration: line-through;} + .cm-s-default .cm-keyword {color: #708;} .cm-s-default .cm-atom {color: #219;} .cm-s-default .cm-number {color: #164;} .cm-s-default .cm-def {color: #00f;} .cm-s-default .cm-variable, .cm-s-default .cm-punctuation, -.cm-s-default .cm-property {} -.cm-s-default .cm-operator {color: blue;} +.cm-s-default .cm-property, +.cm-s-default .cm-operator {} .cm-s-default .cm-variable-2 {color: #05a;} -.cm-s-default .cm-variable-3 {color: #085;} +.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;} .cm-s-default .cm-comment {color: #a50;} .cm-s-default .cm-string {color: #a11;} .cm-s-default .cm-string-2 {color: #f50;} @@ -86,24 +127,21 @@ .cm-s-default .cm-qualifier {color: #555;} .cm-s-default .cm-builtin {color: #30a;} .cm-s-default .cm-bracket {color: #997;} -.cm-s-default .cm-tag {color: orange;} +.cm-s-default .cm-tag {color: #170;} .cm-s-default .cm-attribute {color: #00c;} -.cm-s-default .cm-header {color: blue;} -.cm-s-default .cm-quote {color: #090;} .cm-s-default .cm-hr {color: #999;} .cm-s-default .cm-link {color: #00c;} -.cm-negative {color: #d44;} -.cm-positive {color: #292;} -.cm-header, .cm-strong {font-weight: bold;} -.cm-em {font-style: italic;} -.cm-link {text-decoration: underline;} - .cm-s-default .cm-error {color: #f00;} .cm-invalidchar {color: #f00;} +.CodeMirror-composing { border-bottom: 2px solid; } + +/* Default styles for common addons */ + div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} +.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } .CodeMirror-activeline-background {background: #e8f2ff;} /* STOP */ @@ -112,14 +150,13 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} the editor. You probably shouldn't touch them. */ .CodeMirror { - line-height: 1; position: relative; overflow: hidden; background: white; - color: black; } .CodeMirror-scroll { + overflow: scroll !important; /* Things will break if this is overridden */ /* 30px is the magic margin used to hide the element's real scrollbars */ /* See overflow: hidden in .CodeMirror */ margin-bottom: -30px; margin-right: -30px; @@ -127,18 +164,14 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} height: 100%; outline: none; /* Prevent dragging from highlighting the element */ position: relative; - -moz-box-sizing: content-box; - box-sizing: content-box; } .CodeMirror-sizer { position: relative; border-right: 30px solid transparent; - -moz-box-sizing: content-box; - box-sizing: content-box; } /* The fake, visible scrollbars. Used to force redraw during scrolling - before actuall scrolling happens, thus preventing shaking and + before actual scrolling happens, thus preventing shaking and flickering artifacts. */ .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { position: absolute; @@ -164,29 +197,38 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} .CodeMirror-gutters { position: absolute; left: 0; top: 0; - padding-bottom: 30px; + min-height: 100%; z-index: 3; } .CodeMirror-gutter { white-space: normal; height: 100%; - -moz-box-sizing: content-box; - box-sizing: content-box; - padding-bottom: 30px; - margin-bottom: -32px; display: inline-block; - /* Hack to make IE7 behave */ - *zoom:1; - *display:inline; + vertical-align: top; + margin-bottom: -30px; +} +.CodeMirror-gutter-wrapper { + position: absolute; + z-index: 4; + background: none !important; + border: none !important; +} +.CodeMirror-gutter-background { + position: absolute; + top: 0; bottom: 0; + z-index: 4; } .CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; } +.CodeMirror-gutter-wrapper ::selection { background-color: transparent } +.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent } .CodeMirror-lines { cursor: text; + min-height: 1px; /* prevents collapsing before first draw */ } .CodeMirror pre { /* Reset some styles that the rest of the page might have set */ @@ -203,6 +245,9 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} z-index: 2; position: relative; overflow: visible; + -webkit-tap-highlight-color: transparent; + -webkit-font-variant-ligatures: contextual; + font-variant-ligatures: contextual; } .CodeMirror-wrap pre { word-wrap: break-word; @@ -224,8 +269,20 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} .CodeMirror-widget {} -.CodeMirror-wrap .CodeMirror-scroll { - overflow-x: hidden; +.CodeMirror-rtl pre { direction: rtl; } + +.CodeMirror-code { + outline: none; +} + +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { + -moz-box-sizing: content-box; + box-sizing: content-box; } .CodeMirror-measure { @@ -235,32 +292,49 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} overflow: hidden; visibility: hidden; } -.CodeMirror-measure pre { position: static; } -.CodeMirror div.CodeMirror-cursor { +.CodeMirror-cursor { position: absolute; + pointer-events: none; +} +.CodeMirror-measure pre { position: static; } + +div.CodeMirror-cursors { visibility: hidden; - border-right: none; - width: 0; + position: relative; + z-index: 3; } -.CodeMirror-focused div.CodeMirror-cursor { +div.CodeMirror-dragcursors { + visibility: visible; +} + +.CodeMirror-focused div.CodeMirror-cursors { visibility: visible; } .CodeMirror-selected { background: #d9d9d9; } .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } +.CodeMirror-crosshair { cursor: crosshair; } +.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } +.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } .cm-searching { background: #ffa; background: rgba(255, 255, 0, .4); } -/* IE7 hack to prevent it from returning funny offsetTops on the spans */ -.CodeMirror span { *vertical-align: text-bottom; } +/* Used to force a border model for a node */ +.cm-force-border { padding-right: .1px; } @media print { /* Hide the cursor when printing */ - .CodeMirror div.CodeMirror-cursor { + .CodeMirror div.CodeMirror-cursors { visibility: hidden; } } + +/* See issue #2901 */ +.cm-tab-wrap-hack:after { content: ''; } + +/* Help users use markselection to safely style text background */ +span.CodeMirror-selectedtext { background: none; } diff --git a/wwwroot/css/codemirror/rackcode.css b/wwwroot/css/codemirror/rackcode.css new file mode 100644 index 000000000..d2f53f757 --- /dev/null +++ b/wwwroot/css/codemirror/rackcode.css @@ -0,0 +1,7 @@ +.CodeMirror { height: 500px; } +.cm-s-rackcode span.cm-comment { font-style: italic; color: gray; } +.cm-s-rackcode span.cm-operator { color: blue; } +.cm-s-rackcode span.cm-variable { color: orange; } +.cm-s-rackcode span.cm-def { color: magenta; } +.cm-s-rackcode span.cm-keyword { font-weight: bold; } +.cm-s-rackcode span.cm-atom { font-weight: normal; color: brown; } diff --git a/wwwroot/css/pi.css b/wwwroot/css/pi.css index 006cba2f2..7ddafa478 100644 --- a/wwwroot/css/pi.css +++ b/wwwroot/css/pi.css @@ -731,6 +731,10 @@ div.vlan { font-family: Arial,Sans-Serif,sans-serif; } +.l2address { + font-family: monospace; +} + /*common rack item attributes*/ .atom { text-align: center; diff --git a/wwwroot/inc/ajax-interface.php b/wwwroot/inc/ajax-interface.php index 7930a0eca..2de477f36 100644 --- a/wwwroot/inc/ajax-interface.php +++ b/wwwroot/inc/ajax-interface.php @@ -337,4 +337,3 @@ function getAutocompleteListAJAX() echo json_encode ($rows); } -?> diff --git a/wwwroot/inc/auth.php b/wwwroot/inc/auth.php index 9e92d1853..2881dea65 100644 --- a/wwwroot/inc/auth.php +++ b/wwwroot/inc/auth.php @@ -650,5 +650,3 @@ function authenticated_via_database ($userinfo, $password) return FALSE; return $userinfo['user_password_hash'] == sha1 ($password); } - -?> diff --git a/wwwroot/inc/caching.php b/wwwroot/inc/caching.php index 0189a5acd..4bd4fd7d2 100644 --- a/wwwroot/inc/caching.php +++ b/wwwroot/inc/caching.php @@ -40,8 +40,8 @@ function checkCachedResponse ($creation_ts, $expire) function HTTPDateToUnixTime ($string) { - //Written per RFC 2616 3.3.1 - Full Date - //http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html + // Written per RFC 2616 3.3.1 - Full Date + // http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html $month_number = array ( 'Jan' => 1, @@ -59,9 +59,9 @@ function HTTPDateToUnixTime ($string) ); $formats = array(); - # RFC2616 dictates exchanged timestamps to be in GMT TZ, and RFC822 - # (which RFC1123 relies on) explicitly defines, that "GMT" is equivalent - # to "-0000" and "+0000". + // RFC2616 dictates exchanged timestamps to be in GMT TZ, and RFC822 + // (which RFC1123 relies on) explicitly defines that "GMT" is equivalent + // to "-0000" and "+0000". $formats['rfc1123'] = '/^(Sun|Mon|Tue|Wed|Thu|Fri|Sat), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{2}):(\d{2}):(\d{2}) (?:GMT|[-+]0000)$/'; $formats['rfc850'] = '/^(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{2}):(\d{2}):(\d{2}) (?:GMT|[-+]0000)$/'; $formats['asctime'] = '/^(Sun|Mon|Tue|Wed|Thu|Fri|Sat) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{2}| \d{1}) (\d{2}):(\d{2}):(\d{2}) (\d{4})$/'; @@ -95,10 +95,8 @@ function HTTPDateToUnixTime ($string) $year = $matches[7]; } else - return false; + return FALSE; if ($hours > 23 || $minutes > 59 || $seconds > 59 || ! checkdate ($month, $day, $year)) return FALSE; return gmmktime ($hours, $minutes, $seconds, $month, $day, $year); } - -?> diff --git a/wwwroot/inc/code.php b/wwwroot/inc/code.php index 9a3876501..37177039d 100644 --- a/wwwroot/inc/code.php +++ b/wwwroot/inc/code.php @@ -452,7 +452,7 @@ function un_expr() function refRCLineno ($ln) { - return "line ${ln}"; + return "line ${ln}"; } // returns warning message or NULL @@ -759,5 +759,3 @@ function getRackCodeWarnings () ); return $ret; } - -?> diff --git a/wwwroot/inc/config.php b/wwwroot/inc/config.php index f7b54ec5f..b1891d3e1 100644 --- a/wwwroot/inc/config.php +++ b/wwwroot/inc/config.php @@ -13,6 +13,4 @@ have already been executed. */ -define ('CODE_VERSION', '0.20.13'); - -?> +define ('CODE_VERSION', '0.20.14'); diff --git a/wwwroot/inc/database.php b/wwwroot/inc/database.php index 83982f445..f9be70a35 100644 --- a/wwwroot/inc/database.php +++ b/wwwroot/inc/database.php @@ -495,6 +495,7 @@ function listCells ($realm, $parent_id = 0) 'id' => $tag_id, 'tag' => $taglist[$tag_id]['tag'], 'parent_id' => $taglist[$tag_id]['parent_id'], + 'color' => $taglist[$tag_id]['color'], 'user' => $row['tag_user'], 'time' => $row['tag_time'], ); @@ -607,6 +608,7 @@ function spotEntity ($realm, $id, $ignore_cache = FALSE) 'id' => $row['tag_id'], 'tag' => $taglist[$row['tag_id']]['tag'], 'parent_id' => $taglist[$row['tag_id']]['parent_id'], + 'color' => $taglist[$row['tag_id']]['color'], 'user' => $row['tag_user'], 'time' => $row['tag_time'], ); @@ -617,6 +619,7 @@ function spotEntity ($realm, $id, $ignore_cache = FALSE) 'id' => $row['tag_id'], 'tag' => $taglist[$row['tag_id']]['tag'], 'parent_id' => $taglist[$row['tag_id']]['parent_id'], + 'color' => $taglist[$row['tag_id']]['color'], 'user' => $row['tag_user'], 'time' => $row['tag_time'], ); @@ -831,7 +834,8 @@ function processIPNetVlans (&$cell) function fetchPortList ($sql_where_clause, $query_params = array()) { - $query = << nullIfEmptyStr ($new_name), + 'label' => nullIfEmptyStr ($new_label), + 'has_problems' => $new_has_problems == '' ? 'no' : $new_has_problems, + 'asset_no' => nullIfEmptyStr ($new_asset_no), + 'comment' => nullIfEmptyStr ($new_comment), + ); + $override = callHook('commitUpdateObjectBefore_hook', $object_id, $set_columns); + if ( is_array ($override) ) + { + $set_columns = $override; + } $type_id = getObjectType ($object_id); checkObjectNameUniqueness ($new_name, $type_id, $object_id); usePreparedUpdateBlade ( 'Object', - array - ( - 'name' => nullIfEmptyStr ($new_name), - 'label' => nullIfEmptyStr ($new_label), - 'has_problems' => $new_has_problems == '' ? 'no' : $new_has_problems, - 'asset_no' => nullIfEmptyStr ($new_asset_no), - 'comment' => nullIfEmptyStr ($new_comment), - ), + $set_columns, array ( 'id' => $object_id ) ); recordObjectHistory ($object_id); + callHook ('commitUpdateObjectAfter_hook', $object_id); } function compare_name ($a, $b) @@ -1237,7 +1249,7 @@ function commitUnlinkEntitiesByLinkID ($link_id) // - number of VMs whose parent is one of the resource pools in the cluster function getVMClusterSummary () { - $query = << $object_id)); - # Munin graphs - usePreparedDeleteBlade ('MuninGraph', array ('object_id' => $object_id)); # Do an additional reset if needed callHook ('resetObject_hook', $object_id); } @@ -1505,7 +1513,7 @@ function commitDeleteRow ($row_id) // Returns mounted devices count in all racks inside the specified row function getRowMountsCount ($row_id) { - $query =<<fetch (PDO::FETCH_NUM); - return $row[0]; + return $result->fetchColumn(); } // This function creates a new record in Molecule and number of linked @@ -1684,7 +1691,7 @@ function commitAddPort ($object_id, $port_name, $port_type_id, $port_label, $por global $dbxlink; $db_l2address = l2addressForDatabase ($port_l2address); list ($iif_id, $oif_id) = parsePortIIFOIF ($port_type_id); - // The conditional table locking is less relevant now due to syncObjectPorts(). + // The conditional table locking is less relevant now due to replaceObjectPorts(). if ($db_l2address != '') $dbxlink->exec ('LOCK TABLES Port WRITE'); try @@ -1716,7 +1723,7 @@ function commitAddPortReal ($object_id, $port_name, $iif_id, $oif_id, $port_labe ( 'name' => $port_name, 'object_id' => $object_id, - 'label' => $port_label, + 'label' => nullIfEmptyStr ($port_label), 'iif_id' => $iif_id, 'type' => $oif_id, 'l2address' => nullIfEmptyStr ($db_l2address), @@ -1767,7 +1774,7 @@ function commitUpdatePortReal ($object_id, $port_id, $port_name, $iif_id, $oif_i 'name' => $port_name, 'iif_id' => $iif_id, 'type' => $oif_id, - 'label' => $port_label, + 'label' => nullIfEmptyStr ($port_label), 'reservation_comment' => $port_reservation_comment, 'l2address' => nullIfEmptyStr ($db_l2address), ), @@ -1818,12 +1825,9 @@ function getAllIPv4Allocations () { $result = usePreparedSelectBlade ( - "select object_id as object_id, ". - "Object.name as object_name, ". - "IPv4Allocation.name as name, ". - "IPv4Allocation.type as type, ". - "INET_NTOA(ip) as ip ". - "from IPv4Allocation join Object on id=object_id " + 'SELECT object_id AS object_id, Object.name AS object_name, objtype_id, ' . + 'IPv4Allocation.name AS name, IPv4Allocation.type AS type, INET_NTOA(ip) AS ip '. + 'FROM IPv4Allocation JOIN Object ON id = object_id' ); return $result->fetchAll (PDO::FETCH_ASSOC); } @@ -2104,7 +2108,8 @@ function scanIPv4Space ($pairlist, $filter_flags = IPSCAN_ANY) $whereexpr4 = '('; $whereexpr5a = '('; $whereexpr5b = '('; - $whereexpr6 = '('; + $whereexpr6a = '('; + $whereexpr6b = '('; $qparams = array(); $qparams_bin = array(); foreach ($pairlist as $tmp) @@ -2116,7 +2121,8 @@ function scanIPv4Space ($pairlist, $filter_flags = IPSCAN_ANY) $whereexpr4 .= $or . "rsip between ? and ?"; $whereexpr5a .= $or . "remoteip between ? and ?"; $whereexpr5b .= $or . "localip between ? and ?"; - $whereexpr6 .= $or . "l.ip between ? and ?"; + $whereexpr6a .= $or . "ip between ? and ?"; + $whereexpr6b .= $or . "l.ip between ? and ?"; $or = ' or '; $qparams[] = ip4_bin2db ($tmp['first']); $qparams[] = ip4_bin2db ($tmp['last']); @@ -2130,7 +2136,8 @@ function scanIPv4Space ($pairlist, $filter_flags = IPSCAN_ANY) $whereexpr4 .= ')'; $whereexpr5a .= ')'; $whereexpr5b .= ')'; - $whereexpr6 .= ')'; + $whereexpr6a .= ')'; + $whereexpr6b .= ')'; // 1. collect labels and reservations if ($filter_flags & IPSCAN_DO_ADDR) @@ -2279,8 +2286,8 @@ function scanIPv4Space ($pairlist, $filter_flags = IPSCAN_ANY) if ($filter_flags & IPSCAN_DO_LOG) { $query = "select l.ip, l.user, UNIX_TIMESTAMP(l.date) AS time from IPv4Log l INNER JOIN " . - " (SELECT MAX(id) as id FROM IPv4Log GROUP BY ip) v USING (id) WHERE ${whereexpr6}"; - $result = usePreparedSelectBlade ($query, $qparams); + " (SELECT MAX(id) as id FROM IPv4Log WHERE ${whereexpr6a} GROUP BY ip) v USING (id) WHERE ${whereexpr6b}"; + $result = usePreparedSelectBlade ($query, array_merge ($qparams, $qparams)); while ($row = $result->fetch (PDO::FETCH_ASSOC)) { $ip_bin = ip4_int2bin ($row['ip']); @@ -2318,7 +2325,8 @@ function scanIPv6Space ($pairlist, $filter_flags = IPSCAN_ANY) $whereexpr3a = '('; $whereexpr3b = '('; $whereexpr4 = '('; - $whereexpr6 = '('; + $whereexpr6a = '('; + $whereexpr6b = '('; $qparams = array(); foreach ($pairlist as $tmp) { @@ -2327,7 +2335,8 @@ function scanIPv6Space ($pairlist, $filter_flags = IPSCAN_ANY) $whereexpr3a .= $or . "vip between ? and ?"; $whereexpr3b .= $or . "vip between ? and ?"; $whereexpr4 .= $or . "rsip between ? and ?"; - $whereexpr6 .= $or . "l.ip between ? and ?"; + $whereexpr6a .= $or . "ip between ? and ?"; + $whereexpr6b .= $or . "l.ip between ? and ?"; $or = ' or '; $qparams[] = $tmp['first']; $qparams[] = $tmp['last']; @@ -2337,7 +2346,8 @@ function scanIPv6Space ($pairlist, $filter_flags = IPSCAN_ANY) $whereexpr3a .= ')'; $whereexpr3b .= ')'; $whereexpr4 .= ')'; - $whereexpr6 .= ')'; + $whereexpr6a .= ')'; + $whereexpr6b .= ')'; // 1. collect labels and reservations if ($filter_flags & IPSCAN_DO_ADDR) @@ -2430,8 +2440,8 @@ function scanIPv6Space ($pairlist, $filter_flags = IPSCAN_ANY) if ($filter_flags & IPSCAN_DO_LOG) { $query = "select l.ip, l.user, UNIX_TIMESTAMP(l.date) AS time from IPv6Log l INNER JOIN " . - " (SELECT MAX(id) as id FROM IPv6Log GROUP BY ip) v USING (id) WHERE ${whereexpr6}"; - $result = usePreparedSelectBlade ($query, $qparams); + " (SELECT MAX(id) as id FROM IPv6Log WHERE ${whereexpr6a} GROUP BY ip) v USING (id) WHERE ${whereexpr6b}"; + $result = usePreparedSelectBlade ($query, array_merge ($qparams, $qparams)); while ($row = $result->fetch (PDO::FETCH_ASSOC)) { $ip_bin = $row['ip']; @@ -2764,33 +2774,39 @@ function unbindIPv6FromObject ($ip_bin, $object_id) function getIPv4PrefixSearchResult ($terms) { - $byname = getSearchResultByField - ( - 'IPv4Network', - array ('id'), - 'name', - $terms, - 'ip' - ); $ret = array(); - foreach ($byname as $row) - $ret[$row['id']] = spotEntity ('ipv4net', $row['id']); + foreach (array ('name', 'comment') as $column) + { + $tmp = getSearchResultByField + ( + 'IPv4Network', + array ('id'), + $column, + $terms, + 'ip' + ); + foreach ($tmp as $row) + $ret[$row['id']] = spotEntity ('ipv4net', $row['id']); + } return $ret; } function getIPv6PrefixSearchResult ($terms) { - $byname = getSearchResultByField - ( - 'IPv6Network', - array ('id'), - 'name', - $terms, - 'ip' - ); $ret = array(); - foreach ($byname as $row) - $ret[$row['id']] = spotEntity ('ipv6net', $row['id']); + foreach (array ('name', 'comment') as $column) + { + $tmp = getSearchResultByField + ( + 'IPv6Network', + array ('id'), + $column, + $terms, + 'ip' + ); + foreach ($tmp as $row) + $ret[$row['id']] = spotEntity ('ipv6net', $row['id']); + } return $ret; } @@ -3512,8 +3528,7 @@ function getIPv4Stats () foreach ($subject as $item) { $result = usePreparedSelectBlade ($item['q']); - $row = $result->fetch (PDO::FETCH_NUM); - $ret[$item['txt']] = $row[0]; + $ret[$item['txt']] = $result->fetchColumn(); unset ($result); } return $ret; @@ -3530,8 +3545,7 @@ function getIPv6Stats () foreach ($subject as $item) { $result = usePreparedSelectBlade ($item['q']); - $row = $result->fetch (PDO::FETCH_NUM); - $ret[$item['txt']] = $row[0]; + $ret[$item['txt']] = $result->fetchColumn(); unset ($result); } return $ret; @@ -3549,8 +3563,8 @@ function getRackspaceStats () foreach ($subject as $item) { $result = usePreparedSelectBlade ($item['q']); - $row = $result->fetch (PDO::FETCH_NUM); - $ret[$item['txt']] = $row[0] == '' ? 0 : $row[0]; + $tmp = $result->fetchColumn(); + $ret[$item['txt']] = $tmp == '' ? 0 : $tmp; unset ($result); } return $ret; @@ -3780,8 +3794,7 @@ function fetchAttrsForObjects ($object_set = array()) $record['value'] = $row['uint_value']; break; default: - $record['value'] = NULL; - break; + throw new RackTablesError ("unexpected attribute type '${row['attr_type']}'", RackTablesError::INTERNAL); } $ret[$object_id][$row['attr_id']] = $record; } @@ -3893,12 +3906,44 @@ function convertPDOException ($e) case 'HY000-1205': $text = 'lock wait timeout'; break; + case '42000-1142': + return new RTDBTableAccessDenied ($e->getMessage()); default: return $e; } return new RTDatabaseError ($text); } +// The strict SQL mode, which is the default since MySQL 5.7 and MariaDB 10.2.4, +// generates an error (and in this case a PDO exception) when a column value is +// invalid or missing. When the strict SQL mode is not enabled (for whatever +// reason), the invalid or missing values (as well as other anomalies) end up in +// the warnings buffer and remain out of sight by default. This function saves +// the contents of the buffer such that it can be displayed later. +function collectMySQLWarnings() +{ + global $dbxlink, $debug_mode, $rtdebug_mysql_warnings; + if (! isset ($debug_mode) || ! $debug_mode) + return; + if (! isset ($rtdebug_mysql_warnings)) + $rtdebug_mysql_warnings = array(); + $result = $dbxlink->query ('SHOW WARNINGS'); + $rtdebug_mysql_warnings = array_merge ($rtdebug_mysql_warnings, $result->fetchAll (PDO::FETCH_ASSOC)); +} + +function assertListOfColumnNames ($column_names) +{ + if (! is_array ($column_names)) + throw new InvalidArgException ('column_names', $column_names, 'is not an array'); + if (! count ($column_names)) + throw new InvalidArgException ('column_names', '(empty array)', 'must not be empty'); + foreach ($column_names as $each) + if (! is_string ($each)) + throw new InvalidArgException ('column_names', '(array)', 'contains an item that is not a string'); + elseif ($each == '') + throw new InvalidArgException ('column_names', '(array)', 'contains an empty string'); +} + // This is a swiss-knife blade to insert a record into a table. // The first argument is table name. // The second argument is an array of "name" => "value" pairs. @@ -3906,15 +3951,16 @@ function convertPDOException ($e) function usePreparedInsertBlade ($tablename, $columns) { global $dbxlink; - $query = "INSERT INTO ${tablename} (" . implode (', ', array_keys ($columns)); - $query .= ') VALUES (' . questionMarks (count ($columns)) . ')'; - // Now the query should be as follows: - // INSERT INTO table (c1, c2, c3) VALUES (?, ?, ?) + $query = "INSERT INTO `${tablename}` SET " . makeSetSQL (array_keys ($columns)); + // INSERT INTO `table` SET `c1` = ?, `c2` = ?, `c3` = ? try { $prepared = $dbxlink->prepare ($query); $prepared->execute (array_values ($columns)); - return $prepared->rowCount(); + $ret = $prepared->rowCount(); + unset ($prepared); + collectMySQLWarnings(); + return $ret; } catch (PDOException $e) { @@ -3924,35 +3970,33 @@ function usePreparedInsertBlade ($tablename, $columns) function makeSetSQL ($column_names) { - if (! count ($column_names)) - throw new InvalidArgException ('column_names', '(empty array)', 'must not be empty'); + assertListOfColumnNames ($column_names); $tmp = array(); // Same syntax works for NULL as well. foreach ($column_names as $each) - $tmp[] = "${each}=?"; + $tmp[] = "`${each}` = ?"; return implode (', ', $tmp); } -function makeWhereSQL ($where_columns, $conjunction, &$params = array()) +function makeWhereSQL ($where_columns, $conjunction, &$params) { if (! in_array (strtoupper ($conjunction), array ('AND', '&&', 'OR', '||', 'XOR'))) throw new InvalidArgException ('conjunction', $conjunction, 'invalid operator'); - if (! count ($where_columns)) - throw new InvalidArgException ('where_columns', '(empty array)', 'must not be empty'); + assertListOfColumnNames (array_keys ($where_columns)); $params = array(); $tmp = array(); foreach ($where_columns as $colname => $colvalue) if ($colvalue === NULL) - $tmp[] = "${colname} IS NULL"; + $tmp[] = "`${colname}` IS NULL"; elseif (is_array ($colvalue)) { // Suppress any string keys to keep array_merge() from overwriting. $params = array_merge ($params, array_values ($colvalue)); - $tmp[] = sprintf ('%s IN(%s)', $colname, questionMarks (count ($colvalue))); + $tmp[] = sprintf ('`%s` IN(%s)', $colname, questionMarks (count ($colvalue))); } else { - $tmp[] = "${colname}=?"; + $tmp[] = "`${colname}` = ?"; $params[] = $colvalue; } return implode (" ${conjunction} ", $tmp); @@ -3961,17 +4005,20 @@ function makeWhereSQL ($where_columns, $conjunction, &$params = array()) // This swiss-knife blade deletes any number of records from the specified table // using the specified key names and values. // returns integer - affected rows count. Throws exception on error -function usePreparedDeleteBlade ($tablename, $columns = array(), $conjunction = 'AND') +function usePreparedDeleteBlade ($tablename, $columns, $conjunction = 'AND') { global $dbxlink; if (! count ($columns)) throw new InvalidArgException ('columns', '(empty array)', 'in this function DELETE must have WHERE'); - $query = "DELETE FROM ${tablename} WHERE " . makeWhereSQL ($columns, $conjunction, $where_values); + $query = "DELETE FROM `${tablename}` WHERE " . makeWhereSQL ($columns, $conjunction, $where_values); try { $prepared = $dbxlink->prepare ($query); $prepared->execute ($where_values); - return $prepared->rowCount(); + $ret = $prepared->rowCount(); + unset ($prepared); + collectMySQLWarnings(); + return $ret; } catch (PDOException $e) { @@ -3995,20 +4042,23 @@ function usePreparedSelectBlade ($query, $args = array()) } // returns integer - affected rows count. Throws exception on error -function usePreparedUpdateBlade ($tablename, $set_columns = array(), $where_columns = array(), $conjunction = 'AND') +function usePreparedUpdateBlade ($tablename, $set_columns, $where_columns, $conjunction = 'AND') { global $dbxlink; if (! count ($set_columns)) throw new InvalidArgException ('set_columns', '(empty array)', 'UPDATE must have SET'); if (! count ($where_columns)) throw new InvalidArgException ('where_columns', '(empty array)', 'in this function UPDATE must have WHERE'); - $query = "UPDATE ${tablename} SET " . makeSetSQL (array_keys ($set_columns)); + $query = "UPDATE `${tablename}` SET " . makeSetSQL (array_keys ($set_columns)); $query .= ' WHERE ' . makeWhereSQL ($where_columns, $conjunction, $where_values); try { $prepared = $dbxlink->prepare ($query); $prepared->execute (array_merge (array_values ($set_columns), $where_values)); - return $prepared->rowCount(); + $ret = $prepared->rowCount(); + unset ($prepared); + collectMySQLWarnings(); + return $ret; } catch (PDOException $e) { @@ -4047,14 +4097,27 @@ function loadUserConfigCache ($username) return reindexById ($result->fetchAll (PDO::FETCH_ASSOC), 'varname'); } -function loadThumbCache ($rack_id) +function loadRackThumbCache ($rack_id) { - $ret = NULL; - $result = usePreparedSelectBlade ('SELECT thumb_data FROM RackThumbnail WHERE rack_id = ? AND thumb_data IS NOT NULL', array ($rack_id)); + $result = usePreparedSelectBlade ('SELECT thumb_data FROM RackThumbnail WHERE rack_id = ?', array ($rack_id)); $row = $result->fetch (PDO::FETCH_ASSOC); - if ($row) - $ret = base64_decode ($row['thumb_data']); - return $ret; + return $row ? $row['thumb_data'] : NULL; +} + +function saveRackThumbCache ($rack_id, $thumb_data) +{ + global $dbxlink; + try + { + $query = $dbxlink->prepare ('REPLACE INTO RackThumbnail SET rack_id = ?, thumb_data = ?'); + $query->bindParam (1, $rack_id); + $query->bindParam (2, $thumb_data, PDO::PARAM_LOB); + return $query->execute(); + } + catch (PDOException $e) + { + throw convertPDOException ($e); + } } function executeAutoPorts ($object_id) @@ -4250,7 +4313,11 @@ function generateEntityAutoTags ($cell) // results different from MySQL. function getTagList ($extra_sql = '') { - $result = usePreparedSelectBlade ("SELECT id, parent_id, is_assignable, tag FROM TagTree ORDER BY tag ${extra_sql}"); + $result = usePreparedSelectBlade + ( + 'SELECT id, parent_id, is_assignable, tag, LPAD(HEX(color), 6, "0") AS color ' . + "FROM TagTree ORDER BY tag ${extra_sql}" + ); return reindexById ($result->fetchAll (PDO::FETCH_ASSOC)); } @@ -4296,14 +4363,17 @@ function deleteTagForEntity ($entity_realm, $entity_id, $tag_id) // A tag's parent may not be one of its children, the tag itself or a tag // that does not belong to the forest of rooted trees because of a cycle. -function commitUpdateTag ($tag_id, $tag_name, $parent_id, $is_assignable) +function commitUpdateTag ($tag_id, $tag_name, $parent_id, $is_assignable, $color = NULL) { global $dbxlink; + global $taglist; $dbxlink->beginTransaction(); try { // Use the copy from within the transaction. - assertValidParentId (addTraceToNodes (getTagList ('FOR UPDATE')), $tag_id, $parent_id); + $local_taglist = addTraceToNodes (getTagList ('FOR UPDATE')); + assertValidParentId ($local_taglist, $tag_id, $parent_id); + $db_color = HTMLColorForDatabase ($color); usePreparedUpdateBlade ( 'TagTree', @@ -4311,10 +4381,24 @@ function commitUpdateTag ($tag_id, $tag_name, $parent_id, $is_assignable) ( 'tag' => $tag_name, 'parent_id' => nullIfZero ($parent_id), - 'is_assignable' => $is_assignable + 'is_assignable' => $is_assignable, + 'color' => $db_color ), array ('id' => $tag_id) ); + if ($db_color !== HTMLColorForDatabase ($local_taglist[$tag_id]['color'])) + // Remove only those rack thumbnails that include any objects tagged with + // the current tag (this does not include zero-U associations) or that + // represent racks tagged with the current tag. + usePreparedExecuteBlade + ( + 'DELETE FROM RackThumbnail WHERE ' . + 'rack_id IN(SELECT DISTINCT rack_id FROM TagStorage INNER JOIN RackSpace ON entity_id = object_id ' . + ' WHERE entity_realm = "object" AND tag_id = ?)' . + 'OR rack_id IN(SELECT entity_id FROM TagStorage WHERE entity_realm = "rack" AND tag_id = ?)', + array ($tag_id, $tag_id) + ); + $taglist = addTraceToNodes (getTagList()); $dbxlink->commit(); } catch (PDOException $pe) @@ -4383,6 +4467,14 @@ function rebuildTagChainForEntity ($realm, $entity_id, $extrachain = array(), $r addTagForEntity ($realm, $entity_id, $tag_id); $result = TRUE; } + + // remove Rack thumbnail if Rack or Object tag changes + if ($result && ( $realm == 'rack' || $realm == 'object')) + { + $rack_id = $realm == 'rack' ? $entity_id : getResidentRacksData ($entity_id, FALSE); + usePreparedDeleteBlade ('RackThumbnail', array ('rack_id' => $rack_id)); + } + return $result; } @@ -4958,7 +5050,7 @@ function alreadyUsedL2Address ($address, $my_object_id) // belongs to a port with an object ID other than the given. This constraint makes // it possible to reuse L2 addresses within one object's set of ports and to keep // them universally unique otherwise. Every L2 address on the input list must have -// been conditioned with l2AddressForDatabase(). +// been conditioned with l2addressForDatabase(). function assertUniqueL2Addresses ($db_l2addresses, $my_object_id) { // Reindex the array such that array_merge() below works as expected. @@ -5162,7 +5254,7 @@ function getDomainVLANs ($vdom_id, $strict = FALSE) } $result = usePreparedSelectBlade - (<<fetchAll (PDO::FETCH_ASSOC); } +// plugins may install their own settings +function addConfigVar ($varname, $varvalue, $vartype, $emptyok, $is_hidden, $is_userdefined, $description) +{ + usePreparedInsertBlade + ( + 'Config', + array + ( + 'varname' => $varname, + 'varvalue' => $varvalue, + 'vartype' => $vartype, + 'emptyok' => $emptyok, + 'is_hidden' => $is_hidden, + 'is_userdefined' => $is_userdefined, + 'description' => $description + ) + ); + global $configCache; + $configCache = loadConfigDefaults (); +} + +// used when uninstalling a plugin +function deleteConfigVar ($varname) +{ + global $configCache; + if (! isset ($configCache)) + throw new RackTablesError ('configuration cache is unavailable', RackTablesError::INTERNAL); + unset ($configCache[$varname]); + usePreparedDeleteBlade ('Config', array ('varname' => $varname)); +} + function setConfigVar ($varname, $varvalue) { global $configCache; @@ -5658,7 +5781,7 @@ function setConfigVar ($varname, $varvalue) throw new InvalidArgException ('varname', $varname, 'a hidden variable cannot be changed'); if ($varvalue == '' && $var['emptyok'] != 'yes') throw new InvalidArgException ('varvalue', $varvalue, "'${varname}' must have a non-empty value"); - if ($varvalue != '' && $var['vartype'] == 'uint' && (! is_numeric ($varvalue) || $varvalue < 0 )) + if ($varvalue != '' && $var['vartype'] == 'uint' && ! isUnsignedInteger ($varvalue, TRUE)) throw new InvalidArgException ('varvalue', $varvalue, "'${varname}' must be an unsigned integer"); // Update cache only if the changes went into DB. usePreparedUpdateBlade ('Config', array ('varvalue' => $varvalue), array ('varname' => $varname)); @@ -5681,12 +5804,12 @@ function setUserConfigVar ($varname, $varvalue) throw new InvalidArgException ('varname', $varname, 'a hidden variable cannot be changed'); if ($varvalue == '' && $var['emptyok'] != 'yes') throw new InvalidArgException ('varvalue', $varvalue, "'${varname}' must have a non-empty value"); - if ($varvalue != '' && $var['vartype'] == 'uint' && (! is_numeric ($varvalue) || $varvalue < 0 )) + if ($varvalue != '' && $var['vartype'] == 'uint' && ! isUnsignedInteger ($varvalue, TRUE)) throw new InvalidArgException ('varvalue', $varvalue, "'${varname}' must be an unsigned integer"); // Update cache only if the changes went into DB. usePreparedExecuteBlade ( - 'REPLACE UserConfig SET varvalue=?, varname=?, user=?', + 'REPLACE INTO UserConfig SET varvalue=?, varname=?, user=?', array ($varvalue, $varname, $remote_username) ); $configCache[$varname]['varvalue'] = $varvalue; @@ -5722,26 +5845,6 @@ function getConfiguredQuickLinks() return $ret; } -function getCactiGraphsForObject ($object_id) -{ - $result = usePreparedSelectBlade - ( - 'SELECT server_id, graph_id, caption FROM CactiGraph WHERE object_id = ? ORDER BY server_id, graph_id', - array ($object_id) - ); - return reindexById ($result->fetchAll (PDO::FETCH_ASSOC), 'graph_id'); -} - -function getMuninGraphsForObject ($object_id) -{ - $result = usePreparedSelectBlade - ( - 'SELECT server_id, graph, caption FROM MuninGraph WHERE object_id = ? ORDER BY server_id, graph', - array ($object_id) - ); - return reindexById ($result->fetchAll (PDO::FETCH_ASSOC), 'graph'); -} - function touchVLANSwitch ($switch_id) { return usePreparedExecuteBlade @@ -5794,26 +5897,6 @@ function scanAttrRelativeDays ($attr_id, $not_before_days, $not_after_days) return $result->fetchAll (PDO::FETCH_ASSOC); } -function getCactiServers() -{ - $result = usePreparedSelectBlade - ( - 'SELECT id, base_url, username, password, COUNT(graph_id) AS num_graphs ' . - 'FROM CactiServer AS CS LEFT JOIN CactiGraph AS CG ON CS.id = CG.server_id GROUP BY id' - ); - return reindexById ($result->fetchAll (PDO::FETCH_ASSOC)); -} - -function getMuninServers() -{ - $result = usePreparedSelectBlade - ( - 'SELECT id, base_url, COUNT(MG.object_id) AS num_graphs ' . - 'FROM MuninServer AS MS LEFT JOIN MuninGraph AS MG ON MS.id = MG.server_id GROUP BY id' - ); - return reindexById ($result->fetchAll (PDO::FETCH_ASSOC)); -} - function isTransactionActive() { global $dbxlink; @@ -6037,4 +6120,114 @@ function releaseDBMutex ($name) return $row === '1'; } -?> +// valid states: disabled, enabled, not_installed +// if no state is specified, return all +function getPlugins ($state = NULL) +{ + // installed + $result = usePreparedSelectBlade ('SELECT name, longname, version, home_url, state FROM Plugin ORDER BY name'); + $in_db = array (); + foreach ($result as $row) + if (! $state or $state == $row['state']) + $in_db[$row['name']] = array + ( + 'longname' => $row['longname'], + 'code_version' => 'N/A', + 'db_version' => $row['version'], + 'home_url' => $row['home_url'], + 'state' => $row['state'] + ); + + // available + global $racktables_plugins_dir; + $plugin_dirs = glob ("${racktables_plugins_dir}/*", GLOB_ONLYDIR); + $in_code = array (); + foreach ($plugin_dirs as $plugin_dir) + { + $plugin = basename ($plugin_dir); + if (! file_exists ("${plugin_dir}/plugin.php")) + continue; + + require_once "${plugin_dir}/plugin.php"; + if (! function_exists ("plugin_${plugin}_info")) + continue; + + $info = call_user_func ("plugin_${plugin}_info"); + $in_code[$info['name']] = array + ( + 'longname' => $info['longname'], + 'code_version' => $info['version'], + 'db_version' => (array_key_exists ($plugin, $in_db) ? $in_db[$info['name']]['db_version'] : 'N/A'), + 'home_url' => $info['home_url'], + 'state' => (array_key_exists ($plugin, $in_db) ? $in_db[$info['name']]['state'] : 'not_installed') + ); + } + + // merge plugin lists and filter them, if needed + $ret = array_replace_recursive ($in_db, $in_code); + if ($state) + foreach ($ret as $name => $info) + if ($info['state'] != $state) + unset ($ret[$name]); + ksort ($ret); + return $ret; +} + +function getPlugin ($name) +{ + $result = usePreparedSelectBlade + ( + 'SELECT name, longname, version, home_url, state FROM Plugin WHERE name = ?', + array ($name) + ); + $db_info = $result->fetch (PDO::FETCH_ASSOC); + $in_db = array (); + if (is_array ($db_info)) + { + $in_db['name'] = $db_info['name']; + $in_db['longname'] = $db_info['longname']; + $in_db['code_version'] = 'N/A'; + $in_db['db_version'] = $db_info['version']; + $in_db['home_url'] = $db_info['home_url']; + $in_db['state'] = $db_info['state']; + } + + global $racktables_plugins_dir; + $in_code = array (); + if (file_exists ("$racktables_plugins_dir/${name}/plugin.php")) + { + require_once "${racktables_plugins_dir}/${name}/plugin.php"; + if (! function_exists ("plugin_${name}_info")) + return FALSE; + + $code_info = call_user_func ("plugin_${name}_info"); + $in_code['name'] = $code_info['name']; + $in_code['longname'] = $code_info['longname']; + $in_code['code_version'] = $code_info['version']; + $in_code['db_version'] = (isset ($in_db['db_version']) ? $in_db['db_version'] : 'N/A'); + $in_code['home_url'] = $code_info['home_url']; + $in_code['state'] = (isset ($in_db['state']) ? $in_db['state'] : 'not_installed'); + } + return array_replace ($in_db, $in_code); +} + +function commitInstallPlugin ($name, $longname, $version, $home_url) +{ + usePreparedInsertBlade + ( + 'Plugin', + array + ( + 'name' => $name, + 'longname' => $longname, + 'version' => $version, + 'home_url' => $home_url, + 'state' => 'enabled' + ) + ); +} + +function commitUninstallPlugin ($name) +{ + usePreparedDeleteBlade ('Plugin', array ('name' => $name)); +} diff --git a/wwwroot/inc/deviceconfig.php b/wwwroot/inc/deviceconfig.php index f80449e3a..52a1f81fc 100644 --- a/wwwroot/inc/deviceconfig.php +++ b/wwwroot/inc/deviceconfig.php @@ -3573,5 +3573,3 @@ function iosxr4ReadInterfaceStatus ($input) } return $result; } - -?> diff --git a/wwwroot/inc/dictionary.php b/wwwroot/inc/dictionary.php index 77be7d243..aab804a5a 100644 --- a/wwwroot/inc/dictionary.php +++ b/wwwroot/inc/dictionary.php @@ -73,7 +73,7 @@ function platform_is_ok () { $nerrs = 0; echo "\n"; - $nerrs += platform_generic_test (version_compare (PHP_VERSION, '5.2.10', '>='), 'PHP version >= 5.2.10'); + $nerrs += platform_generic_test (version_compare (PHP_VERSION, '5.5.0', '>='), 'PHP version >= 5.5.0'); $nerrs += platform_generic_test (class_exists ('PDO'), 'PDO extension'); $nerrs += platform_generic_test (in_array ('pdo_mysql', get_loaded_extensions()), 'PDO-MySQL extension'); $nerrs += platform_function_test ('preg_match', 'PCRE extension'); @@ -84,7 +84,6 @@ function platform_is_ok () platform_function_test ('ldap_connect', 'LDAP extension', 'Not found, LDAP authentication will not work.', 'trwarning'); platform_function_test ('pcntl_waitpid', 'PCNTL extension', '802.1Q parallel sync is unavailable.', 'trwarning'); $nerrs += platform_function_test ('json_encode', 'JSON extension', 'JavaScript interface bits may fail.'); - platform_generic_test (in_array ('curl', get_loaded_extensions()), 'cURL extension', 'Not found, Cacti Graph integration is unavailable.', 'trwarning'); $nerrs += platform_function_test ('bcmul', 'BC Math extension'); platform_generic_test ( @@ -2103,11 +2102,11 @@ function platform_is_ok () 2211 => array ('chapter_id' => 12, 'dict_value' => 'Cisco%GPASS%CGS-2520-24TC'), 2212 => array ('chapter_id' => 12, 'dict_value' => 'Linksys%GPASS%SRW2024P'), 2213 => array ('chapter_id' => 12, 'dict_value' => 'HP ProCurve%GPASS%2920-48G J9728A'), - 2214 => array ('chapter_id' => 12, 'dict_value' => '[[Edge-Core%GPASS%AS6700-32X | http://www.edge-core.com/ProdDtl.asp?sno=435&AS6700-32X%20with%20ONIE]]'), - 2215 => array ('chapter_id' => 12, 'dict_value' => '[[Edge-Core%GPASS%AS6701-32X | http://www.edge-core.com/ProdDtl.asp?sno=435&AS6700-32X%20with%20ONIE]]'), - 2216 => array ('chapter_id' => 12, 'dict_value' => '[[Edge-Core%GPASS%AS5610-52X | http://www.edge-core.com/ProdDtl.asp?sno=436&AS5610-52X%20with%20ONIE]]'), - 2217 => array ('chapter_id' => 12, 'dict_value' => '[[Edge-Core%GPASS%AS5600-52X | http://www.edge-core.com/ProdDtl.asp?sno=423&AS5600-52X%20with%20ONIE]]'), - 2218 => array ('chapter_id' => 12, 'dict_value' => '[[Edge-Core%GPASS%AS4600-54T | http://www.edge-core.com/ProdDtl.asp?sno=425&AS4600-54T%20with%20ONIE]]'), + 2214 => array ('chapter_id' => 12, 'dict_value' => 'Edge-Core%GPASS%AS6700-32X'), + 2215 => array ('chapter_id' => 12, 'dict_value' => 'Edge-Core%GPASS%AS6701-32X'), + 2216 => array ('chapter_id' => 12, 'dict_value' => 'Edge-Core%GPASS%AS5610-52X'), + 2217 => array ('chapter_id' => 12, 'dict_value' => 'Edge-Core%GPASS%AS5600-52X'), + 2218 => array ('chapter_id' => 12, 'dict_value' => 'Edge-Core%GPASS%AS4600-54T'), 2219 => array ('chapter_id' => 12, 'dict_value' => 'Cisco%GPASS%Catalyst 2960-Plus 48TC-S'), 2220 => array ('chapter_id' => 31, 'dict_value' => 'Cisco%GPASS%UCS 5108 AC2 Blade Chassis%L4,2H%'), 2221 => array ('chapter_id' => 31, 'dict_value' => 'Cisco%GPASS%UCS 5108 DC2 Blade Chassis%L4,2H%'), @@ -2595,6 +2594,962 @@ function platform_is_ok () 2704 => array ('chapter_id' => 17, 'dict_value' => 'MikroTik%GPASS%CCR1009-7G-1C-1S+'), 2705 => array ('chapter_id' => 13, 'dict_value' => '[[OpenBSD%GSKIP%OpenBSD 6.1 | http://www.openbsd.org/61.html]]'), 2706 => array ('chapter_id' => 12, 'dict_value' => 'Huawei%GPASS%CE8850-32CQ-EI'), + 2707 => array ('chapter_id' => 13, 'dict_value' => 'MicroSoft%GSKIP%Windows Server 2016'), + 2708 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro%GPASS%6028R-E1CR12L | https://www.supermicro.com/products/system/2u/6028/ssg-6028r-e1cr12l.cfm]]'), + 2709 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-HC0R-SIOM | https://www.supermicro.com/products/system/2U/2028/SYS-2028TP-HC0R-SIOM.cfm]]'), + 2710 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026GT-TRF-FM375 | http://www.supermicro.com/products/system/1U/1026/SYS-1026GT-TRF-FM375.cfm]]'), + 2711 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-73HDP+ | http://www.supermicro.com/products/system/1U/6017/SYS-6017R-73HDP_.cfm]]'), + 2712 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7045W-NTR+ | http://www.supermicro.com/products/system/4U/7045/SYS-7045W-NTR_.cfm]]'), + 2713 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-RC1PT+ | http://www.supermicro.com/products/system/4u/F618/SYS-F618R2-RC1PT_.cfm]]'), + 2714 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DC0R | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DC0R.cfm]]'), + 2715 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-N3RF | http://www.supermicro.com/products/system/1u/1027/SYS-1027R-N3RF.cfm]]'), + 2716 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028U-E1CNRT+ | http://www.supermicro.com/products/system/2u/2028/SYS-2028U-E1CNRT_.cfm]]'), + 2717 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6025B-8R+ | http://www.supermicro.com/products/system/2U/6025/SYS-6025B-8R_.cfm]]'), + 2718 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015B-U | http://www.supermicro.com/products/system/1U/5015/SYS-5015B-U.cfm]]'), + 2719 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015B-T | http://www.supermicro.com/products/system/1U/5015/SYS-5015B-T.cfm]]'), + 2720 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DTR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DTR.cfm]]'), + 2721 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5013C-MT | http://www.supermicro.com/products/system/1U/5013/SYS-5013C-MT.cfm]]'), + 2722 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%6048R-E1CR24H | http://www.supermicro.com/products/system/4u/6048/SSG-6048R-E1CR24H.cfm]]'), + 2723 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017TR-TFF | http://www.supermicro.com/products/system/1u/6017/SYS-6017TR-TFF.cfm]]'), + 2724 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-FTPT+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628R3-FTPT_.cfm]]'), + 2725 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018A-FTN4 | http://www.supermicro.com/products/system/1u/5018/SYS-5018A-FTN4.cfm]]'), + 2726 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017C-URF | http://www.supermicro.com/products/system/1u/5017/SYS-5017C-URF.cfm]]'), + 2727 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-H72RF+ | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-H72RF_.cfm]]'), + 2728 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027GR-TRT2 | http://www.supermicro.com/products/system/2u/2027/SYS-2027GR-TRT2.cfm]]'), + 2729 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017R-WRF | http://www.supermicro.com/products/system/1u/5017/SYS-5017R-WRF.cfm]]'), + 2730 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018TR-TF | http://www.supermicro.com/products/system/1u/6018/SYS-6018TR-TF.cfm]]'), + 2731 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7044H-32R | http://www.supermicro.com/products/system/4U/7044/SYS-7044H-32R.cfm]]'), + 2732 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5026TI-HTRF | http://www.supermicro.com/products/system/2u/5026/sys-5026ti-htrf.cfm]]'), + 2733 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-BIBQRF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-BIBQRF.cfm]]'), + 2734 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5038A-I | http://www.supermicro.com/products/system/tower/5038/sys-5038a-i.cfm]]'), + 2735 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DNCTR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DNCTR.cfm]]'), + 2736 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016T-MR | http://www.supermicro.com/products/system/1U/6016/SYS-6016T-MR.cfm]]'), + 2737 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1025C-3 | http://www.supermicro.com/products/system/1U/1025/SYS-1025C-3.cfm]]'), + 2738 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018A-TN4 | http://www.supermicro.com/products/system/1u/5018/SYS-5018A-TN4.cfm]]'), + 2739 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-TF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-TF.cfm]]'), + 2740 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-H72RF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-H72RF.cfm]]'), + 2741 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027R-N3RF4+ | http://www.supermicro.com/products/system/2u/2027/SYS-2027R-N3RF4_.cfm]]'), + 2742 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6036T-6RF | http://www.supermicro.com/products/system/3U/6036/SYS-6036T-6RF.cfm]]'), + 2743 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-WTRFTP | http://www.supermicro.com/products/system/1u/1027/SYS-1027R-WTRFTP.cfm]]'), + 2744 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1016T-M3F | http://www.supermicro.com/products/system/1u/1016/sys-1016t-m3f.cfm]]'), + 2745 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028U-TRT+ | http://www.supermicro.com/products/system/2u/2028/SYS-2028U-TRT_.cfm]]'), + 2746 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6034H-X8R | http://www.supermicro.com/products/system/3U/6034/SYS-6034H-X8R.cfm]]'), + 2747 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-73DARF | http://www.supermicro.com/products/system/1u/1027/SYS-1027R-73DARF.cfm]]'), + 2748 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-MR+ | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-MR_.cfm]]'), + 2749 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028GQ-TR | http://www.supermicro.com/products/system/1u/1028/sys-1028gq-tr.cfm]]'), + 2750 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5013C-M8 | http://www.supermicro.com/products/system/1U/5013/SYS-5013C-M8.cfm]]'), + 2751 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6025W-NTR+ | http://www.supermicro.com/products/system/2U/6025/SYS-6025W-NTR_.cfm]]'), + 2752 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017R-MTF | http://www.supermicro.com/products/system/1u/5017/SYS-5017R-MTF.cfm]]'), + 2753 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016T-NTF | http://www.supermicro.com/products/system/1u/6016/SYS-6016T-NTF.cfm]]'), + 2754 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-R72B+ | http://www.supermicro.com/products/system/4u/F628/SYS-F628R3-R72B_.cfm]]'), + 2755 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027PR-HC0TR | http://www.supermicro.com/products/system/2U/6027/SYS-6027PR-HC0TR.cfm]]'), + 2756 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015V-MR | http://www.supermicro.com/products/system/1U/6015/SYS-6015V-MR.cfm]]'), + 2757 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015V-MT | http://www.supermicro.com/products/system/1U/6015/SYS-6015V-MT.cfm]]'), + 2758 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017B-URF | http://www.supermicro.com/products/system/1u/6017/SYS-6017B-URF.cfm]]'), + 2759 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%7037A-I | http://www.supermicro.com/products/system/tower/7037/SYS-7037A-i.cfm]]'), + 2760 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5016T-T | http://www.supermicro.com/products/system/1U/5016/SYS-5016T-T.cfm]]'), + 2761 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-H6RF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-H6RF.cfm]]'), + 2762 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016T-NTRF | http://www.supermicro.com/products/system/1u/6016/SYS-6016T-NTRF.cfm]]'), + 2763 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-HTR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-HTR.cfm]]'), + 2764 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5028L-TN2 | http://www.supermicro.com/products/system/midtower/5028/SYS-5028L-TN2.cfm]]'), + 2765 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro Tower%GPASS%8047R-7RFT+ | http://www.supermicro.com/products/system/4u/8047/SYS-8047R-7RFT_.cfm]]'), + 2766 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7044A-82 | http://www.supermicro.com/products/system/4U/7044/SYS-7044A-82.cfm]]'), + 2767 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5016T-MR | http://www.supermicro.com/products/system/1u/5016/sys-5016t-mr.cfm]]'), + 2768 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028GQ-TXR | http://www.supermicro.com/products/system/1U/1028/SYS-1028GQ-TXR.cfm]]'), + 2769 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%8028B-TR4F | http://www.supermicro.com/products/system/2U/8028/SYS-8028B-TR4F.cfm]]'), + 2770 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5038MD-H8TRF | http://www.supermicro.com/products/system/3U/5038/SYS-5038MD-H8TRF.cfm]]'), + 2771 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015TW-INF | http://www.supermicro.com/products/system/1U/6015/SYS-6015TW-INF.cfm]]'), + 2772 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026T-TF | http://www.supermicro.com/products/system/2U/6026/SYS-6026T-TF.cfm]]'), + 2773 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617R2-R72+ | http://www.supermicro.com/products/system/4U/F617/SYS-F617R2-R72_.cfm]]'), + 2774 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047R-TXRF | http://www.supermicro.com/products/system/4u/7047/SYS-7047R-TXRF.cfm]]'), + 2775 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6022L-6 | http://www.supermicro.com/products/system/2U/6022/SYS-6022L-6.cfm]]'), + 2776 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015V-M3 | http://www.supermicro.com/products/system/1U/6015/SYS-6015V-M3.cfm]]'), + 2777 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1018GR-T | http://www.supermicro.com/products/system/1u/1018/SYS-1018GR-T.cfm]]'), + 2778 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-D70QRF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-D70QRF.cfm]]'), + 2779 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2026TT-DLRF | http://www.supermicro.com/products/system/2U/2026/SYS-2026TT-DLRF.cfm]]'), + 2780 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047AX-72RF | http://www.supermicro.com/products/system/4u/7047/SYS-7047AX-72RF.cfm]]'), + 2781 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6033P-8R | http://www.supermicro.com/products/system/3U/6033/SYS-6033P-8R.cfm]]'), + 2782 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%6047R-TXRF | http://www.supermicro.com/products/system/4u/6047/SYS-6047R-TXRF.cfm]]'), + 2783 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017C-LF | http://www.supermicro.com/products/system/1u/5017/sys-5017c-lf.cfm]]'), + 2784 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017R-IHDP | http://www.supermicro.com/products/system/1U/5017/SSG-5017R-iHDP.cfm]]'), + 2785 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%7038A-I | http://www.supermicro.com/products/system/tower/7038/SYS-7038A-i.cfm]]'), + 2786 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017P-TF | http://www.supermicro.com/products/system/1u/5017/SYS-5017P-TF.cfm]]'), + 2787 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7048R-TRT | http://www.supermicro.com/products/system/4U/7048/SYS-7048R-TRT.cfm]]'), + 2788 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028UT-BC1NRT | http://www.supermicro.com/products/system/2u/2028/SYS-2028UT-BC1NRT.cfm]]'), + 2789 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-WC1NRT | http://www.supermicro.com/products/system/1u/1027/SYS-1027R-WC1NRT.cfm]]'), + 2790 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028UX-TR4 | http://www.supermicro.com/products/system/2u/6028/SYS-6028UX-TR4.cfm]]'), + 2791 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-D71QRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-D71QRF.cfm]]'), + 2792 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-HTQRF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-HTQRF.cfm]]'), + 2793 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7046T-6F | http://www.supermicro.com/products/system/4U/7046/SYS-7046T-6F.cfm]]'), + 2794 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%6048R-TXR | http://www.supermicro.com/products/system/4U/6048/SYS-6048R-TXR.cfm]]'), + 2795 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-H71RF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-H71RF.cfm]]'), + 2796 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7044A-32 | http://www.supermicro.com/products/system/4U/7044/SYS-7044A-32.cfm]]'), + 2797 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028R-TR | http://www.supermicro.com/products/system/2u/6028/SYS-6028R-TR.cfm]]'), + 2798 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-RC0PT+ | http://www.supermicro.com/products/system/4u/f618/SYS-F618R2-RC0PT_.cfm]]'), + 2799 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5025M-I+ | http://www.supermicro.com/products/system/2U/5025/SYS-5025M-i_.cfm]]'), + 2800 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028R-TT | http://www.supermicro.com/products/system/2u/6028/SYS-6028R-TT.cfm]]'), + 2801 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-T+ | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-T_.cfm]]'), + 2802 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-HC0R-SIOM | http://www.supermicro.com/products/system/2U/6028/SYS-6028TP-HC0R-SIOM.cfm]]'), + 2803 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-E1CR12 | http://www.supermicro.com/products/system/2U/6027/SSG-6027R-E1CR12N.cfm]]'), + 2804 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617H6-FT+ | http://www.supermicro.com/products/system/4u/f617/SYS-F617H6-FT_.cfm]]'), + 2805 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5012B-6 | http://www.supermicro.com/products/system/1U/5012/SYS-5012B-6.cfm]]'), + 2806 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-H70RF | http://www.supermicro.com/products/system/2u/6027/SYS-6027TR-H70RF.cfm]]'), + 2807 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028R-E1CR12 | http://www.supermicro.com/products/system/2u/6028/SSG-6028R-E1CR12N.cfm]]'), + 2808 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617R2-FT | http://www.supermicro.com/products/system/4U/F617/SYS-F617R2-FT.cfm]]'), + 2809 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028R-TRT | http://www.supermicro.com/products/system/2u/6028/SYS-6028R-TRT.cfm]]'), + 2810 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6023P-I | http://www.supermicro.com/products/system/2U/6023/SYS-6023P-i.cfm]]'), + 2811 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627G3-F73+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627G3-F73_.cfm]]'), + 2812 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026T-UF | http://www.supermicro.com/products/system/1u/1026/SYS-1026T-UF.cfm]]'), + 2813 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015TB-T | http://www.supermicro.com/products/system/1U/5015/SYS-5015TB-T.cfm]]'), + 2814 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-HTRF+ | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-HTRF_.cfm]]'), + 2815 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2026TT-HIBQRF | http://www.supermicro.com/products/system/2U/2026/SYS-2026TT-HIBQRF.cfm]]'), + 2816 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-M7UF | http://www.supermicro.com/products/system/1U/6017/SYS-6017R-M7UF.cfm]]'), + 2817 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017A-EF | http://www.supermicro.com/products/system/1u/5017/SYS-5017A-EF.cfm]]'), + 2818 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-H70FRF | http://www.supermicro.com/products/system/2u/6027/SYS-6027TR-H70FRF.cfm]]'), + 2819 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-H70RF+ | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-H70RF_.cfm]]'), + 2820 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R2-F73 | http://www.supermicro.com/products/system/4U/F627/SYS-F627R2-F73.cfm]]'), + 2821 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1018D-73MTF | http://www.supermicro.com/products/system/1u/1018/SYS-1018D-73MTF.cfm]]'), + 2822 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-DTTR | http://www.supermicro.com/products/system/2u/2027/SYS-2027PR-DTTR.cfm]]'), + 2823 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%4028GR-TRT | http://www.supermicro.com/products/system/4u/4028/sys-4028gr-trt.cfm]]'), + 2824 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017A-EP | http://www.supermicro.com/products/system/1u/5017/SYS-5017A-EP.cfm]]'), + 2825 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%1028TP-DC0TR | http://www.supermicro.com/products/system/1U/1028/SYS-1028TP-DC0TR.cfm]]'), + 2826 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7044A-I2 | http://www.supermicro.com/products/system/4U/7044/SYS-7044A-i2.cfm]]'), + 2827 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014H-32 | http://www.supermicro.com/products/system/1U/6014/SYS-6014H-32.cfm]]'), + 2828 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018A-MHN4 | http://www.supermicro.com/products/system/1u/5018/SYS-5018A-MHN4.cfm]]'), + 2829 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047AX-TRF | http://www.supermicro.com/products/system/4u/7047/SYS-7047AX-TRF.cfm]]'), + 2830 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5038AD-T | http://www.supermicro.com/products/system/tower/5038/SYS-5038AD-T.cfm]]'), + 2831 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1018L-MP | http://www.supermicro.com/products/system/mini-itx/1018/SYS-1018L-MP.cfm]]'), + 2832 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017GR-TF-FM275 | http://www.supermicro.com/products/system/1U/5017/SYS-5017GR-TF-FM275.cfm]]'), + 2833 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028R-E1CR16T | http://www.supermicro.com/products/system/2U/6028/SSG-6028R-E1CR16T.cfm]]'), + 2834 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018R-WR | http://www.supermicro.com/products/system/1u/5018/SYS-5018R-WR.cfm]]'), + 2835 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%6046T-TUF | http://www.supermicro.com/products/system/4U/6046/SYS-6046T-TUF.cfm]]'), + 2836 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-DTQRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-DTQRF.cfm]]'), + 2837 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7045A-T | http://www.supermicro.com/products/system/4U/7045/SYS-7045A-T.cfm]]'), + 2838 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-73DBRF | http://www.supermicro.com/products/system/1u/1027/SYS-1027R-73DBRF.cfm]]'), + 2839 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-TDF+ | http://www.supermicro.com/products/system/1u/6017/SYS-6017R-TDF_.cfm]]'), + 2840 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028R-C1RT | http://www.supermicro.com/products/system/2u/2028/SYS-2028R-C1RT.cfm]]'), + 2841 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-RC1+ | http://www.supermicro.com/products/system/4u/F618/SYS-F618R2-RC1_.cfm]]'), + 2842 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027GR-TRFHT | http://www.supermicro.com/products/system/2u/2027/SYS-2027GR-TRFHT.cfm]]'), + 2843 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%7036A-T | http://www.supermicro.com/products/system/tower/7036/SYS-7036A-T.cfm]]'), + 2844 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015B-NT | http://www.supermicro.com/products/system/1U/5015/SYS-5015B-NT.cfm]]'), + 2845 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026GT-TRF-FM309 | http://www.supermicro.com/products/system/1U/1026/SYS-1026GT-TRF-FM309.cfm]]'), + 2846 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-DC1FR | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-DC1FR.cfm]]'), + 2847 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-TDT+ | http://www.supermicro.com/products/system/1U/6017/SYS-6017R-TDT_.cfm]]'), + 2848 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-HTR | http://www.supermicro.com/products/system/2u/2027/SYS-2027PR-HTR.cfm]]'), + 2849 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7046GT-TRF | http://www.supermicro.com/products/system/4U/7046/SYS-7046GT-TRF.cfm]]'), + 2850 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014H-I2 | http://www.supermicro.com/products/system/1U/6014/SYS-6014H-i2.cfm]]'), + 2851 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026GT-TRF-FM307 | http://www.supermicro.com/products/system/1U/1026/SYS-1026GT-TRF-FM307.cfm]]'), + 2852 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5039D-I | http://www.supermicro.com/products/system/tower/5039/SYS-5039D-I.cfm]]'), + 2853 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-E1R12 | http://www.supermicro.com/products/system/2u/6027/SSG-6027R-E1R12N.cfm]]'), + 2854 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%4028GR-TR2 | http://www.supermicro.com/products/system/4u/4028/SYS-4028GR-TR2.cfm]]'), + 2855 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-N3RF | http://www.supermicro.com/products/system/2u/6027/SYS-6027R-N3RF.cfm]]'), + 2856 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-FT | http://www.supermicro.com/products/system/4u/F618/SYS-F618R2-FT.cfm]]'), + 2857 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016TT-IBXF | http://www.supermicro.com/products/system/1U/6016/SYS-6016TT-IBXF.cfm]]'), + 2858 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6037R-TXRF | http://www.supermicro.com/products/system/3u/6037/SYS-6037R-TXRF.cfm]]'), + 2859 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028UT-BTNRT | http://www.supermicro.com/products/system/2u/2028/SYS-2028UT-BTNRT.cfm]]'), + 2860 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R2-FT+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627R2-FT_.cfm]]'), + 2861 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028TR-H72FR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TR-H72FR.cfm]]'), + 2862 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R3-F72+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627R3-F72_.cfm]]'), + 2863 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-HTFRF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-HTFRF.cfm]]'), + 2864 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6024H-82R+ | http://www.supermicro.com/products/system/2U/6024/SYS-6024H-82R_.cfm]]'), + 2865 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7048R-C1R | http://www.supermicro.com/products/system/4U/7048/SYS-7048R-C1R.cfm]]'), + 2866 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-DTFR | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-DTFR.cfm]]'), + 2867 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028U-TR4T+ | http://www.supermicro.com/products/system/1u/1028/SYS-1028U-TR4T_.cfm]]'), + 2868 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-H70FRF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-H70FRF.cfm]]'), + 2869 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-NTF | http://www.supermicro.com/products/system/1u/6017/SYS-6017R-NTF.cfm]]'), + 2870 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7045A-WT | http://www.supermicro.com/products/system/4U/7045/SYS-7045A-WT.cfm]]'), + 2871 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018R-TD8 | http://www.supermicro.com/products/system/1u/6018/SYS-6018R-TD8.cfm]]'), + 2872 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-FT+ | http://www.supermicro.com/products/system/4U/F618/SYS-F618R2-FT_.cfm]]'), + 2873 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6036T-TF | http://www.supermicro.com/products/system/3U/6036/SYS-6036T-TF.cfm]]'), + 2874 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017B-NTF | http://www.supermicro.com/products/system/1u/6017/SYS-6017B-NTF.cfm]]'), + 2875 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%4028GR-TR | http://www.supermicro.com/products/system/4u/4028/sys-4028gr-tr.cfm]]'), + 2876 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5029A-2TN4 | http://www.supermicro.com/products/system/midtower/5029/SYS-5029A-2TN4.cfm]]'), + 2877 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5038AD-I | http://www.supermicro.com/products/system/tower/5038/SYS-5038AD-I.cfm]]'), + 2878 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-DC1TR | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-DC1TR.cfm]]'), + 2879 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026T-URF | http://www.supermicro.com/products/system/2u/6026/SYS-6026T-URF.cfm]]'), + 2880 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5013G-6 | http://www.supermicro.com/products/system/1U/5013/SYS-5013G-6.cfm]]'), + 2881 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028R-WTNRT | http://www.supermicro.com/products/system/1u/1028/SYS-1028R-WTNRT.cfm]]'), + 2882 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%1028TP-DC0FR | http://www.supermicro.com/products/system/1U/1028/SYS-1028TP-DC0FR.cfm]]'), + 2883 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TSF | http://www.supermicro.com/products/system/1u/1027/SYS-1027GR-TSF.cfm]]'), + 2884 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-HTTR | http://www.supermicro.com/products/system/2u/6028/SYS-6028TP-HTTR.cfm]]'), + 2885 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015C-NTR | http://www.supermicro.com/products/system/1U/6015/SYS-6015C-NTR.cfm]]'), + 2886 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028TR-D72R | http://www.supermicro.com/products/system/2u/6028/SYS-6028TR-D72R.cfm]]'), + 2887 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7045A-8 | http://www.supermicro.com/products/system/4U/7045/SYS-7045A-8.cfm]]'), + 2888 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7044H-X8R | http://www.supermicro.com/products/system/4U/7044/SYS-7044H-X8R.cfm]]'), + 2889 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017B-MTRF | http://www.supermicro.com/products/system/1u/6017/SYS-6017B-MTRF.cfm]]'), + 2890 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618H6-FTPTL+ | http://www.supermicro.com/products/system/4U/F618/SYS-F618H6-FTPTL_.cfm]]'), + 2891 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028U-TNR4T+ | http://www.supermicro.com/products/system/1u/1028/SYS-1028U-TNR4T_.cfm]]'), + 2892 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7045A-3 | http://www.supermicro.com/products/system/4U/7045/SYS-7045A-3.cfm]]'), + 2893 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027PR-HTTR | http://www.supermicro.com/products/system/2U/6027/SYS-6027PR-HTTR.cfm]]'), + 2894 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017P-TLN4F | http://www.supermicro.com/products/system/1u/5017/sys-5017p-tln4f.cfm]]'), + 2895 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-TDLRF | http://www.supermicro.com/products/system/1u/6017/SYS-6017R-TDLRF.cfm]]'), + 2896 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047GR-TPRF-FM409 | http://www.supermicro.com/products/system/4U/7047/SYS-7047GR-TPRF-FM409.cfm]]'), + 2897 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R3-FT | http://www.supermicro.com/products/system/4u/F618/SYS-F618R3-FT.cfm]]'), + 2898 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-HTFR | http://www.supermicro.com/products/system/2U/6028/sys-6028tp-htfr.cfm]]'), + 2899 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5035L-I | http://www.supermicro.com/products/system/tower/5035/SYS-5035L-I.cfm]]'), + 2900 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6025B-3R | http://www.supermicro.com/products/system/2U/6025/SYS-6025B-3R.cfm]]'), + 2901 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5016T-MTF | http://www.supermicro.com/products/system/1u/5016/sys-5016t-mtf.cfm]]'), + 2902 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-WC1RT | http://www.supermicro.com/products/system/1u/1027/SYS-1027R-WC1RT.cfm]]'), + 2903 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1017GR-TF | http://www.supermicro.com/products/system/1u/1017/SYS-1017GR-TF.cfm]]'), + 2904 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7045B-T | http://www.supermicro.com/products/system/4U/7045/SYS-7045B-T.cfm]]'), + 2905 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6037R-72RFT | http://www.supermicro.com/products/system/3U/6037/SYS-6037R-72RFT.cfm]]'), + 2906 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017GR-TF-FM209 | http://www.supermicro.com/products/system/1U/5017/SYS-5017GR-TF-FM209.cfm]]'), + 2907 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5013G-M | http://www.supermicro.com/products/system/1U/5013/SYS-5013G-M.cfm]]'), + 2908 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6013L-8 | http://www.supermicro.com/products/system/1U/6013/SYS-6013L-8.cfm]]'), + 2909 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5013G-I | http://www.supermicro.com/products/system/1U/5013/SYS-5013G-i.cfm]]'), + 2910 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7046T-3R | http://www.supermicro.com/products/system/4U/7046/SYS-7046T-3R.cfm]]'), + 2911 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%8028B-C0R4FT | http://www.supermicro.com/products/system/2U/8028/SYS-8028B-C0R4FT.cfm]]'), + 2912 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%1028TP-DTR | http://www.supermicro.com/products/system/1U/1028/SYS-1028TP-DTR.cfm]]'), + 2913 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027TR-TFF | http://www.supermicro.com/products/system/1u/1027/SYS-1027TR-TFF.cfm]]'), + 2914 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6013P-8+ | http://www.supermicro.com/products/system/1U/6013/SYS-6013P-8_.cfm]]'), + 2915 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027R-E1CR24 | http://www.supermicro.com/products/system/2U/2027/SSG-2027R-E1CR24N.cfm]]'), + 2916 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017B-MTLF | http://www.supermicro.com/products/system/1u/6017/SYS-6017B-MTLF.cfm]]'), + 2917 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7048GR-TR | http://www.supermicro.com/products/system/4u/7048/SYS-7048GR-TR.cfm]]'), + 2918 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5025M-UR | http://www.supermicro.com/products/system/2U/5025/SYS-5025M-UR.cfm]]'), + 2919 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1017C-TF | http://www.supermicro.com/products/system/1u/1017/SYS-1017C-TF.cfm]]'), + 2920 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016T-MT | http://www.supermicro.com/products/system/1U/6016/SYS-6016T-MT.cfm]]'), + 2921 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015C-MT | http://www.supermicro.com/products/system/1U/6015/SYS-6015C-MT.cfm]]'), + 2922 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2026TT-H6IBXRF | http://www.supermicro.com/products/system/2U/2026/SYS-2026TT-H6IBXRF.cfm]]'), + 2923 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6024H-TR | http://www.supermicro.com/products/system/2U/6024/SYS-6024H-TR.cfm]]'), + 2924 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5038MR-H8TRF | http://www.supermicro.com/products/system/3U/5038/SYS-5038MR-H8TRF.cfm]]'), + 2925 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028U-TNRT+ | http://www.supermicro.com/products/system/2u/2028/SYS-2028U-TNRT_.cfm]]'), + 2926 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018A-LTN4 | http://www.supermicro.com/products/system/1U/5018/SYS-5018A-LTN4.cfm]]'), + 2927 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-RTBPTN+ | http://www.supermicro.com/products/system/4u/F628/SYS-F628R3-RTBPTN_.cfm]]'), + 2928 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018D-LN4T | http://www.supermicro.com/products/system/1u/5018/SYS-5018D-LN4T.cfm]]'), + 2929 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-TDAF | http://www.supermicro.com/products/system/1u/6017/SYS-6017R-TDAF.cfm]]'), + 2930 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617R3-FT | http://www.supermicro.com/products/system/4u/f617/SYS-F617R3-FT.cfm]]'), + 2931 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028U-TNRT+ | http://www.supermicro.com/products/system/2u/6028/SYS-6028U-TNRT_.cfm]]'), + 2932 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7045B-3 | http://www.supermicro.com/products/system/4U/7045/SYS-7045B-3.cfm]]'), + 2933 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-HC1TR | http://www.supermicro.com/products/system/2u/6028/SYS-6028TP-HC1TR.cfm]]'), + 2934 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015W-NTR | http://www.supermicro.com/products/system/1U/6015/SYS-6015W-NTR.cfm]]'), + 2935 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015V-TLP | http://www.supermicro.com/products/system/1U/6015/SYS-6015V-TLP.cfm]]'), + 2936 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7044H-82R | http://www.supermicro.com/products/system/4U/7044/SYS-7044H-82R.cfm]]'), + 2937 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DNCR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DNCR.cfm]]'), + 2938 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028R-E1CR12H | http://www.supermicro.com/products/system/2u/6028/SSG-6028R-E1CR12H.cfm]]'), + 2939 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028R-E1CR24 | http://www.supermicro.com/products/system/2U/6028/SSG-6028R-E1CR24N.cfm]]'), + 2940 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027R-E1R24 | http://www.supermicro.com/products/system/2U/2027/SSG-2027R-E1R24N.cfm]]'), + 2941 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-HTTR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-HTTR.cfm]]'), + 2942 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018R-WTRT | http://www.supermicro.com/products/system/1u/6018/SYS-6018R-WTRT.cfm]]'), + 2943 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018R-WTR | http://www.supermicro.com/products/system/1u/6018/SYS-6018R-WTR.cfm]]'), + 2944 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-D70RF+ | http://www.supermicro.com/products/system/2u/2027/SYS-2027TR-D70RF_.cfm]]'), + 2945 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DECR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DECR.cfm]]'), + 2946 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-TRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027R-TRF.cfm]]'), + 2947 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-HTRF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-HTRF.cfm]]'), + 2948 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018GR-T | http://www.supermicro.com/products/system/1u/5018/SYS-5018GR-T.cfm]]'), + 2949 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026T-M3 | http://www.supermicro.com/products/system/1U/1026/SYS-1026T-M3.cfm]]'), + 2950 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5038K-I | http://www.supermicro.com/products/system/tower/5038/SYS-5038K-I.cfm]]'), + 2951 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-HTFR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-HTFR.cfm]]'), + 2952 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015B-NTR | http://www.supermicro.com/products/system/1U/5015/SYS-5015B-NTR.cfm]]'), + 2953 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015W-NI | http://www.supermicro.com/products/system/1U/6015/SYS-6015W-Ni.cfm]]'), + 2954 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618H6-FT+ | http://www.supermicro.com/products/system/4U/F618/SYS-F618H6-FT_.cfm]]'), + 2955 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%8028B-TR3F | http://www.supermicro.com/products/system/2u/8028/SYS-8028B-TR3F.cfm]]'), + 2956 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-FC0PT+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628R3-FC0PT_.cfm]]'), + 2957 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5037MC-H12TRF | http://www.supermicro.com/products/system/3U/5037/SYS-5037MC-H12TRF.cfm]]'), + 2958 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027GR-TRFH-FM609 | http://www.supermicro.com/products/system/2u/2027/SYS-2027GR-TRFH-FM609.cfm]]'), + 2959 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6037R-E1R16 | http://www.supermicro.com/products/system/3U/6037/SSG-6037R-E1R16N.cfm]]'), + 2960 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028U-TN24R4T+ | http://www.supermicro.com/products/system/2u/2028/SYS-2028U-TN24R4T_.cfm]]'), + 2961 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-H70QRF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-H70QRF.cfm]]'), + 2962 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617R2-RT+ | http://www.supermicro.com/products/system/4U/F617/SYS-F617R2-RT_.cfm]]'), + 2963 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028R-C1RT4+ | http://www.supermicro.com/products/system/2u/2028/SYS-2028R-C1RT4_.cfm]]'), + 2964 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016T-URF4+ | http://www.supermicro.com/products/system/1U/6016/SYS-6016T-URF4_.cfm]]'), + 2965 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7046A-HR+ | http://www.supermicro.com/products/system/4U/7046/SYS-7046A-HR_.cfm]]'), + 2966 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5037MR-H8TRF | http://www.supermicro.com/products/system/3u/5037/SYS-5037MR-H8TRF.cfm]]'), + 2967 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015X-T | http://www.supermicro.com/products/system/1U/6015/SYS-6015X-T.cfm]]'), + 2968 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028R-WTRT | http://www.supermicro.com/products/system/2u/6028/SYS-6028R-WTRT.cfm]]'), + 2969 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-72RFTP | http://www.supermicro.com/products/system/1U/6017/SYS-6017R-72RFTP.cfm]]'), + 2970 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5037MC-H86RF | http://www.supermicro.com/products/system/3U/5037/SYS-5037MC-H86RF.cfm]]'), + 2971 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1017GR-TF-FM175 | http://www.supermicro.com/products/system/1U/1017/SYS-1017GR-TF-FM175.cfm]]'), + 2972 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014L-M | http://www.supermicro.com/products/system/1U/6014/SYS-6014L-M.cfm]]'), + 2973 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027R-AR24 | http://www.supermicro.com/products/system/2U/2027/SSG-2027R-AR24.cfm]]'), + 2974 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-D70RF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-D70RF.cfm]]'), + 2975 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-D71RF+ | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-D71RF_.cfm]]'), + 2976 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027GR-TRFH-FM675 | http://www.supermicro.com/products/system/2u/2027/SYS-2027GR-TRFH-FM675.cfm]]'), + 2977 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R3-FT+ | http://www.supermicro.com/products/system/4U/F618/SYS-F618R3-FT_.cfm]]'), + 2978 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028U-TR4T+ | http://www.supermicro.com/products/system/2u/6028/SYS-6028U-TR4T_.cfm]]'), + 2979 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028GR-TR | http://www.supermicro.com/products/system/2u/2028/SYS-2028GR-TR.cfm]]'), + 2980 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018R-TDTP | http://www.supermicro.com/products/system/1u/6018/SYS-6018R-TDTP.cfm]]'), + 2981 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028R-WTR | http://www.supermicro.com/products/system/2u/6028/SYS-6028R-WTR.cfm]]'), + 2982 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-HC0FR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-HC0FR.cfm]]'), + 2983 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-HC1FR | http://www.supermicro.com/products/system/2u/6028/SYS-6028TP-HC1FR.cfm]]'), + 2984 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027B-URF | http://www.supermicro.com/products/system/2u/6027/SYS-6027B-URF.cfm]]'), + 2985 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R2-RTB+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627R2-RTB_.cfm]]'), + 2986 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TRF-FM375 | http://www.supermicro.com/products/system/1U/1027/SYS-1027GR-TRF-FM375.cfm]]'), + 2987 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7046T-H6R | http://www.supermicro.com/products/system/4U/7046/SYS-7046T-H6R.cfm]]'), + 2988 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7045A-C3 | http://www.supermicro.com/products/system/4U/7045/SYS-7045A-C3.cfm]]'), + 2989 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-RC1B+ | http://www.supermicro.com/products/system/4u/F628/SYS-F628R3-RC1B_.cfm]]'), + 2990 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7048R-C1RT4+ | http://www.supermicro.com/products/system/4u/7048/SYS-7048R-C1RT4_.cfm]]'), + 2991 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015B-UR | http://www.supermicro.com/products/system/1U/6015/SYS-6015B-UR.cfm]]'), + 2992 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015TC-LFT | http://www.supermicro.com/products/system/1U/6015/SYS-6015TC-LFT.cfm]]'), + 2993 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-FC0 | http://www.supermicro.com/products/system/4u/F618/SYS-F618R2-FC0.cfm]]'), + 2994 => array ('chapter_id' => 18, 'dict_value' => '[[SuperMicro%GPASS%937R-E2CJB | http://www.supermicro.com/products/system/3U/937/SSG-937R-E2CJB.cfm]]'), + 2995 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015C-NI | http://www.supermicro.com/products/system/1U/6015/SYS-6015C-Ni.cfm]]'), + 2996 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6038R-E1CR16 | http://www.supermicro.com/products/system/3u/6038/SSG-6038R-E1CR16N.cfm]]'), + 2997 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-TDT+ | http://www.supermicro.com/products/system/2U/6027/SYS-6027R-TDT_.cfm]]'), + 2998 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028U-E1CNR4T+ | http://www.supermicro.com/products/system/2u/6028/SYS-6028U-E1CNR4T_.cfm]]'), + 2999 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017B-MTF | http://www.supermicro.com/products/system/1u/6017/SYS-6017B-MTF.cfm]]'), + 3000 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%8048B-TRFT | http://www.supermicro.com/products/system/4u/8048/SYS-8048B-TRFT.cfm]]'), + 3001 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-WTRFTP | http://www.supermicro.com/products/system/1U/6017/SYS-6017R-WTRFTP.cfm]]'), + 3002 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014L-M4 | http://www.supermicro.com/products/system/1U/6014/SYS-6014L-M4.cfm]]'), + 3003 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DC1R | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DC1R.cfm]]'), + 3004 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028BT-HNC0R+ | http://www.supermicro.com/products/system/2U/2028/SYS-2028BT-HNC0R_.cfm]]'), + 3005 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5013C-M | http://www.supermicro.com/products/system/1U/5013/SYS-5013C-M.cfm]]'), + 3006 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028TR-HTFR | http://www.supermicro.com/products/system/2U/2028/SYS-2028TR-HTFR.cfm]]'), + 3007 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DNCFR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DNCFR.cfm]]'), + 3008 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5038D-I | http://www.supermicro.com/products/system/tower/5038/sys-5038d-i.cfm]]'), + 3009 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5039MS-H8TRF | http://www.supermicro.com/products/system/3U/5039/SYS-5039MS-H8TRF.cfm]]'), + 3010 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018D-MHR7N4P | http://www.supermicro.com/products/system/1U/5018/SYS-5018D-MHR7N4P.cfm]]'), + 3011 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5026T-T | http://www.supermicro.com/products/system/2U/5026/SYS-5026T-T.cfm]]'), + 3012 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DECTR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DECTR.cfm]]'), + 3013 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027PR-HC1FR | http://www.supermicro.com/products/system/2U/6027/SYS-6027PR-HC1FR.cfm]]'), + 3014 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-DC0R | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-DC0R.cfm]]'), + 3015 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026T-6RF+ | http://www.supermicro.com/products/system/1U/1026/SYS-1026T-6RF_.cfm]]'), + 3016 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028U-TNRT+ | http://www.supermicro.com/products/system/1u/1028/SYS-1028U-TNRT_.cfm]]'), + 3017 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-H70RF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-H70RF.cfm]]'), + 3018 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028R-E1CR48 | http://www.supermicro.com/products/system/2U/2028/SSG-2028R-E1CR48N.cfm]]'), + 3019 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7046A-3 | http://www.supermicro.com/products/system/4U/7046/SYS-7046A-3.cfm]]'), + 3020 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-DTRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-DTRF.cfm]]'), + 3021 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028TR-HTR | http://www.supermicro.com/products/system/2U/2028/SYS-2028TR-HTR.cfm]]'), + 3022 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-DC1R | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-DC1R.cfm]]'), + 3023 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014P-32 | http://www.supermicro.com/products/system/1U/6014/SYS-6014P-32.cfm]]'), + 3024 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R2-FC0 | http://www.supermicro.com/products/system/4u/F628/SYS-F628R2-FC0.cfm]]'), + 3025 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028R-TXR | http://www.supermicro.com/products/system/2U/2028/SYS-2028R-TXR.cfm]]'), + 3026 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-HTR-SIOM | http://www.supermicro.com/products/system/2U/6028/SYS-6028TP-HTR-SIOM.cfm]]'), + 3027 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7045A-CT | http://www.supermicro.com/products/system/4U/7045/SYS-7045A-CT.cfm]]'), + 3028 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015B-NTR | http://www.supermicro.com/products/system/1U/6015/SYS-6015B-NTR.cfm]]'), + 3029 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016T-URF | http://www.supermicro.com/products/system/1U/6016/SYS-6016T-URF.cfm]]'), + 3030 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1016I-M6F | http://www.supermicro.com/products/system/1u/1016/sys-1016i-m6f.cfm]]'), + 3031 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-DTFRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-DTFRF.cfm]]'), + 3032 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6023P-8 | http://www.supermicro.com/products/system/2U/6023/SYS-6023P-8.cfm]]'), + 3033 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-RTB+ | http://www.supermicro.com/products/system/4u/f628/SYS-F628R3-RTB_.cfm]]'), + 3034 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-DNCFR | http://www.supermicro.com/products/system/2u/6028/SYS-6028TP-DNCFR.cfm]]'), + 3035 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DECFR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DECFR.cfm]]'), + 3036 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014H-XI | http://www.supermicro.com/products/system/1U/6014/SYS-6014H-Xi.cfm]]'), + 3037 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DTFR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DTFR.cfm]]'), + 3038 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018U-TR4T+ | http://www.supermicro.com/products/system/1U/6018/SYS-6018U-TR4T_.cfm]]'), + 3039 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1025TC-T | http://www.supermicro.com/products/system/1U/1025/SYS-1025TC-T.cfm]]'), + 3040 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028UX-CR-LL2 | http://www.supermicro.com/products/system/1u/1028/SYS-1028UX-CR-LL2.cfm]]'), + 3041 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617R3-FT+ | http://www.supermicro.com/products/system/4u/f617/SYS-F617R3-FT_.cfm]]'), + 3042 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TQFT | http://www.supermicro.com/products/system/1u/1027/SYS-1027GR-TQFT.cfm]]'), + 3043 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028UX-CR-LL1 | http://www.supermicro.com/products/system/1u/1028/SYS-1028UX-CR-LL1.cfm]]'), + 3044 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047R-3RF4+ | http://www.supermicro.com/products/system/4U/7047/SYS-7047R-3RF4_.cfm]]'), + 3045 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F647G2-F73PT+ | http://www.supermicro.com/products/system/4U/F647/SYS-F647G2-F73PT_.cfm]]'), + 3046 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-WRF | http://www.supermicro.com/products/system/2u/6027/SYS-6027R-WRF.cfm]]'), + 3047 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014P-32R | http://www.supermicro.com/products/system/1U/6014/SYS-6014P-32R.cfm]]'), + 3048 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R3-FT+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627R3-FT_.cfm]]'), + 3049 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018D-FN4T | http://www.supermicro.com/products/system/1u/5018/SYS-5018D-FN4T.cfm]]'), + 3050 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5019S-TN4 | http://www.supermicro.com/products/system/1U/5019/SYS-5019S-TN4.cfm]]'), + 3051 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R2-FTPT+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627R2-FTPT_.cfm]]'), + 3052 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018R-MTR | http://www.supermicro.com/products/system/1u/6018/SYS-6018R-MTR.cfm]]'), + 3053 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-E1R12T | http://www.supermicro.com/products/system/2U/6027/SSG-6027R-E1R12T.cfm]]'), + 3054 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015TB-10G | http://www.supermicro.com/products/system/1U/5015/SYS-5015TB-10G.cfm]]'), + 3055 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-3RF4+ | http://www.supermicro.com/products/system/2u/6027/SYS-6027R-3RF4_.cfm]]'), + 3056 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017R-MTRF | http://www.supermicro.com/products/system/1u/5017/SYS-5017R-MTRF.cfm]]'), + 3057 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7044A-82R | http://www.supermicro.com/products/system/4U/7044/SYS-7044A-82R.cfm]]'), + 3058 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F648G2-FT+ | http://www.supermicro.com/products/system/4U/F648/SYS-F648G2-FT_.cfm]]'), + 3059 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-D71FRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-D71FRF.cfm]]'), + 3060 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2026TT-H6RF | http://www.supermicro.com/products/system/2U/2026/SYS-2026TT-H6RF.cfm]]'), + 3061 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016TT-TF | http://www.supermicro.com/products/system/1U/6016/SYS-6016TT-TF.cfm]]'), + 3062 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%1028TP-DC1R | http://www.supermicro.com/products/system/1U/1028/SYS-1028TP-DC1R.cfm]]'), + 3063 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028R-TDW | http://www.supermicro.com/products/system/1u/1028/SYS-1028R-TDW.cfm]]'), + 3064 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628G2-FC0PT+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628G2-FC0PT_.cfm]]'), + 3065 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1016I-U | http://www.supermicro.com/products/system/1u/1016/sys-1016i-u.cfm]]'), + 3066 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%8027R-TRF+ | http://www.supermicro.com/products/system/2u/8027/SYS-8027R-TRF_.cfm]]'), + 3067 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5036T-T | http://www.supermicro.com/products/system/midtower/5036/SYS-5036T-T.cfm]]'), + 3068 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7044H-82 | http://www.supermicro.com/products/system/4U/7044/SYS-7044H-82.cfm]]'), + 3069 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-HC0R | http://www.supermicro.com/products/system/2U/2028/SYS-2028TP-HC0R.cfm]]'), + 3070 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016T-MTLF | http://www.supermicro.com/products/system/1u/6016/SYS-6016T-MTLF.cfm]]'), + 3071 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7046T-NTR+ | http://www.supermicro.com/products/system/4U/7046/SYS-7046T-NTR_.cfm]]'), + 3072 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047R-72RFT | http://www.supermicro.com/products/system/4U/7047/SYS-7047R-72RFT.cfm]]'), + 3073 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1015B-3 | http://www.supermicro.com/products/system/1U/1015/SYS-1015B-3.cfm]]'), + 3074 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014H-X8 | http://www.supermicro.com/products/system/1U/6014/SYS-6014H-X8.cfm]]'), + 3075 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017R-MF | http://www.supermicro.com/products/system/1u/5017/SYS-5017R-MF.cfm]]'), + 3076 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%8026B-6R | http://www.supermicro.com/products/system/2U/8026/SYS-8026B-6R.cfm]]'), + 3077 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628G3-FC0PT+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628G3-FC0PT_.cfm]]'), + 3078 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018U-TRTP+ | http://www.supermicro.com/products/system/1u/6018/SYS-6018U-TRTP_.cfm]]'), + 3079 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026TT-IBXF | http://www.supermicro.com/products/system/1U/1026/SYS-1026TT-IBXF.cfm]]'), + 3080 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028TR-HTR | http://www.supermicro.com/products/system/2u/6028/SYS-6028TR-HTR.cfm]]'), + 3081 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017C-MTRF | http://www.supermicro.com/products/system/1u/5017/sys-5017c-mtrf.cfm]]'), + 3082 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-BTF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-BTF.cfm]]'), + 3083 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro Tower%GPASS%8047R-7JRFT | http://www.supermicro.com/products/system/4u/8047/SYS-8047R-7JRFT.cfm]]'), + 3084 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015C-M3 | http://www.supermicro.com/products/system/1U/6015/SYS-6015C-M3.cfm]]'), + 3085 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-72RFT+ | http://www.supermicro.com/products/system/2U/6027/SYS-6027R-72RFT_.cfm]]'), + 3086 => array ('chapter_id' => 18, 'dict_value' => '[[SuperMicro%GPASS%947R-E2CJB | http://www.supermicro.com/products/system/4U/947/SSG-947R-E2CJB.cfm]]'), + 3087 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018D-MTLN4F | http://www.supermicro.com/products/system/1u/5018/SYS-5018D-MTLN4F.cfm]]'), + 3088 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TQF-FM409 | http://www.supermicro.com/products/system/1U/1027/SYS-1027GR-TQF-FM409.cfm]]'), + 3089 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%6048R-E1CR24 | http://www.supermicro.com/products/system/4u/6048/SSG-6048R-E1CR24N.cfm]]'), + 3090 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028R-TDWNR | http://www.supermicro.com/products/system/2u/6028/SYS-6028R-TDWNR.cfm]]'), + 3091 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-RC0+ | http://www.supermicro.com/products/system/4u/f618/SYS-F618R2-RC0_.cfm]]'), + 3092 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015T-INF | http://www.supermicro.com/products/system/1U/6015/SYS-6015T-INF.cfm]]'), + 3093 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-HC1R-SIOM | http://www.supermicro.com/products/system/2U/2028/SYS-2028TP-HC1R-SIOM.cfm]]'), + 3094 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6035B-8R | http://www.supermicro.com/products/system/3U/6035/SYS-6035B-8R.cfm]]'), + 3095 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5028D-TN4T | http://www.supermicro.com/products/system/midtower/5028/sys-5028d-tn4t.cfm]]'), + 3096 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028R-WC1R | http://www.supermicro.com/products/system/1u/1028/SYS-1028R-WC1R.cfm]]'), + 3097 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5019S-M | http://www.supermicro.com/products/system/1U/5019/SYS-5019S-M.cfm]]'), + 3098 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028UX-LL3-B8 | http://www.supermicro.com/products/system/1U/1028/SYS-1028UX-LL3-B8.cfm]]'), + 3099 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028U-TNR4T+ | http://www.supermicro.com/products/system/2u/6028/SYS-6028U-TNR4T_.cfm]]'), + 3100 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628G2-FT+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628G2-FT_.cfm]]'), + 3101 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018D-FN8T | http://www.supermicro.com/products/system/1u/5018/SYS-5018D-FN8T.cfm]]'), + 3102 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1019S-MP | http://www.supermicro.com/products/system/Mini-ITX/1019/SYS-1019S-MP.cfm]]'), + 3103 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617H6-FTL+ | http://www.supermicro.com/products/system/4U/F617/SYS-F617H6-FTL_.cfm]]'), + 3104 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028TR-H72R | http://www.supermicro.com/products/system/2u/2028/SYS-2028TR-H72R.cfm]]'), + 3105 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027GR-TRF-FM409 | http://www.supermicro.com/products/system/2U/2027/SYS-2027GR-TRF-FM409.cfm]]'), + 3106 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-H71QRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-H71QRF.cfm]]'), + 3107 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-H71QRF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-H71QRF.cfm]]'), + 3108 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%1028TP-DTFR | http://www.supermicro.com/products/system/1U/1028/SYS-1028TP-DTFR.cfm]]'), + 3109 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015TC-10G | http://www.supermicro.com/products/system/1U/6015/SYS-6015TC-10G.cfm]]'), + 3110 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5038MA-H24TRF | http://www.supermicro.com/products/system/3U/5038/SYS-5038MA-H24TRF.cfm]]'), + 3111 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5025M-I | http://www.supermicro.com/products/system/2U/5025/SYS-5025M-i.cfm]]'), + 3112 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-HC0TR | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-HC0TR.cfm]]'), + 3113 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-D70RF+ | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-D70RF_.cfm]]'), + 3114 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014V-T2 | http://www.supermicro.com/products/system/1U/6014/SYS-6014V-T2.cfm]]'), + 3115 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028U-E1CR4+ | http://www.supermicro.com/products/system/1U/1028/SYS-1028U-E1CR4_.cfm]]'), + 3116 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5025M-4 | http://www.supermicro.com/products/system/2U/5025/SYS-5025M-4.cfm]]'), + 3117 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-R72PT+ | http://www.supermicro.com/products/system/4u/F618/SYS-F618R2-R72PT_.cfm]]'), + 3118 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-NT | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-NT.cfm]]'), + 3119 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7044H-82R+ | http://www.supermicro.com/products/system/4U/7044/SYS-7044H-82R_.cfm]]'), + 3120 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-NI | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-Ni.cfm]]'), + 3121 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6037R-72RF | http://www.supermicro.com/products/system/3U/6037/SYS-6037R-72RF.cfm]]'), + 3122 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2026GT-TRF | http://www.supermicro.com/products/system/2U/2026/SYS-2026GT-TRF.cfm]]'), + 3123 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5019S-WR | http://www.supermicro.com/products/system/1U/5019/SYS-5019S-WR.cfm]]'), + 3124 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R3-F73 | http://www.supermicro.com/products/system/4U/F627/SYS-F627R3-F73.cfm]]'), + 3125 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017GR-TF-FM175 | http://www.supermicro.com/products/system/1U/5017/SYS-5017GR-TF-FM175.cfm]]'), + 3126 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-WRFT+ | http://www.supermicro.com/products/system/1u/1027/SYS-1027R-WRFT_.cfm]]'), + 3127 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5038MD-H24TRF | http://www.supermicro.com/products/system/3U/5038/SYS-5038MD-H24TRF.cfm]]'), + 3128 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-RC1BPT+ | http://www.supermicro.com/products/system/4u/F628/SYS-F628R3-RC1BPT_.cfm]]'), + 3129 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-RTBPT+ | http://www.supermicro.com/products/system/4u/F628/SYS-F628R3-RTBPT_.cfm]]'), + 3130 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TRT2 | http://www.supermicro.com/products/system/1u/1027/SYS-1027GR-TRT2.cfm]]'), + 3131 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-RT+ | http://www.supermicro.com/products/system/4u/f618/SYS-F618R2-RT_.cfm]]'), + 3132 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026GT-TF | http://www.supermicro.com/products/system/1U/1026/SYS-1026GT-TF.cfm]]'), + 3133 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017K-N6 | http://www.supermicro.com/products/system/1U/5017/SYS-5017K-N6.cfm]]'), + 3134 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-DNCTR | http://www.supermicro.com/products/system/2u/6028/SYS-6028TP-DNCTR.cfm]]'), + 3135 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015B-T+ | http://www.supermicro.com/products/system/1U/6015/SYS-6015B-T_.cfm]]'), + 3136 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TQF-FM475 | http://www.supermicro.com/products/system/1U/1027/SYS-1027GR-TQF-FM475.cfm]]'), + 3137 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-HC0FR | http://www.supermicro.com/products/system/2u/6028/SYS-6028TP-HC0FR.cfm]]'), + 3138 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5016I-MTHF | http://www.supermicro.com/products/system/1u/5016/sys-5016i-mthf.cfm]]'), + 3139 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-HTFRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-HTFRF.cfm]]'), + 3140 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-DNCR | http://www.supermicro.com/products/system/2u/6028/SYS-6028TP-DNCR.cfm]]'), + 3141 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TRF+ | http://www.supermicro.com/products/system/1u/1027/SYS-1027GR-TRF_.cfm]]'), + 3142 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%8016B-6 | http://www.supermicro.com/products/system/1U/8016/SYS-8016B-6.cfm]]'), + 3143 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-HC0TR | http://www.supermicro.com/products/system/2u/6028/SYS-6028TP-HC0TR.cfm]]'), + 3144 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014H-I | http://www.supermicro.com/products/system/1U/6014/SYS-6014H-i.cfm]]'), + 3145 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014P-T | http://www.supermicro.com/products/system/1U/6014/SYS-6014P-T.cfm]]'), + 3146 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028U-TRTP+ | http://www.supermicro.com/products/system/2u/2028/SYS-2028U-TRTP_.cfm]]'), + 3147 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-R72+ | http://www.supermicro.com/products/system/4u/F618/SYS-F618R2-R72_.cfm]]'), + 3148 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1017GR-TF-FM209 | http://www.supermicro.com/products/system/1U/1017/SYS-1017GR-TF-FM209.cfm]]'), + 3149 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%8027R-7RFT+ | http://www.supermicro.com/products/system/2U/8027/SYS-8027R-7RFT_.cfm]]'), + 3150 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014H-T | http://www.supermicro.com/products/system/1U/6014/SYS-6014H-T.cfm]]'), + 3151 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016TT-IBQF | http://www.supermicro.com/products/system/1U/6016/SYS-6016TT-IBQF.cfm]]'), + 3152 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014A-8 | http://www.supermicro.com/products/system/1U/6014/SYS-6014A-8.cfm]]'), + 3153 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-HTQRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-HTQRF.cfm]]'), + 3154 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5039MS-H12TRF | http://www.supermicro.com/products/system/3U/5039/SYS-5039MS-H12TRF.cfm]]'), + 3155 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018D-MTF | http://www.supermicro.com/products/system/1U/5018/SYS-5018D-MTF.cfm]]'), + 3156 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014V-M4 | http://www.supermicro.com/products/system/1U/6014/SYS-6014V-M4.cfm]]'), + 3157 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015X-8 | http://www.supermicro.com/products/system/1U/6015/SYS-6015X-8.cfm]]'), + 3158 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2026T-6RF+ | http://www.supermicro.com/products/system/2U/2026/SYS-2026T-6RF_.cfm]]'), + 3159 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015B-T | http://www.supermicro.com/products/system/1U/6015/SYS-6015B-T.cfm]]'), + 3160 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015B-U | http://www.supermicro.com/products/system/1U/6015/SYS-6015B-U.cfm]]'), + 3161 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%4028GR-TRT2 | http://www.supermicro.com/products/system/4u/4028/SYS-4028GR-TRT2.cfm]]'), + 3162 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F648G2-FTPT+ | http://www.supermicro.com/products/system/4U/F648/SYS-F648G2-FTPT_.cfm]]'), + 3163 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015TW-T | http://www.supermicro.com/products/system/1U/6015/SYS-6015TW-T.cfm]]'), + 3164 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R3-FTPT+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627R3-FTPT_.cfm]]'), + 3165 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015X-3 | http://www.supermicro.com/products/system/1U/6015/SYS-6015X-3.cfm]]'), + 3166 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028U-TR4T+ | http://www.supermicro.com/products/system/2u/2028/SYS-2028U-TR4T_.cfm]]'), + 3167 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5029S-TN2 | http://www.supermicro.com/products/system/midtower/5029/SYS-5029S-TN2.cfm]]'), + 3168 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628G3-FC0+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628G3-FC0_.cfm]]'), + 3169 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028R-WC1RT | http://www.supermicro.com/products/system/1u/1028/SYS-1028R-WC1RT.cfm]]'), + 3170 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%4048B-TRFT | http://www.supermicro.com/products/system/4u/4048/SYS-4048B-TRFT.cfm]]'), + 3171 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627G3-F73PT+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627G3-F73PT_.cfm]]'), + 3172 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028U-TR4+ | http://www.supermicro.com/products/system/2u/6028/SYS-6028U-TR4_.cfm]]'), + 3173 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014H-82 | http://www.supermicro.com/products/system/1U/6014/SYS-6014H-82.cfm]]'), + 3174 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5037C-T | http://www.supermicro.com/products/system/tower/5037/sys-5037c-t.cfm]]'), + 3175 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028U-TNR4T+ | http://www.supermicro.com/products/system/2u/2028/SYS-2028U-TNR4T_.cfm]]'), + 3176 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%5046A-X | http://www.supermicro.com/products/system/tower/5046/SYS-5046A-X.cfm]]'), + 3177 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-FT+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628R3-FT_.cfm]]'), + 3178 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027TR-TQF | http://www.supermicro.com/products/system/1u/1027/SYS-1027TR-TQF.cfm]]'), + 3179 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015B-3 | http://www.supermicro.com/products/system/1U/6015/SYS-6015B-3.cfm]]'), + 3180 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-H71RF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-H71RF.cfm]]'), + 3181 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027PR-HC1TR | http://www.supermicro.com/products/system/2U/6027/SYS-6027PR-HC1TR.cfm]]'), + 3182 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R2-FC0+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628R2-FC0_.cfm]]'), + 3183 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DTTR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DTTR.cfm]]'), + 3184 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%4048B-TR4FT | http://www.supermicro.com/products/system/4u/4048/SYS-4048B-TR4FT.cfm]]'), + 3185 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015B-8 | http://www.supermicro.com/products/system/1U/6015/SYS-6015B-8.cfm]]'), + 3186 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026T-URF4+ | http://www.supermicro.com/products/system/1U/1026/SYS-1026T-URF4_.cfm]]'), + 3187 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014P-8 | http://www.supermicro.com/products/system/1U/6014/SYS-6014P-8.cfm]]'), + 3188 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F517H6-FT | http://www.supermicro.com/products/system/4u/f517/SYS-F517H6-FT.cfm]]'), + 3189 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%1028TP-DTTR | http://www.supermicro.com/products/system/1U/1028/SYS-1028TP-DTTR.cfm]]'), + 3190 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%8025C-3R | http://www.supermicro.com/products/system/2U/8025/SYS-8025C-3R.cfm]]'), + 3191 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016T-GIBQF | http://www.supermicro.com/products/system/1u/6016/SYS-6016T-GIBQF.cfm]]'), + 3192 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618H6-FTL+ | http://www.supermicro.com/products/system/4U/F618/SYS-F618H6-FTL_.cfm]]'), + 3193 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017GR-TF-FM109 | http://www.supermicro.com/products/system/1U/5017/SYS-5017GR-TF-FM109.cfm]]'), + 3194 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DC0FR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DC0FR.cfm]]'), + 3195 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627G2-FTPT+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627G2-FTPT_.cfm]]'), + 3196 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%8016B-TLF | http://www.supermicro.com/products/system/1U/8016/SYS-8016B-TLF.cfm]]'), + 3197 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014L-T | http://www.supermicro.com/products/system/1U/6014/SYS-6014L-T.cfm]]'), + 3198 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028U-TRT+ | http://www.supermicro.com/products/system/1u/1028/SYS-1028U-TRT_.cfm]]'), + 3199 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-RTN+ | http://www.supermicro.com/products/system/4u/F618/SYS-F618R2-RTN_.cfm]]'), + 3200 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TRFT | http://www.supermicro.com/products/system/1u/1027/SYS-1027GR-TRFT.cfm]]'), + 3201 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014H-8 | http://www.supermicro.com/products/system/1U/6014/SYS-6014H-8.cfm]]'), + 3202 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2015TA-HTRF | http://www.supermicro.com/products/system/2U/2015/SYS-2015TA-HTRF.cfm]]'), + 3203 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-HTR | http://www.supermicro.com/products/system/2u/6028/SYS-6028TP-HTR.cfm]]'), + 3204 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028GR-TRT | http://www.supermicro.com/products/system/2u/2028/SYS-2028GR-TRT.cfm]]'), + 3205 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014P-82 | http://www.supermicro.com/products/system/1U/6014/SYS-6014P-82.cfm]]'), + 3206 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-MF | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-MF.cfm]]'), + 3207 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015P-8 | http://www.supermicro.com/products/system/1U/6015/SYS-6015P-8.cfm]]'), + 3208 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028R-ACR24H | http://www.supermicro.com/products/system/2U/2028/SSG-2028R-ACR24H.cfm]]'), + 3209 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5037MC-H8TRF | http://www.supermicro.com/products/system/tower/5037/SYS-5037MC-H8TRF.cfm]]'), + 3210 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617R3-FTPT+ | http://www.supermicro.com/products/system/4U/F617/SYS-F617R3-FTPT_.cfm]]'), + 3211 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%6047R-E1CR36 | http://www.supermicro.com/products/system/4U/6047/SSG-6047R-E1CR36N.cfm]]'), + 3212 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-MR | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-MR.cfm]]'), + 3213 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-D70RF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-D70RF.cfm]]'), + 3214 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-MT | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-MT.cfm]]'), + 3215 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-HTFR | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-HTFR.cfm]]'), + 3216 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028GR-TRH | http://www.supermicro.com/products/system/2u/2028/SYS-2028GR-TRH.cfm]]'), + 3217 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016GT-TF | http://www.supermicro.com/products/system/1U/6016/SYS-6016GT-TF.cfm]]'), + 3218 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027GR-TSF | http://www.supermicro.com/products/system/2u/2027/SYS-2027GR-TSF.cfm]]'), + 3219 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027GR-TRF-FM475 | http://www.supermicro.com/products/system/2U/2027/SYS-2027GR-TRF-FM475.cfm]]'), + 3220 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%8015C-T | http://www.supermicro.com/products/system/1U/8015/SYS-8015C-T.cfm]]'), + 3221 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6024H-32 | http://www.supermicro.com/products/system/2U/6024/SYS-6024H-32.cfm]]'), + 3222 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627G3-FTPT+ | http://www.supermicro.com/products/system/4u/f627/SYS-F627G3-FTPT_.cfm]]'), + 3223 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-72BRFTP | http://www.supermicro.com/products/system/1u/1027/SYS-1027R-72BRFTP.cfm]]'), + 3224 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%8048B-C0R3FT | http://www.supermicro.com/products/system/4U/8048/SYS-8048B-C0R3FT.cfm]]'), + 3225 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6037R-72RFT+ | http://www.supermicro.com/products/system/3u/6037/SYS-6037R-72RFT_.cfm]]'), + 3226 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5025B-T | http://www.supermicro.com/products/system/2U/5025/SYS-5025B-T.cfm]]'), + 3227 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026T-3RF | http://www.supermicro.com/products/system/2U/6026/SYS-6026T-3RF.cfm]]'), + 3228 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015T-T | http://www.supermicro.com/products/system/1U/6015/SYS-6015T-T.cfm]]'), + 3229 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026T-URF | http://www.supermicro.com/products/system/1u/1026/SYS-1026T-URF.cfm]]'), + 3230 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-HC0FR | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-HC0FR.cfm]]'), + 3231 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028R-T | http://www.supermicro.com/products/system/2u/6028/SYS-6028R-T.cfm]]'), + 3232 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5029AP-TN2 | http://www.supermicro.com/products/system/midtower/5029/SYS-5029AP-TN2.cfm]]'), + 3233 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-HTR-SIOM | http://www.supermicro.com/products/system/2U/2028/SYS-2028TP-HTR-SIOM.cfm]]'), + 3234 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R2-F72+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627R2-F72_.cfm]]'), + 3235 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018R-TDW | http://www.supermicro.com/products/system/1u/6018/SYS-6018R-TDW.cfm]]'), + 3236 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628G3-FTPT+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628G3-FTPT_.cfm]]'), + 3237 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DC0TR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DC0TR.cfm]]'), + 3238 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-72RFT | http://www.supermicro.com/products/system/2U/6027/SYS-6027R-72RFT.cfm]]'), + 3239 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617H6-FTPTL+ | http://www.supermicro.com/products/system/4U/F617/SYS-F617H6-FTPTL_.cfm]]'), + 3240 => array ('chapter_id' => 18, 'dict_value' => '[[SuperMicro%GPASS%937R-E2JB | http://www.supermicro.com/products/system/3U/937/SYS-937R-E2JB.cfm]]'), + 3241 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-H71FRF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-H71FRF.cfm]]'), + 3242 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027PR-HTR | http://www.supermicro.com/products/system/2U/6027/SYS-6027PR-HTR.cfm]]'), + 3243 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015P-T | http://www.supermicro.com/products/system/1U/6015/SYS-6015P-T.cfm]]'), + 3244 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018R-M | http://www.supermicro.com/products/system/1u/5018/SYS-5018R-M.cfm]]'), + 3245 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018R-TD | http://www.supermicro.com/products/system/1u/6018/SYS-6018R-TD.cfm]]'), + 3246 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028U-TRT+ | http://www.supermicro.com/products/system/2u/6028/SYS-6028U-TRT_.cfm]]'), + 3247 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617R2-F72+ | http://www.supermicro.com/products/system/4u/f617/SYS-F617R2-F72_.cfm]]'), + 3248 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6038R-TXR | http://www.supermicro.com/products/system/3U/6038/SYS-6038R-TXR.cfm]]'), + 3249 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-72RFTP | http://www.supermicro.com/products/system/1U/1027/SYS-1027R-72RFTP.cfm]]'), + 3250 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028U-TRTP+ | http://www.supermicro.com/products/system/2u/6028/SYS-6028U-TRTP_.cfm]]'), + 3251 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-MT+ | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-MT_.cfm]]'), + 3252 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5016I-MT | http://www.supermicro.com/products/system/1u/5016/sys-5016i-mt.cfm]]'), + 3253 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5016I-MR | http://www.supermicro.com/products/system/1u/5016/sys-5016i-mr.cfm]]'), + 3254 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1017R-WR | http://www.supermicro.com/products/system/1u/1017/SYS-1017R-WR.cfm]]'), + 3255 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-DTRF+ | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-DTRF_.cfm]]'), + 3256 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028TR-TF | http://www.supermicro.com/products/system/1u/1028/SYS-1028TR-TF.cfm]]'), + 3257 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1017GR-TF-FM109 | http://www.supermicro.com/products/system/1U/1017/SYS-1017GR-TF-FM109.cfm]]'), + 3258 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-MF+ | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-MF_.cfm]]'), + 3259 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028R-E1CR12T | http://www.supermicro.com/products/system/2U/6028/SSG-6028R-E1CR12T.cfm]]'), + 3260 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018A-MLHN4 | http://www.supermicro.com/products/system/1U/5018/SYS-5018A-MLHN4.cfm]]'), + 3261 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%1028TP-DC0R | http://www.supermicro.com/products/system/1U/1028/SYS-1028TP-DC0R.cfm]]'), + 3262 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5037A-T | http://www.supermicro.com/products/system/tower/5037/SYS-5037A-T.cfm]]'), + 3263 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 5U%GPASS%5086B-TRF | http://www.supermicro.com/products/system/5U/5086/SYS-5086B-TRF.cfm]]'), + 3264 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5037A-I | http://www.supermicro.com/products/system/tower/5037/SYS-5037A-i.cfm]]'), + 3265 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-WRF | http://www.supermicro.com/products/system/1u/6017/SYS-6017R-WRF.cfm]]'), + 3266 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015P-8R | http://www.supermicro.com/products/system/1U/5015/SYS-5015P-8R.cfm]]'), + 3267 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-IBXF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-IBXF.cfm]]'), + 3268 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028UX-LL1-B8 | http://www.supermicro.com/products/system/1U/1028/SYS-1028UX-LL1-B8.cfm]]'), + 3269 => array ('chapter_id' => 18, 'dict_value' => '[[SuperMicro%GPASS%927R-E2CJB | http://www.supermicro.com/products/system/2U/927/SSG-927R-E2CJB.cfm]]'), + 3270 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-HC1R | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-HC1R.cfm]]'), + 3271 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5025B-4 | http://www.supermicro.com/products/system/2U/5025/SYS-5025B-4.cfm]]'), + 3272 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017GR-TF | http://www.supermicro.com/products/system/1u/5017/SYS-5017GR-TF.cfm]]'), + 3273 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%7034L-I | http://www.supermicro.com/products/system/tower/7034/SYS-7034L-i.cfm]]'), + 3274 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5036I-I | http://www.supermicro.com/products/system/midtower/5036/SYS-5036I-I.cfm]]'), + 3275 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6024H-I | http://www.supermicro.com/products/system/2U/6024/SYS-6024H-i.cfm]]'), + 3276 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015B-3R | http://www.supermicro.com/products/system/1U/6015/SYS-6015B-3R.cfm]]'), + 3277 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-HC1TR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-HC1TR.cfm]]'), + 3278 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-HC1FR | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-HC1FR.cfm]]'), + 3279 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015A-NT | http://www.supermicro.com/products/system/1U/6015/SYS-6015A-NT.cfm]]'), + 3280 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-R72BPT+ | http://www.supermicro.com/products/system/4u/F628/SYS-F628R3-R72BPT_.cfm]]'), + 3281 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015P-TR | http://www.supermicro.com/products/system/1U/6015/SYS-6015P-TR.cfm]]'), + 3282 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6024H-T | http://www.supermicro.com/products/system/2U/6024/SYS-6024H-T.cfm]]'), + 3283 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5039AD-T | http://www.supermicro.com/products/system/tower/5039/SYS-5039AD-T.cfm]]'), + 3284 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-HDTRF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-HDTRF.cfm]]'), + 3285 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-WTRFTP+ | http://www.supermicro.com/products/system/1u/6017/SYS-6017R-WTRFTP_.cfm]]'), + 3286 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027PR-HC0FR | http://www.supermicro.com/products/system/2U/6027/SYS-6027PR-HC0FR.cfm]]'), + 3287 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-MTLF | http://www.supermicro.com/products/system/1U/6017/SYS-6017R-MTLF.cfm]]'), + 3288 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028TR-HTFR | http://www.supermicro.com/products/system/2u/6028/SYS-6028TR-HTFR.cfm]]'), + 3289 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028R-MCTR | http://www.supermicro.com/products/system/1u/1028/SYS-1028R-MCTR.cfm]]'), + 3290 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027AX-TRF-HFT1 | http://www.supermicro.com/products/system/2u/6027/SYS-6027AX-TRF-HFT1.cfm]]'), + 3291 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027AX-TRF-HFT3 | http://www.supermicro.com/products/system/2u/6027/SYS-6027AX-TRF-HFT3.cfm]]'), + 3292 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027AX-TRF-HFT2 | http://www.supermicro.com/products/system/2u/6027/SYS-6027AX-TRF-HFT2.cfm]]'), + 3293 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018D-MTRF | http://www.supermicro.com/products/system/1u/5018/SYS-5018D-MTRF.cfm]]'), + 3294 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018R-TDTPR | http://www.supermicro.com/products/system/1u/6018/SYS-6018R-TDTPR.cfm]]'), + 3295 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-72RFTP+ | http://www.supermicro.com/products/system/2U/6027/SYS-6027R-72RFTP_.cfm]]'), + 3296 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047GR-TRF | http://www.supermicro.com/products/system/4u/7047/sys-7047gr-trf.cfm]]'), + 3297 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028U-TR4+ | http://www.supermicro.com/products/system/1u/1028/SYS-1028U-TR4_.cfm]]'), + 3298 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-DTR | http://www.supermicro.com/products/system/2u/2027/SYS-2027PR-DTR.cfm]]'), + 3299 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F647G2-FT+ | http://www.supermicro.com/products/system/4u/f647/SYS-F647G2-FT_.cfm]]'), + 3300 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7046A-T | http://www.supermicro.com/products/system/4U/7046/SYS-7046A-T.cfm]]'), + 3301 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5130AD-T | http://www.supermicro.com/products/system/tower/5130/SYS-5130AD-T.cfm]]'), + 3302 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027GR-TRFT | http://www.supermicro.com/products/system/2u/2027/SYS-2027GR-TRFT.cfm]]'), + 3303 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015B-8+ | http://www.supermicro.com/products/system/1U/6015/SYS-6015B-8_.cfm]]'), + 3304 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-FC0 | http://www.supermicro.com/products/system/4u/F628/SYS-F628R3-FC0.cfm]]'), + 3305 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018R-MT | http://www.supermicro.com/products/system/1u/6018/SYS-6018R-MT.cfm]]'), + 3306 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5037C-I | http://www.supermicro.com/products/system/tower/5037/sys-5037c-i.cfm]]'), + 3307 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028BT-HNR+ | http://www.supermicro.com/products/system/2U/2028/SYS-2028BT-HNR_.cfm]]'), + 3308 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617R2-FT+ | http://www.supermicro.com/products/system/4U/F617/SYS-F617R2-FT_.cfm]]'), + 3309 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%8014T-T | http://www.supermicro.com/products/system/1U/8014/SYS-8014T-T.cfm]]'), + 3310 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5014C-M8 | http://www.supermicro.com/products/system/1U/5014/SYS-5014C-M8.cfm]]'), + 3311 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-N3RFT+ | http://www.supermicro.com/products/system/2u/6027/SYS-6027R-N3RFT_.cfm]]'), + 3312 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%4047R-7JRFT | http://www.supermicro.com/products/system/4U/4047/SYS-4047R-7JRFT.cfm]]'), + 3313 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047GR-TPRF-FM475 | http://www.supermicro.com/products/system/4U/7047/SYS-7047GR-TPRF-FM475.cfm]]'), + 3314 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-D6IBQRF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-D6IBQRF.cfm]]'), + 3315 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018R-MD | http://www.supermicro.com/products/system/1u/6018/SYS-6018R-MD.cfm]]'), + 3316 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015V-T | http://www.supermicro.com/products/system/1U/6015/SYS-6015V-T.cfm]]'), + 3317 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-73DAF | http://www.supermicro.com/products/system/1u/1027/SYS-1027R-73DAF.cfm]]'), + 3318 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014P-82R | http://www.supermicro.com/products/system/1U/6014/SYS-6014P-82R.cfm]]'), + 3319 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6024H-8R | http://www.supermicro.com/products/system/2U/6024/SYS-6024H-8R.cfm]]'), + 3320 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018U-TR4+ | http://www.supermicro.com/products/system/1u/6018/SYS-6018U-TR4_.cfm]]'), + 3321 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1017A-MP | http://www.supermicro.com/products/system/mini-itx/1017/SYS-1017A-MP.cfm]]'), + 3322 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7045B-8R+ | http://www.supermicro.com/products/system/4U/7045/SYS-7045B-8R_.cfm]]'), + 3323 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-73THDP+ | http://www.supermicro.com/products/system/1U/6017/SYS-6017R-73THDP_.cfm]]'), + 3324 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-HC1FR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-HC1FR.cfm]]'), + 3325 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-HC1TR | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-HC1TR.cfm]]'), + 3326 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-D6IBXRF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-D6IBXRF.cfm]]'), + 3327 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627G2-F73+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627G2-F73_.cfm]]'), + 3328 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-72RF | http://www.supermicro.com/products/system/2U/6027/SYS-6027R-72RF.cfm]]'), + 3329 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%6047R-E1R24 | http://www.supermicro.com/products/system/4U/6047/SSG-6047R-E1R24N.cfm]]'), + 3330 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1017GR-TF-FM275 | http://www.supermicro.com/products/system/1U/1017/SYS-1017GR-TF-FM275.cfm]]'), + 3331 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015P-TR | http://www.supermicro.com/products/system/1U/5015/SYS-5015P-TR.cfm]]'), + 3332 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028R-C1R4+ | http://www.supermicro.com/products/system/2u/2028/SYS-2028R-C1R4_.cfm]]'), + 3333 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7048R-TR | http://www.supermicro.com/products/system/4U/7048/SYS-7048R-TR.cfm]]'), + 3334 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F647G2-FTPT+ | http://www.supermicro.com/products/system/4U/F647/SYS-F647G2-FTPT_.cfm]]'), + 3335 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1019S-MC0T | http://www.supermicro.com/products/system/1U/1019/SYS-1019S-MC0T.cfm]]'), + 3336 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6013P-I | http://www.supermicro.com/products/system/1U/6013/SYS-6013P-i.cfm]]'), + 3337 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-HC1R | http://www.supermicro.com/products/system/2u/6028/SYS-6028TP-HC1R.cfm]]'), + 3338 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6024H-32R | http://www.supermicro.com/products/system/2U/6024/SYS-6024H-32R.cfm]]'), + 3339 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6013P-T | http://www.supermicro.com/products/system/1U/6013/SYS-6013P-T.cfm]]'), + 3340 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047GR-TPRF | http://www.supermicro.com/products/system/4u/7047/SYS-7047GR-TPRF.cfm]]'), + 3341 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6012P-6 | http://www.supermicro.com/products/system/1U/6012/SYS-6012P-6.cfm]]'), + 3342 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028R-E1CR24 | http://www.supermicro.com/products/system/2u/2028/SSG-2028R-E1CR24N.cfm]]'), + 3343 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6012P-8 | http://www.supermicro.com/products/system/1U/6012/SYS-6012P-8.cfm]]'), + 3344 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-TDF | http://www.supermicro.com/products/system/1u/6017/SYS-6017R-TDF.cfm]]'), + 3345 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7045B-TR+ | http://www.supermicro.com/products/system/4U/7045/SYS-7045B-TR_.cfm]]'), + 3346 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628G2-FTPT+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628G2-FTPT_.cfm]]'), + 3347 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%6048R-E1CR60 | http://www.supermicro.com/products/system/4U/6048/SSG-6048R-E1CR60N.cfm]]'), + 3348 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015A-EHF-D525 | http://www.supermicro.com/products/system/1U/5015/SYS-5015A-EHF-D525.cfm]]'), + 3349 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-IBQF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-IBQF.cfm]]'), + 3350 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028U-E1CNRT+ | http://www.supermicro.com/products/system/2u/6028/SYS-6028U-E1CNRT_.cfm]]'), + 3351 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047GR-TRF-FC475 | http://www.supermicro.com/products/system/4u/7047/SYS-7047GR-TRF-FC475.cfm]]'), + 3352 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015TC-T | http://www.supermicro.com/products/system/1U/6015/SYS-6015TC-T.cfm]]'), + 3353 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628G2-FC0+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628G2-FC0_.cfm]]'), + 3354 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-HC1R | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-HC1R.cfm]]'), + 3355 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F648G2-FC0+ | http://www.supermicro.com/products/system/4U/F648/SYS-F648G2-FC0_.cfm]]'), + 3356 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618H6-FTPT+ | http://www.supermicro.com/products/system/4U/F618/SYS-F618H6-FTPT_.cfm]]'), + 3357 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028U-TNRTP+ | http://www.supermicro.com/products/system/1u/1028/SYS-1028U-TNRTP_.cfm]]'), + 3358 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 7U%GPASS%7088B-TR4FT | http://www.supermicro.com/products/system/7U/7088/SYS-7088B-TR4FT.cfm]]'), + 3359 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6013E-I | http://www.supermicro.com/products/system/1U/6013/SYS-6013E-i.cfm]]'), + 3360 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028R-MCT | http://www.supermicro.com/products/system/1u/1028/SYS-1028R-MCT.cfm]]'), + 3361 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-HTTR | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-HTTR.cfm]]'), + 3362 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016T-T | http://www.supermicro.com/products/system/1U/6016/SYS-6016T-T.cfm]]'), + 3363 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6013P-8 | http://www.supermicro.com/products/system/1U/6013/SYS-6013P-8.cfm]]'), + 3364 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028U-E1CRTP+ | http://www.supermicro.com/products/system/1u/1028/SYS-1028U-E1CRTP_.cfm]]'), + 3365 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6024H-82 | http://www.supermicro.com/products/system/2U/6024/SYS-6024H-82.cfm]]'), + 3366 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017TR-TF | http://www.supermicro.com/products/system/1u/6017/SYS-6017TR-TF.cfm]]'), + 3367 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-H70RF+ | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-H70RF_.cfm]]'), + 3368 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%6047R-E1R72L2K | http://www.supermicro.com/products/system/4U/6047/SSG-6047R-E1R72L2K.cfm]]'), + 3369 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TRFT+ | http://www.supermicro.com/products/system/1u/1027/SYS-1027GR-TRFT_.cfm]]'), + 3370 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027R-WRF | http://www.supermicro.com/products/system/2u/2027/SYS-2027R-WRF.cfm]]'), + 3371 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5035B-T | http://www.supermicro.com/products/system/tower/5035/SYS-5035B-T.cfm]]'), + 3372 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1017R-MTF | http://www.supermicro.com/products/system/1u/1017/SYS-1017R-MTF.cfm]]'), + 3373 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DC1TR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DC1TR.cfm]]'), + 3374 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027GR-TRFH | http://www.supermicro.com/products/system/2u/2027/SYS-2027GR-TRFH.cfm]]'), + 3375 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1025C-M3 | http://www.supermicro.com/products/system/1U/1025/SYS-1025C-M3.cfm]]'), + 3376 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5019S-MR | http://www.supermicro.com/products/system/1U/5019/SYS-5019S-MR.cfm]]'), + 3377 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-DC1FR | http://www.supermicro.com/products/system/2u/2028/SYS-2028TP-DC1FR.cfm]]'), + 3378 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5019S-MT | http://www.supermicro.com/products/system/1U/5019/SYS-5019S-MT.cfm]]'), + 3379 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-WRF | http://www.supermicro.com/products/system/1u/1027/SYS-1027R-WRF.cfm]]'), + 3380 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015B-NI | http://www.supermicro.com/products/system/1U/6015/SYS-6015B-Ni.cfm]]'), + 3381 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7048R-C1RT | http://www.supermicro.com/products/system/4U/7048/SYS-7048R-C1RT.cfm]]'), + 3382 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6025B-T | http://www.supermicro.com/products/system/2U/6025/SYS-6025B-T.cfm]]'), + 3383 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7046A-6 | http://www.supermicro.com/products/system/4U/7046/SYS-7046A-6.cfm]]'), + 3384 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027TR-TF | http://www.supermicro.com/products/system/1u/1027/SYS-1027TR-TF.cfm]]'), + 3385 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-H71FRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-H71FRF.cfm]]'), + 3386 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7048R-C1R4+ | http://www.supermicro.com/products/system/4U/7048/SYS-7048R-C1R4_.cfm]]'), + 3387 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027PR-HTFR | http://www.supermicro.com/products/system/2U/6027/SYS-6027PR-HTFR.cfm]]'), + 3388 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-HIBQRF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-HIBQRF.cfm]]'), + 3389 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016T-UF | http://www.supermicro.com/products/system/1U/6016/SYS-6016T-UF.cfm]]'), + 3390 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%6048R-E1CR36H | http://www.supermicro.com/products/system/4u/6048/SSG-6048R-E1CR36H.cfm]]'), + 3391 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TQF | http://www.supermicro.com/products/system/1u/1027/SYS-1027GR-TQF.cfm]]'), + 3392 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027R-AR24NV | http://www.supermicro.com/products/system/2u/2027/SSG-2027R-AR24NV.cfm]]'), + 3393 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5026TI-BTRF | http://www.supermicro.com/products/system/2U/5026/SYS-5026TI-BTRF.cfm]]'), + 3394 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-N3RF4+ | http://www.supermicro.com/products/system/1u/6017/SYS-6017R-N3RF4_.cfm]]'), + 3395 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018U-TRT+ | http://www.supermicro.com/products/system/1u/6018/SYS-6018U-TRT_.cfm]]'), + 3396 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1015B-M3 | http://www.supermicro.com/products/system/1U/1015/SYS-1015B-M3.cfm]]'), + 3397 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627G3-FT+ | http://www.supermicro.com/products/system/4u/f627/SYS-F627G3-FT_.cfm]]'), + 3398 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018D-MF | http://www.supermicro.com/products/system/1u/5018/SYS-5018D-MF.cfm]]'), + 3399 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5028R-WR | http://www.supermicro.com/products/system/2u/5028/SYS-5028R-WR.cfm]]'), + 3400 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027B-TLF | http://www.supermicro.com/products/system/2u/6027/SYS-6027B-TLF.cfm]]'), + 3401 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028BT-HTR+ | http://www.supermicro.com/products/system/2U/2028/SYS-2028BT-HTR_.cfm]]'), + 3402 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-WC1NR | http://www.supermicro.com/products/system/1U/1027/SYS-1027R-WC1NR.cfm]]'), + 3403 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%6048R-E1CR36 | http://www.supermicro.com/products/system/4u/6048/SSG-6048R-E1CR36N.cfm]]'), + 3404 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-H71RF+ | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-H71RF_.cfm]]'), + 3405 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047A-T | http://www.supermicro.com/products/system/4u/7047/SYS-7047A-T.cfm]]'), + 3406 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028GR-TR | http://www.supermicro.com/products/system/1u/1028/SYS-1028GR-TR.cfm]]'), + 3407 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014P-TR | http://www.supermicro.com/products/system/1U/6014/SYS-6014P-TR.cfm]]'), + 3408 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015B-UR | http://www.supermicro.com/products/system/1U/5015/SYS-5015B-UR.cfm]]'), + 3409 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F647G2-F73+ | http://www.supermicro.com/products/system/4U/F647/SYS-F647G2-F73_.cfm]]'), + 3410 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R3-RTB+ | http://www.supermicro.com/products/system/4u/f627/SYS-F627R3-RTB_.cfm]]'), + 3411 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2048U-RTR4 | http://www.supermicro.com/products/system/2u/2048/SYS-2048U-RTR4.cfm]]'), + 3412 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6013A-T | http://www.supermicro.com/products/system/1U/6013/SYS-6013A-T.cfm]]'), + 3413 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R2-FC0PT+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628R2-FC0PT_.cfm]]'), + 3414 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028R-E1CR24H | http://www.supermicro.com/products/system/2u/2028/SSG-2028R-E1CR24H.cfm]]'), + 3415 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018A-MLTN4 | http://www.supermicro.com/products/system/1u/5018/SYS-5018A-MLTN4.cfm]]'), + 3416 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5019S-M2 | http://www.supermicro.com/products/system/1U/5019/SYS-5019S-M2.cfm]]'), + 3417 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-RTBN+ | http://www.supermicro.com/products/system/4u/f628/SYS-F628R3-RTBN_.cfm]]'), + 3418 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6012L-6 | http://www.supermicro.com/products/system/1U/6012/SYS-6012L-6.cfm]]'), + 3419 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-WRF4+ | http://www.supermicro.com/products/system/1u/1027/SYS-1027R-WRF4_.cfm]]'), + 3420 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1025TC-3F | http://www.supermicro.com/products/system/1U/1025/SYS-1025TC-3F.cfm]]'), + 3421 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%4028GR-TXRT | http://www.supermicro.com/products/system/4U/4028/SYS-4028GR-TXRT.cfm]]'), + 3422 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028U-E1CNR4T+ | http://www.supermicro.com/products/system/2u/2028/SYS-2028U-E1CNR4T_.cfm]]'), + 3423 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R2-RT+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627R2-RT_.cfm]]'), + 3424 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6014P-8R | http://www.supermicro.com/products/system/1U/6014/SYS-6014P-8R.cfm]]'), + 3425 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028GR-TRHT | http://www.supermicro.com/products/system/2u/2028/SYS-2028GR-TRHT.cfm]]'), + 3426 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6025B-8 | http://www.supermicro.com/products/system/2U/6025/SYS-6025B-8.cfm]]'), + 3427 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5036A-T | http://www.supermicro.com/products/system/midtower/5036/SYS-5036A-T.cfm]]'), + 3428 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1025TC-10G | http://www.supermicro.com/products/system/1U/1025/SYS-1025TC-10G.cfm]]'), + 3429 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-FTPT+ | http://www.supermicro.com/products/system/4U/F618/SYS-F618R2-FTPT_.cfm]]'), + 3430 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028R-C1R | http://www.supermicro.com/products/system/2u/2028/SYS-2028R-C1R.cfm]]'), + 3431 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-H6IBXRF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-H6IBXRF.cfm]]'), + 3432 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5016I-MRHF | http://www.supermicro.com/products/system/1u/5016/sys-5016i-mrhf.cfm]]'), + 3433 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026TT-IBQF | http://www.supermicro.com/products/system/1U/1026/SYS-1026TT-IBQF.cfm]]'), + 3434 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%4027GR-TR | http://www.supermicro.com/products/system/4u/4027/SYS-4027GR-TR.cfm]]'), + 3435 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028U-TN10RT+ | http://www.supermicro.com/products/system/1u/1028/sys-1028u-tn10rt_.cfm]]'), + 3436 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017TR-TQF | http://www.supermicro.com/products/system/1u/6017/SYS-6017TR-TQF.cfm]]'), + 3437 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%4027GR-TRT | http://www.supermicro.com/products/system/4u/4027/SYS-4027GR-TRT.cfm]]'), + 3438 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028R-WMRT | http://www.supermicro.com/products/system/1u/1028/SYS-1028R-WMRT.cfm]]'), + 3439 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018A-TN7B | http://www.supermicro.com/products/system/1u/5018/SYS-5018A-TN7B.cfm]]'), + 3440 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2026T-URF4+ | http://www.supermicro.com/products/system/2U/2026/SYS-2026T-URF4_.cfm]]'), + 3441 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%8048B-C0R4FT | http://www.supermicro.com/products/system/4U/8048/SYS-8048B-C0R4FT.cfm]]'), + 3442 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6023L-8R | http://www.supermicro.com/products/system/2U/6023/SYS-6023L-8R.cfm]]'), + 3443 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5038ML-H24TRF | http://www.supermicro.com/products/system/3U/5038/SYS-5038ML-H24TRF.cfm]]'), + 3444 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5027R-WRF | http://www.supermicro.com/products/system/2u/5027/SYS-5027R-WRF.cfm]]'), + 3445 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%1028TP-DC1FR | http://www.supermicro.com/products/system/1U/1028/SYS-1028TP-DC1FR.cfm]]'), + 3446 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-RTPT+ | http://www.supermicro.com/products/system/4u/F618/SYS-F618R2-RTPT_.cfm]]'), + 3447 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017C-TF | http://www.supermicro.com/products/system/1u/5017/sys-5017c-tf.cfm]]'), + 3448 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028GQ-TRT | http://www.supermicro.com/products/system/1u/1028/sys-1028gq-trt.cfm]]'), + 3449 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015P-T | http://www.supermicro.com/products/system/1U/5015/SYS-5015P-T.cfm]]'), + 3450 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6022P-6 | http://www.supermicro.com/products/system/2U/6022/SYS-6022P-6.cfm]]'), + 3451 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617R2-F73 | http://www.supermicro.com/products/system/4U/F617/SYS-F617R2-F73.cfm]]'), + 3452 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028R-WTNR | http://www.supermicro.com/products/system/1u/1028/SYS-1028R-WTNR.cfm]]'), + 3453 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026T-URF4+ | http://www.supermicro.com/products/system/2U/6026/SYS-6026T-URF4_.cfm]]'), + 3454 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026GT-TRF | http://www.supermicro.com/products/system/1U/1026/SYS-1026GT-TRF.cfm]]'), + 3455 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028UX-LL2-B8 | http://www.supermicro.com/products/system/1U/1028/SYS-1028UX-LL2-B8.cfm]]'), + 3456 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7044H-TR | http://www.supermicro.com/products/system/4U/7044/SYS-7044H-TR.cfm]]'), + 3457 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6025W-UR | http://www.supermicro.com/products/system/2U/6025/SYS-6025W-UR.cfm]]'), + 3458 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015P-8 | http://www.supermicro.com/products/system/1U/5015/SYS-5015P-8.cfm]]'), + 3459 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6025B-3 | http://www.supermicro.com/products/system/2U/6025/SYS-6025B-3.cfm]]'), + 3460 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R3-R72B+ | http://www.supermicro.com/products/system/4u/f627/SYS-F627R3-R72B_.cfm]]'), + 3461 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-FC0+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628R3-FC0_.cfm]]'), + 3462 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R3-FT | http://www.supermicro.com/products/system/4U/F627/SYS-F627R3-FT.cfm]]'), + 3463 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028TR-T | http://www.supermicro.com/products/system/1u/1028/SYS-1028TR-T.cfm]]'), + 3464 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-HTRF | http://www.supermicro.com/products/system/2u/6027/SYS-6027TR-HTRF.cfm]]'), + 3465 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-72RT2 | http://www.supermicro.com/products/system/1u/1027/SYS-1027GR-72RT2.cfm]]'), + 3466 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-NTR | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-NTR.cfm]]'), + 3467 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018TR-T | http://www.supermicro.com/products/system/1u/6018/SYS-6018TR-T.cfm]]'), + 3468 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2026TT-DLIBQRF | http://www.supermicro.com/products/system/2U/2026/SYS-2026TT-DLIBQRF.cfm]]'), + 3469 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-UR | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-UR.cfm]]'), + 3470 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047R-TRF | http://www.supermicro.com/products/system/4U/7047/SYS-7047R-TRF.cfm]]'), + 3471 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047R-72RF | http://www.supermicro.com/products/system/4U/7047/SYS-7047R-72RF.cfm]]'), + 3472 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027B-MTF | http://www.supermicro.com/products/system/1u/1027/SYS-1027B-MTF.cfm]]'), + 3473 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-N3RF4+ | http://www.supermicro.com/products/system/2u/6027/SYS-6027R-N3RF4_.cfm]]'), + 3474 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5016I-UR | http://www.supermicro.com/products/system/1u/5016/sys-5016i-ur.cfm]]'), + 3475 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R2-F72PT+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627R2-F72PT_.cfm]]'), + 3476 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-H70QRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-H70QRF.cfm]]'), + 3477 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-H6IBQRF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-H6IBQRF.cfm]]'), + 3478 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5038ML-H12TRF | http://www.supermicro.com/products/system/3u/5038/SYS-5038ML-H12TRF.cfm]]'), + 3479 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-DC0TR | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-DC0TR.cfm]]'), + 3480 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro Tower%GPASS%8047R-TRF+ | http://www.supermicro.com/products/system/4U/8047/SYS-8047R-TRF_.cfm]]'), + 3481 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017C-MF | http://www.supermicro.com/products/system/1u/5017/sys-5017c-mf.cfm]]'), + 3482 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%8017R-7FT+ | http://www.supermicro.com/products/system/1U/8017/SYS-8017R-7FT_.cfm]]'), + 3483 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5017C-MTF | http://www.supermicro.com/products/system/1u/5017/sys-5017c-mtf.cfm]]'), + 3484 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5018R-MR | http://www.supermicro.com/products/system/1u/5018/SYS-5018R-MR.cfm]]'), + 3485 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro%GPASS%8044T-8R | http://www.supermicro.com/products/system/4U/8044/SYS-8044T-8R.cfm]]'), + 3486 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%8048B-TR4FT | http://www.supermicro.com/products/system/4u/8048/SYS-8048B-TR4FT.cfm]]'), + 3487 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5019S-MN4 | http://www.supermicro.com/products/system/1U/5019/SYS-5019S-MN4.cfm]]'), + 3488 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6035B-8 | http://www.supermicro.com/products/system/3U/6035/SYS-6035B-8.cfm]]'), + 3489 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6024H-82R | http://www.supermicro.com/products/system/2U/6024/SYS-6024H-82R.cfm]]'), + 3490 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-N3RFT+ | http://www.supermicro.com/products/system/1u/6017/SYS-6017R-N3RFT_.cfm]]'), + 3491 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2026TT-DLIBXRF | http://www.supermicro.com/products/system/2U/2026/SYS-2026TT-DLIBXRF.cfm]]'), + 3492 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-BIBXF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-BIBXF.cfm]]'), + 3493 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%1028TP-DC1TR | http://www.supermicro.com/products/system/1U/1028/SYS-1028TP-DC1TR.cfm]]'), + 3494 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-D70QRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-D70QRF.cfm]]'), + 3495 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F648G2-FC0PT+ | http://www.supermicro.com/products/system/4U/F648/SYS-F648G2-FC0PT_.cfm]]'), + 3496 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026T-NTR+ | http://www.supermicro.com/products/system/2U/6026/SYS-6026T-NTR_.cfm]]'), + 3497 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015V-MRLP | http://www.supermicro.com/products/system/1U/6015/SYS-6015V-MRLP.cfm]]'), + 3498 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016T-6RF+ | http://www.supermicro.com/products/system/1U/6016/SYS-6016T-6RF_.cfm]]'), + 3499 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028R-WTR | http://www.supermicro.com/products/system/1u/1028/SYS-1028R-WTR.cfm]]'), + 3500 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%5038ML-H8TRF | http://www.supermicro.com/products/system/3u/5038/SYS-5038ML-H8TRF.cfm]]'), + 3501 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617R2-FTPT+ | http://www.supermicro.com/products/system/4U/F617/SYS-F617R2-FTPT_.cfm]]'), + 3502 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1019S-M2 | http://www.supermicro.com/products/system/1U/1019/SYS-1019S-M2.cfm]]'), + 3503 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro Tower%GPASS%8046B-6R | http://www.supermicro.com/products/system/4U/8046/SYS-8046B-6R.cfm]]'), + 3504 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%2028TP-HC0TR | http://www.supermicro.com/products/system/2U/2028/SYS-2028TP-HC0TR.cfm]]'), + 3505 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5026T-3F | http://www.supermicro.com/products/system/2U/5026/SYS-5026T-3F.cfm]]'), + 3506 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027GR-TR2 | http://www.supermicro.com/products/system/2u/2027/SYS-2027GR-TR2.cfm]]'), + 3507 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-D71RF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-D71RF.cfm]]'), + 3508 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6024H-I2 | http://www.supermicro.com/products/system/2U/6024/SYS-6024H-i2.cfm]]'), + 3509 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2026TT-H6IBQRF | http://www.supermicro.com/products/system/2U/2026/SYS-2026TT-H6IBQRF.cfm]]'), + 3510 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-M7RF | http://www.supermicro.com/products/system/1U/6017/SYS-6017R-M7RF.cfm]]'), + 3511 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027R-N3RFT+ | http://www.supermicro.com/products/system/2u/2027/SYS-2027R-N3RFT_.cfm]]'), + 3512 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015P-8R | http://www.supermicro.com/products/system/1U/6015/SYS-6015P-8R.cfm]]'), + 3513 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R3-FTPT+ | http://www.supermicro.com/products/system/4U/F618/SYS-F618R3-FTPT_.cfm]]'), + 3514 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-H72FRF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-H72FRF.cfm]]'), + 3515 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015A-PHF | http://www.supermicro.com/products/system/1U/5015/SYS-5015A-PHF.cfm]]'), + 3516 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5014C-T | http://www.supermicro.com/products/system/1U/5014/SYS-5014C-T.cfm]]'), + 3517 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026T-6RF+ | http://www.supermicro.com/products/system/2U/6026/SYS-6026T-6RF_.cfm]]'), + 3518 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%8048B-TR4F | http://www.supermicro.com/products/system/4U/8048/SYS-8048B-TR4F.cfm]]'), + 3519 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F618R2-RTPTN+ | http://www.supermicro.com/products/system/4u/F618/SYS-F618R2-RTPTN_.cfm]]'), + 3520 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027R-72RFTP+ | http://www.supermicro.com/products/system/2U/2027/SYS-2027R-72RFTP_.cfm]]'), + 3521 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028GR-TRT | http://www.supermicro.com/products/system/1u/1028/SYS-1028GR-TRT.cfm]]'), + 3522 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro%GPASS%8045C-3R | http://www.supermicro.com/products/system/4U/8045/SYS-8045C-3R.cfm]]'), + 3523 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-H72QRF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-H72QRF.cfm]]'), + 3524 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6023P-8R | http://www.supermicro.com/products/system/2U/6023/SYS-6023P-8R.cfm]]'), + 3525 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TRF-FM309 | http://www.supermicro.com/products/system/1U/1027/SYS-1027GR-TRF-FM309.cfm]]'), + 3526 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro Tower%GPASS%8046B-TRLF | http://www.supermicro.com/products/system/4U/8046/SYS-8046B-TRLF.cfm]]'), + 3527 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028R-WMR | http://www.supermicro.com/products/system/1u/1028/SYS-1028R-WMR.cfm]]'), + 3528 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-DC0FR | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-DC0FR.cfm]]'), + 3529 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027GR-TRF | http://www.supermicro.com/products/system/2u/2027/SYS-2027GR-TRF.cfm]]'), + 3530 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-73DARF | http://www.supermicro.com/products/system/2u/6027/sys-6027r-73darf.cfm]]'), + 3531 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-72R2 | http://www.supermicro.com/products/system/1u/1027/SYS-1027GR-72R2.cfm]]'), + 3532 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R2-FT+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628R2-FT_.cfm]]'), + 3533 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6016T-6F | http://www.supermicro.com/products/system/1U/6016/SYS-6016T-6F.cfm]]'), + 3534 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027AX-72RF | http://www.supermicro.com/products/system/2u/6027/SYS-6027AX-72RF.cfm]]'), + 3535 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6025B-TR+ | http://www.supermicro.com/products/system/2U/6025/SYS-6025B-TR_.cfm]]'), + 3536 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%8048B-TR3F | http://www.supermicro.com/products/system/4U/8048/SYS-8048B-TR3F.cfm]]'), + 3537 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027TR-D70FRF | http://www.supermicro.com/products/system/2U/6027/SYS-6027TR-D70FRF.cfm]]'), + 3538 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-BIBQF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-BIBQF.cfm]]'), + 3539 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6015B-NT | http://www.supermicro.com/products/system/1U/6015/SYS-6015B-NT.cfm]]'), + 3540 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-TDARF | http://www.supermicro.com/products/system/2U/6027/SYS-6027R-TDARF.cfm]]'), + 3541 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7047A-73 | http://www.supermicro.com/products/system/4u/7047/SYS-7047A-73.cfm]]'), + 3542 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5028TK-HTR | http://www.supermicro.com/products/system/2U/5028/SYS-5028TK-HTR.cfm]]'), + 3543 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027PR-HC0R | http://www.supermicro.com/products/system/2U/2027/SYS-2027PR-HC0R.cfm]]'), + 3544 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1018R-WC0R | http://www.supermicro.com/products/system/1u/1018/SYS-1018R-WC0R.cfm]]'), + 3545 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-T | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-T.cfm]]'), + 3546 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015M-U | http://www.supermicro.com/products/system/1U/5015/SYS-5015M-U.cfm]]'), + 3547 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015B-MT | http://www.supermicro.com/products/system/1U/5015/SYS-5015B-MT.cfm]]'), + 3548 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7048A-T | http://www.supermicro.com/products/system/4U/7048/SYS-7048A-T.cfm]]'), + 3549 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-HC1R-SIOM | http://www.supermicro.com/products/system/2U/6028/SYS-6028TP-HC1R-SIOM.cfm]]'), + 3550 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015B-MR | http://www.supermicro.com/products/system/1U/5015/SYS-5015B-MR.cfm]]'), + 3551 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027B-URF | http://www.supermicro.com/products/system/1u/1027/SYS-1027B-URF.cfm]]'), + 3552 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628G3-FT+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628G3-FT_.cfm]]'), + 3553 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%8017R-TF+ | http://www.supermicro.com/products/system/1u/8017/SYS-8017R-TF_.cfm]]'), + 3554 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028GQ-TXRT | http://www.supermicro.com/products/system/1U/1028/SYS-1028GQ-TXRT.cfm]]'), + 3555 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-HTRF+ | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-HTRF_.cfm]]'), + 3556 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015B-MF | http://www.supermicro.com/products/system/1U/5015/SYS-5015B-MF.cfm]]'), + 3557 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TR2 | http://www.supermicro.com/products/system/1u/1027/SYS-1027GR-TR2.cfm]]'), + 3558 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5028A-TN4 | http://www.supermicro.com/products/system/midtower/5028/sys-5028a-tn4.cfm]]'), + 3559 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5016TI-TF | http://www.supermicro.com/products/system/1U/5016/SYS-5016TI-TF.cfm]]'), + 3560 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6038R-E1CR16H | http://www.supermicro.com/products/system/3U/6038/SSG-6038R-E1CR16H.cfm]]'), + 3561 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1028R-WTRT | http://www.supermicro.com/products/system/1u/1028/SYS-1028R-WTRT.cfm]]'), + 3562 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-H71RF+ | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-H71RF_.cfm]]'), + 3563 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2027TR-D70FRF | http://www.supermicro.com/products/system/2U/2027/SYS-2027TR-D70FRF.cfm]]'), + 3564 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1026TT-TF | http://www.supermicro.com/products/system/1U/1026/SYS-1026TT-TF.cfm]]'), + 3565 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-RC0BPT+ | http://www.supermicro.com/products/system/4u/f628/SYS-F628R3-RC0BPT_.cfm]]'), + 3566 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6026TT-D6RF | http://www.supermicro.com/products/system/2U/6026/SYS-6026TT-D6RF.cfm]]'), + 3567 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-FT | http://www.supermicro.com/products/system/4u/f628/SYS-F628R3-FT.cfm]]'), + 3568 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627G2-FT+ | http://www.supermicro.com/products/system/4u/f627/SYS-F627G2-FT_.cfm]]'), + 3569 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 3U%GPASS%6035B-8R+ | http://www.supermicro.com/products/system/3U/6035/SYS-6035B-8R_.cfm]]'), + 3570 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%4028GR-TXR | http://www.supermicro.com/products/system/4U/4028/SYS-4028GR-TXR.cfm]]'), + 3571 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R2-FTPT+ | http://www.supermicro.com/products/system/4U/F628/SYS-F628R2-FTPT_.cfm]]'), + 3572 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627G2-F73PT+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627G2-F73PT_.cfm]]'), + 3573 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027R-WC1R | http://www.supermicro.com/products/system/1u/1027/SYS-1027R-WC1R.cfm]]'), + 3574 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028U-TR4+ | http://www.supermicro.com/products/system/2u/2028/SYS-2028U-TR4_.cfm]]'), + 3575 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%7044H-T | http://www.supermicro.com/products/system/4U/7044/SYS-7044H-T.cfm]]'), + 3576 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6018R-MDR | http://www.supermicro.com/products/system/1u/6018/SYS-6018R-MDR.cfm]]'), + 3577 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027AX-72RF-HFT1 | http://www.supermicro.com/products/system/2u/6027/SYS-6027AX-72RF-HFT1.cfm]]'), + 3578 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027AX-72RF-HFT3 | http://www.supermicro.com/products/system/2u/6027/sys-6027ax-72rf-hft3.cfm]]'), + 3579 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027AX-72RF-HFT2 | http://www.supermicro.com/products/system/2u/6027/SYS-6027AX-72RF-HFT2.cfm]]'), + 3580 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F627R3-F72PT+ | http://www.supermicro.com/products/system/4U/F627/SYS-F627R3-F72PT_.cfm]]'), + 3581 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2028R-NR48 | http://www.supermicro.com/products/system/2U/2028/SSG-2028R-NR48N.cfm]]'), + 3582 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5016I-T | http://www.supermicro.com/products/system/1u/5016/sys-5016i-t.cfm]]'), + 3583 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F617H6-FTPT+ | http://www.supermicro.com/products/system/4U/F617/SYS-F617H6-FTPT_.cfm]]'), + 3584 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027AX-TRF | http://www.supermicro.com/products/system/2u/6027/SYS-6027AX-TRF.cfm]]'), + 3585 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1018D-FRN8T | http://www.supermicro.com/products/system/1u/1018/SYS-1018D-FRN8T.cfm]]'), + 3586 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%8028B-C0R3FT | http://www.supermicro.com/products/system/2u/8028/SYS-8028B-C0R3FT.cfm]]'), + 3587 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1018R-WR | http://www.supermicro.com/products/system/1U/1018/SYS-1018R-WR.cfm]]'), + 3588 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1019S-WR | http://www.supermicro.com/products/system/1U/1019/SYS-1019S-WR.cfm]]'), + 3589 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%2016TI-HTRF | http://www.supermicro.com/products/system/2u/2016/sys-2016ti-htrf.cfm]]'), + 3590 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 4U%GPASS%6047R-E1R36 | http://www.supermicro.com/products/system/4u/6047/SSG-6047R-E1R36N.cfm]]'), + 3591 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%5025M-4+ | http://www.supermicro.com/products/system/2U/5025/SYS-5025M-4_.cfm]]'), + 3592 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6028TR-DTR | http://www.supermicro.com/products/system/2u/6028/SYS-6028TR-DTR.cfm]]'), + 3593 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%1027GR-TRF | http://www.supermicro.com/products/system/1u/1027/SYS-1027GR-TRF.cfm]]'), + 3594 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027PR-HC1R | http://www.supermicro.com/products/system/2U/6027/SYS-6027PR-HC1R.cfm]]'), + 3595 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%F628R3-RC0B+ | http://www.supermicro.com/products/system/4u/f628/SYS-F628R3-RC0B_.cfm]]'), + 3596 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5014C-MF | http://www.supermicro.com/products/system/1U/5014/SYS-5014C-MF.cfm]]'), + 3597 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5015B-M3 | http://www.supermicro.com/products/system/1U/5015/SYS-5015B-M3.cfm]]'), + 3598 => array ('chapter_id' => 18, 'dict_value' => '[[SuperMicro%GPASS%K1048-RT | http://www.supermicro.com/products/system/1u/k1048/ssg-k1048-rt.cfm]]'), + 3599 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%6017R-TDLF | http://www.supermicro.com/products/system/1u/6017/SYS-6017R-TDLF.cfm]]'), + 3600 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027PR-HC0R | http://www.supermicro.com/products/system/2U/6027/SYS-6027PR-HC0R.cfm]]'), + 3601 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5014C-MR | http://www.supermicro.com/products/system/1U/5014/SYS-5014C-MR.cfm]]'), + 3602 => array ('chapter_id' => 31, 'dict_value' => '[[SuperMicro%GPASS%6028TP-HC0R | http://www.supermicro.com/products/system/2u/6028/SYS-6028TP-HC0R.cfm]]'), + 3603 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 2U%GPASS%6027R-CDNRT+ | http://www.supermicro.com/products/system/2U/6027/SYS-6027R-CDNRT_.cfm]]'), + 3604 => array ('chapter_id' => 11, 'dict_value' => '[[SuperMicro 1U%GPASS%5014C-MT | http://www.supermicro.com/products/system/1U/5014/SYS-5014C-MT.cfm]]'), + 3605 => array ('chapter_id' => 26, 'dict_value' => '[[Cisco%GPASS%MDS 9148 | http://www.cisco.com/c/en/us/products/storage-networking/mds-9148-multilayer-fabric-switch/index.html]]'), + 3606 => array ('chapter_id' => 26, 'dict_value' => '[[Cisco%GPASS%MDS 9148S | http://www.cisco.com/c/en/us/products/storage-networking/mds-9148s-16g-multilayer-fabric-switch/index.html]]'), + 3607 => array ('chapter_id' => 26, 'dict_value' => '[[Cisco%GPASS%MDS 9396S | http://www.cisco.com/c/en/us/products/storage-networking/mds-9396s-16g-multilayer-fabric-switch/index.html]]'), + 3608 => array ('chapter_id' => 26, 'dict_value' => '[[Cisco%GPASS%MDS 9706 | http://www.cisco.com/c/en/us/products/storage-networking/mds-9706-multilayer-director/index.html]]'), + 3609 => array ('chapter_id' => 26, 'dict_value' => '[[Cisco%GPASS%MDS 9710 | http://www.cisco.com/c/en/us/products/storage-networking/mds-9710-multilayer-director/index.html]]'), + 3610 => array ('chapter_id' => 18, 'dict_value' => 'EMC Unity 300'), + 3611 => array ('chapter_id' => 18, 'dict_value' => 'EMC Unity 400'), + 3612 => array ('chapter_id' => 18, 'dict_value' => 'EMC Unity 500'), + 3613 => array ('chapter_id' => 18, 'dict_value' => 'EMC Unity 600'), + 3614 => array ('chapter_id' => 18, 'dict_value' => 'EMC Unity 350F'), + 3615 => array ('chapter_id' => 18, 'dict_value' => 'EMC Unity 450F'), + 3616 => array ('chapter_id' => 18, 'dict_value' => 'EMC Unity 550F'), + 3617 => array ('chapter_id' => 18, 'dict_value' => 'EMC Unity 650F'), + 3618 => array ('chapter_id' => 18, 'dict_value' => 'EMC VMAX 10K'), + 3619 => array ('chapter_id' => 18, 'dict_value' => 'EMC VMAX 20K'), + 3620 => array ('chapter_id' => 18, 'dict_value' => 'EMC VMAX 40K'), + 3621 => array ('chapter_id' => 18, 'dict_value' => 'EMC VMAX 100K'), + 3622 => array ('chapter_id' => 18, 'dict_value' => 'EMC VMAX 200K'), + 3623 => array ('chapter_id' => 18, 'dict_value' => 'EMC VMAX 250F'), + 3624 => array ('chapter_id' => 18, 'dict_value' => 'EMC VMAX 400K'), + 3625 => array ('chapter_id' => 18, 'dict_value' => 'EMC VMAX 450F'), + 3626 => array ('chapter_id' => 18, 'dict_value' => 'EMC VMAX 850F'), + 3627 => array ('chapter_id' => 18, 'dict_value' => 'EMC VMAX 950F'), + 3628 => array ('chapter_id' => 18, 'dict_value' => 'EMC XtremIO'), + 3629 => array ('chapter_id' => 18, 'dict_value' => 'EMC XtremIO X2'), + 3630 => array ('chapter_id' => 18, 'dict_value' => 'EMC VNX 5300'), + 3631 => array ('chapter_id' => 18, 'dict_value' => 'EMC VNX 5500'), + 3632 => array ('chapter_id' => 18, 'dict_value' => 'EMC VNX 5700'), + 3633 => array ('chapter_id' => 18, 'dict_value' => 'EMC VNX 7500'), + 3634 => array ('chapter_id' => 18, 'dict_value' => 'EMC VNX 5200'), + 3635 => array ('chapter_id' => 18, 'dict_value' => 'EMC VNX 5400'), + 3636 => array ('chapter_id' => 18, 'dict_value' => 'EMC VNX 5600'), + 3637 => array ('chapter_id' => 18, 'dict_value' => 'EMC VNX 5800'), + 3638 => array ('chapter_id' => 18, 'dict_value' => 'EMC VNX 7600'), + 3639 => array ('chapter_id' => 18, 'dict_value' => 'EMC VNX 8000'), + 3640 => array ('chapter_id' => 18, 'dict_value' => 'EMC Isilon NL410'), + 3641 => array ('chapter_id' => 18, 'dict_value' => 'EMC Isilon S210'), + 3642 => array ('chapter_id' => 18, 'dict_value' => 'EMC Isilon X410'), + 3643 => array ('chapter_id' => 18, 'dict_value' => 'EMC RecoverPoint G5'), + 3644 => array ('chapter_id' => 18, 'dict_value' => 'EMC RecoverPoint G6'), + 3645 => array ('chapter_id' => 18, 'dict_value' => 'EMC VPLEX'), + 3646 => array ('chapter_id' => 18, 'dict_value' => 'EMC VPLEX V6'), + 3647 => array ('chapter_id' => 18, 'dict_value' => 'EMC VNXe 3150'), + 3648 => array ('chapter_id' => 18, 'dict_value' => 'EMC VNXe 3300'), + 3649 => array ('chapter_id' => 12, 'dict_value' => '[[Cisco%GPASS%Nexus 5596UP | http://www.cisco.com/c/en/us/products/switches/nexus-5596up-switch/index.html]]'), + 3650 => array ('chapter_id' => 12, 'dict_value' => 'Cisco%GPASS%Nexus 93180YC-EX'), + 3651 => array ('chapter_id' => 12, 'dict_value' => 'MikroTik%GPASS%CSS326-24G-2S+RM'), + 3652 => array ('chapter_id' => 12, 'dict_value' => 'MikroTik%GPASS%CRS326-24G-2S+RM'), + 3653 => array ('chapter_id' => 12, 'dict_value' => 'MikroTik%GPASS%CRS317-1G-16S+RM'), + 3654 => array ('chapter_id' => 13, 'dict_value' => 'RH Fedora%GSKIP%Fedora 26'), + 3655 => array ('chapter_id' => 13, 'dict_value' => 'Ubuntu%GSKIP%Ubuntu 17.04'), + 3656 => array ('chapter_id' => 13, 'dict_value' => 'NetBSD%GSKIP%NetBSD 7.1'), + 3657 => array ('chapter_id' => 12, 'dict_value' => 'Arista%GPASS%7020TR-48'), + 3658 => array ('chapter_id' => 12, 'dict_value' => 'Arista%GPASS%7020TRA-48'), + 3659 => array ('chapter_id' => 12, 'dict_value' => 'Arista%GPASS%7160-32CQ'), + 3660 => array ('chapter_id' => 12, 'dict_value' => 'Arista%GPASS%7160-48YC6'), + 3661 => array ('chapter_id' => 12, 'dict_value' => 'Arista%GPASS%7160-48TC6'), + 3662 => array ('chapter_id' => 12, 'dict_value' => 'Arista%GPASS%7516R'), # Any new "default" dictionary records must go above this line (i.e., with @@ -2602,5 +3557,3 @@ function platform_is_ok () # and dictionary updates working properly. 49999 => array ('chapter_id' => 13, 'dict_value' => '[[RH Fedora%GSKIP%Fedora 15 | http://docs.fedoraproject.org/release-notes/f15/en-US/html/]]'), ); - -?> diff --git a/wwwroot/inc/exceptions.php b/wwwroot/inc/exceptions.php index a26a70c74..29d876f1d 100644 --- a/wwwroot/inc/exceptions.php +++ b/wwwroot/inc/exceptions.php @@ -181,7 +181,7 @@ function __construct ($message) class InvalidArgException extends RackTablesError { // derive an instance of InvalidRequestArgException - function newIRAE ($argname = NULL) + public function newIRAE ($argname = NULL) { if ($argname === NULL) return new InvalidRequestArgException ($this->name, $this->value, $this->reason); @@ -198,6 +198,19 @@ function __construct ($name, $value, $reason = NULL) $this->value = $value; $this->reason = $reason; } + // Instead of the two methods below it would be better to have a single method + // like setArgumentName() in order not to expose unnecessary details to the + // users of the class. However, this is not possible because the Exception + // class does not allow to redefine the message string, which the constructor + // assigns based on the argument name. + public function getValue() + { + return $this->value; + } + public function getReason() + { + return $this->reason; + } } // this simplifies construction and helps in catching "soft" @@ -210,8 +223,8 @@ public function dispatch() } } -// this wraps certain known PDO errors and is caught in process.php -// as a "soft" error +// This wraps certain known PDO errors and is caught in index.php?module=redirect +// and elsewhere to be handled as a "soft" error. class RTDatabaseError extends RackTablesError { public function dispatch() @@ -220,6 +233,19 @@ public function dispatch() } } +// This specifically means the error condition that happens when the database user +// does not have the privileges to execute the query. The code that catches this +// exception class has to interpret what it actually means based on the query it +// was trying to execute. If not specifically expected, the exception will end up +// in the same catch blocks as RTDatabaseError. +class RTDBTableAccessDenied extends RTDatabaseError +{ + public function dispatch() + { + RackTablesError::genHTMLPage ('Database table access denied', '

Database table access denied


' . $this->message); + } +}; + // gateway failure is a common case of a "soft" error, some functions do catch this class RTGatewayError extends RackTablesError { @@ -355,11 +381,11 @@ function printPDOException ($e) header ('Content-Type: text/html; charset=UTF-8'); echo '' . "\n"; echo '' . "\n"; - echo " PDO Exception \n"; + echo "PDOException\n"; echo "\n"; echo "\n"; - echo ''; - echo '

Pdo exception: ' . get_class ($e) . '

' . $e->getMessage() . ' (' . $e->getCode() . ')'; + echo ''; + echo '

PDOException

' . $e->getMessage() . ' (' . $e->getCode() . ')'; echo '

at file ' . $e->getFile() . ', line ' . $e->getLine() . '

';
 	echo stringTrace ($e->getTrace());
 	echo '
'; @@ -410,5 +436,3 @@ function printException ($e) else printGenericException ($e); } - -?> diff --git a/wwwroot/inc/functions.php b/wwwroot/inc/functions.php index 39d9f59e8..1cab9e047 100644 --- a/wwwroot/inc/functions.php +++ b/wwwroot/inc/functions.php @@ -35,15 +35,18 @@ $message_buffering = FALSE; define ('CHAP_OBJTYPE', 1); -// The latter matches both SunOS and Linux-styled formats. -define ('RE_L2_IFCFG', '/^[0-9a-f]{1,2}(:[0-9a-f]{1,2}){5}$/i'); -define ('RE_L2_CISCO', '/^[0-9a-f]{4}(\.[0-9a-f]{4}){2}$/i'); -define ('RE_L2_HUAWEI', '/^[0-9a-f]{4}(-[0-9a-f]{4}){2}$/i'); -define ('RE_L2_SOLID', '/^[0-9a-f]{12}$/i'); -define ('RE_L2_IPCFG', '/^[0-9a-f]{2}(-[0-9a-f]{2}){5}$/i'); -define ('RE_L2_WWN_COLON', '/^[0-9a-f]{1,2}(:[0-9a-f]{1,2}){7}$/i'); -define ('RE_L2_WWN_HYPHEN', '/^[0-9a-f]{2}(-[0-9a-f]{2}){7}$/i'); -define ('RE_L2_WWN_SOLID', '/^[0-9a-f]{16}$/i'); +define ('RE_L2_IFCFG', '/^[0-9A-F]{2}(:[0-9A-F]{2}){5}$/'); // most ifconfigs +define ('RE_L2_IFCFG_SUNOS', '/^[0-9A-F]{1,2}(:[0-9A-F]{1,2}){5}$/'); // SunOS ifconfig +define ('RE_L2_CISCO', '/^[0-9A-F]{4}(\.[0-9A-F]{4}){2}$/'); +define ('RE_L2_HUAWEI', '/^[0-9A-F]{4}(-[0-9A-F]{4}){2}$/'); +define ('RE_L2_SOLID', '/^[0-9A-F]{12}$/i'); +define ('RE_L2_IPCFG', '/^[0-9A-F]{2}(-[0-9A-F]{2}){5}$/'); +define ('RE_L2_WWN_COLON', '/^[0-9A-F]{2}(:[0-9A-F]{2}){7}$/'); +define ('RE_L2_WWN_HYPHEN', '/^[0-9A-F]{2}(-[0-9A-F]{2}){7}$/'); +define ('RE_L2_WWN_SOLID', '/^[0-9A-F]{16}$/'); +define ('RE_L2_IPOIB_COLON', '/^[0-9A-F]{2}(:[0-9A-F]{2}){19}$/'); +define ('RE_L2_IPOIB_HYPHEN', '/^[0-9A-F]{2}(-[0-9A-F]{2}){19}$/'); +define ('RE_L2_IPOIB_SOLID', '/^[0-9A-F]{40}$/'); define ('RE_IP4_ADDR', '#^[0-9]{1,3}(\.[0-9]{1,3}){3}$#'); define ('RE_IP4_NET', '#^[0-9]{1,3}(\.[0-9]{1,3}){3}/[0-9]{1,2}$#'); define ('E_8021Q_NOERROR', 0); @@ -177,18 +180,31 @@ function assertUIntArg ($argname, $allow_zero = FALSE) { if (!isset ($_REQUEST[$argname])) throw new InvalidRequestArgException($argname, '', 'parameter is missing'); - if (!is_numeric ($_REQUEST[$argname])) - throw new InvalidRequestArgException($argname, $_REQUEST[$argname], 'parameter is not a number'); - if ($_REQUEST[$argname] < 0) - throw new InvalidRequestArgException($argname, $_REQUEST[$argname], 'parameter is less than zero'); - if (! $allow_zero && $_REQUEST[$argname] == 0) - throw new InvalidRequestArgException($argname, $_REQUEST[$argname], 'parameter is zero'); + if (! isUnsignedInteger ($_REQUEST[$argname], $allow_zero)) + throw new InvalidRequestArgException ($argname, $_REQUEST[$argname], 'parameter is not an unsigned integer' . ($allow_zero ? ' (or 0)' : '')); return $_REQUEST[$argname]; } +// Tell whether the argument is a decimal integer (or, alternatively, a numeric +// string with a decimal integer). function isInteger ($arg, $allow_zero = FALSE) { - return is_numeric ($arg) && ($allow_zero || $arg != 0); + // In PHP 7.0.0 and later is_numeric() rejects a string that contains + // a hexadecimal number, help PHP 5 achieve the same result here. + return is_numeric ($arg) && + (! is_string ($arg) || FALSE === mb_strstr ($arg, '0x')) && + is_int (0 + $arg) && + ($allow_zero || $arg != 0); +} + +function isUnsignedInteger ($arg, $allow_zero = FALSE) +{ + return isInteger ($arg, $allow_zero) && $arg >= 0; +} + +function isHTMLColor ($color) +{ + return 1 == preg_match ('/^[0-9A-F]{6}$/i', $color); } # Make sure the arg is a parsable date, return its UNIX timestamp equivalent @@ -369,6 +385,21 @@ function genericAssertion ($argname, $argtype) throw $iae->newIRAE ($argname); } return $argvalue; + case 'dateonly0': + if ('' == assertStringArg ($argname, TRUE)) + return ''; + // fall through + case 'dateonly': + $argvalue = assertStringArg ($argname); + try + { + SQLDateFromDateStr ($argvalue); // discard the result on success + } + catch (InvalidArgException $iae) + { + throw $iae->newIRAE ($argname); + } + return $argvalue; case 'enum/attr_type': assertStringArg ($argname); if (!in_array ($sic[$argname], array ('uint', 'float', 'string', 'dict','date'))) @@ -443,6 +474,15 @@ function genericAssertion ($argname, $argtype) if (! $expr = compileExpression ($sic[$argname])) throw new InvalidRequestArgException ($argname, $sic[$argname], 'not a valid RackCode expression'); return $expr; + case 'htmlcolor0': + if ('' == assertStringArg ($argname, TRUE)) + return ''; + // fall through + case 'htmlcolor': + $argvalue = assertStringArg ($argname); + if (! isHTMLColor ($argvalue)) + throw new InvalidRequestArgException ($argname, $argvalue, 'not an HTML color'); + return $argvalue; default: throw new InvalidArgException ('argtype', $argtype); // comes not from user's input } @@ -598,26 +638,20 @@ function markAllSpans (&$rackData) // descending) and mark the best (if any). function markBestSpan (&$rackData, $i) { - global $template, $templateWidth; - for ($j = 0; $j < 6; $j++) + global $templateWidth; + $height = array(); + $square = array(); + foreach ($templateWidth as $j => $width) { $height[$j] = rectHeight ($rackData, $i, $j); - $square[$j] = $height[$j] * $templateWidth[$j]; + $square[$j] = $height[$j] * $width; } // find the widest rectangle of those with maximal height - $maxsquare = max ($square); - if (!$maxsquare) + if (0 == $maxsquare = max ($square)) return FALSE; - $best_template_index = 0; - for ($j = 0; $j < 6; $j++) - if ($square[$j] == $maxsquare) - { - $best_template_index = $j; - $bestheight = $height[$j]; - break; - } + $best_template_index = array_search ($maxsquare, $square); // distribute span marks - markSpan ($rackData, $i, $bestheight, $best_template_index); + markSpan ($rackData, $i, $height[$best_template_index], $best_template_index); return TRUE; } @@ -642,10 +676,10 @@ function applyObjectMountMask (&$rackData, $object_id) // check permissions for rack modification function rackModificationPermitted ($rackData, $op, $with_context=TRUE) { - $op_annex = array (array ('tag' => '$op_'.$op), array ('tag' => '$any_op')); - $rack_op_annex = array_merge ($rackData['etags'], $rackData['itags'], $rackData['atags'], $op_annex); - $context = !$with_context || permitted (NULL, NULL, NULL, $op_annex); - return $context && permitted (NULL, NULL, NULL, $rack_op_annex); + if ($with_context && ! permitted (NULL, NULL, $op)) + return FALSE; + $rack_op_annex = array_merge ($rackData['etags'], $rackData['itags'], $rackData['atags']); + return permitted (NULL, NULL, $op, $rack_op_annex); } // Design change means transition between 'F' and 'A' and back. @@ -927,54 +961,98 @@ function ip6_mask ($prefix_len) throw new InvalidArgException ('prefix_len', $prefix_len); } -// Return a uniformly (010203040506 or 0102030405060708) formatted address, if it is present -// in the provided string, an empty string for an empty string or raise an exception. +// Return a uniformly (010203040506 or 0102030405060708 or likewise) formatted +// L2 address for a string in one of the recognized formats, an empty string for +// an empty string or raise an exception on invalid input. function l2addressForDatabase ($string) { $string = strtoupper (trim ($string)); $ret = ''; switch (TRUE) { - case ($string == '' || preg_match (RE_L2_SOLID, $string) || preg_match (RE_L2_WWN_SOLID, $string)): + case $string == '': + case preg_match (RE_L2_SOLID, $string): + case preg_match (RE_L2_WWN_SOLID, $string): + case preg_match (RE_L2_IPOIB_SOLID, $string): $ret = $string; break; - case (preg_match (RE_L2_IFCFG, $string) || preg_match (RE_L2_WWN_COLON, $string)): - // reformat output of SunOS ifconfig - $ret = ''; + case preg_match (RE_L2_IFCFG, $string): + case preg_match (RE_L2_WWN_COLON, $string): + case preg_match (RE_L2_IPOIB_COLON, $string): + $ret = str_replace (':', '', $string); + break; + // SunOS notation regexp will also match other ifconfigs notations hence should + // be matched and conditioned after the others, not before. + case preg_match (RE_L2_IFCFG_SUNOS, $string): foreach (explode (':', $string) as $byte) $ret .= (strlen ($byte) == 1 ? '0' : '') . $byte; - $ret = $ret; break; - case (preg_match (RE_L2_CISCO, $string)): + case preg_match (RE_L2_CISCO, $string): $ret = str_replace ('.', '', $string); break; - case (preg_match (RE_L2_HUAWEI, $string)): + case preg_match (RE_L2_HUAWEI, $string): $ret = str_replace ('-', '', $string); break; - case (preg_match (RE_L2_IPCFG, $string) || preg_match (RE_L2_WWN_HYPHEN, $string)): + case preg_match (RE_L2_IPCFG, $string): + case preg_match (RE_L2_WWN_HYPHEN, $string): + case preg_match (RE_L2_IPOIB_HYPHEN, $string): $ret = str_replace ('-', '', $string); break; default: - throw new InvalidArgException ('string', $string, 'malformed MAC/WWN address'); + throw new InvalidArgException ('string', $string, 'malformed MAC/WWN/IPoIB address'); } - // some switches provide this fake address through SNMP. Store it as NULL to allow multiple copies + // Some switches return this invalid address through SNMP. Disregard the malformed data + // and return an empty string, which will translate to NULL when (if) the address goes + // into the database. This suppresses unnecessary violations of the L2 address constraint. if ($ret === '000000000000') $ret = ''; return $ret; } +// The input to this function is valid iff it is an output of l2addressForDatabase() or a NULL. function l2addressFromDatabase ($string) { - switch (strlen ($string)) + // $string normally comes from the database in uppercase, test it with + // the regexps, which are now uppercase. + switch (TRUE) { - case 12: // Ethernet - case 16: // FireWire/Fibre Channel + case $string === NULL: + case $string === '': + return ''; + case preg_match (RE_L2_SOLID, $string): + case preg_match (RE_L2_WWN_SOLID, $string): + case preg_match (RE_L2_IPOIB_SOLID, $string): return implode (':', str_split ($string, 2)); default: - return $string; + throw new InvalidArgException ('string', $string, 'invalid format'); } } +function HTMLColorForDatabase ($string) +{ + $ret = 0; + // The HTTP request coming through the opspec declaration will indicate an undefined + // color value with an empty string, PHP code in addition to that is likely to use + // NULL, which comes from the database. + if ($string === NULL || $string === '') + return NULL; + if (! isHTMLColor ($string) || 1 != sscanf (mb_strtoupper ($string), '%06X', $ret)) + throw new InvalidArgException ('string', $string, 'not an HTML color'); + return $ret; +} + +// No code currently depends on this function, it is here for completeness. +function HTMLColorFromDatabase ($u) +{ + if ($u === NULL) + return NULL; + if (! isUnsignedInteger ($u, TRUE)) + throw new InvalidArgException ('u', $u, 'not an unsigned integer'); + if ($u > 0xFFFFFF) + throw new InvalidArgException ('u', $u, 'value out of range'); + return sprintf ('%06X', $u); +} + // DEPRECATED, remove in 0.21.0 function getPrevIDforRack ($row_id, $rack_id) { @@ -1044,21 +1122,18 @@ function sortTokenize ($a, $b) $ar = explode(' ', $a); $br = explode(' ', $b); - for ($i=0; $i $taginfo['tag'], 'parent_id' => $taginfo['parent_id'], 'refcnt' => $taginfo['refcnt'], + 'color' => $taginfo['color'], 'kids' => $subsearch ); else @@ -3242,7 +3302,7 @@ function getAllVLANOptions ($except = array()) return $ret; } -// Let's have this debug helper here to enable debugging of process.php w/o interface.php. +// This debugging helper does not depend on interface.php. function dump ($var) { echo '
';
@@ -4851,10 +4911,10 @@ function sortPortList ($plist, $name_in_value = FALSE)
 			'numidx' => count ($numbers),
 			'index' => $numbers,
 			'idx_parent' => $parent,
-			'iif_id' => isset($plist[$pkey]['iif_id']) ? $plist[$pkey]['iif_id'] : 0,
-			'label' => isset($plist[$pkey]['label']) ? $plist[$pkey]['label'] : '',
-			'l2address' => isset($plist[$pkey]['l2address']) ? $plist[$pkey]['l2address'] : '',
-			'id' => isset($plist[$pkey]['id']) ? $plist[$pkey]['id'] : 0,
+			'iif_id' => array_fetch ($pvalue, 'iif_id', 0),
+			'label' => array_fetch ($pvalue, 'label', ''),
+			'l2address' => array_fetch ($pvalue, 'l2address', ''),
+			'id' => array_fetch ($pvalue, 'id', 0),
 			'name' => $pn,
 		);
 	}
@@ -4865,12 +4925,9 @@ function sortPortList ($plist, $name_in_value = FALSE)
 }
 
 // This function works like standard php usort function and uses sortPortList.
-function usort_portlist(&$array)
+function usort_portlist (&$portnames)
 {
-	$temp_array = array();
-	foreach($array as $portname)
-		$temp_array[$portname] = 1;
-	$array = array_keys (sortPortList ($temp_array, FALSE));
+	$portnames = array_keys (sortPortList (array_fill_keys ($portnames, array())));
 }
 
 // return a "?, ?, ?, ... ?, ?" string consisting of N question marks
@@ -5350,12 +5407,12 @@ function loadConfigDefaults()
 	$ret = loadConfigCache();
 	if (!count ($ret))
 		throw new RackTablesError ('Failed to load configuration from the database.', RackTablesError::INTERNAL);
-	foreach ($ret as $varname => &$row)
+	foreach (array_keys ($ret) as $varname)
 	{
-		$row['is_altered'] = 'no';
-		if ($row['vartype'] == 'uint')
-			$row['varvalue'] = 0 + $row['varvalue'];
-		$row['defaultvalue'] = $row['varvalue'];
+		$ret[$varname]['is_altered'] = 'no';
+		if ($ret[$varname]['vartype'] == 'uint')
+			$ret[$varname]['varvalue'] = intval ($ret[$varname]['varvalue']);
+		$ret[$varname]['defaultvalue'] = $ret[$varname]['varvalue'];
 	}
 	return $ret;
 }
@@ -5534,7 +5591,7 @@ function getOutputOf ($func_name)
 	}
 	catch (Exception $e)
 	{
-		ob_clean();
+		ob_end_clean();
 		throw $e;
 	}
 }
@@ -5834,6 +5891,8 @@ function array_sub ($a, $b)
 // returns the requested element value or the default value if not found
 function array_fetch ($array, $key, $default_value)
 {
+	if (! is_array ($array))
+		throw new InvalidArgException ('array', $array, 'is not an array');
 	return array_key_exists ($key, $array) ? $array[$key] : $default_value;
 }
 
@@ -6245,6 +6304,44 @@ function timestampFromDatetimestr ($s)
 	return $ret;
 }
 
+function SQLDateFromDateStr ($s, $format = NULL)
+{
+	if ($format === NULL)
+		$format = getConfigVar ('DATEONLY_FORMAT');
+	if (FALSE === $tmp = strptime ($s, $format))
+		throw new InvalidArgException ('s', $s, "not a date in format '${format}'");
+	$y = $tmp['tm_year'] + 1900;
+	$m = $tmp['tm_mon'] + 1;
+	$d = $tmp['tm_mday'];
+	if ($y < 1000 || $y > 9999)
+		throw new InvalidArgException ('s', $s, 'year out of range');
+	if (! checkdate ($m, $d, $y))
+		throw new InvalidArgException ('s', $s, 'not a Gregorian calendar date');
+	return sprintf ('%4u-%02u-%02u', $y, $m, $d);
+}
+
+// This function returns either -1 or 0 or 1, it can be used with usort().
+function cmpSQLDates ($date1, $date2)
+{
+	if
+	(
+		! preg_match ('/^(\d\d\d\d)-(\d\d)-(\d\d)$/', $date1, $m1) ||
+		! checkdate ($m1[2], $m1[3], $m1[1])
+	)
+		throw new InvalidArgException ('date1', $date1, 'not a valid SQL date');
+	if
+	(
+		! preg_match ('/^(\d\d\d\d)-(\d\d)-(\d\d)$/', $date2, $m2) ||
+		! checkdate ($m2[2], $m2[3], $m2[1])
+	)
+		throw new InvalidArgException ('date2', $date2, 'not a valid SQL date');
+	if (0 != $ret = numCompare ($m1[1], $m2[1]))
+		return $ret;
+	if (0 != $ret = numCompare ($m1[2], $m2[2]))
+		return $ret;
+	return numCompare ($m1[3], $m2[3]);
+}
+
 # Produce a human-readable clue, such as 'YYYY-MM-DD' for '%Y-%m-%d'.
 function datetimeFormatHint ($format)
 {
@@ -6292,6 +6389,11 @@ function nullIfZero ($x)
 	return $x == 0 ? NULL : $x;
 }
 
+function emptyStrIfZero ($x)
+{
+	return ($x === 0 || $x === '0') ? '' : $x;
+}
+
 function printLocationChildrenSelectOptions ($location, $parent_id, $location_id = NULL, $level = 0)
 {
 	$self = __FUNCTION__;
@@ -6583,7 +6685,7 @@ function textareaCooked ($text)
 	return $ret;
 }
 
-// Used to fill $desiredPorts argument for syncObjectPorts.
+// Used to fill $desiredPorts argument for replaceObjectPorts.
 // Call this function just like commitAddPort except the first argument
 function addDesiredPort (&$desiredPorts, $port_name, $port_type_id, $port_label, $port_l2address)
 {
@@ -6601,14 +6703,14 @@ function addDesiredPort (&$desiredPorts, $port_name, $port_type_id, $port_label,
 // $desiredPorts is a list of ports in getObjectPortsAndLinks format.
 // required port fields are name, iif_id, oif_id, label and l2address.
 // $desiredPorts can be filled by addDesiredPort function using commitAddPort format
-function syncObjectPorts ($object_id, $desiredPorts)
+function replaceObjectPorts ($object_id, $desiredPorts)
 {
 	global $dbxlink;
 	$to_delete = $to_update = $real_ports = array();
 
 	// The check that does not require access to the database goes first.
 	foreach (array_keys ($desiredPorts) as $k)
-		$desiredPorts[$k]['l2address'] = l2AddressForDatabase ($desiredPorts[$k]['l2address']);
+		$desiredPorts[$k]['l2address'] = l2addressForDatabase ($desiredPorts[$k]['l2address']);
 
 	// Further processing must be done with exclusive access to the table. Even when the
 	// only changes requested are to add ports w/o MAC addresses or to update existing
@@ -6671,4 +6773,13 @@ function syncObjectPorts ($object_id, $desiredPorts)
 	showSuccess (sprintf ('Added ports: %u, changed: %u, deleted: %u', count ($to_add), count ($to_update), count ($to_delete)));
 }
 
-?>
+function formatPluginState ($state)
+{
+	$map = array
+	(
+		'disabled' => 'Disabled',
+		'enabled' => 'Enabled',
+		'not_installed' => 'Not installed',
+	);
+	return array_fetch ($map, $state, 'unknown');
+}
diff --git a/wwwroot/inc/init.php b/wwwroot/inc/init.php
index 8be1b1554..603bccaf4 100644
--- a/wwwroot/inc/init.php
+++ b/wwwroot/inc/init.php
@@ -144,7 +144,7 @@
 alterConfigWithUserPreferences();
 $op = '';
 
-// load additional plugins
+// load v1 plugins
 ob_start();
 if (FALSE !== $plugin_files = glob ("${racktables_plugins_dir}/*.php"))
 	foreach ($plugin_files as $plugin_file)
@@ -155,6 +155,12 @@
 	echo $tmp;
 unset ($tmp);
 
+// load v2 plugins that are enabled
+$plugins = getPlugins ('enabled');
+foreach (array_keys ($plugins) as $plugin)
+	if (function_exists ("plugin_${plugin}_init"))
+		call_user_func ("plugin_${plugin}_init");
+
 // These will be filled in by fixContext()
 $expl_tags = array();
 $impl_tags = array();
@@ -162,5 +168,3 @@
 $target_given_tags = array();
 
 callHook ('initFinished');
-
-?>
diff --git a/wwwroot/inc/install.php b/wwwroot/inc/install.php
index dc102b4e3..86d9ebb67 100644
--- a/wwwroot/inc/install.php
+++ b/wwwroot/inc/install.php
@@ -36,9 +36,11 @@ function renderInstallerHTML()
 }
 $title = "RackTables installation: step ${step} of " . count ($stepfunc);
 header ('Content-Type: text/html; charset=UTF-8');
-?>
+	// Heredoc, not nowdoc!
+	echo <<<"ENDOFTEXT"
+
 
-<?php echo $title; ?>
+${title}