|
1
|
-- MySQL dump 10.11
|
|
2
|
--
|
|
3
|
-- Host: localhost Database: inventory
|
|
4
|
-- ------------------------------------------------------
|
|
5
|
-- Server version 5.0.51a-3ubuntu5.1
|
|
6
|
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
|
7
|
/*!40103 SET TIME_ZONE='+00:00' */;
|
|
8
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
|
9
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
|
10
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
|
11
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
|
12
|
|
|
13
|
--
|
|
14
|
-- Table structure for table `device_kinds`
|
|
15
|
--
|
|
16
|
|
|
17
|
SET @saved_cs_client = @@character_set_client;
|
|
18
|
SET character_set_client = utf8;
|
|
19
|
CREATE TABLE `device_kinds` (
|
|
20
|
`id` int(11) NOT NULL COMMENT 'universally unique id for device',
|
|
21
|
`inventory_id` int(11) NOT NULL COMMENT 'the inventory when we caught this device type',
|
|
22
|
`bus` varchar(16) default NULL COMMENT 'e.g. pci or usb',
|
|
23
|
`vendor` int(11) NOT NULL COMMENT 'id of vendor from /sys',
|
|
24
|
`device` int(11) NOT NULL COMMENT 'id of device from /sys',
|
|
25
|
PRIMARY KEY (`id`)
|
|
26
|
);
|
|
27
|
SET character_set_client = @saved_cs_client;
|
|
28
|
|
|
29
|
--
|
|
30
|
-- Table structure for table `device_ouis`
|
|
31
|
--
|
|
32
|
|
|
33
|
SET @saved_cs_client = @@character_set_client;
|
|
34
|
SET character_set_client = utf8;
|
|
35
|
CREATE TABLE `device_ouis` (
|
|
36
|
`oui` char(8) NOT NULL COMMENT 'OUI as string XX:XX:XX',
|
|
37
|
`device_kind_id` int(11) NOT NULL COMMENT 'link to corresponding entry in device_kinds',
|
|
38
|
`inventory_id` int(11) default NULL COMMENT 'if generated automatically, id of inventory run, otherwise NULL'
|
|
39
|
);
|
|
40
|
SET character_set_client = @saved_cs_client;
|
|
41
|
|
|
42
|
--
|
|
43
|
-- Table structure for table `device_tags`
|
|
44
|
--
|
|
45
|
|
|
46
|
SET @saved_cs_client = @@character_set_client;
|
|
47
|
SET character_set_client = utf8;
|
|
48
|
CREATE TABLE `device_tags` (
|
|
49
|
`tag` varchar(64) NOT NULL COMMENT 'name for this tag',
|
|
50
|
`device_kind_id` int(11) NOT NULL COMMENT 'link to corresponding entry in device_kinds',
|
|
51
|
`inventory_id` int(11) default NULL COMMENT 'if generated automatically, id of inventory run, otherwise NULL'
|
|
52
|
);
|
|
53
|
SET character_set_client = @saved_cs_client;
|
|
54
|
|
|
55
|
--
|
|
56
|
-- Table structure for table `devices`
|
|
57
|
--
|
|
58
|
|
|
59
|
SET @saved_cs_client = @@character_set_client;
|
|
60
|
SET character_set_client = utf8;
|
|
61
|
CREATE TABLE `devices` (
|
|
62
|
`id` int(11) NOT NULL COMMENT 'universally unique id for device',
|
|
63
|
`device_kind_id` int(11) NOT NULL COMMENT 'link to corresponding entry in device_kinds',
|
|
64
|
`motherboard_id` int(11) default NULL COMMENT 'link to corresponding entry in motherboards',
|
|
65
|
`inventory_id` int(11) NOT NULL COMMENT 'link to corresponding entry in inventories',
|
|
66
|
`address` varchar(18) NOT NULL COMMENT 'bus address of this device. MUST sort lexically by bus',
|
|
67
|
`mac` varchar(17) default NULL COMMENT 'MAC address of this device, if it is a network device',
|
|
68
|
`canonical_name` varchar(64) default NULL COMMENT 'a good guess as to the name Linux will give to this device',
|
|
69
|
PRIMARY KEY (`id`)
|
|
70
|
);
|
|
71
|
SET character_set_client = @saved_cs_client;
|
|
72
|
|
|
73
|
--
|
|
74
|
-- Table structure for table `inventories`
|
|
75
|
--
|
|
76
|
|
|
77
|
SET @saved_cs_client = @@character_set_client;
|
|
78
|
SET character_set_client = utf8;
|
|
79
|
CREATE TABLE `inventories` (
|
|
80
|
`id` int(11) NOT NULL COMMENT 'obligatiory unique id',
|
|
81
|
`opened` timestamp NOT NULL default CURRENT_TIMESTAMP COMMENT 'start of inventory run',
|
|
82
|
`closed` timestamp NOT NULL default '0000-00-00 00:00:00' COMMENT 'end of inventory run, or 0000-etc. if not done yet',
|
|
83
|
PRIMARY KEY (`id`)
|
|
84
|
);
|
|
85
|
SET character_set_client = @saved_cs_client;
|
|
86
|
|
|
87
|
--
|
|
88
|
-- Table structure for table `locations`
|
|
89
|
--
|
|
90
|
|
|
91
|
SET @saved_cs_client = @@character_set_client;
|
|
92
|
SET character_set_client = utf8;
|
|
93
|
CREATE TABLE `locations` (
|
|
94
|
`id` int(11) NOT NULL COMMENT 'universally unique id for location',
|
|
95
|
`x` int(11) NOT NULL default '0' COMMENT 'logical x address of location',
|
|
96
|
`y` int(11) NOT NULL default '0' COMMENT 'logical y address of location',
|
|
97
|
`z` int(11) NOT NULL default '0' COMMENT 'logical z address of location',
|
|
98
|
`latitude` float default NULL COMMENT 'latitude of this location or NULL',
|
|
99
|
`longitude` float default NULL COMMENT 'longitude of this location or NULL',
|
|
100
|
`elevation` float default NULL COMMENT 'elevation of this location or NULL',
|
|
101
|
`testbed_id` int(11) NOT NULL,
|
|
102
|
`name` varchar(64) default NULL,
|
|
103
|
PRIMARY KEY (`id`)
|
|
104
|
);
|
|
105
|
SET character_set_client = @saved_cs_client;
|
|
106
|
|
|
107
|
--
|
|
108
|
-- Table structure for table `motherboards`
|
|
109
|
--
|
|
110
|
|
|
111
|
SET @saved_cs_client = @@character_set_client;
|
|
112
|
SET character_set_client = utf8;
|
|
113
|
CREATE TABLE `motherboards` (
|
|
114
|
`id` int(11) NOT NULL COMMENT 'universally unique id for motherboard',
|
|
115
|
`inventory_id` int(11) NOT NULL COMMENT 'link to corresponding entry in inventories',
|
|
116
|
`mfr_sn` varchar(128) default NULL COMMENT 'manufacturer serial number of the motherboard',
|
|
117
|
`cpu_type` varchar(64) default NULL COMMENT 'name of CPU as given by vendor',
|
|
118
|
`cpu_n` int(11) default NULL COMMENT 'number of CPUs',
|
|
119
|
`cpu_hz` float default NULL COMMENT 'CPU speed in MHz',
|
|
120
|
`hd_sn` varchar(64) default NULL COMMENT 'hard drive serial number, NULL if no hd',
|
|
121
|
`hd_size` int(11) default NULL COMMENT 'hard disk size in bytes',
|
|
122
|
`hd_status` tinyint(1) default '1' COMMENT 'true means drive probably okay',
|
|
123
|
`memory` int(11) default NULL COMMENT 'memory size in bytes',
|
|
124
|
PRIMARY KEY (`id`),
|
|
125
|
UNIQUE KEY `mfr_sn` (`mfr_sn`)
|
|
126
|
);
|
|
127
|
SET character_set_client = @saved_cs_client;
|
|
128
|
|
|
129
|
--
|
|
130
|
-- Table structure for table `nodes`
|
|
131
|
--
|
|
132
|
|
|
133
|
SET @saved_cs_client = @@character_set_client;
|
|
134
|
SET character_set_client = utf8;
|
|
135
|
CREATE TABLE `nodes` (
|
|
136
|
`id` int(11) NOT NULL COMMENT 'universally unique id for nodes',
|
|
137
|
`inventory_id` int(11) NOT NULL COMMENT 'link to corresponding entry in inventories',
|
|
138
|
`chassis_sn` varchar(64) default NULL COMMENT 'manufacturer serial number of the chassis of the node; optionally null',
|
|
139
|
`motherboard_id` int(11) NOT NULL COMMENT 'the motherboard in this node',
|
|
140
|
`location_id` int(11) default NULL COMMENT 'the location of this node',
|
|
141
|
`control_ip` varchar(64) default NULL,
|
|
142
|
`pxeimage_id` int(11) default NULL,
|
|
143
|
PRIMARY KEY (`id`),
|
|
144
|
UNIQUE KEY `location_id` (`location_id`)
|
|
145
|
);
|
|
146
|
SET character_set_client = @saved_cs_client;
|
|
147
|
|
|
148
|
--
|
|
149
|
-- Table structure for table `pxeimages`
|
|
150
|
--
|
|
151
|
|
|
152
|
SET @saved_cs_client = @@character_set_client;
|
|
153
|
SET character_set_client = utf8;
|
|
154
|
CREATE TABLE `pxeimages` (
|
|
155
|
`id` int(11) default NULL,
|
|
156
|
`image_name` varchar(64) default NULL,
|
|
157
|
`short_description` varchar(128) default NULL
|
|
158
|
);
|
|
159
|
SET character_set_client = @saved_cs_client;
|
|
160
|
|
|
161
|
--
|
|
162
|
-- Table structure for table `testbeds`
|
|
163
|
--
|
|
164
|
|
|
165
|
SET @saved_cs_client = @@character_set_client;
|
|
166
|
SET character_set_client = utf8;
|
|
167
|
CREATE TABLE `testbeds` (
|
|
168
|
`id` int(11) NOT NULL COMMENT 'universally unique id for testbed',
|
|
169
|
`node_domain` varchar(128) NOT NULL COMMENT 'example: grid',
|
|
170
|
`x_max` int(11) default NULL,
|
|
171
|
`y_max` int(11) default NULL,
|
|
172
|
`z_max` int(11) default NULL,
|
|
173
|
`control_ip` varchar(64) default NULL,
|
|
174
|
`data_ip` varchar(64) default NULL,
|
|
175
|
`cm_ip` varchar(64) default NULL,
|
|
176
|
`latitude` float default NULL COMMENT 'latitude of origin of node_domain or NULL',
|
|
177
|
`longitude` float default NULL COMMENT 'longitude of origin of node_domain or NULL',
|
|
178
|
`elevation` float default NULL COMMENT 'elevation of origin of node_domain or NULL',
|
|
179
|
`pxe_url` varchar(64) default NULL,
|
|
180
|
`cmc_url` varchar(64) default NULL,
|
|
181
|
`oml_url` varchar(64) default NULL,
|
|
182
|
`oml_port` varchar(64) default NULL,
|
|
183
|
`oml_host` varchar(64) default NULL,
|
|
184
|
`oml_localhost` varchar(64) default NULL,
|
|
185
|
`frisbee_url` varchar(64) default NULL,
|
|
186
|
`frisbee_default_disk` varchar(64) default NULL,
|
|
187
|
PRIMARY KEY (`id`),
|
|
188
|
UNIQUE KEY `node_domain` (`node_domain`)
|
|
189
|
);
|
|
190
|
SET character_set_client = @saved_cs_client;
|
|
191
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
|
192
|
|
|
193
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
194
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
195
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
196
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|
197
|
|
|
198
|
-- Dump completed on 2009-02-03 0:55:48
|