IP addresses inherit tags from their parent networks (#375)
[racktables] / wwwroot / inc / install.php
1 <?php
2
3 # This file is a part of RackTables, a datacenter and server room management
4 # framework. See accompanying file "COPYING" for the full copyright and
5 # licensing information.
6
7 function renderInstallerHTML()
8 {
9 $stepfunc[1] = 'not_already_installed';
10 $stepfunc[2] = 'platform_is_ok';
11 $stepfunc[3] = 'init_config';
12 $stepfunc[4] = 'init_database_static';
13 $stepfunc[5] = 'init_database_dynamic';
14 $stepfunc[6] = 'congrats';
15
16 if (isset ($_REQUEST['step']))
17 $step = $_REQUEST['step'];
18 else
19 $step = 1;
20
21 if ($step > count ($stepfunc))
22 {
23 $root = (empty($_SERVER['HTTPS']) or $_SERVER['HTTPS'] == 'off') ? 'http://' : 'https://';
24 $root .= isset ($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME'].($_SERVER['SERVER_PORT']=='80'?'':$_SERVER['SERVER_PORT']));
25 // "Since PHP 4.3.0, you will often get a slash or a dot back from
26 // dirname() in situations where the older functionality would have given
27 // you the empty string."
28 // "On Windows, both slash (/) and backslash (\) are used as directory
29 // separator character."
30 $root .= strtr (dirname ($_SERVER['PHP_SELF']), '\\', '/');
31 if (substr ($root, -1) != '/')
32 $root .= '/';
33 header ("Location: ${root}");
34 exit;
35 }
36 $title = "RackTables installation: step ${step} of " . count ($stepfunc);
37 header ('Content-Type: text/html; charset=UTF-8');
38 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
39 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
40 <head><title><?php echo $title; ?></title>
41 <style type="text/css">
42 .tdleft {
43 text-align: left;
44 }
45
46 .trok {
47 background-color: #80FF80;
48 }
49
50 .trwarning {
51 background-color: #FFFF80;
52 }
53
54 .trerror {
55 background-color: #FF8080;
56 }
57 </style>
58 </head>
59 <body>
60 <center>
61 <?php
62 echo "<h1>${title}</h1><p>";
63
64 echo "</p><form method=post>\n";
65 $testres = $stepfunc[$step] ();
66 if ($testres)
67 {
68 $next_step = $step + 1;
69 echo "<br><input type=submit value='proceed'>";
70 }
71 else
72 {
73 $next_step = $step;
74 echo "<br><input type=submit value='retry'>";
75 }
76 echo "<input type=hidden name=step value='${next_step}'>\n";
77
78 ?>
79 </form>
80 </center>
81 </body>
82 </html>
83
84 <?php
85 }
86
87 // Check if the software is already installed.
88 function not_already_installed()
89 {
90 global $found_secret_file, $pdo_dsn;
91 if ($found_secret_file and isset ($pdo_dsn))
92 {
93 echo 'Your configuration file exists and seems to hold necessary data already.<br>';
94 return FALSE;
95 }
96 else
97 {
98 echo 'There seem to be no existing installation here, I am going to setup one now.<br>';
99 return TRUE;
100 }
101 }
102
103 // Check that we can write to configuration file.
104 // If so, ask for DB connection paramaters and test
105 // the connection. Neither save the parameters nor allow
106 // going further until we succeed with the given
107 // credentials.
108 function init_config ()
109 {
110 function print_form
111 (
112 $use_tcp = TRUE,
113 $tcp_host = 'localhost',
114 $tcp_port = '',
115 $unix_socket = '/var/lib/mysql/mysql.sock',
116 $database = 'racktables_db',
117 $username = 'racktables_user',
118 $password = ''
119 )
120 {
121 echo "<input type=hidden name=save_config value=1>\n";
122 echo '<h3>Server-side MySQL setup of the database:</h3><div align=left><pre class=trok>';
123 echo "mysql&gt;\nCREATE DATABASE racktables_db CHARACTER SET utf8 COLLATE utf8_general_ci;\n";
124 echo "GRANT ALL PRIVILEGES ON racktables_db.* TO racktables_user@localhost IDENTIFIED BY 'MY_SECRET_PASSWORD';\n</pre></div>";
125 echo '<table>';
126 echo '<tr><td><label for=conn_tcp>TCP connection</label></td>';
127 echo '<td><input type=radio name=conn value=conn_tcp id=conn_tcp' . ($use_tcp ? ' checked' : '') . '></td></tr>';
128 echo '<tr><td><label for=conn_unix>UNIX socket</label></td>';
129 echo '<td><input type=radio name=conn value=conn_unix id=conn_unix' . ($use_tcp ? '' : ' checked') . '></td></tr>';
130 echo "<tr><td><label for=mysql_host>TCP host:</label></td>";
131 echo "<td><input type=text name=mysql_host id=mysql_host value='${tcp_host}'></td></tr>\n";
132 echo "<tr><td><label for=mysql_port>TCP port (if not 3306):</label></td>";
133 echo "<td><input type=text name=mysql_port id=mysql_port value='${tcp_port}'></td></tr>\n";
134 echo "<tr><td><label for=mysql_socket>UNIX socket:</label></td>";
135 echo "<td><input type=text name=mysql_socket id=mysql_socket value='${unix_socket}'></td></tr>\n";
136 echo "<tr><td><label for=mysql_db>database:</label></td>";
137 echo "<td><input type=text name=mysql_db id=mysql_db value='${database}'></td></tr>\n";
138 echo "<tr><td><label for=mysql_username>username:</label></td>";
139 echo "<td><input type=text name=mysql_username id=mysql_username value='${username}'></td></tr>\n";
140 echo "<tr><td><label for=mysql_password>password:</label></td>";
141 echo "<td><input type=password name=mysql_password id=mysql_password value='${password}'></td></tr>\n";
142 echo '</table>';
143 }
144 global $path_to_secret_php;
145 if (!is_writable ($path_to_secret_php))
146 {
147 echo "The $path_to_secret_php file is not writable by web-server. Make sure it is.";
148 echo "The following commands should suffice:<pre>touch '$path_to_secret_php'; chmod 666 '$path_to_secret_php'</pre>";
149 echo 'Fedora Linux with SELinux may require this file to be owned by specific user (apache) and/or executing "setenforce 0" for the time of installation. ';
150 echo 'SELinux may be turned back on with "setenforce 1" command.<br>';
151 return FALSE;
152 }
153 if (! array_key_exists ('save_config', $_REQUEST))
154 {
155 print_form();
156 return FALSE;
157 }
158 if (empty ($_REQUEST['mysql_db']) or empty ($_REQUEST['mysql_username']))
159 {
160 print_form
161 (
162 $_REQUEST['conn'] == 'conn_tcp',
163 $_REQUEST['mysql_host'],
164 $_REQUEST['mysql_port'],
165 $_REQUEST['mysql_socket'],
166 $_REQUEST['mysql_db'],
167 $_REQUEST['mysql_username'],
168 $_REQUEST['mysql_password']
169 );
170 echo '<h2 class=trerror>Missing database/username parameter!</h2>';
171 return FALSE;
172 }
173 if ($_REQUEST['conn'] == 'conn_tcp' and empty ($_REQUEST['mysql_host']))
174 {
175 print_form
176 (
177 $_REQUEST['conn'] == 'conn_tcp',
178 $_REQUEST['mysql_host'],
179 $_REQUEST['mysql_port'],
180 $_REQUEST['mysql_socket'],
181 $_REQUEST['mysql_db'],
182 $_REQUEST['mysql_username'],
183 $_REQUEST['mysql_password']
184 );
185 echo '<h2 class=trerror>Missing TCP hostname parameter!</h2>';
186 return FALSE;
187 }
188 if ($_REQUEST['conn'] == 'conn_unix' and empty ($_REQUEST['mysql_socket']))
189 {
190 print_form
191 (
192 $_REQUEST['conn'] == 'conn_tcp',
193 $_REQUEST['mysql_host'],
194 $_REQUEST['mysql_port'],
195 $_REQUEST['mysql_socket'],
196 $_REQUEST['mysql_db'],
197 $_REQUEST['mysql_username'],
198 $_REQUEST['mysql_password']
199 );
200 echo '<h2 class=trerror>Missing UNIX socket parameter!</h2>';
201 return FALSE;
202 }
203 # finally OK to make a connection attempt
204 $pdo_dsn = 'mysql:';
205 switch ($_REQUEST['conn'])
206 {
207 case 'conn_tcp':
208 $pdo_dsn .= 'host=' . $_REQUEST['mysql_host'];
209 if (!empty ($_REQUEST['mysql_port']) and $_REQUEST['mysql_port'] != '3306')
210 $pdo_dsn .= ';port=' . $_REQUEST['mysql_port'];
211 break;
212 case 'conn_unix':
213 $pdo_dsn .= 'unix_socket=' . $_REQUEST['mysql_socket'];
214 break;
215 default:
216 print_form();
217 echo '<h2 class=trerror>form error</h2>';
218 return FALSE;
219 }
220 $pdo_dsn .= ';dbname=' . $_REQUEST['mysql_db'];
221 try
222 {
223 $dbxlink = new PDO ($pdo_dsn, $_REQUEST['mysql_username'], $_REQUEST['mysql_password']);
224 }
225 catch (PDOException $e)
226 {
227 print_form
228 (
229 $_REQUEST['conn'] == 'conn_tcp',
230 $_REQUEST['mysql_host'],
231 $_REQUEST['mysql_port'],
232 $_REQUEST['mysql_socket'],
233 $_REQUEST['mysql_db'],
234 $_REQUEST['mysql_username'],
235 $_REQUEST['mysql_password']
236 );
237 echo "<h2 class=trerror>Database connection failed. Check parameters and try again.</h2>\n";
238 echo "PDO DSN: <tt class=trwarning>${pdo_dsn}</tt><br>";
239 return FALSE;
240 }
241
242 $conf = fopen ($path_to_secret_php, 'w+');
243 if ($conf === FALSE)
244 {
245 echo "Error: failed to open $path_to_secret_php for writing";
246 return FALSE;
247 }
248 fwrite ($conf, "<?php\n# This file has been generated automatically by RackTables installer.\n");
249 fwrite ($conf, "\$pdo_dsn = '${pdo_dsn}';\n");
250 fwrite ($conf, "\$db_username = '" . $_REQUEST['mysql_username'] . "';\n");
251 fwrite ($conf, "\$db_password = '" . $_REQUEST['mysql_password'] . "';\n\n");
252 fwrite ($conf, <<<ENDOFTEXT
253
254 \$user_auth_src = 'database';
255 \$require_local_account = TRUE;
256 # Default setting is to authenticate users locally, but it is possible to
257 # employ existing LDAP or Apache user accounts. Check RackTables wiki for
258 # more information, in particular, this page for LDAP configuration details:
259 # http://wiki.racktables.org/index.php?title=LDAP
260
261 #\$LDAP_options = array
262 #(
263 # 'server' => 'localhost',
264 # 'domain' => 'example.com',
265 # 'search_attr' => '',
266 # 'search_dn' => '',
267 # // The following credentials will be used when searching for the user's DN:
268 # 'search_bind_rdn' => NULL,
269 # 'search_bind_password' => NULL,
270 # 'displayname_attrs' => '',
271 # 'options' => array (LDAP_OPT_PROTOCOL_VERSION => 3),
272 # 'use_tls' => 2, // 0 == don't attempt, 1 == attempt, 2 == require
273 #);
274
275 # This HTML banner is intended to assist users in dispatching their issues
276 # to the local tech support service. Its text (in its verbatim form) will
277 # be appended to assorted error messages visible in user's browser (including
278 # "not authenticated" message). Beware of placing any sensitive information
279 # here, it will be readable by unauthorized visitors.
280 #\$helpdesk_banner = '<B>This RackTables instance is supported by Example Inc. IT helpdesk, dial ext. 1234 to report a problem.</B>';
281
282
283 ENDOFTEXT
284 );
285 fwrite ($conf, "?>\n");
286 fclose ($conf);
287 echo "The configuration file has been written successfully.<br>";
288 return TRUE;
289 }
290
291 function connect_to_db_or_die ()
292 {
293 try
294 {
295 connectDB();
296 }
297 catch (RackTablesError $e)
298 {
299 die ('Error connecting to the database');
300 }
301 }
302
303 function init_database_static ()
304 {
305 connect_to_db_or_die();
306 global $dbxlink;
307 if (!isInnoDBSupported())
308 {
309 echo 'InnoDB test failed! Please configure MySQL server properly and retry.';
310 return FALSE;
311 }
312 $result = $dbxlink->query ('show tables');
313 $tables = $result->fetchAll (PDO::FETCH_NUM);
314 $result->closeCursor();
315 unset ($result);
316 if (count ($tables))
317 {
318 echo 'Your database is already holding ' . count ($tables);
319 echo ' tables, so I will stop here and let you check it yourself.<br>';
320 echo 'There is some important data there probably.<br>';
321 return FALSE;
322 }
323 echo 'Initializing the database...<br>';
324 echo '<table border=1>';
325 echo "<tr><th>section</th><th>queries</th><th>errors</th></tr>";
326 $errlist = array();
327 foreach (array ('structure', 'dictbase') as $part)
328 {
329 echo "<tr><td>${part}</td>";
330 $nq = $nerrs = 0;
331 foreach (preg_split ("/;\s*\n/", get_pseudo_file ($part)) as $query)
332 {
333 $query = trim($query);
334 if (empty ($query) or '--' == substr ($query, 0, 2))
335 continue;
336 $nq++;
337 if ($dbxlink->exec ($query) === FALSE)
338 {
339 $nerrs++;
340 $errlist[] = $query;
341 }
342 }
343 echo "<td>${nq}</td><td>${nerrs}</td></tr>\n";
344 }
345 // (re)load dictionary by pure PHP means w/o any external file
346 echo "<tr><td>dictionary</td>";
347 $nq = $nerrs = 0;
348 $dictq = array();
349 foreach (reloadDictionary() as $query)
350 {
351 $nq++;
352 if ($dbxlink->exec ($query) === FALSE)
353 {
354 $nerrs++;
355 $errlist[] = $query;
356 }
357 }
358 echo "<td>${nq}</td><td>${nerrs}</td></tr>\n";
359
360 echo '</table>';
361 if (count ($errlist))
362 {
363 echo '<pre>The following queries failed:\n';
364 foreach ($errlist as $q)
365 echo "${q}\n\n";
366 echo '</pre>';
367 return FALSE;
368 }
369 return TRUE;
370 }
371
372 function init_database_dynamic ()
373 {
374 connect_to_db_or_die();
375 global $dbxlink;
376 if (!isset ($_REQUEST['password']) or empty ($_REQUEST['password']))
377 {
378 $result = $dbxlink->query ('select count(user_id) from UserAccount where user_id = 1');
379 $row = $result->fetch (PDO::FETCH_NUM);
380 $nrecs = $row[0];
381 $result->closeCursor();
382 if (!$nrecs)
383 {
384 echo '<table border=1>';
385 echo '<caption>Administrator password not set</caption>';
386 echo '<tr><td><input type=password name=password></td></tr>';
387 echo '</table>';
388 }
389 return FALSE;
390 }
391 else
392 {
393 // Never send cleartext password over the wire.
394 $hash = sha1 ($_REQUEST['password']);
395 $query = "INSERT INTO `UserAccount` (`user_id`, `user_name`, `user_password_hash`, `user_realname`) " .
396 "VALUES (1,'admin','${hash}','RackTables Administrator')";
397 $result = $dbxlink->exec ($query);
398 echo "Administrator password has been set successfully.<br>";
399 return TRUE;
400 }
401 }
402
403 function congrats ()
404 {
405 echo 'Congratulations! RackTables installation is complete. After pressing Proceed you will ';
406 echo 'enter the system. Authenticate with <strong>admin</strong> username.<br>RackTables project has a ';
407 echo "<a href='http://wiki.racktables.org/index.php?title=RackTablesAdminGuide'>";
408 echo "wiki</a> and a ";
409 echo "<a href='http://www.freelists.org/list/racktables-users'>mailing list</a> for users. Have fun.<br>";
410 return TRUE;
411 }
412
413 function get_pseudo_file ($name)
414 {
415 switch ($name)
416 {
417 case 'structure':
418 return <<<END_OF_FILE
419 alter database character set utf8;
420 set names 'utf8';
421 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
422
423 CREATE TABLE `Atom` (
424 `molecule_id` int(10) unsigned default NULL,
425 `rack_id` int(10) unsigned default NULL,
426 `unit_no` int(10) unsigned default NULL,
427 `atom` enum('front','interior','rear') default NULL,
428 CONSTRAINT `Atom-FK-molecule_id` FOREIGN KEY (`molecule_id`) REFERENCES `Molecule` (`id`) ON DELETE CASCADE,
429 CONSTRAINT `Atom-FK-rack_id` FOREIGN KEY (`rack_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
430 ) ENGINE=InnoDB;
431
432 CREATE TABLE `Attribute` (
433 `id` int(10) unsigned NOT NULL auto_increment,
434 `type` enum('string','uint','float','dict','date') default NULL,
435 `name` char(64) default NULL,
436 PRIMARY KEY (`id`),
437 UNIQUE KEY `name` (`name`)
438 ) ENGINE=InnoDB;
439
440 CREATE TABLE `AttributeMap` (
441 `objtype_id` int(10) unsigned NOT NULL default '1',
442 `attr_id` int(10) unsigned NOT NULL default '1',
443 `chapter_id` int(10) unsigned default NULL,
444 UNIQUE KEY `objtype_id` (`objtype_id`,`attr_id`),
445 KEY `attr_id` (`attr_id`),
446 KEY `chapter_id` (`chapter_id`),
447 CONSTRAINT `AttributeMap-FK-chapter_id` FOREIGN KEY (`chapter_id`) REFERENCES `Chapter` (`id`),
448 CONSTRAINT `AttributeMap-FK-attr_id` FOREIGN KEY (`attr_id`) REFERENCES `Attribute` (`id`)
449 ) ENGINE=InnoDB;
450
451 CREATE TABLE `AttributeValue` (
452 `object_id` int(10) unsigned NOT NULL,
453 -- Default value intentionally breaks the constraint, this blocks
454 -- any insertion, which doesn't have 'object_tid' on the column list.
455 `object_tid` int(10) unsigned NOT NULL default '0',
456 `attr_id` int(10) unsigned NOT NULL,
457 `string_value` char(255) default NULL,
458 `uint_value` int(10) unsigned default NULL,
459 `float_value` float default NULL,
460 PRIMARY KEY (`object_id`,`attr_id`),
461 KEY `attr_id-uint_value` (`attr_id`,`uint_value`),
462 KEY `attr_id-string_value` (`attr_id`,`string_value`(12)),
463 KEY `id-tid` (`object_id`,`object_tid`),
464 KEY `object_tid-attr_id` (`object_tid`,`attr_id`),
465 CONSTRAINT `AttributeValue-FK-map` FOREIGN KEY (`object_tid`, `attr_id`) REFERENCES `AttributeMap` (`objtype_id`, `attr_id`),
466 CONSTRAINT `AttributeValue-FK-object` FOREIGN KEY (`object_id`, `object_tid`) REFERENCES `Object` (`id`, `objtype_id`) ON DELETE CASCADE ON UPDATE CASCADE
467 ) ENGINE=InnoDB;
468
469 CREATE TABLE `CachedPAV` (
470 `object_id` int(10) unsigned NOT NULL,
471 `port_name` char(255) NOT NULL,
472 `vlan_id` int(10) unsigned NOT NULL default '0',
473 PRIMARY KEY (`object_id`,`port_name`,`vlan_id`),
474 KEY `vlan_id` (`vlan_id`),
475 CONSTRAINT `CachedPAV-FK-object-port` FOREIGN KEY (`object_id`, `port_name`) REFERENCES `CachedPVM` (`object_id`, `port_name`) ON DELETE CASCADE,
476 CONSTRAINT `CachedPAV-FK-vlan_id` FOREIGN KEY (`vlan_id`) REFERENCES `VLANValidID` (`vlan_id`)
477 ) ENGINE=InnoDB;
478
479 CREATE TABLE `CachedPNV` (
480 `object_id` int(10) unsigned NOT NULL,
481 `port_name` char(255) NOT NULL,
482 `vlan_id` int(10) unsigned NOT NULL default '0',
483 PRIMARY KEY (`object_id`,`port_name`,`vlan_id`),
484 UNIQUE KEY `port_id` (`object_id`,`port_name`),
485 CONSTRAINT `CachedPNV-FK-compound` FOREIGN KEY (`object_id`, `port_name`, `vlan_id`) REFERENCES `CachedPAV` (`object_id`, `port_name`, `vlan_id`) ON DELETE CASCADE
486 ) ENGINE=InnoDB;
487
488 CREATE TABLE `CachedPVM` (
489 `object_id` int(10) unsigned NOT NULL,
490 `port_name` char(255) NOT NULL,
491 `vlan_mode` enum('access','trunk') NOT NULL default 'access',
492 PRIMARY KEY (`object_id`,`port_name`),
493 CONSTRAINT `CachedPVM-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
494 ) ENGINE=InnoDB;
495
496 CREATE TABLE `CactiGraph` (
497 `object_id` int(10) unsigned NOT NULL,
498 `server_id` int(10) unsigned NOT NULL,
499 `graph_id` int(10) unsigned NOT NULL,
500 `caption` char(255) DEFAULT NULL,
501 PRIMARY KEY (`server_id`,`graph_id`),
502 KEY `object_id` (`object_id`),
503 KEY `graph_id` (`graph_id`),
504 CONSTRAINT `CactiGraph-FK-server_id` FOREIGN KEY (`server_id`) REFERENCES `CactiServer` (`id`),
505 CONSTRAINT `CactiGraph-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
506 ) ENGINE=InnoDB;
507
508 CREATE TABLE `CactiServer` (
509 `id` int(10) unsigned NOT NULL auto_increment,
510 `base_url` char(255) DEFAULT NULL,
511 `username` char(64) DEFAULT NULL,
512 `password` char(64) DEFAULT NULL,
513 PRIMARY KEY (`id`)
514 ) ENGINE=InnoDB;
515
516 CREATE TABLE `Chapter` (
517 `id` int(10) unsigned NOT NULL auto_increment,
518 `sticky` enum('yes','no') default 'no',
519 `name` char(128) NOT NULL,
520 PRIMARY KEY (`id`),
521 UNIQUE KEY `name` (`name`)
522 ) ENGINE=InnoDB;
523
524 CREATE TABLE `Config` (
525 `varname` char(32) NOT NULL,
526 `varvalue` text NOT NULL,
527 `vartype` enum('string','uint') NOT NULL default 'string',
528 `emptyok` enum('yes','no') NOT NULL default 'no',
529 `is_hidden` enum('yes','no') NOT NULL default 'yes',
530 `is_userdefined` enum('yes','no') NOT NULL default 'no',
531 `description` text,
532 PRIMARY KEY (`varname`)
533 ) ENGINE=InnoDB;
534
535 CREATE TABLE `Dictionary` (
536 `chapter_id` int(10) unsigned NOT NULL,
537 `dict_key` int(10) unsigned NOT NULL auto_increment,
538 `dict_sticky` enum('yes','no') DEFAULT 'no',
539 `dict_value` char(255) default NULL,
540 PRIMARY KEY (`dict_key`),
541 UNIQUE KEY `dict_unique` (`chapter_id`,`dict_value`,`dict_sticky`),
542 CONSTRAINT `Dictionary-FK-chapter_id` FOREIGN KEY (`chapter_id`) REFERENCES `Chapter` (`id`)
543 ) ENGINE=InnoDB;
544
545 CREATE TABLE `EntityLink` (
546 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
547 `parent_entity_type` enum('ipv4net','ipv4rspool','ipv4vs','ipv6net','location','object','rack','row','user') NOT NULL,
548 `parent_entity_id` int(10) unsigned NOT NULL,
549 `child_entity_type` enum('file','location','object','rack','row') NOT NULL,
550 `child_entity_id` int(10) unsigned NOT NULL,
551 PRIMARY KEY (`id`),
552 UNIQUE KEY `EntityLink-unique` (`parent_entity_type`,`parent_entity_id`,`child_entity_type`,`child_entity_id`),
553 KEY `EntityLink-compound` (`parent_entity_type`,`child_entity_type`,`child_entity_id`)
554 ) ENGINE=InnoDB;
555
556 CREATE TABLE `File` (
557 `id` int(10) unsigned NOT NULL auto_increment,
558 `name` char(255) NOT NULL,
559 `type` char(255) NOT NULL,
560 `size` int(10) unsigned NOT NULL,
561 `ctime` datetime NOT NULL,
562 `mtime` datetime NOT NULL,
563 `atime` datetime NOT NULL,
564 `thumbnail` longblob,
565 `contents` longblob NOT NULL,
566 `comment` text,
567 PRIMARY KEY (`id`),
568 UNIQUE KEY `name` (`name`)
569 ) ENGINE=InnoDB;
570
571 CREATE TABLE `FileLink` (
572 `id` int(10) unsigned NOT NULL auto_increment,
573 `file_id` int(10) unsigned NOT NULL,
574 `entity_type` enum('ipv4net','ipv4rspool','ipv4vs','ipv6net','location','object','rack','user') NOT NULL default 'object',
575 `entity_id` int(10) NOT NULL,
576 PRIMARY KEY (`id`),
577 KEY `FileLink-file_id` (`file_id`),
578 UNIQUE KEY `FileLink-unique` (`file_id`,`entity_type`,`entity_id`),
579 CONSTRAINT `FileLink-File_fkey` FOREIGN KEY (`file_id`) REFERENCES `File` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
580 ) ENGINE=InnoDB;
581
582 CREATE TABLE `IPv4Address` (
583 `ip` int(10) unsigned NOT NULL default '0',
584 `name` char(255) NOT NULL default '',
585 `comment` char(255) NOT NULL default '',
586 `reserved` enum('yes','no') default NULL,
587 PRIMARY KEY (`ip`)
588 ) ENGINE=InnoDB;
589
590 CREATE TABLE `IPv4Allocation` (
591 `object_id` int(10) unsigned NOT NULL default '0',
592 `ip` int(10) unsigned NOT NULL default '0',
593 `name` char(255) NOT NULL default '',
594 `type` enum('regular','shared','virtual','router') NOT NULL DEFAULT 'regular',
595 PRIMARY KEY (`object_id`,`ip`),
596 KEY `ip` (`ip`),
597 CONSTRAINT `IPv4Allocation-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
598 ) ENGINE=InnoDB;
599
600 CREATE TABLE `IPv4LB` (
601 `object_id` int(10) unsigned default NULL,
602 `rspool_id` int(10) unsigned default NULL,
603 `vs_id` int(10) unsigned default NULL,
604 `prio` varchar(255) default NULL,
605 `vsconfig` text,
606 `rsconfig` text,
607 UNIQUE KEY `LB-VS` (`object_id`,`vs_id`),
608 KEY `IPv4LB-FK-rspool_id` (`rspool_id`),
609 KEY `IPv4LB-FK-vs_id` (`vs_id`),
610 CONSTRAINT `IPv4LB-FK-vs_id` FOREIGN KEY (`vs_id`) REFERENCES `IPv4VS` (`id`),
611 CONSTRAINT `IPv4LB-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`),
612 CONSTRAINT `IPv4LB-FK-rspool_id` FOREIGN KEY (`rspool_id`) REFERENCES `IPv4RSPool` (`id`)
613 ) ENGINE=InnoDB;
614
615 CREATE TABLE `IPv4Log` (
616 `id` int(10) NOT NULL AUTO_INCREMENT,
617 `ip` int(10) unsigned NOT NULL,
618 `date` datetime NOT NULL,
619 `user` varchar(64) NOT NULL,
620 `message` text NOT NULL,
621 PRIMARY KEY (`id`),
622 KEY `ip-date` (`ip`,`date`)
623 ) ENGINE=InnoDB;
624
625 CREATE TABLE `IPv6Log` (
626 `id` int(10) NOT NULL AUTO_INCREMENT,
627 `ip` binary(16) NOT NULL,
628 `date` datetime NOT NULL,
629 `user` varchar(64) NOT NULL,
630 `message` text NOT NULL,
631 PRIMARY KEY (`id`),
632 KEY `ip-date` (`ip`,`date`)
633 ) ENGINE=InnoDB;
634
635 CREATE TABLE `IPv4NAT` (
636 `object_id` int(10) unsigned NOT NULL default '0',
637 `proto` enum('TCP','UDP') NOT NULL default 'TCP',
638 `localip` int(10) unsigned NOT NULL default '0',
639 `localport` smallint(5) unsigned NOT NULL default '0',
640 `remoteip` int(10) unsigned NOT NULL default '0',
641 `remoteport` smallint(5) unsigned NOT NULL default '0',
642 `description` char(255) default NULL,
643 PRIMARY KEY (`object_id`,`proto`,`localip`,`localport`,`remoteip`,`remoteport`),
644 KEY `localip` (`localip`),
645 KEY `remoteip` (`remoteip`),
646 KEY `object_id` (`object_id`),
647 CONSTRAINT `IPv4NAT-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`)
648 ) ENGINE=InnoDB;
649
650 CREATE TABLE `IPv4Network` (
651 `id` int(10) unsigned NOT NULL auto_increment,
652 `ip` int(10) unsigned NOT NULL default '0',
653 `mask` int(10) unsigned NOT NULL default '0',
654 `name` char(255) default NULL,
655 `comment` text,
656 PRIMARY KEY (`id`),
657 UNIQUE KEY `base-len` (`ip`,`mask`)
658 ) ENGINE=InnoDB;
659
660 CREATE TABLE `IPv4RS` (
661 `id` int(10) unsigned NOT NULL auto_increment,
662 `inservice` enum('yes','no') NOT NULL default 'no',
663 `rsip` varbinary(16) NOT NULL,
664 `rsport` smallint(5) unsigned default NULL,
665 `rspool_id` int(10) unsigned default NULL,
666 `rsconfig` text,
667 `comment` varchar(255) DEFAULT NULL,
668 PRIMARY KEY (`id`),
669 KEY `rsip` (`rsip`),
670 UNIQUE KEY `pool-endpoint` (`rspool_id`,`rsip`,`rsport`),
671 CONSTRAINT `IPv4RS-FK` FOREIGN KEY (`rspool_id`) REFERENCES `IPv4RSPool` (`id`) ON DELETE CASCADE
672 ) ENGINE=InnoDB;
673
674 CREATE TABLE `IPv4RSPool` (
675 `id` int(10) unsigned NOT NULL auto_increment,
676 `name` char(255) default NULL,
677 `vsconfig` text,
678 `rsconfig` text,
679 PRIMARY KEY (`id`)
680 ) ENGINE=InnoDB;
681
682 CREATE TABLE `IPv4VS` (
683 `id` int(10) unsigned NOT NULL auto_increment,
684 `vip` varbinary(16) NOT NULL,
685 `vport` smallint(5) unsigned default NULL,
686 `proto` enum('TCP','UDP','MARK') NOT NULL default 'TCP',
687 `name` char(255) default NULL,
688 `vsconfig` text,
689 `rsconfig` text,
690 PRIMARY KEY (`id`),
691 KEY `vip` (`vip`)
692 ) ENGINE=InnoDB;
693
694 CREATE TABLE `IPv6Address` (
695 `ip` binary(16) NOT NULL,
696 `name` char(255) NOT NULL default '',
697 `comment` char(255) NOT NULL default '',
698 `reserved` enum('yes','no') default NULL,
699 PRIMARY KEY (`ip`)
700 ) ENGINE=InnoDB;
701
702 CREATE TABLE `IPv6Allocation` (
703 `object_id` int(10) unsigned NOT NULL default '0',
704 `ip` binary(16) NOT NULL,
705 `name` char(255) NOT NULL default '',
706 `type` enum('regular','shared','virtual','router') NOT NULL DEFAULT 'regular',
707 PRIMARY KEY (`object_id`,`ip`),
708 KEY `ip` (`ip`),
709 CONSTRAINT `IPv6Allocation-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
710 ) ENGINE=InnoDB;
711
712 CREATE TABLE `IPv6Network` (
713 `id` int(10) unsigned NOT NULL auto_increment,
714 `ip` binary(16) NOT NULL,
715 `mask` int(10) unsigned NOT NULL,
716 `last_ip` binary(16) NOT NULL,
717 `name` char(255) default NULL,
718 `comment` text,
719 PRIMARY KEY (`id`),
720 UNIQUE KEY `ip` (`ip`,`mask`)
721 ) ENGINE=InnoDB;
722
723 CREATE TABLE `LDAPCache` (
724 `presented_username` char(64) NOT NULL,
725 `successful_hash` char(40) NOT NULL,
726 `first_success` timestamp NOT NULL default CURRENT_TIMESTAMP,
727 `last_retry` timestamp NOT NULL default '0000-00-00 00:00:00',
728 `displayed_name` char(128) default NULL,
729 `memberof` text,
730 UNIQUE KEY `presented_username` (`presented_username`),
731 KEY `scanidx` (`presented_username`,`successful_hash`)
732 ) ENGINE=InnoDB;
733
734 CREATE TABLE `Link` (
735 `porta` int(10) unsigned NOT NULL default '0',
736 `portb` int(10) unsigned NOT NULL default '0',
737 `cable` char(64) DEFAULT NULL,
738 PRIMARY KEY (`porta`,`portb`),
739 UNIQUE KEY `porta` (`porta`),
740 UNIQUE KEY `portb` (`portb`),
741 CONSTRAINT `Link-FK-a` FOREIGN KEY (`porta`) REFERENCES `Port` (`id`) ON DELETE CASCADE,
742 CONSTRAINT `Link-FK-b` FOREIGN KEY (`portb`) REFERENCES `Port` (`id`) ON DELETE CASCADE
743 ) ENGINE=InnoDB;
744
745 CREATE TABLE `Molecule` (
746 `id` int(10) unsigned NOT NULL auto_increment,
747 PRIMARY KEY (`id`)
748 ) ENGINE=InnoDB;
749
750 CREATE TABLE `MountOperation` (
751 `id` int(10) unsigned NOT NULL auto_increment,
752 `object_id` int(10) unsigned NOT NULL default '0',
753 `ctime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
754 `user_name` char(64) default NULL,
755 `old_molecule_id` int(10) unsigned default NULL,
756 `new_molecule_id` int(10) unsigned default NULL,
757 `comment` text,
758 PRIMARY KEY (`id`),
759 KEY `object_id` (`object_id`),
760 CONSTRAINT `MountOperation-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE,
761 CONSTRAINT `MountOperation-FK-old_molecule_id` FOREIGN KEY (`old_molecule_id`) REFERENCES `Molecule` (`id`) ON DELETE CASCADE,
762 CONSTRAINT `MountOperation-FK-new_molecule_id` FOREIGN KEY (`new_molecule_id`) REFERENCES `Molecule` (`id`) ON DELETE CASCADE
763 ) ENGINE=InnoDB;
764
765 CREATE TABLE `ObjectLog` (
766 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
767 `object_id` int(10) unsigned NOT NULL,
768 `user` char(64) NOT NULL,
769 `date` datetime NOT NULL,
770 `content` text NOT NULL,
771 PRIMARY KEY (`id`),
772 KEY `object_id` (`object_id`),
773 KEY `date` (`date`),
774 CONSTRAINT `ObjectLog-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
775 ) ENGINE=InnoDB;
776
777 CREATE TABLE `ObjectParentCompat` (
778 `parent_objtype_id` int(10) unsigned NOT NULL,
779 `child_objtype_id` int(10) unsigned NOT NULL,
780 UNIQUE KEY `parent_child` (`parent_objtype_id`,`child_objtype_id`)
781 ) ENGINE=InnoDB;
782
783 CREATE TABLE `Port` (
784 `id` int(10) unsigned NOT NULL auto_increment,
785 `object_id` int(10) unsigned NOT NULL default '0',
786 `name` char(255) NOT NULL default '',
787 `iif_id` int(10) unsigned NOT NULL,
788 `type` int(10) unsigned NOT NULL default '0',
789 `l2address` char(64) default NULL,
790 `reservation_comment` char(255) default NULL,
791 `label` char(255) default NULL,
792 PRIMARY KEY (`id`),
793 UNIQUE KEY `object_iif_oif_name` (`object_id`,`iif_id`,`type`,`name`),
794 KEY `type` (`type`),
795 KEY `comment` (`reservation_comment`),
796 KEY `l2address` (`l2address`),
797 KEY `Port-FK-iif-oif` (`iif_id`,`type`),
798 CONSTRAINT `Port-FK-iif-oif` FOREIGN KEY (`iif_id`, `type`) REFERENCES `PortInterfaceCompat` (`iif_id`, `oif_id`),
799 CONSTRAINT `Port-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
800 ) ENGINE=InnoDB;
801
802 CREATE TABLE `PortAllowedVLAN` (
803 `object_id` int(10) unsigned NOT NULL,
804 `port_name` char(255) NOT NULL,
805 `vlan_id` int(10) unsigned NOT NULL default '0',
806 PRIMARY KEY (`object_id`,`port_name`,`vlan_id`),
807 KEY `vlan_id` (`vlan_id`),
808 CONSTRAINT `PortAllowedVLAN-FK-object-port` FOREIGN KEY (`object_id`, `port_name`) REFERENCES `PortVLANMode` (`object_id`, `port_name`) ON DELETE CASCADE,
809 CONSTRAINT `PortAllowedVLAN-FK-vlan_id` FOREIGN KEY (`vlan_id`) REFERENCES `VLANValidID` (`vlan_id`)
810 ) ENGINE=InnoDB;
811
812 CREATE TABLE `PortCompat` (
813 `type1` int(10) unsigned NOT NULL default '0',
814 `type2` int(10) unsigned NOT NULL default '0',
815 UNIQUE KEY `type1_2` (`type1`,`type2`),
816 KEY `type2` (`type2`)
817 ) ENGINE=InnoDB;
818
819 CREATE TABLE `PortInnerInterface` (
820 `id` int(10) unsigned NOT NULL,
821 `iif_name` char(16) NOT NULL,
822 PRIMARY KEY (`id`),
823 UNIQUE KEY `iif_name` (`iif_name`)
824 ) ENGINE=InnoDB;
825
826 CREATE TABLE `PortInterfaceCompat` (
827 `iif_id` int(10) unsigned NOT NULL,
828 `oif_id` int(10) unsigned NOT NULL,
829 UNIQUE KEY `pair` (`iif_id`,`oif_id`),
830 CONSTRAINT `PortInterfaceCompat-FK-iif_id` FOREIGN KEY (`iif_id`) REFERENCES `PortInnerInterface` (`id`)
831 ) ENGINE=InnoDB;
832
833 CREATE TABLE `PortLog` (
834 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
835 `port_id` int(10) unsigned NOT NULL,
836 `date` datetime NOT NULL,
837 `user` varchar(64) NOT NULL,
838 `message` text NOT NULL,
839 PRIMARY KEY (`id`),
840 KEY `port_id-date` (`port_id`,`date`),
841 CONSTRAINT `PortLog_ibfk_1` FOREIGN KEY (`port_id`) REFERENCES `Port` (`id`) ON DELETE CASCADE
842 ) ENGINE=InnoDB;
843
844 CREATE TABLE `PortNativeVLAN` (
845 `object_id` int(10) unsigned NOT NULL,
846 `port_name` char(255) NOT NULL,
847 `vlan_id` int(10) unsigned NOT NULL default '0',
848 PRIMARY KEY (`object_id`,`port_name`,`vlan_id`),
849 UNIQUE KEY `port_id` (`object_id`,`port_name`),
850 CONSTRAINT `PortNativeVLAN-FK-compound` FOREIGN KEY (`object_id`, `port_name`, `vlan_id`) REFERENCES `PortAllowedVLAN` (`object_id`, `port_name`, `vlan_id`) ON DELETE CASCADE
851 ) ENGINE=InnoDB;
852
853 CREATE TABLE `PortVLANMode` (
854 `object_id` int(10) unsigned NOT NULL,
855 `port_name` char(255) NOT NULL,
856 `vlan_mode` enum('access','trunk') NOT NULL default 'access',
857 PRIMARY KEY (`object_id`,`port_name`),
858 CONSTRAINT `PortVLANMode-FK-object-port` FOREIGN KEY (`object_id`, `port_name`) REFERENCES `CachedPVM` (`object_id`, `port_name`)
859 ) ENGINE=InnoDB;
860
861 CREATE TABLE `Object` (
862 `id` int(10) unsigned NOT NULL auto_increment,
863 `name` char(255) default NULL,
864 `label` char(255) default NULL,
865 `objtype_id` int(10) unsigned NOT NULL default '1',
866 `asset_no` char(64) default NULL,
867 `has_problems` enum('yes','no') NOT NULL default 'no',
868 `comment` text,
869 PRIMARY KEY (`id`),
870 UNIQUE KEY `asset_no` (`asset_no`),
871 KEY `id-tid` (`id`,`objtype_id`),
872 KEY `type_id` (`objtype_id`,`id`)
873 ) ENGINE=InnoDB;
874
875 CREATE TABLE `ObjectHistory` (
876 `id` int(10) unsigned default NULL,
877 `name` char(255) default NULL,
878 `label` char(255) default NULL,
879 `objtype_id` int(10) unsigned default NULL,
880 `asset_no` char(64) default NULL,
881 `has_problems` enum('yes','no') NOT NULL default 'no',
882 `comment` text,
883 `ctime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
884 `user_name` char(64) default NULL,
885 KEY `id` (`id`),
886 CONSTRAINT `ObjectHistory-FK-object_id` FOREIGN KEY (`id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
887 ) ENGINE=InnoDB;
888
889 CREATE TABLE `RackSpace` (
890 `rack_id` int(10) unsigned NOT NULL default '0',
891 `unit_no` int(10) unsigned NOT NULL default '0',
892 `atom` enum('front','interior','rear') NOT NULL default 'interior',
893 `state` enum('A','U','T','W') NOT NULL default 'A',
894 `object_id` int(10) unsigned default NULL,
895 PRIMARY KEY (`rack_id`,`unit_no`,`atom`),
896 KEY `RackSpace_object_id` (`object_id`),
897 CONSTRAINT `RackSpace-FK-rack_id` FOREIGN KEY (`rack_id`) REFERENCES `Object` (`id`),
898 CONSTRAINT `RackSpace-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
899 ) ENGINE=InnoDB;
900
901 CREATE TABLE `RackThumbnail` (
902 `rack_id` int(10) unsigned NOT NULL,
903 `thumb_data` blob,
904 UNIQUE KEY `rack_id` (`rack_id`),
905 CONSTRAINT `RackThumbnail-FK-rack_id` FOREIGN KEY (`rack_id`) REFERENCES `Object` (`id`) ON DELETE CASCADE
906 ) ENGINE=InnoDB;
907
908 CREATE TABLE `Script` (
909 `script_name` char(64) NOT NULL,
910 `script_text` longtext,
911 PRIMARY KEY (`script_name`)
912 ) ENGINE=InnoDB;
913
914 CREATE TABLE `TagStorage` (
915 `entity_realm` enum('file','ipv4net','ipv4rspool','ipv4vs','ipv6net','location','object','rack','user','vst') NOT NULL default 'object',
916 `entity_id` int(10) unsigned NOT NULL,
917 `tag_id` int(10) unsigned NOT NULL default '0',
918 `user` char(64) DEFAULT NULL,
919 `date` datetime DEFAULT NULL,
920 UNIQUE KEY `entity_tag` (`entity_realm`,`entity_id`,`tag_id`),
921 KEY `entity_id` (`entity_id`),
922 KEY `TagStorage-FK-tag_id` (`tag_id`),
923 CONSTRAINT `TagStorage-FK-tag_id` FOREIGN KEY (`tag_id`) REFERENCES `TagTree` (`id`)
924 ) ENGINE=InnoDB;
925
926 CREATE TABLE `TagTree` (
927 `id` int(10) unsigned NOT NULL auto_increment,
928 `parent_id` int(10) unsigned default NULL,
929 `tag` char(255) default NULL,
930 PRIMARY KEY (`id`),
931 UNIQUE KEY `tag` (`tag`),
932 KEY `TagTree-K-parent_id` (`parent_id`),
933 CONSTRAINT `TagTree-K-parent_id` FOREIGN KEY (`parent_id`) REFERENCES `TagTree` (`id`)
934 ) ENGINE=InnoDB;
935
936 CREATE TABLE `UserAccount` (
937 `user_id` int(10) unsigned NOT NULL auto_increment,
938 `user_name` char(64) NOT NULL default '',
939 `user_password_hash` char(40) default NULL,
940 `user_realname` char(64) default NULL,
941 PRIMARY KEY (`user_id`),
942 UNIQUE KEY `user_name` (`user_name`)
943 ) ENGINE=InnoDB;
944
945 CREATE TABLE `UserConfig` (
946 `varname` char(32) NOT NULL,
947 `varvalue` text NOT NULL,
948 `user` char(64) NOT NULL,
949 UNIQUE KEY `user_varname` (`user`,`varname`),
950 KEY `varname` (`varname`),
951 CONSTRAINT `UserConfig-FK-varname` FOREIGN KEY (`varname`) REFERENCES `Config` (`varname`) ON DELETE CASCADE,
952 CONSTRAINT `UserConfig-FK-user` FOREIGN KEY (`user`) REFERENCES `UserAccount` (`user_name`) ON DELETE CASCADE
953 ) ENGINE=InnoDB;
954
955 CREATE TABLE `VLANDescription` (
956 `domain_id` int(10) unsigned NOT NULL,
957 `vlan_id` int(10) unsigned NOT NULL default '0',
958 `vlan_type` enum('ondemand','compulsory','alien') NOT NULL default 'ondemand',
959 `vlan_descr` char(255) default NULL,
960 PRIMARY KEY (`domain_id`,`vlan_id`),
961 KEY `vlan_id` (`vlan_id`),
962 CONSTRAINT `VLANDescription-FK-domain_id` FOREIGN KEY (`domain_id`) REFERENCES `VLANDomain` (`id`) ON DELETE CASCADE,
963 CONSTRAINT `VLANDescription-FK-vlan_id` FOREIGN KEY (`vlan_id`) REFERENCES `VLANValidID` (`vlan_id`)
964 ) ENGINE=InnoDB;
965
966 CREATE TABLE `VLANDomain` (
967 `id` int(10) unsigned NOT NULL auto_increment,
968 `description` char(255) default NULL,
969 PRIMARY KEY (`id`),
970 UNIQUE KEY `description` (`description`)
971 ) ENGINE=InnoDB;
972
973 CREATE TABLE `VLANIPv4` (
974 `domain_id` int(10) unsigned NOT NULL,
975 `vlan_id` int(10) unsigned NOT NULL,
976 `ipv4net_id` int(10) unsigned NOT NULL,
977 UNIQUE KEY `network-domain` (`ipv4net_id`,`domain_id`),
978 KEY `VLANIPv4-FK-compound` (`domain_id`,`vlan_id`),
979 CONSTRAINT `VLANIPv4-FK-compound` FOREIGN KEY (`domain_id`, `vlan_id`) REFERENCES `VLANDescription` (`domain_id`, `vlan_id`) ON DELETE CASCADE,
980 CONSTRAINT `VLANIPv4-FK-ipv4net_id` FOREIGN KEY (`ipv4net_id`) REFERENCES `IPv4Network` (`id`) ON DELETE CASCADE
981 ) ENGINE=InnoDB;
982
983 CREATE TABLE `VLANIPv6` (
984 `domain_id` int(10) unsigned NOT NULL,
985 `vlan_id` int(10) unsigned NOT NULL,
986 `ipv6net_id` int(10) unsigned NOT NULL,
987 UNIQUE KEY `network-domain` (`ipv6net_id`,`domain_id`),
988 KEY `VLANIPv6-FK-compound` (`domain_id`,`vlan_id`),
989 CONSTRAINT `VLANIPv6-FK-compound` FOREIGN KEY (`domain_id`, `vlan_id`) REFERENCES `VLANDescription` (`domain_id`, `vlan_id`) ON DELETE CASCADE,
990 CONSTRAINT `VLANIPv6-FK-ipv6net_id` FOREIGN KEY (`ipv6net_id`) REFERENCES `IPv6Network` (`id`) ON DELETE CASCADE
991 ) ENGINE=InnoDB;
992
993 CREATE TABLE `VLANSTRule` (
994 `vst_id` int(10) unsigned NOT NULL,
995 `rule_no` int(10) unsigned NOT NULL,
996 `port_pcre` char(255) NOT NULL,
997 `port_role` enum('access','trunk','anymode','uplink','downlink','none') NOT NULL default 'none',
998 `wrt_vlans` char(255) default NULL,
999 `description` char(255) default NULL,
1000 UNIQUE KEY `vst-rule` (`vst_id`,`rule_no`),
1001 CONSTRAINT `VLANSTRule-FK-vst_id` FOREIGN KEY (`vst_id`) REFERENCES `VLANSwitchTemplate` (`id`) ON DELETE CASCADE
1002 ) ENGINE=InnoDB;
1003
1004 CREATE TABLE `VLANSwitch` (
1005 `object_id` int(10) unsigned NOT NULL,
1006 `domain_id` int(10) unsigned NOT NULL,
1007 `template_id` int(10) unsigned NOT NULL,
1008 `mutex_rev` int(10) unsigned NOT NULL default '0',
1009 `out_of_sync` enum('yes','no') NOT NULL default 'yes',
1010 `last_errno` int(10) unsigned NOT NULL default '0',
1011 `last_change` timestamp NOT NULL default '0000-00-00 00:00:00',
1012 `last_push_started` timestamp NOT NULL default '0000-00-00 00:00:00',
1013 `last_push_finished` timestamp NOT NULL default '0000-00-00 00:00:00',
1014 `last_error_ts` timestamp NOT NULL default '0000-00-00 00:00:00',
1015 UNIQUE KEY `object_id` (`object_id`),
1016 KEY `domain_id` (`domain_id`),
1017 KEY `template_id` (`template_id`),
1018 KEY `out_of_sync` (`out_of_sync`),
1019 KEY `last_errno` (`last_errno`),
1020 CONSTRAINT `VLANSwitch-FK-domain_id` FOREIGN KEY (`domain_id`) REFERENCES `VLANDomain` (`id`),
1021 CONSTRAINT `VLANSwitch-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES `Object` (`id`),
1022 CONSTRAINT `VLANSwitch-FK-template_id` FOREIGN KEY (`template_id`) REFERENCES `VLANSwitchTemplate` (`id`)
1023 ) ENGINE=InnoDB;
1024
1025 CREATE TABLE `VLANSwitchTemplate` (
1026 `id` int(10) unsigned NOT NULL auto_increment,
1027 `mutex_rev` int(10) NOT NULL,
1028 `description` char(255) default NULL,
1029 `saved_by` char(64) NOT NULL,
1030 PRIMARY KEY (`id`),
1031 UNIQUE KEY `description` (`description`)
1032 ) ENGINE=InnoDB;
1033
1034 CREATE TABLE `VLANValidID` (
1035 `vlan_id` int(10) unsigned NOT NULL default '1',
1036 PRIMARY KEY (`vlan_id`)
1037 ) ENGINE=InnoDB;
1038
1039 CREATE VIEW `Location` AS SELECT O.id, O.name, O.has_problems, O.comment, P.id AS parent_id, P.name AS parent_name
1040 FROM `Object` O
1041 LEFT JOIN (
1042 `Object` P INNER JOIN `EntityLink` EL
1043 ON EL.parent_entity_id = P.id AND P.objtype_id = 1562 AND EL.parent_entity_type = 'location' AND EL.child_entity_type = 'location'
1044 ) ON EL.child_entity_id = O.id
1045 WHERE O.objtype_id = 1562;
1046
1047 CREATE VIEW `Row` AS SELECT O.id, O.name, L.id AS location_id, L.name AS location_name
1048 FROM `Object` O
1049 LEFT JOIN `EntityLink` EL ON O.id = EL.child_entity_id AND EL.parent_entity_type = 'location' AND EL.child_entity_type = 'row'
1050 LEFT JOIN `Object` L ON EL.parent_entity_id = L.id AND L.objtype_id = 1562
1051 WHERE O.objtype_id = 1561;
1052
1053 CREATE VIEW `Rack` AS SELECT O.id, O.name AS name, O.asset_no, O.has_problems, O.comment,
1054 AV_H.uint_value AS height,
1055 AV_S.uint_value AS sort_order,
1056 RT.thumb_data,
1057 R.id AS row_id,
1058 R.name AS row_name
1059 FROM `Object` O
1060 LEFT JOIN `AttributeValue` AV_H ON O.id = AV_H.object_id AND AV_H.attr_id = 27
1061 LEFT JOIN `AttributeValue` AV_S ON O.id = AV_S.object_id AND AV_S.attr_id = 29
1062 LEFT JOIN `RackThumbnail` RT ON O.id = RT.rack_id
1063 LEFT JOIN `EntityLink` EL ON O.id = EL.child_entity_id AND EL.parent_entity_type = 'row' AND EL.child_entity_type = 'rack'
1064 INNER JOIN `Object` R ON R.id = EL.parent_entity_id
1065 WHERE O.objtype_id = 1560;
1066
1067 CREATE VIEW `RackObject` AS SELECT id, name, label, objtype_id, asset_no, has_problems, comment FROM `Object`
1068 WHERE `objtype_id` NOT IN (1560, 1561, 1562);
1069
1070 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
1071 END_OF_FILE;
1072 ##########################################################################
1073 case 'dictbase':
1074 $db_version = CODE_VERSION;
1075 return <<<END_OF_FILE
1076 INSERT INTO `Attribute` (`id`, `type`, `name`) VALUES
1077 (1,'string','OEM S/N 1'),
1078 (2,'dict','HW type'),
1079 (3,'string','FQDN'),
1080 (4,'dict','SW type'),
1081 (5,'string','SW version'),
1082 (6,'uint','number of ports'),
1083 (7,'float','max. current, Ampers'),
1084 (8,'float','power load, percents'),
1085 (14,'string','contact person'),
1086 (13,'float','max power, Watts'),
1087 (16,'uint','flash memory, MB'),
1088 (17,'uint','DRAM, MB'),
1089 (18,'uint','CPU, MHz'),
1090 (20,'string','OEM S/N 2'),
1091 (21,'date','support contract expiration'),
1092 (22,'date','HW warranty expiration'),
1093 (24,'date','SW warranty expiration'),
1094 (25,'string','UUID'),
1095 (26,'dict','Hypervisor'),
1096 (27,'uint','Height, units'),
1097 (28,'string','Slot number'),
1098 (29,'uint','Sort order'),
1099 (30,'dict','Mgmt type'),
1100 -- ^^^^^ Any new "default" attributes must go above this line! ^^^^^
1101 -- Primary key value 9999 makes sure, that AUTO_INCREMENT on server restart
1102 -- doesn't drop below 10000 (other code relies on this, site-specific
1103 -- attributes are assigned IDs starting from 10000).
1104 (9999,'string','base MAC address');
1105
1106 INSERT INTO `Chapter` (`id`, `sticky`, `name`) VALUES
1107 (1,'yes','ObjectType'),
1108 (2,'yes','PortOuterInterface'),
1109 (11,'no','server models'),
1110 (12,'no','network switch models'),
1111 (13,'no','server OS type'),
1112 (14,'no','switch OS type'),
1113 (16,'no','router OS type'),
1114 (17,'no','router models'),
1115 (18,'no','disk array models'),
1116 (19,'no','tape library models'),
1117 (21,'no','KVM switch models'),
1118 (23,'no','console models'),
1119 (24,'no','network security models'),
1120 (25,'no','wireless models'),
1121 (26,'no','fibre channel switch models'),
1122 (27,'no','PDU models'),
1123 (28,'no','Voice/video hardware'),
1124 (29,'no','Yes/No'),
1125 (30,'no','network chassis models'),
1126 (31,'no','server chassis models'),
1127 (32,'no','virtual switch models'),
1128 (33,'no','virtual switch OS type'),
1129 (34,'no','power supply chassis models'),
1130 (35,'no','power supply models'),
1131 (36,'no','serial console server models'),
1132 (37,'no','wireless OS type'),
1133 (38,'no','management interface type'),
1134 -- Default chapters must have ID less than 10000, add them above this line.
1135 (9999,'no','multiplexer models');
1136
1137 INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_id`) VALUES
1138 (2,1,NULL),
1139 (2,2,27),
1140 (2,3,NULL),
1141 (2,5,NULL),
1142 (4,1,NULL),
1143 (4,2,11),
1144 (4,3,NULL),
1145 (4,4,13),
1146 (4,14,NULL),
1147 (4,21,NULL),
1148 (4,22,NULL),
1149 (4,24,NULL),
1150 (4,25,NULL),
1151 (4,26,29),
1152 (4,28,NULL),
1153 (5,1,NULL),
1154 (5,2,18),
1155 (6,1,NULL),
1156 (6,2,19),
1157 (6,20,NULL),
1158 (7,1,NULL),
1159 (7,2,17),
1160 (7,3,NULL),
1161 (7,4,16),
1162 (7,5,NULL),
1163 (7,14,NULL),
1164 (7,16,NULL),
1165 (7,17,NULL),
1166 (7,18,NULL),
1167 (7,21,NULL),
1168 (7,22,NULL),
1169 (7,24,NULL),
1170 (8,1,NULL),
1171 (8,2,12),
1172 (8,3,NULL),
1173 (8,4,14),
1174 (8,5,NULL),
1175 (8,14,NULL),
1176 (8,16,NULL),
1177 (8,17,NULL),
1178 (8,18,NULL),
1179 (8,20,NULL),
1180 (8,21,NULL),
1181 (8,22,NULL),
1182 (8,24,NULL),
1183 (8,28,NULL),
1184 (9,6,NULL),
1185 (12,1,NULL),
1186 (12,3,NULL),
1187 (12,7,NULL),
1188 (12,8,NULL),
1189 (12,13,NULL),
1190 (12,20,NULL),
1191 (445,1,NULL),
1192 (445,2,21),
1193 (445,3,NULL),
1194 (445,5,NULL),
1195 (445,14,NULL),
1196 (445,22,NULL),
1197 (447,1,NULL),
1198 (447,2,9999),
1199 (447,3,NULL),
1200 (447,5,NULL),
1201 (447,14,NULL),
1202 (447,22,NULL),
1203 (15,2,23),
1204 (798,1,NULL),
1205 (798,2,24),
1206 (798,3,NULL),
1207 (798,5,NULL),
1208 (798,14,NULL),
1209 (798,16,NULL),
1210 (798,17,NULL),
1211 (798,18,NULL),
1212 (798,20,NULL),
1213 (798,21,NULL),
1214 (798,22,NULL),
1215 (798,24,NULL),
1216 (798,28,NULL),
1217 (965,1,NULL),
1218 (965,3,NULL),
1219 (965,2,25),
1220 (965,4,37),
1221 (1055,2,26),
1222 (1055,28,NULL),
1223 (1323,1,NULL),
1224 (1323,2,28),
1225 (1323,3,NULL),
1226 (1323,5,NULL),
1227 (1397,1,NULL),
1228 (1397,2,34),
1229 (1397,14,NULL),
1230 (1397,21,NULL),
1231 (1397,22,NULL),
1232 (1398,1,NULL),
1233 (1398,2,35),
1234 (1398,14,NULL),
1235 (1398,21,NULL),
1236 (1398,22,NULL),
1237 (1502,1,NULL),
1238 (1502,2,31),
1239 (1502,3,NULL),
1240 (1502,14,NULL),
1241 (1502,20,NULL),
1242 (1502,21,NULL),
1243 (1502,22,NULL),
1244 (1503,1,NULL),
1245 (1503,2,30),
1246 (1503,3,NULL),
1247 (1503,4,14),
1248 (1503,5,NULL),
1249 (1503,14,NULL),
1250 (1503,16,NULL),
1251 (1503,17,NULL),
1252 (1503,18,NULL),
1253 (1503,20,NULL),
1254 (1503,21,NULL),
1255 (1503,22,NULL),
1256 (1503,24,NULL),
1257 (1504,3,NULL),
1258 (1504,4,13),
1259 (1504,14,NULL),
1260 (1504,24,NULL),
1261 (1505,14,NULL),
1262 (1506,14,NULL),
1263 (1506,17,NULL),
1264 (1506,18,NULL),
1265 (1507,1,NULL),
1266 (1507,2,32),
1267 (1507,3,NULL),
1268 (1507,4,33),
1269 (1507,5,NULL),
1270 (1507,14,NULL),
1271 (1507,20,NULL),
1272 (1507,21,NULL),
1273 (1507,22,NULL),
1274 (1560,27,NULL),
1275 (1560,29,NULL),
1276 (1562,14,NULL),
1277 (1644, 1, NULL),
1278 (1644, 2, 36),
1279 (1644, 3, NULL),
1280 (1787,3,NULL),
1281 (1787,14,NULL),
1282 (1787,30,38);
1283
1284 INSERT INTO `PortInnerInterface` VALUES
1285 (1,'hardwired'),
1286 (2,'SFP-100'),
1287 (3,'GBIC'),
1288 (4,'SFP-1000'),
1289 (5,'XENPAK'),
1290 (6,'X2'),
1291 (7,'XPAK'),
1292 (8,'XFP'),
1293 (9,'SFP+'),
1294 (10,'QSFP+'),
1295 (11,'CFP');
1296
1297 INSERT INTO `ObjectParentCompat` VALUES
1298 (3,13),
1299 (4,1504),
1300 (4,1507),
1301 (1397,1398),
1302 (1502,4),
1303 (1503,8),
1304 (1505,4),
1305 (1505,1504),
1306 (1505,1506),
1307 (1505,1507),
1308 (1506,4),
1309 (1506,1504);
1310
1311 INSERT INTO `PortInterfaceCompat` VALUES
1312 (2,1208),(2,1195),(2,1196),(2,1197),(2,1198),(2,1199),(2,1200),(2,1201),
1313 (3,1078),(3,24),(3,34),(3,1202),(3,1203),(3,1204),(3,1205),(3,1206),(3,1207),
1314 (4,1077),(4,24),(4,34),(4,1202),(4,1203),(4,1204),(4,1205),(4,1206),(4,1207),
1315 (5,1079),(5,30),(5,35),(5,36),(5,37),(5,38),(5,39),(5,40),
1316 (6,1080),(6,30),(6,35),(6,36),(6,37),(6,38),(6,39),(6,40),
1317 (7,1081),(7,30),(7,35),(7,36),(7,37),(7,38),(7,39),(7,40),
1318 (8,1082),(8,30),(8,35),(8,36),(8,37),(8,38),(8,39),(8,40),
1319 (9,1084),(9,30),(9,35),(9,36),(9,37),(9,38),(9,39),(9,40),
1320 (10,1588),(10,1663),(10,1664),
1321 (11,1668),(11,1669),(11,1670),(11,1671),
1322 (1,16),(1,19),(1,24),(1,29),(1,31),(1,33),(1,446),(1,681),(1,682),(1,1322),(1,1399),(1,1469);
1323
1324 INSERT INTO `PortCompat` (`type1`, `type2`) VALUES
1325 (17,17),
1326 (18,18),
1327 (19,19),
1328 (24,24),
1329 (18,19),
1330 (19,18),
1331 (18,24),
1332 (24,18),
1333 (19,24),
1334 (24,19),
1335 (29,29),
1336 (30,30),
1337 (16,1322),
1338 (1322,16),
1339 (29,681),
1340 (29,682),
1341 (32,32),
1342 (33,446),
1343 (34,34),
1344 (35,35),
1345 (36,36),
1346 (37,37),
1347 (38,38),
1348 (39,39),
1349 (40,40),
1350 (41,41),
1351 (439,439),
1352 (446,33),
1353 (681,29),
1354 (681,681),
1355 (681,682),
1356 (682,29),
1357 (682,681),
1358 (682,682),
1359 (1077,1077),
1360 (1084,1084),
1361 (1087,1087),
1362 (1195,1195),
1363 (1196,1196),
1364 (1197,1197),
1365 (1198,1199),
1366 (1199,1198),
1367 (1200,1200),
1368 (1201,1201),
1369 (1202,1202),
1370 (1203,1203),
1371 (1204,1204),
1372 (1205,1205),
1373 (1206,1207),
1374 (1207,1206),
1375 (1209,1209),
1376 (1210,1210),
1377 (1211,1211),
1378 (1212,1212),
1379 (1213,1213),
1380 (1214,1214),
1381 (1215,1215),
1382 (1216,1216),
1383 (1217,1217),
1384 (1218,1218),
1385 (1219,1219),
1386 (1220,1220),
1387 (1221,1221),
1388 (1222,1222),
1389 (1223,1223),
1390 (1224,1224),
1391 (1225,1225),
1392 (1226,1226),
1393 (1227,1227),
1394 (1228,1228),
1395 (1229,1229),
1396 (1230,1230),
1397 (1231,1231),
1398 (1232,1232),
1399 (1233,1233),
1400 (1234,1234),
1401 (1235,1235),
1402 (1236,1236),
1403 (1237,1237),
1404 (1238,1238),
1405 (1239,1239),
1406 (1240,1240),
1407 (1241,1241),
1408 (1242,1242),
1409 (1243,1243),
1410 (1244,1244),
1411 (1245,1245),
1412 (1246,1246),
1413 (1247,1247),
1414 (1248,1248),
1415 (1249,1249),
1416 (1250,1250),
1417 (1251,1251),
1418 (1252,1252),
1419 (1253,1253),
1420 (1254,1254),
1421 (1255,1255),
1422 (1256,1256),
1423 (1257,1257),
1424 (1258,1258),
1425 (1259,1259),
1426 (1260,1260),
1427 (1261,1261),
1428 (1262,1262),
1429 (1263,1263),
1430 (1264,1264),
1431 (1265,1265),
1432 (1266,1266),
1433 (1267,1267),
1434 (1268,1268),
1435 (1269,1269),
1436 (1270,1270),
1437 (1271,1271),
1438 (1272,1272),
1439 (1273,1273),
1440 (1274,1274),
1441 (1275,1275),
1442 (1276,1276),
1443 (1277,1277),
1444 (1278,1278),
1445 (1279,1279),
1446 (1280,1280),
1447 (1281,1281),
1448 (1282,1282),
1449 (1283,1283),
1450 (1284,1284),
1451 (1285,1285),
1452 (1286,1286),
1453 (1287,1287),
1454 (1288,1288),
1455 (1289,1289),
1456 (1290,1290),
1457 (1291,1291),
1458 (1292,1292),
1459 (1293,1293),
1460 (1294,1294),
1461 (1295,1295),
1462 (1296,1296),
1463 (1297,1297),
1464 (1298,1298),
1465 (1299,1299),
1466 (1300,1300),
1467 (1316,1316),
1468 (1424,1424),
1469 (1425,1425),
1470 (1426,1426),
1471 (1427,1427),
1472 (1428,1428),
1473 (1429,1429),
1474 (1430,1430),
1475 (1431,1431),
1476 (1432,1432),
1477 (1433,1433),
1478 (1434,1434),
1479 (1435,1435),
1480 (1436,1436),
1481 (1437,1437),
1482 (1438,1438),
1483 (1439,1439),
1484 (1440,1440),
1485 (1441,1441),
1486 (1442,1442),
1487 (1443,1443),
1488 (1444,1444),
1489 (1445,1445),
1490 (1446,1446),
1491 (1447,1447),
1492 (1448,1448),
1493 (1449,1449),
1494 (1450,1450),
1495 (1451,1451),
1496 (1452,1452),
1497 (1453,1453),
1498 (1454,1454),
1499 (1455,1455),
1500 (1456,1456),
1501 (1457,1457),
1502 (1458,1458),
1503 (1459,1459),
1504 (1460,1460),
1505 (1461,1461),
1506 (1462,1462),
1507 (1463,1463),
1508 (1464,1464),
1509 (1465,1465),
1510 (1466,1466),
1511 (1469,1469),
1512 (1399,1399),
1513 (1588,1588),
1514 (1603,1603),
1515 (1661,1661),
1516 (1663,1663),
1517 (1664,1664),
1518 (1668,1668),
1519 (1669,1669),
1520 (1670,1670),
1521 (1671,1671),
1522 (1642,1642);
1523
1524 INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, is_userdefined, description) VALUES
1525 ('MASSCOUNT','8','uint','no','no','yes','&quot;Fast&quot; form is this many records tall'),
1526 ('MAXSELSIZE','30','uint','no','no','yes','&lt;SELECT&gt; lists height'),
1527 ('enterprise','MyCompanyName','string','no','no','no','Organization name'),
1528 ('ROW_SCALE','2','uint','no','no','yes','Picture scale for rack row display'),
1529 ('PORTS_PER_ROW','12','uint','no','no','yes','Ports per row in VLANs tab'),
1530 ('IPV4_ADDRS_PER_PAGE','256','uint','no','no','yes','IPv4 addresses per page'),
1531 ('DEFAULT_RACK_HEIGHT','42','uint','yes','no','yes','Default rack height'),
1532 ('DEFAULT_SLB_VS_PORT','','uint','yes','no','yes','Default port of SLB virtual service'),
1533 ('DEFAULT_SLB_RS_PORT','','uint','yes','no','yes','Default port of SLB real server'),
1534 ('DETECT_URLS','no','string','yes','no','yes','Detect URLs in text fields'),
1535 ('RACK_PRESELECT_THRESHOLD','1','uint','no','no','yes','Rack pre-selection threshold'),
1536 ('DEFAULT_IPV4_RS_INSERVICE','no','string','no','no','yes','Inservice status for new SLB real servers'),
1537 ('AUTOPORTS_CONFIG','4 = 1*33*kvm + 2*24*eth%u;15 = 1*446*kvm','string','yes','no','no','AutoPorts configuration'),
1538 ('DEFAULT_OBJECT_TYPE','4','uint','yes','no','yes','Default object type for new objects'),
1539 ('SHOW_EXPLICIT_TAGS','yes','string','no','no','yes','Show explicit tags'),
1540 ('SHOW_IMPLICIT_TAGS','yes','string','no','no','yes','Show implicit tags'),
1541 ('SHOW_AUTOMATIC_TAGS','no','string','no','no','yes','Show automatic tags'),
1542 ('IPV4_AUTO_RELEASE','1','uint','no','no','yes','Auto-release IPv4 addresses on allocation'),
1543 ('SHOW_LAST_TAB','yes','string','yes','no','yes','Remember last tab shown for each page'),
1544 ('EXT_IPV4_VIEW','yes','string','no','no','yes','Extended IPv4 view'),
1545 ('TREE_THRESHOLD','25','uint','yes','no','yes','Tree view auto-collapse threshold'),
1546 ('IPV4_JAYWALK','no','string','no','no','no','Enable IPv4 address allocations w/o covering network'),
1547 ('ADDNEW_AT_TOP','yes','string','no','no','yes','Render "add new" line at top of the list'),
1548 ('IPV4_TREE_SHOW_USAGE','no','string','no','no','yes','Show address usage in IPv4 tree'),
1549 ('PREVIEW_TEXT_MAXCHARS','10240','uint','yes','no','yes','Max chars for text file preview'),
1550 ('PREVIEW_TEXT_ROWS','25','uint','yes','no','yes','Rows for text file preview'),
1551 ('PREVIEW_TEXT_COLS','80','uint','yes','no','yes','Columns for text file preview'),
1552 ('PREVIEW_IMAGE_MAXPXS','320','uint','yes','no','yes','Max pixels per axis for image file preview'),
1553 ('VENDOR_SIEVE','','string','yes','no','yes','Vendor sieve configuration'),
1554 ('IPV4LB_LISTSRC','false','string','yes','no','no','List source: IPv4 load balancers'),
1555 ('IPV4OBJ_LISTSRC','{\$typeid_4} or {\$typeid_7} or {\$typeid_8} or {\$typeid_12} or {\$typeid_445} or {\$typeid_447} or {\$typeid_798} or {\$typeid_1397} or {\$typeid_1502} or {\$typeid_1503} or {\$typeid_1504} or {\$typeid_1507} or {\$typeid_1787}','string','yes','no','no','List source: IPv4-enabled objects'),
1556 ('IPV4NAT_LISTSRC','{\$typeid_4} or {\$typeid_7} or {\$typeid_8} or {\$typeid_798}','string','yes','no','no','List source: IPv4 NAT performers'),
1557 ('ASSETWARN_LISTSRC','{\$typeid_4} or {\$typeid_7} or {\$typeid_8}','string','yes','no','no','List source: object, for which asset tag should be set'),
1558 ('NAMEWARN_LISTSRC','{\$typeid_4} or {\$typeid_7} or {\$typeid_8}','string','yes','no','no','List source: object, for which common name should be set'),
1559 ('RACKS_PER_ROW','12','uint','yes','no','yes','Racks per row'),
1560 ('FILTER_PREDICATE_SIEVE','','string','yes','no','yes','Predicate sieve regex(7)'),
1561 ('FILTER_DEFAULT_ANDOR','and','string','no','no','yes','Default list filter boolean operation (or/and)'),
1562 ('FILTER_SUGGEST_ANDOR','yes','string','no','no','yes','Suggest and/or selector in list filter'),
1563 ('FILTER_SUGGEST_TAGS','yes','string','no','no','yes','Suggest tags in list filter'),
1564 ('FILTER_SUGGEST_PREDICATES','yes','string','no','no','yes','Suggest predicates in list filter'),
1565 ('FILTER_SUGGEST_EXTRA','yes','string','no','no','yes','Suggest extra expression in list filter'),
1566 ('DEFAULT_SNMP_COMMUNITY','public','string','no','no','no','Default SNMP Community string'),
1567 ('IPV4_ENABLE_KNIGHT','yes','string','no','no','yes','Enable IPv4 knight feature'),
1568 ('TAGS_TOPLIST_SIZE','50','uint','yes','no','yes','Tags top list size'),
1569 ('TAGS_QUICKLIST_SIZE','20','uint','no','no','yes','Tags quick list size'),
1570 ('TAGS_QUICKLIST_THRESHOLD','50','uint','yes','no','yes','Tags quick list threshold'),
1571 ('ENABLE_MULTIPORT_FORM','no','string','no','no','yes','Enable "Add/update multiple ports" form'),
1572 ('DEFAULT_PORT_IIF_ID','1','uint','no','no','no','Default port inner interface ID'),
1573 ('DEFAULT_PORT_OIF_IDS','1=24; 3=1078; 4=1077; 5=1079; 6=1080; 8=1082; 9=1084; 10=1588; 11=1668','string','no','no','no','Default port outer interface IDs'),
1574 ('IPV4_TREE_RTR_AS_CELL','no','string','no','no','yes','Show full router info for each network in IPv4 tree view'),
1575 ('PROXIMITY_RANGE','0','uint','yes','no','yes','Proximity range (0 is current rack only)'),
1576 ('VLANSWITCH_LISTSRC', '', 'string', 'yes', 'no', 'yes', 'List of VLAN running switches'),
1577 ('VLANIPV4NET_LISTSRC', '', 'string', 'yes', 'no', 'yes', 'List of VLAN-based IPv4 networks'),
1578 ('IPV4_TREE_SHOW_VLAN','yes','string','no','no','yes','Show VLAN for each network in IPv4 tree'),
1579 ('DEFAULT_VDOM_ID','','uint','yes','no','yes','Default VLAN domain ID'),
1580 ('DEFAULT_VST_ID','','uint','yes','no','yes','Default VLAN switch template ID'),
1581 ('8021Q_DEPLOY_MINAGE','300','uint','no','no','no','802.1Q deploy minimum age'),
1582 ('8021Q_DEPLOY_MAXAGE','3600','uint','no','no','no','802.1Q deploy maximum age'),
1583 ('8021Q_DEPLOY_RETRY','10800','uint','no','no','no','802.1Q deploy retry timer'),
1584 ('8021Q_WRI_AFTER_CONFT_LISTSRC','false','string','no','no','no','802.1Q: save device configuration after deploy (RackCode)'),
1585 ('8021Q_INSTANT_DEPLOY','no','string','no','no','yes','802.1Q: instant deploy'),
1586 ('STATIC_FILTER','yes','string','no','no','yes','Enable Filter Caching'),
1587 ('ENABLE_BULKPORT_FORM','yes','string','no','no','yes','Enable "Bulk Port" form'),
1588 ('CDP_RUNNERS_LISTSRC', '', 'string', 'yes', 'no', 'no', 'List of devices running CDP'),
1589 ('LLDP_RUNNERS_LISTSRC', '', 'string', 'yes', 'no', 'no', 'List of devices running LLDP'),
1590 ('SHRINK_TAG_TREE_ON_CLICK','yes','string','no','no','yes','Dynamically hide useless tags in tagtree'),
1591 ('MAX_UNFILTERED_ENTITIES','0','uint','no','no','yes','Max item count to display on unfiltered result page'),
1592 ('SYNCDOMAIN_MAX_PROCESSES','0','uint','yes','no', 'no', 'How many worker proceses syncdomain cron script should create'),
1593 ('PORT_EXCLUSION_LISTSRC','{\$typeid_3} or {\$typeid_10} or {\$typeid_11} or {\$typeid_1505} or {\$typeid_1506}','string','yes','no','no','List source: objects without ports'),
1594 ('FILTER_RACKLIST_BY_TAGS','yes','string','yes','no','yes','Rackspace: show only racks matching the current object\'s tags'),
1595 ('SSH_OBJS_LISTSRC','false','string','yes','no','yes','Rackcode filter for SSH-managed objects'),
1596 ('TELNET_OBJS_LISTSRC','false','string','yes','no','yes','Rackcode filter for telnet-managed objects'),
1597 ('SYNC_802Q_LISTSRC','','string','yes','no','no','List of VLAN switches sync is enabled on'),
1598 ('QUICK_LINK_PAGES','depot,ipv4space,rackspace','string','yes','no','yes','List of pages to dislay in quick links'),
1599 ('CACTI_LISTSRC','false','string','yes','no','no','List of object with Cacti graphs'),
1600 ('VIRTUAL_OBJ_LISTSRC','1504,1505,1506,1507','string','no','no','no','List source: virtual objects'),
1601 ('DATETIME_ZONE','UTC','string','yes','no','yes','Timezone to use for displaying/calculating dates'),
1602 ('DATETIME_FORMAT','m/d/Y','string','no','no','yes','PHP date() format to use for date output'),
1603 ('SEARCH_DOMAINS','','string','yes','no','yes','DNS domain list (comma-separated) to search in FQDN attributes'),
1604 ('8021Q_EXTSYNC_LISTSRC','false','string','yes','no','no','List source: objects with extended 802.1Q sync'),
1605 ('DB_VERSION','${db_version}','string','no','yes','no','Database version.');
1606
1607 INSERT INTO `Script` VALUES ('RackCode','allow {\$userid_1}');
1608
1609 INSERT INTO VLANValidID (vlan_id) VALUES
1610 (1),
1611 (2),
1612 (3),
1613 (4),
1614 (5),
1615 (6),
1616 (7),
1617 (8),
1618 (9),
1619 (10),
1620 (11),
1621 (12),
1622 (13),
1623 (14),
1624 (15),
1625 (16),
1626 (17),
1627 (18),
1628 (19),
1629 (20),
1630 (21),
1631 (22),
1632 (23),
1633 (24),
1634 (25),
1635 (26),
1636 (27),
1637 (28),
1638 (29),
1639 (30),
1640 (31),
1641 (32),
1642 (33),
1643 (34),
1644 (35),
1645 (36),
1646 (37),
1647 (38),
1648 (39),
1649 (40),
1650 (41),
1651 (42),
1652 (43),
1653 (44),
1654 (45),
1655 (46),
1656 (47),
1657 (48),
1658 (49),
1659 (50),
1660 (51),
1661 (52),
1662 (53),
1663 (54),
1664 (55),
1665 (56),
1666 (57),
1667 (58),
1668 (59),
1669 (60),
1670 (61),
1671 (62),
1672 (63),
1673 (64),
1674 (65),
1675 (66),
1676 (67),
1677 (68),
1678 (69),
1679 (70),
1680 (71),
1681 (72),
1682 (73),
1683 (74),
1684 (75),
1685 (76),
1686 (77),
1687 (78),
1688 (79),
1689 (80),
1690 (81),
1691 (82),
1692 (83),
1693 (84),
1694 (85),
1695 (86),
1696 (87),
1697 (88),
1698 (89),
1699 (90),
1700 (91),
1701 (92),
1702 (93),
1703 (94),
1704 (95),
1705 (96),
1706 (97),
1707 (98),
1708 (99),
1709 (100),
1710 (101),
1711 (102),
1712 (103),
1713 (104),
1714 (105),
1715 (106),
1716 (107),
1717 (108),
1718 (109),
1719 (110),
1720 (111),
1721 (112),
1722 (113),
1723 (114),
1724 (115),
1725 (116),
1726 (117),
1727 (118),
1728 (119),
1729 (120),
1730 (121),
1731 (122),
1732 (123),
1733 (124),
1734 (125),
1735 (126),
1736 (127),
1737 (128),
1738 (129),
1739 (130),
1740 (131),
1741 (132),
1742 (133),
1743 (134),
1744 (135),
1745 (136),
1746 (137),
1747 (138),
1748 (139),
1749 (140),
1750 (141),
1751 (142),
1752 (143),
1753 (144),
1754 (145),
1755 (146),
1756 (147),
1757 (148),
1758 (149),
1759 (150),
1760 (151),
1761 (152),
1762 (153),
1763 (154),
1764 (155),
1765 (156),
1766 (157),
1767 (158),
1768 (159),
1769 (160),
1770 (161),
1771 (162),
1772 (163),
1773 (164),
1774 (165),
1775 (166),
1776 (167),
1777 (168),
1778 (169),
1779 (170),
1780 (171),
1781 (172),
1782 (173),
1783 (174),
1784 (175),
1785 (176),
1786 (177),
1787 (178),
1788 (179),
1789 (180),
1790 (181),
1791 (182),
1792 (183),
1793 (184),
1794 (185),
1795 (186),
1796 (187),
1797 (188),
1798 (189),
1799 (190),
1800 (191),
1801 (192),
1802 (193),
1803 (194),
1804 (195),
1805 (196),
1806 (197),
1807 (198),
1808 (199),
1809 (200),
1810 (201),
1811 (202),
1812 (203),
1813 (204),
1814 (205),
1815 (206),
1816 (207),
1817 (208),
1818 (209),
1819 (210),
1820 (211),
1821 (212),
1822 (213),
1823 (214),
1824 (215),
1825 (216),
1826 (217),
1827 (218),
1828 (219),
1829 (220),
1830 (221),
1831 (222),
1832 (223),
1833 (224),
1834 (225),
1835 (226),
1836 (227),
1837 (228),
1838 (229),
1839 (230),
1840 (231),
1841 (232),
1842 (233),
1843 (234),
1844 (235),
1845 (236),
1846 (237),
1847 (238),
1848 (239),
1849 (240),
1850 (241),
1851 (242),
1852 (243),
1853 (244),
1854 (245),
1855 (246),
1856 (247),
1857 (248),
1858 (249),
1859 (250),
1860 (251),
1861 (252),
1862 (253),
1863 (254),
1864 (255),
1865 (256),
1866 (257),
1867 (258),
1868 (259),
1869 (260),
1870 (261),
1871 (262),
1872 (263),
1873 (264),
1874 (265),
1875 (266),
1876 (267),
1877 (268),
1878 (269),
1879 (270),
1880 (271),
1881 (272),
1882 (273),
1883 (274),
1884 (275),
1885 (276),
1886 (277),
1887 (278),
1888 (279),
1889 (280),
1890 (281),
1891 (282),
1892 (283),
1893 (284),
1894 (285),
1895 (286),
1896 (287),
1897 (288),
1898 (289),
1899 (290),
1900 (291),
1901 (292),
1902 (293),
1903 (294),
1904 (295),
1905 (296),
1906 (297),
1907 (298),
1908 (299),
1909 (300),
1910 (301),
1911 (302),
1912 (303),
1913 (304),
1914 (305),
1915 (306),
1916 (307),
1917 (308),
1918 (309),
1919 (310),
1920 (311),
1921 (312),
1922 (313),
1923 (314),
1924 (315),
1925 (316),
1926 (317),
1927 (318),
1928 (319),
1929 (320),
1930 (321),
1931 (322),
1932 (323),
1933 (324),
1934 (325),
1935 (326),
1936 (327),
1937 (328),
1938 (329),
1939 (330),
1940 (331),
1941 (332),
1942 (333),
1943 (334),
1944 (335),
1945 (336),
1946 (337),
1947 (338),
1948 (339),
1949 (340),
1950 (341),
1951 (342),
1952 (343),
1953 (344),
1954 (345),
1955 (346),
1956 (347),
1957 (348),
1958 (349),
1959 (350),
1960 (351),
1961 (352),
1962 (353),
1963 (354),
1964 (355),
1965 (356),
1966 (357),
1967 (358),
1968 (359),
1969 (360),
1970 (361),
1971 (362),
1972 (363),
1973 (364),
1974 (365),
1975 (366),
1976 (367),
1977 (368),
1978 (369),
1979 (370),
1980 (371),
1981 (372),
1982 (373),
1983 (374),
1984 (375),
1985 (376),
1986 (377),
1987 (378),
1988 (379),
1989 (380),
1990 (381),
1991 (382),
1992 (383),
1993 (384),
1994 (385),
1995 (386),
1996 (387),
1997 (388),
1998 (389),
1999 (390),
2000 (391),
2001 (392),
2002 (393),
2003 (394),
2004 (395),
2005 (396),
2006 (397),
2007 (398),
2008 (399),
2009 (400),
2010 (401),
2011 (402),
2012 (403),
2013 (404),
2014 (405),
2015 (406),
2016 (407),
2017 (408),
2018 (409),
2019 (410),
2020 (411),
2021 (412),
2022 (413),
2023 (414),
2024 (415),
2025 (416),
2026 (417),
2027 (418),
2028 (419),
2029 (420),
2030 (421),
2031 (422),
2032 (423),
2033 (424),
2034 (425),
2035 (426),
2036 (427),
2037 (428),
2038 (429),
2039 (430),
2040 (431),
2041 (432),
2042 (433),
2043 (434),
2044 (435),
2045 (436),
2046 (437),
2047 (438),
2048 (439),
2049 (440),
2050 (441),
2051 (442),
2052 (443),
2053 (444),
2054 (445),
2055 (446),
2056 (447),
2057 (448),
2058 (449),
2059 (450),
2060 (451),
2061 (452),
2062 (453),
2063 (454),
2064 (455),
2065 (456),
2066 (457),
2067 (458),
2068 (459),
2069 (460),
2070 (461),
2071 (462),
2072 (463),
2073 (464),
2074 (465),
2075 (466),
2076 (467),
2077 (468),
2078 (469),
2079 (470),
2080 (471),
2081 (472),
2082 (473),
2083 (474),
2084 (475),
2085 (476),
2086 (477),
2087 (478),
2088 (479),
2089 (480),
2090 (481),
2091 (482),
2092 (483),
2093 (484),
2094 (485),
2095 (486),
2096 (487),
2097 (488),
2098 (489),
2099 (490),
2100 (491),
2101 (492),
2102 (493),
2103 (494),
2104 (495),
2105 (496),
2106 (497),
2107 (498),
2108 (499),
2109 (500),
2110 (501),
2111 (502),
2112 (503),
2113 (504),
2114 (505),
2115 (506),
2116 (507),
2117 (508),
2118 (509),
2119 (510),
2120 (511),
2121 (512),
2122 (513),
2123 (514),
2124 (515),
2125 (516),
2126 (517),
2127 (518),
2128 (519),
2129 (520),
2130 (521),
2131 (522),
2132 (523),
2133 (524),
2134 (525),
2135 (526),
2136 (527),
2137 (528),
2138 (529),
2139 (530),
2140 (531),
2141 (532),
2142 (533),
2143 (534),
2144 (535),
2145 (536),
2146 (537),
2147 (538),
2148 (539),
2149 (540),
2150 (541),
2151 (542),
2152 (543),
2153 (544),
2154 (545),
2155 (546),
2156 (547),
2157 (548),
2158 (549),
2159 (550),
2160 (551),
2161 (552),
2162 (553),
2163 (554),
2164 (555),
2165 (556),
2166 (557),
2167 (558),
2168 (559),
2169 (560),
2170 (561),
2171 (562),
2172 (563),
2173 (564),
2174 (565),
2175 (566),
2176 (567),
2177 (568),
2178 (569),
2179 (570),
2180 (571),
2181 (572),
2182 (573),
2183 (574),
2184 (575),
2185 (576),
2186 (577),
2187 (578),
2188 (579),
2189 (580),
2190 (581),
2191 (582),
2192 (583),
2193 (584),
2194 (585),
2195 (586),
2196 (587),
2197 (588),
2198 (589),
2199 (590),
2200 (591),
2201 (592),
2202 (593),
2203 (594),
2204 (595),
2205 (596),
2206 (597),
2207 (598),
2208 (599),
2209 (600),
2210 (601),
2211 (602),
2212 (603),
2213 (604),
2214 (605),
2215 (606),
2216 (607),
2217 (608),
2218 (609),
2219 (610),
2220 (611),
2221 (612),
2222 (613),
2223 (614),
2224 (615),
2225 (616),
2226 (617),
2227 (618),
2228 (619),
2229 (620),
2230 (621),
2231 (622),
2232 (623),
2233 (624),
2234 (625),
2235 (626),
2236 (627),
2237 (628),
2238 (629),
2239 (630),
2240 (631),
2241 (632),
2242 (633),
2243 (634),
2244 (635),
2245 (636),
2246 (637),
2247 (638),
2248 (639),
2249 (640),
2250 (641),
2251 (642),
2252 (643),
2253 (644),
2254 (645),
2255 (646),
2256 (647),
2257 (648),
2258 (649),
2259 (650),
2260 (651),
2261 (652),
2262 (653),
2263 (654),
2264 (655),
2265 (656),
2266 (657),
2267 (658),
2268 (659),
2269 (660),
2270 (661),
2271 (662),
2272 (663),
2273 (664),
2274 (665),
2275 (666),
2276 (667),
2277 (668),
2278 (669),
2279 (670),
2280 (671),
2281 (672),
2282 (673),
2283 (674),
2284 (675),
2285 (676),
2286 (677),
2287 (678),
2288 (679),
2289 (680),
2290 (681),
2291 (682),
2292 (683),
2293 (684),
2294 (685),
2295 (686),
2296 (687),
2297 (688),
2298 (689),
2299 (690),
2300 (691),
2301 (692),
2302 (693),
2303 (694),
2304 (695),
2305 (696),
2306 (697),
2307 (698),
2308 (699),
2309 (700),
2310 (701),
2311 (702),
2312 (703),
2313 (704),
2314 (705),
2315 (706),
2316 (707),
2317 (708),
2318 (709),
2319 (710),
2320 (711),
2321 (712),
2322 (713),
2323 (714),
2324 (715),
2325 (716),
2326 (717),
2327 (718),
2328 (719),
2329 (720),
2330 (721),
2331 (722),
2332 (723),
2333 (724),
2334 (725),
2335 (726),
2336 (727),
2337 (728),
2338 (729),
2339 (730),
2340 (731),
2341 (732),
2342 (733),
2343 (734),
2344 (735),
2345 (736),
2346 (737),
2347 (738),
2348 (739),
2349 (740),
2350 (741),
2351 (742),
2352 (743),
2353 (744),
2354 (745),
2355 (746),
2356 (747),
2357 (748),
2358 (749),
2359 (750),
2360 (751),
2361 (752),
2362 (753),
2363 (754),
2364 (755),
2365 (756),
2366 (757),
2367 (758),
2368 (759),
2369 (760),
2370 (761),
2371 (762),
2372 (763),
2373 (764),
2374 (765),
2375 (766),
2376 (767),
2377 (768),
2378 (769),
2379 (770),
2380 (771),
2381 (772),
2382 (773),
2383 (774),
2384 (775),
2385 (776),
2386 (777),
2387 (778),
2388 (779),
2389 (780),
2390 (781),
2391 (782),
2392 (783),
2393 (784),
2394 (785),
2395 (786),
2396 (787),
2397 (788),
2398 (789),
2399 (790),
2400 (791),
2401 (792),
2402 (793),
2403 (794),
2404 (795),
2405 (796),
2406 (797),
2407 (798),
2408 (799),
2409 (800),
2410 (801),
2411 (802),
2412 (803),
2413 (804),
2414 (805),
2415 (806),
2416 (807),
2417 (808),
2418 (809),
2419 (810),
2420 (811),
2421 (812),
2422 (813),
2423 (814),
2424 (815),
2425 (816),
2426 (817),
2427 (818),
2428 (819),
2429 (820),
2430 (821),
2431 (822),
2432 (823),
2433 (824),
2434 (825),
2435 (826),
2436 (827),
2437 (828),
2438 (829),
2439 (830),
2440 (831),
2441 (832),
2442 (833),
2443 (834),
2444 (835),
2445 (836),
2446 (837),
2447 (838),
2448 (839),
2449 (840),
2450 (841),
2451 (842),
2452 (843),
2453 (844),
2454 (845),
2455 (846),
2456 (847),
2457 (848),
2458 (849),
2459 (850),
2460 (851),
2461 (852),
2462 (853),
2463 (854),
2464 (855),
2465 (856),
2466 (857),
2467 (858),
2468 (859),
2469 (860),
2470 (861),
2471 (862),
2472 (863),
2473 (864),
2474 (865),
2475 (866),
2476 (867),
2477 (868),
2478 (869),
2479 (870),
2480 (871),
2481 (872),
2482 (873),
2483 (874),
2484 (875),
2485 (876),
2486 (877),
2487 (878),
2488 (879),
2489 (880),
2490 (881),
2491 (882),
2492 (883),
2493 (884),
2494 (885),
2495 (886),
2496 (887),
2497 (888),
2498 (889),
2499 (890),
2500 (891),
2501 (892),
2502 (893),
2503 (894),
2504 (895),
2505 (896),
2506 (897),
2507 (898),
2508 (899),
2509 (900),
2510 (901),
2511 (902),
2512 (903),
2513 (904),
2514 (905),
2515 (906),
2516 (907),
2517 (908),
2518 (909),
2519 (910),
2520 (911),
2521 (912),
2522 (913),
2523 (914),
2524 (915),
2525 (916),
2526 (917),
2527 (918),
2528 (919),
2529 (920),
2530 (921),
2531 (922),
2532 (923),
2533 (924),
2534 (925),
2535 (926),
2536 (927),
2537 (928),
2538 (929),
2539 (930),
2540 (931),
2541 (932),
2542 (933),
2543 (934),
2544 (935),
2545 (936),
2546 (937),
2547 (938),
2548 (939),
2549 (940),
2550 (941),
2551 (942),
2552 (943),
2553 (944),
2554 (945),
2555 (946),
2556 (947),
2557 (948),
2558 (949),
2559 (950),
2560 (951),
2561 (952),
2562 (953),
2563 (954),
2564 (955),
2565 (956),
2566 (957),
2567 (958),
2568 (959),
2569 (960),
2570 (961),
2571 (962),
2572 (963),
2573 (964),
2574 (965),
2575 (966),
2576 (967),
2577 (968),
2578 (969),
2579 (970),
2580 (971),
2581 (972),
2582 (973),
2583 (974),
2584 (975),
2585 (976),
2586 (977),
2587 (978),
2588 (979),
2589 (980),
2590 (981),
2591 (982),
2592 (983),
2593 (984),
2594 (985),
2595 (986),
2596 (987),
2597 (988),
2598 (989),
2599 (990),
2600 (991),
2601 (992),
2602 (993),
2603 (994),
2604 (995),
2605 (996),
2606 (997),
2607 (998),
2608 (999),
2609 (1000),
2610 (1001),
2611 (1002),
2612 (1003),
2613 (1004),
2614 (1005),
2615 (1006),
2616 (1007),
2617 (1008),
2618 (1009),
2619 (1010),
2620 (1011),
2621 (1012),
2622 (1013),
2623 (1014),
2624 (1015),
2625 (1016),
2626 (1017),
2627 (1018),
2628 (1019),
2629 (1020),
2630 (1021),
2631 (1022),
2632 (1023),
2633 (1024),
2634 (1025),
2635 (1026),
2636 (1027),
2637 (1028),
2638 (1029),
2639 (1030),
2640 (1031),
2641 (1032),
2642 (1033),
2643 (1034),
2644 (1035),
2645 (1036),
2646 (1037),
2647 (1038),
2648 (1039),
2649 (1040),
2650 (1041),
2651 (1042),
2652 (1043),
2653 (1044),
2654 (1045),
2655 (1046),
2656 (1047),
2657 (1048),
2658 (1049),
2659 (1050),
2660 (1051),
2661 (1052),
2662 (1053),
2663 (1054),
2664 (1055),
2665 (1056),
2666 (1057),
2667 (1058),
2668 (1059),
2669 (1060),
2670 (1061),
2671 (1062),
2672 (1063),
2673 (1064),
2674 (1065),
2675 (1066),
2676 (1067),
2677 (1068),
2678 (1069),
2679 (1070),
2680 (1071),
2681 (1072),
2682 (1073),
2683 (1074),
2684 (1075),
2685 (1076),
2686 (1077),
2687 (1078),
2688 (1079),
2689 (1080),
2690 (1081),
2691 (1082),
2692 (1083),
2693 (1084),
2694 (1085),
2695 (1086),
2696 (1087),
2697 (1088),
2698 (1089),
2699 (1090),
2700 (1091),
2701 (1092),
2702 (1093),
2703 (1094),
2704 (1095),
2705 (1096),
2706 (1097),
2707 (1098),
2708 (1099),
2709 (1100),
2710 (1101),
2711 (1102),
2712 (1103),
2713 (1104),
2714 (1105),
2715 (1106),
2716 (1107),
2717 (1108),
2718 (1109),
2719 (1110),
2720 (1111),
2721 (1112),
2722 (1113),
2723 (1114),
2724 (1115),
2725 (1116),
2726 (1117),
2727 (1118),
2728 (1119),
2729 (1120),
2730 (1121),
2731 (1122),
2732 (1123),
2733 (1124),
2734 (1125),
2735 (1126),
2736 (1127),
2737 (1128),
2738 (1129),
2739 (1130),
2740 (1131),
2741 (1132),
2742 (1133),
2743 (1134),
2744 (1135),
2745 (1136),
2746 (1137),
2747 (1138),
2748 (1139),
2749 (1140),
2750 (1141),
2751 (1142),
2752 (1143),
2753 (1144),
2754 (1145),
2755 (1146),
2756 (1147),
2757 (1148),
2758 (1149),
2759 (1150),
2760 (1151),
2761 (1152),
2762 (1153),
2763 (1154),
2764 (1155),
2765 (1156),
2766 (1157),
2767 (1158),
2768 (1159),
2769 (1160),
2770 (1161),
2771 (1162),
2772 (1163),
2773 (1164),
2774 (1165),
2775 (1166),
2776 (1167),
2777 (1168),
2778 (1169),
2779 (1170),
2780 (1171),
2781 (1172),
2782 (1173),
2783 (1174),
2784 (1175),
2785 (1176),
2786 (1177),
2787 (1178),
2788 (1179),
2789 (1180),
2790 (1181),
2791 (1182),
2792 (1183),
2793 (1184),
2794 (1185),
2795 (1186),
2796 (1187),
2797 (1188),
2798 (1189),
2799 (1190),
2800 (1191),
2801 (1192),
2802 (1193),
2803 (1194),
2804 (1195),
2805 (1196),
2806 (1197),
2807 (1198),
2808 (1199),
2809 (1200),
2810 (1201),
2811 (1202),
2812 (1203),
2813 (1204),
2814 (1205),
2815 (1206),
2816 (1207),
2817 (1208),
2818 (1209),
2819 (1210),
2820 (1211),
2821 (1212),
2822 (1213),
2823 (1214),
2824 (1215),
2825 (1216),
2826 (1217),
2827 (1218),
2828 (1219),
2829 (1220),
2830 (1221),
2831 (1222),
2832 (1223),
2833 (1224),
2834 (1225),
2835 (1226),
2836 (1227),
2837 (1228),
2838 (1229),
2839 (1230),
2840 (1231),
2841 (1232),
2842 (1233),
2843 (1234),
2844 (1235),
2845 (1236),
2846 (1237),
2847 (1238),
2848 (1239),
2849 (1240),
2850 (1241),
2851 (1242),
2852 (1243),
2853 (1244),
2854 (1245),
2855 (1246),
2856 (1247),
2857 (1248),
2858 (1249),
2859 (1250),
2860 (1251),
2861 (1252),
2862 (1253),
2863 (1254),
2864 (1255),
2865 (1256),
2866 (1257),
2867 (1258),
2868 (1259),
2869 (1260),
2870 (1261),
2871 (1262),
2872 (1263),
2873 (1264),
2874 (1265),
2875 (1266),
2876 (1267),
2877 (1268),
2878 (1269),
2879 (1270),
2880 (1271),
2881 (1272),
2882 (1273),
2883 (1274),
2884 (1275),
2885 (1276),
2886 (1277),
2887 (1278),
2888 (1279),
2889 (1280),
2890 (1281),
2891 (1282),
2892 (1283),
2893 (1284),
2894 (1285),
2895 (1286),
2896 (1287),
2897 (1288),
2898 (1289),
2899 (1290),
2900 (1291),
2901 (1292),
2902 (1293),
2903 (1294),
2904 (1295),
2905 (1296),
2906 (1297),
2907 (1298),
2908 (1299),
2909 (1300),
2910 (1301),
2911 (1302),
2912 (1303),
2913 (1304),
2914 (1305),
2915 (1306),
2916 (1307),
2917 (1308),
2918 (1309),
2919 (1310),
2920 (1311),
2921 (1312),
2922 (1313),
2923 (1314),
2924 (1315),
2925 (1316),
2926 (1317),
2927 (1318),
2928 (1319),
2929 (1320),
2930 (1321),
2931 (1322),
2932 (1323),
2933 (1324),
2934 (1325),
2935 (1326),
2936 (1327),
2937 (1328),
2938 (1329),
2939 (1330),
2940 (1331),
2941 (1332),
2942 (1333),
2943 (1334),
2944 (1335),
2945 (1336),
2946 (1337),
2947 (1338),
2948 (1339),
2949 (1340),
2950 (1341),
2951 (1342),
2952 (1343),
2953 (1344),
2954 (1345),
2955 (1346),
2956 (1347),
2957 (1348),
2958 (1349),
2959 (1350),
2960 (1351),
2961 (1352),
2962 (1353),
2963 (1354),
2964 (1355),
2965 (1356),
2966 (1357),
2967 (1358),
2968 (1359),
2969 (1360),
2970 (1361),
2971 (1362),
2972 (1363),
2973 (1364),
2974 (1365),
2975 (1366),
2976 (1367),
2977 (1368),
2978 (1369),
2979 (1370),
2980 (1371),
2981 (1372),
2982 (1373),
2983 (1374),
2984 (1375),
2985 (1376),
2986 (1377),
2987 (1378),
2988 (1379),
2989 (1380),
2990 (1381),
2991 (1382),
2992 (1383),
2993 (1384),
2994 (1385),
2995 (1386),
2996 (1387),
2997 (1388),
2998 (1389),
2999 (1390),
3000 (1391),
3001 (1392),
3002 (1393),
3003 (1394),
3004 (1395),
3005 (1396),
3006 (1397),
3007 (1398),
3008 (1399),
3009 (1400),
3010 (1401),
3011 (1402),
3012 (1403),
3013 (1404),
3014 (1405),
3015 (1406),
3016 (1407),
3017 (1408),
3018 (1409),
3019 (1410),
3020 (1411),
3021 (1412),
3022 (1413),
3023 (1414),
3024 (1415),
3025 (1416),
3026 (1417),
3027 (1418),
3028 (1419),
3029 (1420),
3030 (1421),
3031 (1422),
3032 (1423),
3033 (1424),
3034 (1425),
3035 (1426),
3036 (1427),
3037 (1428),
3038 (1429),
3039 (1430),
3040 (1431),
3041 (1432),
3042 (1433),
3043 (1434),
3044 (1435),
3045 (1436),
3046 (1437),
3047 (1438),
3048 (1439),
3049 (1440),
3050 (1441),
3051 (1442),
3052 (1443),
3053 (1444),
3054 (1445),
3055 (1446),
3056 (1447),
3057 (1448),
3058 (1449),
3059 (1450),
3060 (1451),
3061 (1452),
3062 (1453),
3063 (1454),
3064 (1455),
3065 (1456),
3066 (1457),
3067 (1458),
3068 (1459),
3069 (1460),
3070 (1461),
3071 (1462),
3072 (1463),
3073 (1464),
3074 (1465),
3075 (1466),
3076 (1467),
3077 (1468),
3078 (1469),
3079 (1470),
3080 (1471),
3081 (1472),
3082 (1473),
3083 (1474),
3084 (1475),
3085 (1476),
3086 (1477),
3087 (1478),
3088 (1479),
3089 (1480),
3090 (1481),
3091 (1482),
3092 (1483),
3093 (1484),
3094 (1485),
3095 (1486),
3096 (1487),
3097 (1488),
3098 (1489),
3099 (1490),
3100 (1491),
3101 (1492),
3102 (1493),
3103 (1494),
3104 (1495),
3105 (1496),
3106 (1497),
3107 (1498),
3108 (1499),
3109 (1500),
3110 (1501),
3111 (1502),
3112 (1503),
3113 (1504),
3114 (1505),
3115 (1506),
3116 (1507),
3117 (1508),
3118 (1509),
3119 (1510),
3120 (1511),
3121 (1512),
3122 (1513),
3123 (1514),
3124 (1515),
3125 (1516),
3126 (1517),
3127 (1518),
3128 (1519),
3129 (1520),
3130 (1521),
3131 (1522),
3132 (1523),
3133 (1524),
3134 (1525),
3135 (1526),
3136 (1527),
3137 (1528),
3138 (1529),
3139 (1530),
3140 (1531),
3141 (1532),
3142 (1533),
3143 (1534),
3144 (1535),
3145 (1536),
3146 (1537),
3147 (1538),
3148 (1539),
3149 (1540),
3150 (1541),
3151 (1542),
3152 (1543),
3153 (1544),
3154 (1545),
3155 (1546),
3156 (1547),
3157 (1548),
3158 (1549),
3159 (1550),
3160 (1551),
3161 (1552),
3162 (1553),
3163 (1554),
3164 (1555),
3165 (1556),
3166 (1557),
3167 (1558),
3168 (1559),
3169 (1560),
3170 (1561),
3171 (1562),
3172 (1563),
3173 (1564),
3174 (1565),
3175 (1566),
3176 (1567),
3177 (1568),
3178 (1569),
3179 (1570),
3180 (1571),
3181 (1572),
3182 (1573),
3183 (1574),
3184 (1575),
3185 (1576),
3186 (1577),
3187 (1578),
3188 (1579),
3189 (1580),
3190 (1581),
3191 (1582),
3192 (1583),
3193 (1584),
3194 (1585),
3195 (1586),
3196 (1587),
3197 (1588),
3198 (1589),
3199 (1590),
3200 (1591),
3201 (1592),
3202 (1593),
3203 (1594),
3204 (1595),
3205 (1596),
3206 (1597),
3207 (1598),
3208 (1599),
3209 (1600),
3210 (1601),
3211 (1602),
3212 (1603),
3213 (1604),
3214 (1605),
3215 (1606),
3216 (1607),
3217 (1608),
3218 (1609),
3219 (1610),
3220 (1611),
3221 (1612),
3222 (1613),
3223 (1614),
3224 (1615),
3225 (1616),
3226 (1617),
3227 (1618),
3228 (1619),
3229 (1620),
3230 (1621),
3231 (1622),
3232 (1623),
3233 (1624),
3234 (1625),
3235 (1626),
3236 (1627),
3237 (1628),
3238 (1629),
3239 (1630),
3240 (1631),
3241 (1632),
3242 (1633),
3243 (1634),
3244 (1635),
3245 (1636),
3246 (1637),
3247 (1638),
3248 (1639),
3249 (1640),
3250 (1641),
3251 (1642),
3252 (1643),
3253 (1644),
3254 (1645),
3255 (1646),
3256 (1647),
3257 (1648),
3258 (1649),
3259 (1650),
3260 (1651),
3261 (1652),
3262 (1653),
3263 (1654),
3264 (1655),
3265 (1656),
3266 (1657),
3267 (1658),
3268 (1659),
3269 (1660),
3270 (1661),
3271 (1662),
3272 (1663),
3273 (1664),
3274 (1665),
3275 (1666),
3276 (1667),
3277 (1668),
3278 (1669),
3279 (1670),
3280 (1671),
3281 (1672),
3282 (1673),
3283 (1674),
3284 (1675),
3285 (1676),
3286 (1677),
3287 (1678),
3288 (1679),
3289 (1680),
3290 (1681),
3291 (1682),
3292 (1683),
3293 (1684),
3294 (1685),
3295 (1686),
3296 (1687),
3297 (1688),
3298 (1689),
3299 (1690),
3300 (1691),
3301 (1692),
3302 (1693),
3303 (1694),
3304 (1695),
3305 (1696),
3306 (1697),
3307 (1698),
3308 (1699),
3309 (1700),
3310 (1701),
3311 (1702),
3312 (1703),
3313 (1704),
3314 (1705),
3315 (1706),
3316 (1707),
3317 (1708),
3318 (1709),
3319 (1710),
3320 (1711),
3321 (1712),
3322 (1713),
3323 (1714),
3324 (1715),
3325 (1716),
3326 (1717),
3327 (1718),
3328 (1719),
3329 (1720),
3330 (1721),
3331 (1722),
3332 (1723),
3333 (1724),
3334 (1725),
3335 (1726),
3336 (1727),
3337 (1728),
3338 (1729),
3339 (1730),
3340 (1731),
3341 (1732),
3342 (1733),
3343 (1734),
3344 (1735),
3345 (1736),
3346 (1737),
3347 (1738),
3348 (1739),
3349 (1740),
3350 (1741),
3351 (1742),
3352 (1743),
3353 (1744),
3354 (1745),
3355 (1746),
3356 (1747),
3357 (1748),
3358 (1749),
3359 (1750),
3360 (1751),
3361 (1752),
3362 (1753),
3363 (1754),
3364 (1755),
3365 (1756),
3366 (1757),
3367 (1758),
3368 (1759),
3369 (1760),
3370 (1761),
3371 (1762),
3372 (1763),
3373 (1764),
3374 (1765),
3375 (1766),
3376 (1767),
3377 (1768),
3378 (1769),
3379 (1770),
3380 (1771),
3381 (1772),
3382 (1773),
3383 (1774),
3384 (1775),
3385 (1776),
3386 (1777),
3387 (1778),
3388 (1779),
3389 (1780),
3390 (1781),
3391 (1782),
3392 (1783),
3393 (1784),
3394 (1785),
3395 (1786),
3396 (1787),
3397 (1788),
3398 (1789),
3399 (1790),
3400 (1791),
3401 (1792),
3402 (1793),
3403 (1794),
3404 (1795),
3405 (1796),
3406 (1797),
3407 (1798),
3408 (1799),
3409 (1800),
3410 (1801),
3411 (1802),
3412 (1803),
3413 (1804),
3414 (1805),
3415 (1806),
3416 (1807),
3417 (1808),
3418 (1809),
3419 (1810),
3420 (1811),
3421 (1812),
3422 (1813),
3423 (1814),
3424 (1815),
3425 (1816),
3426 (1817),
3427 (1818),
3428 (1819),
3429 (1820),
3430 (1821),
3431 (1822),
3432 (1823),
3433 (1824),
3434 (1825),
3435 (1826),
3436 (1827),
3437 (1828),
3438 (1829),
3439 (1830),
3440 (1831),
3441 (1832),
3442 (1833),
3443 (1834),
3444 (1835),
3445 (1836),
3446 (1837),
3447 (1838),
3448 (1839),
3449 (1840),
3450 (1841),
3451 (1842),
3452 (1843),
3453 (1844),
3454 (1845),
3455 (1846),
3456 (1847),
3457 (1848),
3458 (1849),
3459 (1850),
3460 (1851),
3461 (1852),
3462 (1853),
3463 (1854),
3464 (1855),
3465 (1856),
3466 (1857),
3467 (1858),
3468 (1859),
3469 (1860),
3470 (1861),
3471 (1862),
3472 (1863),
3473 (1864),
3474 (1865),
3475 (1866),
3476 (1867),
3477 (1868),
3478 (1869),
3479 (1870),
3480 (1871),
3481 (1872),
3482 (1873),
3483 (1874),
3484 (1875),
3485 (1876),
3486 (1877),
3487 (1878),
3488 (1879),
3489 (1880),
3490 (1881),
3491 (1882),
3492 (1883),
3493 (1884),
3494 (1885),
3495 (1886),
3496 (1887),
3497 (1888),
3498 (1889),
3499 (1890),
3500 (1891),
3501 (1892),
3502 (1893),
3503 (1894),
3504 (1895),
3505 (1896),
3506 (1897),
3507 (1898),
3508 (1899),
3509 (1900),
3510 (1901),
3511 (1902),
3512 (1903),
3513 (1904),
3514 (1905),
3515 (1906),
3516 (1907),
3517 (1908),
3518 (1909),
3519 (1910),
3520 (1911),
3521 (1912),
3522 (1913),
3523 (1914),
3524 (1915),
3525 (1916),
3526 (1917),
3527 (1918),
3528 (1919),
3529 (1920),
3530 (1921),
3531 (1922),
3532 (1923),
3533 (1924),
3534 (1925),
3535 (1926),
3536 (1927),
3537 (1928),
3538 (1929),
3539 (1930),
3540 (1931),
3541 (1932),
3542 (1933),
3543 (1934),
3544 (1935),
3545 (1936),
3546 (1937),
3547 (1938),
3548 (1939),
3549 (1940),
3550 (1941),
3551 (1942),
3552 (1943),
3553 (1944),
3554 (1945),
3555 (1946),
3556 (1947),
3557 (1948),
3558 (1949),
3559 (1950),
3560 (1951),
3561 (1952),
3562 (1953),
3563 (1954),
3564 (1955),
3565 (1956),
3566 (1957),
3567 (1958),
3568 (1959),
3569 (1960),
3570 (1961),
3571 (1962),
3572 (1963),
3573 (1964),
3574 (1965),
3575 (1966),
3576 (1967),
3577 (1968),
3578 (1969),
3579 (1970),
3580 (1971),
3581 (1972),
3582 (1973),
3583 (1974),
3584 (1975),
3585 (1976),
3586 (1977),
3587 (1978),
3588 (1979),
3589 (1980),
3590 (1981),
3591 (1982),
3592 (1983),
3593 (1984),
3594 (1985),
3595 (1986),
3596 (1987),
3597 (1988),
3598 (1989),
3599 (1990),
3600 (1991),
3601 (1992),
3602 (1993),
3603 (1994),
3604 (1995),
3605 (1996),
3606 (1997),
3607 (1998),
3608 (1999),
3609 (2000),
3610 (2001),
3611 (2002),
3612 (2003),
3613 (2004),
3614 (2005),
3615 (2006),
3616 (2007),
3617 (2008),
3618 (2009),
3619 (2010),
3620 (2011),
3621 (2012),
3622 (2013),
3623 (2014),
3624 (2015),
3625 (2016),
3626 (2017),
3627 (2018),
3628 (2019),
3629 (2020),
3630 (2021),
3631 (2022),
3632 (2023),
3633 (2024),
3634 (2025),
3635 (2026),
3636 (2027),
3637 (2028),
3638 (2029),
3639 (2030),
3640 (2031),
3641 (2032),
3642 (2033),
3643 (2034),
3644 (2035),
3645 (2036),
3646 (2037),
3647 (2038),
3648 (2039),
3649 (2040),
3650 (2041),
3651 (2042),
3652 (2043),
3653 (2044),
3654 (2045),
3655 (2046),
3656 (2047),
3657 (2048),
3658 (2049),
3659 (2050),
3660 (2051),
3661 (2052),
3662 (2053),
3663 (2054),
3664 (2055),
3665 (2056),
3666 (2057),
3667 (2058),
3668 (2059),
3669 (2060),
3670 (2061),
3671 (2062),
3672 (2063),
3673 (2064),
3674 (2065),
3675 (2066),
3676 (2067),
3677 (2068),
3678 (2069),
3679 (2070),
3680 (2071),
3681 (2072),
3682 (2073),
3683 (2074),
3684 (2075),
3685 (2076),
3686 (2077),
3687 (2078),
3688 (2079),
3689 (2080),
3690 (2081),
3691 (2082),
3692 (2083),
3693 (2084),
3694 (2085),
3695 (2086),
3696 (2087),
3697 (2088),
3698 (2089),
3699 (2090),
3700 (2091),
3701 (2092),
3702 (2093),
3703 (2094),
3704 (2095),
3705 (2096),
3706 (2097),
3707 (2098),
3708 (2099),
3709 (2100),
3710 (2101),
3711 (2102),
3712 (2103),
3713 (2104),
3714 (2105),
3715 (2106),
3716 (2107),
3717 (2108),
3718 (2109),
3719 (2110),
3720 (2111),
3721 (2112),
3722 (2113),
3723 (2114),
3724 (2115),
3725 (2116),
3726 (2117),
3727 (2118),
3728 (2119),
3729 (2120),
3730 (2121),
3731 (2122),
3732 (2123),
3733 (2124),
3734 (2125),
3735 (2126),
3736 (2127),
3737 (2128),
3738 (2129),
3739 (2130),
3740 (2131),
3741 (2132),
3742 (2133),
3743 (2134),
3744 (2135),
3745 (2136),
3746 (2137),
3747 (2138),
3748 (2139),
3749 (2140),
3750 (2141),
3751 (2142),
3752 (2143),
3753 (2144),
3754 (2145),
3755 (2146),
3756 (2147),
3757 (2148),
3758 (2149),
3759 (2150),
3760 (2151),
3761 (2152),
3762 (2153),
3763 (2154),
3764 (2155),
3765 (2156),
3766 (2157),
3767 (2158),
3768 (2159),
3769 (2160),
3770 (2161),
3771 (2162),
3772 (2163),
3773 (2164),
3774 (2165),
3775 (2166),
3776 (2167),
3777 (2168),
3778 (2169),
3779 (2170),
3780 (2171),
3781 (2172),
3782 (2173),
3783 (2174),
3784 (2175),
3785 (2176),
3786 (2177),
3787 (2178),
3788 (2179),
3789 (2180),
3790 (2181),
3791 (2182),
3792 (2183),
3793 (2184),
3794 (2185),
3795 (2186),
3796 (2187),
3797 (2188),
3798 (2189),
3799 (2190),
3800 (2191),
3801 (2192),
3802 (2193),
3803 (2194),
3804 (2195),
3805 (2196),
3806 (2197),
3807 (2198),
3808 (2199),
3809 (2200),
3810 (2201),
3811 (2202),
3812 (2203),
3813 (2204),
3814 (2205),
3815 (2206),
3816 (2207),
3817 (2208),
3818 (2209),
3819 (2210),
3820 (2211),
3821 (2212),
3822 (2213),
3823 (2214),
3824 (2215),
3825 (2216),
3826 (2217),
3827 (2218),
3828 (2219),
3829 (2220),
3830 (2221),
3831 (2222),
3832 (2223),
3833 (2224),
3834 (2225),
3835 (2226),
3836 (2227),
3837 (2228),
3838 (2229),
3839 (2230),
3840 (2231),
3841 (2232),
3842 (2233),
3843 (2234),
3844 (2235),
3845 (2236),
3846 (2237),
3847 (2238),
3848 (2239),
3849 (2240),
3850 (2241),
3851 (2242),
3852 (2243),
3853 (2244),
3854 (2245),
3855 (2246),
3856 (2247),
3857 (2248),
3858 (2249),
3859 (2250),
3860 (2251),
3861 (2252),
3862 (2253),
3863 (2254),
3864 (2255),
3865 (2256),
3866 (2257),
3867 (2258),
3868 (2259),
3869 (2260),
3870 (2261),
3871 (2262),
3872 (2263),
3873 (2264),
3874 (2265),
3875 (2266),
3876 (2267),
3877 (2268),
3878 (2269),
3879 (2270),
3880 (2271),
3881 (2272),
3882 (2273),
3883 (2274),
3884 (2275),
3885 (2276),
3886 (2277),
3887 (2278),
3888 (2279),
3889 (2280),
3890 (2281),
3891 (2282),
3892 (2283),
3893 (2284),
3894 (2285),
3895 (2286),
3896 (2287),
3897 (2288),
3898 (2289),
3899 (2290),
3900 (2291),
3901 (2292),
3902 (2293),
3903 (2294),
3904 (2295),
3905 (2296),
3906 (2297),
3907 (2298),
3908 (2299),
3909 (2300),
3910 (2301),
3911 (2302),
3912 (2303),
3913 (2304),
3914 (2305),
3915 (2306),
3916 (2307),
3917 (2308),
3918 (2309),
3919 (2310),
3920 (2311),
3921 (2312),
3922 (2313),
3923 (2314),
3924 (2315),
3925 (2316),
3926 (2317),
3927 (2318),
3928 (2319),
3929 (2320),
3930 (2321),
3931 (2322),
3932 (2323),
3933 (2324),
3934 (2325),
3935 (2326),
3936 (2327),
3937 (2328),
3938 (2329),
3939 (2330),
3940 (2331),
3941 (2332),
3942 (2333),
3943 (2334),
3944 (2335),
3945 (2336),
3946 (2337),
3947 (2338),
3948 (2339),
3949 (2340),
3950 (2341),
3951 (2342),
3952 (2343),
3953 (2344),
3954 (2345),
3955 (2346),
3956 (2347),
3957 (2348),
3958 (2349),
3959 (2350),
3960 (2351),
3961 (2352),
3962 (2353),
3963 (2354),
3964 (2355),
3965 (2356),
3966 (2357),
3967 (2358),
3968 (2359),
3969 (2360),
3970 (2361),
3971 (2362),
3972 (2363),
3973 (2364),
3974 (2365),
3975 (2366),
3976 (2367),
3977 (2368),
3978 (2369),
3979 (2370),
3980 (2371),
3981 (2372),
3982 (2373),
3983 (2374),
3984 (2375),
3985 (2376),
3986 (2377),
3987 (2378),
3988 (2379),
3989 (2380),
3990 (2381),
3991 (2382),
3992 (2383),
3993 (2384),
3994 (2385),
3995 (2386),
3996 (2387),
3997 (2388),
3998 (2389),
3999 (2390),
4000 (2391),
4001 (2392),
4002 (2393),
4003 (2394),
4004 (2395),
4005 (2396),
4006 (2397),
4007 (2398),
4008 (2399),
4009 (2400),
4010 (2401),
4011 (2402),
4012 (2403),
4013 (2404),
4014 (2405),
4015 (2406),
4016 (2407),
4017 (2408),
4018 (2409),
4019 (2410),
4020 (2411),
4021 (2412),
4022 (2413),
4023 (2414),
4024 (2415),
4025 (2416),
4026 (2417),
4027 (2418),
4028 (2419),
4029 (2420),
4030 (2421),
4031 (2422),
4032 (2423),
4033 (2424),
4034 (2425),
4035 (2426),
4036 (2427),
4037 (2428),
4038 (2429),
4039 (2430),
4040 (2431),
4041 (2432),
4042 (2433),
4043 (2434),
4044 (2435),
4045 (2436),
4046 (2437),
4047 (2438),
4048 (2439),
4049 (2440),
4050 (2441),
4051 (2442),
4052 (2443),
4053 (2444),
4054 (2445),
4055 (2446),
4056 (2447),
4057 (2448),
4058 (2449),
4059 (2450),
4060 (2451),
4061 (2452),
4062 (2453),
4063 (2454),
4064 (2455),
4065 (2456),
4066 (2457),
4067 (2458),
4068 (2459),
4069 (2460),
4070 (2461),
4071 (2462),
4072 (2463),
4073 (2464),
4074 (2465),
4075 (2466),
4076 (2467),
4077 (2468),
4078 (2469),
4079 (2470),
4080 (2471),
4081 (2472),
4082 (2473),
4083 (2474),
4084 (2475),
4085 (2476),
4086 (2477),
4087 (2478),
4088 (2479),
4089 (2480),
4090 (2481),
4091 (2482),
4092 (2483),
4093 (2484),
4094 (2485),
4095 (2486),
4096 (2487),
4097 (2488),
4098 (2489),
4099 (2490),
4100 (2491),
4101 (2492),
4102 (2493),
4103 (2494),
4104 (2495),
4105 (2496),
4106 (2497),
4107 (2498),
4108 (2499),
4109 (2500),
4110 (2501),
4111 (2502),
4112 (2503),
4113 (2504),
4114 (2505),
4115 (2506),
4116 (2507),
4117 (2508),
4118 (2509),
4119 (2510),
4120 (2511),
4121 (2512),
4122 (2513),
4123 (2514),
4124 (2515),
4125 (2516),
4126 (2517),
4127 (2518),
4128 (2519),
4129 (2520),
4130 (2521),
4131 (2522),
4132 (2523),
4133 (2524),
4134 (2525),
4135 (2526),
4136 (2527),
4137 (2528),
4138 (2529),
4139 (2530),
4140 (2531),
4141 (2532),
4142 (2533),
4143 (2534),
4144 (2535),
4145 (2536),
4146 (2537),
4147 (2538),
4148 (2539),
4149 (2540),
4150 (2541),
4151 (2542),
4152 (2543),
4153 (2544),
4154 (2545),
4155 (2546),
4156 (2547),
4157 (2548),
4158 (2549),
4159 (2550),
4160 (2551),
4161 (2552),
4162 (2553),
4163 (2554),
4164 (2555),
4165 (2556),
4166 (2557),
4167 (2558),
4168 (2559),
4169 (2560),
4170 (2561),
4171 (2562),
4172 (2563),
4173 (2564),
4174 (2565),
4175 (2566),
4176 (2567),
4177 (2568),
4178 (2569),
4179 (2570),
4180 (2571),
4181 (2572),
4182 (2573),
4183 (2574),
4184 (2575),
4185 (2576),
4186 (2577),
4187 (2578),
4188 (2579),
4189 (2580),
4190 (2581),
4191 (2582),
4192 (2583),
4193 (2584),
4194 (2585),
4195 (2586),
4196 (2587),
4197 (2588),
4198 (2589),
4199 (2590),
4200 (2591),
4201 (2592),
4202 (2593),
4203 (2594),
4204 (2595),
4205 (2596),
4206 (2597),
4207 (2598),
4208 (2599),
4209 (2600),
4210 (2601),
4211 (2602),
4212 (2603),
4213 (2604),
4214 (2605),
4215 (2606),
4216 (2607),
4217 (2608),
4218 (2609),
4219 (2610),
4220 (2611),
4221 (2612),
4222 (2613),
4223 (2614),
4224 (2615),
4225 (2616),
4226 (2617),
4227 (2618),
4228 (2619),
4229 (2620),
4230 (2621),
4231 (2622),
4232 (2623),
4233 (2624),
4234 (2625),
4235 (2626),
4236 (2627),
4237 (2628),
4238 (2629),
4239 (2630),
4240 (2631),
4241 (2632),
4242 (2633),
4243 (2634),
4244 (2635),
4245 (2636),
4246 (2637),
4247 (2638),
4248 (2639),
4249 (2640),
4250 (2641),
4251 (2642),
4252 (2643),
4253 (2644),
4254 (2645),
4255 (2646),
4256 (2647),
4257 (2648),
4258 (2649),
4259 (2650),
4260 (2651),
4261 (2652),
4262 (2653),
4263 (2654),
4264 (2655),
4265 (2656),
4266 (2657),
4267 (2658),
4268 (2659),
4269 (2660),
4270 (2661),
4271 (2662),
4272 (2663),
4273 (2664),
4274 (2665),
4275 (2666),
4276 (2667),
4277 (2668),
4278 (2669),
4279 (2670),
4280 (2671),
4281 (2672),
4282 (2673),
4283 (2674),
4284 (2675),
4285 (2676),
4286 (2677),
4287 (2678),
4288 (2679),
4289 (2680),
4290 (2681),
4291 (2682),
4292 (2683),
4293 (2684),
4294 (2685),
4295 (2686),
4296 (2687),
4297 (2688),
4298 (2689),
4299 (2690),
4300 (2691),
4301 (2692),
4302 (2693),
4303 (2694),
4304 (2695),
4305 (2696),
4306 (2697),
4307 (2698),
4308 (2699),
4309 (2700),
4310 (2701),
4311 (2702),
4312 (2703),
4313 (2704),
4314 (2705),
4315 (2706),
4316 (2707),
4317 (2708),
4318 (2709),
4319 (2710),
4320 (2711),
4321 (2712),
4322 (2713),
4323 (2714),
4324 (2715),
4325 (2716),
4326 (2717),
4327 (2718),
4328 (2719),
4329 (2720),
4330 (2721),
4331 (2722),
4332 (2723),
4333 (2724),
4334 (2725),
4335 (2726),
4336 (2727),
4337 (2728),
4338 (2729),
4339 (2730),
4340 (2731),
4341 (2732),
4342 (2733),
4343 (2734),
4344 (2735),
4345 (2736),
4346 (2737),
4347 (2738),
4348 (2739),
4349 (2740),
4350 (2741),
4351 (2742),
4352 (2743),
4353 (2744),
4354 (2745),
4355 (2746),
4356 (2747),
4357 (2748),
4358 (2749),
4359 (2750),
4360 (2751),
4361 (2752),
4362 (2753),
4363 (2754),
4364 (2755),
4365 (2756),
4366 (2757),
4367 (2758),
4368 (2759),
4369 (2760),
4370 (2761),
4371 (2762),
4372 (2763),
4373 (2764),
4374 (2765),
4375 (2766),
4376 (2767),
4377 (2768),
4378 (2769),
4379 (2770),
4380 (2771),
4381 (2772),
4382 (2773),
4383 (2774),
4384 (2775),
4385 (2776),
4386 (2777),
4387 (2778),
4388 (2779),
4389 (2780),
4390 (2781),
4391 (2782),
4392 (2783),
4393 (2784),
4394 (2785),
4395 (2786),
4396 (2787),
4397 (2788),
4398 (2789),
4399 (2790),
4400 (2791),
4401 (2792),
4402 (2793),
4403 (2794),
4404 (2795),
4405 (2796),
4406 (2797),
4407 (2798),
4408 (2799),
4409 (2800),
4410 (2801),
4411 (2802),
4412 (2803),
4413 (2804),
4414 (2805),
4415 (2806),
4416 (2807),
4417 (2808),
4418 (2809),
4419 (2810),
4420 (2811),
4421 (2812),
4422 (2813),
4423 (2814),
4424 (2815),
4425 (2816),
4426 (2817),
4427 (2818),
4428 (2819),
4429 (2820),
4430 (2821),
4431 (2822),
4432 (2823),
4433 (2824),
4434 (2825),
4435 (2826),
4436 (2827),
4437 (2828),
4438 (2829),
4439 (2830),
4440 (2831),
4441 (2832),
4442 (2833),
4443 (2834),
4444 (2835),
4445 (2836),
4446 (2837),
4447 (2838),
4448 (2839),
4449 (2840),
4450 (2841),
4451 (2842),
4452 (2843),
4453 (2844),
4454 (2845),
4455 (2846),
4456 (2847),
4457 (2848),
4458 (2849),
4459 (2850),
4460 (2851),
4461 (2852),
4462 (2853),
4463 (2854),
4464 (2855),
4465 (2856),
4466 (2857),
4467 (2858),
4468 (2859),
4469 (2860),
4470 (2861),
4471 (2862),
4472 (2863),
4473 (2864),
4474 (2865),
4475 (2866),
4476 (2867),
4477 (2868),
4478 (2869),
4479 (2870),
4480 (2871),
4481 (2872),
4482 (2873),
4483 (2874),
4484 (2875),
4485 (2876),
4486 (2877),
4487 (2878),
4488 (2879),
4489 (2880),
4490 (2881),
4491 (2882),
4492 (2883),
4493 (2884),
4494 (2885),
4495 (2886),
4496 (2887),
4497 (2888),
4498 (2889),
4499 (2890),
4500 (2891),
4501 (2892),
4502 (2893),
4503 (2894),
4504 (2895),
4505 (2896),
4506 (2897),
4507 (2898),
4508 (2899),
4509 (2900),
4510 (2901),
4511 (2902),
4512 (2903),
4513 (2904),
4514 (2905),
4515 (2906),
4516 (2907),
4517 (2908),
4518 (2909),
4519 (2910),
4520 (2911),
4521 (2912),
4522 (2913),
4523 (2914),
4524 (2915),
4525 (2916),
4526 (2917),
4527 (2918),
4528 (2919),
4529 (2920),
4530 (2921),
4531 (2922),
4532 (2923),
4533 (2924),
4534 (2925),
4535 (2926),
4536 (2927),
4537 (2928),
4538 (2929),
4539 (2930),
4540 (2931),
4541 (2932),
4542 (2933),
4543 (2934),
4544 (2935),
4545 (2936),
4546 (2937),
4547 (2938),
4548 (2939),
4549 (2940),
4550 (2941),
4551 (2942),
4552 (2943),
4553 (2944),
4554 (2945),
4555 (2946),
4556 (2947),
4557 (2948),
4558 (2949),
4559 (2950),
4560 (2951),
4561 (2952),
4562 (2953),
4563 (2954),
4564 (2955),
4565 (2956),
4566 (2957),
4567 (2958),
4568 (2959),
4569 (2960),
4570 (2961),
4571 (2962),
4572 (2963),
4573 (2964),
4574 (2965),
4575 (2966),
4576 (2967),
4577 (2968),
4578 (2969),
4579 (2970),
4580 (2971),
4581 (2972),
4582 (2973),
4583 (2974),
4584 (2975),
4585 (2976),
4586 (2977),
4587 (2978),
4588 (2979),
4589 (2980),
4590 (2981),
4591 (2982),
4592 (2983),
4593 (2984),
4594 (2985),
4595 (2986),
4596 (2987),
4597 (2988),
4598 (2989),
4599 (2990),
4600 (2991),
4601 (2992),
4602 (2993),
4603 (2994),
4604 (2995),
4605 (2996),
4606 (2997),
4607 (2998),
4608 (2999),
4609 (3000),
4610 (3001),
4611 (3002),
4612 (3003),
4613 (3004),
4614 (3005),
4615 (3006),
4616 (3007),
4617 (3008),
4618 (3009),
4619 (3010),
4620 (3011),
4621 (3012),
4622 (3013),
4623 (3014),
4624 (3015),
4625 (3016),
4626 (3017),
4627 (3018),
4628 (3019),
4629 (3020),
4630 (3021),
4631 (3022),
4632 (3023),
4633 (3024),
4634 (3025),
4635 (3026),
4636 (3027),
4637 (3028),
4638 (3029),
4639 (3030),
4640 (3031),
4641 (3032),
4642 (3033),
4643 (3034),
4644 (3035),
4645 (3036),
4646 (3037),
4647 (3038),
4648 (3039),
4649 (3040),
4650 (3041),
4651 (3042),
4652 (3043),
4653 (3044),
4654 (3045),
4655 (3046),
4656 (3047),
4657 (3048),
4658 (3049),
4659 (3050),
4660 (3051),
4661 (3052),
4662 (3053),
4663 (3054),
4664 (3055),
4665 (3056),
4666 (3057),
4667 (3058),
4668 (3059),
4669 (3060),
4670 (3061),
4671 (3062),
4672 (3063),
4673 (3064),
4674 (3065),
4675 (3066),
4676 (3067),
4677 (3068),
4678 (3069),
4679 (3070),
4680 (3071),
4681 (3072),
4682 (3073),
4683 (3074),
4684 (3075),
4685 (3076),
4686 (3077),
4687 (3078),
4688 (3079),
4689 (3080),
4690 (3081),
4691 (3082),
4692 (3083),
4693 (3084),
4694 (3085),
4695 (3086),
4696 (3087),
4697 (3088),
4698 (3089),
4699 (3090),
4700 (3091),
4701 (3092),
4702 (3093),
4703 (3094),
4704 (3095),
4705 (3096),
4706 (3097),
4707 (3098),
4708 (3099),
4709 (3100),
4710 (3101),
4711 (3102),
4712 (3103),
4713 (3104),
4714 (3105),
4715 (3106),
4716 (3107),
4717 (3108),
4718 (3109),
4719 (3110),
4720 (3111),
4721 (3112),
4722 (3113),
4723 (3114),
4724 (3115),
4725 (3116),
4726 (3117),
4727 (3118),
4728 (3119),
4729 (3120),
4730 (3121),
4731 (3122),
4732 (3123),
4733 (3124),
4734 (3125),
4735 (3126),
4736 (3127),
4737 (3128),
4738 (3129),
4739 (3130),
4740 (3131),
4741 (3132),
4742 (3133),
4743 (3134),
4744 (3135),
4745 (3136),
4746 (3137),
4747 (3138),
4748 (3139),
4749 (3140),
4750 (3141),
4751 (3142),
4752 (3143),
4753 (3144),
4754 (3145),
4755 (3146),
4756 (3147),
4757 (3148),
4758 (3149),
4759 (3150),
4760 (3151),
4761 (3152),
4762 (3153),
4763 (3154),
4764 (3155),
4765 (3156),
4766 (3157),
4767 (3158),
4768 (3159),
4769 (3160),
4770 (3161),
4771 (3162),
4772 (3163),
4773 (3164),
4774 (3165),
4775 (3166),
4776 (3167),
4777 (3168),
4778 (3169),
4779 (3170),
4780 (3171),
4781 (3172),
4782 (3173),
4783 (3174),
4784 (3175),
4785 (3176),
4786 (3177),
4787 (3178),
4788 (3179),
4789 (3180),
4790 (3181),
4791 (3182),
4792 (3183),
4793 (3184),
4794 (3185),
4795 (3186),
4796 (3187),
4797 (3188),
4798 (3189),
4799 (3190),
4800 (3191),
4801 (3192),
4802 (3193),
4803 (3194),
4804 (3195),
4805 (3196),
4806 (3197),
4807 (3198),
4808 (3199),
4809 (3200),
4810 (3201),
4811 (3202),
4812 (3203),
4813 (3204),
4814 (3205),
4815 (3206),
4816 (3207),
4817 (3208),
4818 (3209),
4819 (3210),
4820 (3211),
4821 (3212),
4822 (3213),
4823 (3214),
4824 (3215),
4825 (3216),
4826 (3217),
4827 (3218),
4828 (3219),
4829 (3220),
4830 (3221),
4831 (3222),
4832 (3223),
4833 (3224),
4834 (3225),
4835 (3226),
4836 (3227),
4837 (3228),
4838 (3229),
4839 (3230),
4840 (3231),
4841 (3232),
4842 (3233),
4843 (3234),
4844 (3235),
4845 (3236),
4846 (3237),
4847 (3238),
4848 (3239),
4849 (3240),
4850 (3241),
4851 (3242),
4852 (3243),
4853 (3244),
4854 (3245),
4855 (3246),
4856 (3247),
4857 (3248),
4858 (3249),
4859 (3250),
4860 (3251),
4861 (3252),
4862 (3253),
4863 (3254),
4864 (3255),
4865 (3256),
4866 (3257),
4867 (3258),
4868 (3259),
4869 (3260),
4870 (3261),
4871 (3262),
4872 (3263),
4873 (3264),
4874 (3265),
4875 (3266),
4876 (3267),
4877 (3268),
4878 (3269),
4879 (3270),
4880 (3271),
4881 (3272),
4882 (3273),
4883 (3274),
4884 (3275),
4885 (3276),
4886 (3277),
4887 (3278),
4888 (3279),
4889 (3280),
4890 (3281),
4891 (3282),
4892 (3283),
4893 (3284),
4894 (3285),
4895 (3286),
4896 (3287),
4897 (3288),
4898 (3289),
4899 (3290),
4900 (3291),
4901 (3292),
4902 (3293),
4903 (3294),
4904 (3295),
4905 (3296),
4906 (3297),
4907 (3298),
4908 (3299),
4909 (3300),
4910 (3301),
4911 (3302),
4912 (3303),
4913 (3304),
4914 (3305),
4915 (3306),
4916 (3307),
4917 (3308),
4918 (3309),
4919 (3310),
4920 (3311),
4921 (3312),
4922 (3313),
4923 (3314),
4924 (3315),
4925 (3316),
4926 (3317),
4927 (3318),
4928 (3319),
4929 (3320),
4930 (3321),
4931 (3322),
4932 (3323),
4933 (3324),
4934 (3325),
4935 (3326),
4936 (3327),
4937 (3328),
4938 (3329),
4939 (3330),
4940 (3331),
4941 (3332),
4942 (3333),
4943 (3334),
4944 (3335),
4945 (3336),
4946 (3337),
4947 (3338),
4948 (3339),
4949 (3340),
4950 (3341),
4951 (3342),
4952 (3343),
4953 (3344),
4954 (3345),
4955 (3346),
4956 (3347),
4957 (3348),
4958 (3349),
4959 (3350),
4960 (3351),
4961 (3352),
4962 (3353),
4963 (3354),
4964 (3355),
4965 (3356),
4966 (3357),
4967 (3358),
4968 (3359),
4969 (3360),
4970 (3361),
4971 (3362),
4972 (3363),
4973 (3364),
4974 (3365),
4975 (3366),
4976 (3367),
4977 (3368),
4978 (3369),
4979 (3370),
4980 (3371),
4981 (3372),
4982 (3373),