From ae67fa11ffdaf8b4bc178f6f8389271c6b1acf9d Mon Sep 17 00:00:00 2001 From: Aaron Dummer Date: Mon, 14 Mar 2011 02:48:51 +0000 Subject: [PATCH] r4332 new object types: power supply chassis, power supply (#409) --- ChangeLog | 3 ++- wwwroot/inc/dictionary.php | 13 +++++++++++++ wwwroot/inc/install.php | 22 ++++++++++++++++++---- wwwroot/inc/upgrade.php | 16 ++++++++++++++++ 4 files changed, 49 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee585c77..e6d9e673 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,7 +5,8 @@ update: new DB table indexes speeding up IP tree operations update: tolerate user-visible newlines in secret.php and local.php update: ability to delete a file entity from the Edit tab of the File page - update: 802.1q: links to swithports allowing the vlan added in page Vlan info + update: 802.1q: links to switchports allowing the vlan added in page Vlan info + update: new object types: power supply chassis, power supply (#409) 0.19.1 2011-02-22 update: UI: rack lists are now reduced by common tags with object on Rackspace tab (FILTER_RACKLIST_BY_TAGS config var) update: 802.1q: If switch has IP interface in some VLAN linked to IP subnet, this VLAN is not pruned from switch's uplink diff --git a/wwwroot/inc/dictionary.php b/wwwroot/inc/dictionary.php index 4c9dafbd..4ecafabc 100644 --- a/wwwroot/inc/dictionary.php +++ b/wwwroot/inc/dictionary.php @@ -1476,6 +1476,19 @@ $dictionary = array 1394 => array ('chapter_id' => 12, 'dict_value' => 'Cisco%GPASS%Catalyst 2960S-24PS-L'), 1395 => array ('chapter_id' => 13, 'dict_value' => '[[Linux%GSKIP%Debian 6.0 (squeeze) | http://debian.org/releases/squeeze/]]'), 1396 => array ('chapter_id' => 13, 'dict_value' => 'Linux%GSKIP%RHEL6'), + 1397 => array ('chapter_id' => 1, 'dict_value' => 'Power supply chassis'), + 1398 => array ('chapter_id' => 1, 'dict_value' => 'Power supply'), + 1399 => array ('chapter_id' => 2, 'dict_value' => 'DC'), + 1400 => array ('chapter_id' => 34, 'dict_value' => 'Cisco%GPASS%RPS 2300'), + 1401 => array ('chapter_id' => 34, 'dict_value' => 'D-Link%GPASS%DPS-800'), + 1402 => array ('chapter_id' => 34, 'dict_value' => 'D-Link%GPASS%DPS-900'), + 1403 => array ('chapter_id' => 35, 'dict_value' => 'Cisco%GPASS%RPS 675'), + 1404 => array ('chapter_id' => 35, 'dict_value' => 'Cisco%GPASS%C3K-PWR-750WAC'), + 1405 => array ('chapter_id' => 35, 'dict_value' => 'Cisco%GPASS%C3K-PWR-1150WAC'), + 1406 => array ('chapter_id' => 35, 'dict_value' => 'D-Link%GPASS%DPS-200'), + 1407 => array ('chapter_id' => 35, 'dict_value' => 'D-Link%GPASS%DPS-500'), + 1408 => array ('chapter_id' => 35, 'dict_value' => 'D-Link%GPASS%DPS-510'), + 1409 => array ('chapter_id' => 35, 'dict_value' => 'D-Link%GPASS%DPS-600'), // ^ // ^ // add new dictionary entries up here ^ diff --git a/wwwroot/inc/install.php b/wwwroot/inc/install.php index f7d088ce..708f3f83 100644 --- a/wwwroot/inc/install.php +++ b/wwwroot/inc/install.php @@ -1023,6 +1023,16 @@ INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_id`) VALUES (1323,2,28), (1323,3,NULL), (1323,5,NULL), +(1397,1,NULL), +(1397,2,34), +(1397,14,NULL), +(1397,21,NULL), +(1397,22,NULL), +(1398,1,NULL), +(1398,2,35), +(1398,14,NULL), +(1398,21,NULL), +(1398,22,NULL), (1502,1,NULL), (1502,2,31), (1502,3,NULL), @@ -1084,7 +1094,9 @@ INSERT INTO `Chapter` (`id`, `sticky`, `name`) VALUES (30,'no','network chassis models'), (31,'no','server chassis models'), (32,'no','virtual switch models'), -(33,'no','virtual switch OS type'); +(33,'no','virtual switch OS type'), +(34,'no','power supply chassis models'), +(35,'no','power supply models'); INSERT INTO `PortInnerInterface` VALUES (1,'hardwired'), @@ -1101,6 +1113,7 @@ INSERT INTO `ObjectParentCompat` VALUES (3,13), (4,1504), (4,1507), +(1397,1398), (1502,4), (1503,8), (1505,4), @@ -1118,7 +1131,7 @@ INSERT INTO `PortInterfaceCompat` VALUES (7,1081),(7,30),(7,35),(7,36),(7,37),(7,38),(7,39),(7,40), (8,1082),(8,30),(8,35),(8,36),(8,37),(8,38),(8,39),(8,40), (9,1084),(9,30),(9,35),(9,36),(9,37),(9,38),(9,39),(9,40), -(1,16),(1,19),(1,24),(1,29),(1,31),(1,33),(1,446),(1,681),(1,682),(1,1322); +(1,16),(1,19),(1,24),(1,29),(1,31),(1,33),(1,446),(1,681),(1,682),(1,1322),(1,1399); INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (17,17), @@ -1302,7 +1315,8 @@ INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (1298,1298), (1299,1299), (1300,1300), -(1316,1316); +(1316,1316), +(1399,1399); INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, is_userdefined, description) VALUES ('color_F','8fbfbf','string','no','yes','no','HSV: 180-25-75. Free atoms, they are available for allocation to objects.'), @@ -1342,7 +1356,7 @@ INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, is_userdef ('PREVIEW_IMAGE_MAXPXS','320','uint','yes','no','yes','Max pixels per axis for image file preview'), ('VENDOR_SIEVE','','string','yes','no','yes','Vendor sieve configuration'), ('IPV4LB_LISTSRC','{\$typeid_4}','string','yes','no','no','List source: IPv4 load balancers'), -('IPV4OBJ_LISTSRC','{\$typeid_4} or {\$typeid_7} or {\$typeid_8} or {\$typeid_12} or {\$typeid_445} or {\$typeid_447} or {\$typeid_798} or {\$typeid_1502} or {\$typeid_1503} or {\$typeid_1504} or {\$typeid_1507}','string','yes','no','no','List source: IPv4-enabled objects'), +('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}','string','yes','no','no','List source: IPv4-enabled objects'), ('IPV4NAT_LISTSRC','{\$typeid_4} or {\$typeid_7} or {\$typeid_8} or {\$typeid_798}','string','yes','no','no','List source: IPv4 NAT performers'), ('ASSETWARN_LISTSRC','{\$typeid_4} or {\$typeid_7} or {\$typeid_8}','string','yes','no','no','List source: object, for which asset tag should be set'), ('NAMEWARN_LISTSRC','{\$typeid_4} or {\$typeid_7} or {\$typeid_8}','string','yes','no','no','List source: object, for which common name should be set'), diff --git a/wwwroot/inc/upgrade.php b/wwwroot/inc/upgrade.php index ee63cc98..f7b406fc 100644 --- a/wwwroot/inc/upgrade.php +++ b/wwwroot/inc/upgrade.php @@ -1010,6 +1010,22 @@ CREATE TABLE `EntityLink` ( $query[] = "ALTER TABLE IPv6Allocation ADD KEY `ip` (`ip`)"; $query[] = "ALTER TABLE IPv4VS ADD KEY `vip` (`vip`)"; $query[] = "ALTER TABLE IPv4RS ADD KEY `rsip` (`rsip`)"; + $query[] = "INSERT INTO `Chapter` (`id`, `sticky`, `name`) VALUES (34,'no','power supply chassis models')"; + $query[] = "INSERT INTO `Chapter` (`id`, `sticky`, `name`) VALUES (35,'no','power supply models')"; + $query[] = "INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_id`) VALUES (1397,1,NULL)"; + $query[] = "INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_id`) VALUES (1397,2,34)"; + $query[] = "INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_id`) VALUES (1397,14,NULL)"; + $query[] = "INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_id`) VALUES (1397,21,NULL)"; + $query[] = "INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_id`) VALUES (1397,22,NULL)"; + $query[] = "INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_id`) VALUES (1398,1,NULL)"; + $query[] = "INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_id`) VALUES (1398,2,35)"; + $query[] = "INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_id`) VALUES (1398,14,NULL)"; + $query[] = "INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_id`) VALUES (1398,21,NULL)"; + $query[] = "INSERT INTO `AttributeMap` (`objtype_id`, `attr_id`, `chapter_id`) VALUES (1398,22,NULL)"; + $query[] = "INSERT INTO `ObjectParentCompat` (`parent_objtype_id`, `child_objtype_id`) VALUES (1397,1398)"; + $query[] = "INSERT INTO `PortCompat` (`type1`, `type2`) VALUES (1399,1399)"; + $query[] = "INSERT INTO `PortInterfaceCompat` (`iif_id`, `oif_id`) VALUES (1,1399)"; + $query[] = "UPDATE Config SET varvalue = CONCAT(varvalue, ' or {\$typeid_1397}') WHERE varname = 'IPV4OBJ_LISTSRC'"; $query[] = "UPDATE Config SET varvalue = '0.19.2' WHERE varname = 'DB_VERSION'"; break; default: -- 2.25.1