-
Notifications
You must be signed in to change notification settings - Fork 0
/
vpsdb.dump
321 lines (290 loc) · 11.3 KB
/
vpsdb.dump
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
-- MySQL dump 10.13 Distrib 5.1.66, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: vpsdb
-- ------------------------------------------------------
-- Server version 5.1.66
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `admin`
--
DROP TABLE IF EXISTS `admin`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admin` (
`api_key` varchar(128) NOT NULL,
`allow_network` varchar(255) NOT NULL,
`regist_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`api_key`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `disk_define`
--
DROP TABLE IF EXISTS `disk_define`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `disk_define` (
`vps_uuid` varchar(48) CHARACTER SET latin1 DEFAULT NULL,
`project_id` varchar(16) DEFAULT NULL,
`image_path` varchar(255) NOT NULL DEFAULT '',
`size` bigint(20) DEFAULT NULL,
`driver` varchar(16) CHARACTER SET latin1 DEFAULT NULL,
`ready` tinyint(4) DEFAULT NULL,
`try_remove` tinyint(1) DEFAULT NULL,
`regist_time` datetime DEFAULT NULL,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`image_path`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `interface_define`
--
DROP TABLE IF EXISTS `interface_define`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `interface_define` (
`vps_uuid` varchar(48) CHARACTER SET latin1 DEFAULT NULL,
`project_id` varchar(16) DEFAULT NULL,
`mac` varchar(17) CHARACTER SET latin1 NOT NULL DEFAULT '',
`vlan_id` int(4) DEFAULT NULL,
`proxy_vlan_id` int(4) DEFAULT NULL,
`driver` varchar(16) CHARACTER SET latin1 DEFAULT NULL,
`ip` varchar(15) CHARACTER SET latin1 DEFAULT NULL,
`seq` int(4) DEFAULT '0',
`ready` tinyint(4) DEFAULT NULL,
`try_remove` tinyint(1) DEFAULT NULL,
`regist_time` datetime DEFAULT NULL,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`mac`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ip`
--
DROP TABLE IF EXISTS `ip`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ip` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`vlan_id` int(4) DEFAULT NULL,
`network` varchar(32) DEFAULT NULL,
`ip` varchar(16) NOT NULL DEFAULT '',
`mask` varchar(16) DEFAULT NULL,
`gw` varchar(16) DEFAULT NULL,
`used_vps_uuid` varchar(48) DEFAULT NULL,
`secondary` tinyint(4) DEFAULT '0',
`mac` varchar(17) DEFAULT NULL,
`start_time` time DEFAULT NULL,
`end_time` time DEFAULT NULL,
`enable` tinyint(1) DEFAULT NULL,
`try_release` tinyint(1) DEFAULT NULL,
`reserve_uuid` varchar(48) DEFAULT NULL,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `vlan_id` (`vlan_id`,`ip`),
UNIQUE KEY `vlan_id_2` (`vlan_id`,`ip`)
) ENGINE=InnoDB AUTO_INCREMENT=6894 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `job`
--
DROP TABLE IF EXISTS `job`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `job` (
`job_id` int(11) NOT NULL AUTO_INCREMENT,
`job_uuid` varchar(48) DEFAULT NULL,
`request_job` mediumtext CHARACTER SET latin1,
`result` int(11) DEFAULT NULL,
`message` mediumtext CHARACTER SET latin1,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`lock_target` varchar(64) CHARACTER SET latin1 DEFAULT NULL,
`project_id` varchar(16) DEFAULT NULL,
PRIMARY KEY (`job_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12131 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `node`
--
DROP TABLE IF EXISTS `node`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `node` (
`name` varchar(255) NOT NULL DEFAULT '',
`uuid` varchar(48) DEFAULT NULL,
`cpu_total` int(8) DEFAULT NULL,
`mem_total` int(64) DEFAULT NULL,
`mem_free` int(64) DEFAULT NULL,
`loadavg` float DEFAULT NULL,
`vps_number` int(8) DEFAULT NULL,
`cpu_vps_used` int(8) DEFAULT NULL,
`cpu_available` int(8) DEFAULT NULL,
`regist_time` datetime DEFAULT NULL,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`disable` tinyint(4) DEFAULT '0',
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `node_define`
--
DROP TABLE IF EXISTS `node_define`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `node_define` (
`name` varchar(64) DEFAULT NULL,
`uuid` varchar(48) DEFAULT NULL,
`api_key` varchar(128) DEFAULT NULL,
`plan` varchar(255) DEFAULT NULL,
`auto_select` tinyint(4) DEFAULT '1',
`regist_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `project`
--
DROP TABLE IF EXISTS `project`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project` (
`project_id` varchar(16) NOT NULL DEFAULT '',
`api_key` varchar(128) DEFAULT NULL,
`regist_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`project_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `storage`
--
DROP TABLE IF EXISTS `storage`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `storage` (
`uuid` varchar(48) NOT NULL DEFAULT '',
`storage_tag` varchar(32) DEFAULT NULL,
`export_path` varchar(255) DEFAULT NULL,
`mount_path` varchar(255) DEFAULT NULL,
`host` varchar(64) DEFAULT NULL,
`type` varchar(16) DEFAULT NULL,
`available` int(128) DEFAULT NULL,
`priority` int(8) DEFAULT '0',
`avail_size` bigint(20) unsigned DEFAULT '0',
`iowait` bigint(20) DEFAULT '0',
`regist_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `test`
--
DROP TABLE IF EXISTS `test`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test` (
`id` int(11) DEFAULT NULL,
`bar` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `user_switch`
--
DROP TABLE IF EXISTS `user_switch`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_switch` (
`vlan_id` int(8) NOT NULL DEFAULT '0',
`contract_user` varchar(32) DEFAULT NULL,
`enable` tinyint(1) DEFAULT NULL,
`regist_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`vlan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `vps`
--
DROP TABLE IF EXISTS `vps`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vps` (
`name` varchar(64) DEFAULT NULL,
`uuid` varchar(48) NOT NULL DEFAULT '',
`project_id` varchar(16) DEFAULT NULL,
`disks` varchar(255) DEFAULT NULL,
`memory` int(32) DEFAULT NULL,
`cpu` int(8) DEFAULT NULL,
`state` varchar(32) DEFAULT NULL,
`node` varchar(255) DEFAULT NULL,
`vnc_port` int(11) DEFAULT NULL,
`use_spice` tinyint(4) DEFAULT NULL,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`update_key` varchar(48) DEFAULT NULL,
PRIMARY KEY (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `vps_define`
--
DROP TABLE IF EXISTS `vps_define`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vps_define` (
`name` varchar(64) DEFAULT NULL,
`uuid` varchar(48) NOT NULL DEFAULT '',
`project_id` varchar(16) DEFAULT NULL,
`public_template` tinyint(4) DEFAULT '0',
`memory` int(32) NOT NULL DEFAULT '1024000',
`cpu_number` int(8) NOT NULL DEFAULT '1',
`clock` varchar(32) DEFAULT 'localtime',
`vnc_password` varchar(64) DEFAULT 'smc00',
`use_spice` tinyint(4) DEFAULT NULL,
`instance_status` varchar(32) DEFAULT NULL,
`cdrom_path` varchar(255) DEFAULT '',
`boot_node` varchar(64) DEFAULT NULL,
`original` varchar(255) DEFAULT NULL,
`tag` varchar(255) DEFAULT NULL,
`extra_info` text,
`ready` tinyint(1) DEFAULT NULL,
`try_remove` tinyint(1) DEFAULT NULL,
`regist_time` datetime DEFAULT NULL,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`uuid`),
UNIQUE KEY `name` (`name`,`project_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `vps_template`
--
DROP TABLE IF EXISTS `vps_template`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vps_template` (
`uuid` varchar(48) NOT NULL DEFAULT '',
`memo` varchar(255) DEFAULT NULL,
`file_path` varchar(255) DEFAULT NULL,
`ostype` varchar(32) DEFAULT NULL,
`cpu_number` int(8) DEFAULT NULL,
`memory` int(32) DEFAULT NULL,
`xml` mediumtext,
`regist_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2014-02-17 13:39:39