2 * Copyright 2017 Telefonica Investigacion y Desarrollo, S.A.U.
3 * This file is part of openmano
6 * Licensed under the Apache License, Version 2.0 (the "License"); you may
7 * not use this file except in compliance with the License. You may obtain
8 * a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15 * License for the specific language governing permissions and limitations
18 * For those usages not covered by the Apache License, Version 2.0 please
19 * contact with: nfvlabs@tid.es
22 -- MySQL dump 10.13 Distrib 5.7.30, for Linux (x86_64)
24 -- Host: localhost Database: {{mano_db}}
25 -- ------------------------------------------------------
26 -- Server version 5.7.27
28 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
29 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
30 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
31 /*!40101 SET NAMES utf8 */;
32 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
33 /*!40103 SET TIME_ZONE='+00:00' */;
34 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
35 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
36 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
37 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
40 -- Current Database: `{{mano_db}}`
43 /*!40000 DROP DATABASE IF EXISTS `{{mano_db}}`*/;
45 CREATE DATABASE /*!32312 IF NOT EXISTS*/ `
{{mano_db
}}`
/*!40100 DEFAULT CHARACTER SET utf8 */;
50 -- Table structure for table `datacenter_nets`
53 DROP TABLE IF EXISTS `datacenter_nets`
;
54 /*!40101 SET @saved_cs_client = @@character_set_client */;
55 /*!40101 SET character_set_client = utf8 */;
56 CREATE TABLE `datacenter_nets`
(
57 `uuid`
varchar(36) NOT NULL,
58 `
name`
varchar(255) NOT NULL,
59 `vim_net_id`
varchar(300) NOT NULL,
60 `datacenter_id`
varchar(36) NOT NULL,
61 `
type`
enum('bridge','data','ptp') NOT NULL DEFAULT 'data' COMMENT 'Type of network',
62 `multipoint`
enum('true','false') NOT NULL DEFAULT 'true',
63 `shared`
enum('true','false') NOT NULL DEFAULT 'false' COMMENT 'If can be shared with serveral scenarios',
64 `description`
varchar(255) DEFAULT NULL,
65 `created_at`
double NOT NULL,
66 `modified_at`
double DEFAULT NULL,
68 UNIQUE KEY `name_datacenter_id`
(`
name`
,`datacenter_id`
),
69 KEY `FK_datacenter_nets_datacenters`
(`datacenter_id`
),
70 CONSTRAINT `FK_datacenter_nets_datacenters`
FOREIGN KEY (`datacenter_id`
) REFERENCES `datacenters`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
71 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
COMMENT='Contain the external nets of a datacenter';
72 /*!40101 SET character_set_client = @saved_cs_client */;
75 -- Table structure for table `datacenter_tenants`
78 DROP TABLE IF EXISTS `datacenter_tenants`
;
79 /*!40101 SET @saved_cs_client = @@character_set_client */;
80 /*!40101 SET character_set_client = utf8 */;
81 CREATE TABLE `datacenter_tenants`
(
82 `uuid`
varchar(36) NOT NULL,
83 `
name`
varchar(255) DEFAULT NULL,
84 `datacenter_id`
varchar(36) NOT NULL COMMENT 'Datacenter of this tenant',
85 `vim_tenant_name`
varchar(256) DEFAULT NULL,
86 `vim_tenant_id`
varchar(256) DEFAULT NULL COMMENT 'Tenant ID at VIM',
87 `created`
enum('true','false') NOT NULL DEFAULT 'false' COMMENT 'Indicates if this tenant has been created by openmano, or it existed on VIM',
88 `
user`
varchar(64) DEFAULT NULL,
89 `passwd`
varchar(64) DEFAULT NULL,
90 `config`
varchar(4000) DEFAULT NULL,
91 `created_at`
double NOT NULL,
92 `modified_at`
double DEFAULT NULL,
94 KEY `FK_vim_tenants_datacenters`
(`datacenter_id`
),
95 CONSTRAINT `FK_vim_tenants_datacenters`
FOREIGN KEY (`datacenter_id`
) REFERENCES `datacenters`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
96 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Scenarios defined by the user';
97 /*!40101 SET character_set_client = @saved_cs_client */;
100 -- Table structure for table `datacenters`
103 DROP TABLE IF EXISTS `datacenters`
;
104 /*!40101 SET @saved_cs_client = @@character_set_client */;
105 /*!40101 SET character_set_client = utf8 */;
106 CREATE TABLE `datacenters`
(
107 `uuid`
varchar(36) NOT NULL,
108 `
name`
varchar(255) NOT NULL,
109 `description`
varchar(255) DEFAULT NULL,
110 `
type`
varchar(36) NOT NULL DEFAULT 'openvim',
111 `vim_url`
varchar(150) NOT NULL COMMENT 'URL of the VIM for the REST API',
112 `vim_url_admin`
varchar(150) DEFAULT NULL,
113 `config`
varchar(4000) DEFAULT NULL COMMENT 'extra config information in json',
114 `created_at`
double NOT NULL,
115 `modified_at`
double DEFAULT NULL,
117 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Datacenters managed by the NFVO.';
118 /*!40101 SET character_set_client = @saved_cs_client */;
121 -- Table structure for table `datacenters_flavors`
124 DROP TABLE IF EXISTS `datacenters_flavors`
;
125 /*!40101 SET @saved_cs_client = @@character_set_client */;
126 /*!40101 SET character_set_client = utf8 */;
127 CREATE TABLE `datacenters_flavors`
(
128 `
id`
int(11) NOT NULL AUTO_INCREMENT
,
129 `flavor_id`
varchar(36) NOT NULL,
130 `datacenter_vim_id`
varchar(36) NOT NULL,
131 `vim_id`
varchar(300) NOT NULL,
132 `status`
enum('ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
134 `created`
enum('true','false') NOT NULL DEFAULT 'false' COMMENT 'Indicates if it has been created by openmano, or already existed',
135 `extended`
varchar(2000) DEFAULT NULL COMMENT 'Extra description json format of additional devices',
137 KEY `FK__flavors`
(`flavor_id`
),
138 KEY `FK_datacenters_flavors_datacenter_tenants`
(`datacenter_vim_id`
),
139 CONSTRAINT `FK__flavors`
FOREIGN KEY (`flavor_id`
) REFERENCES `flavors`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
140 CONSTRAINT `FK_datacenters_flavors_datacenter_tenants`
FOREIGN KEY (`datacenter_vim_id`
) REFERENCES `datacenter_tenants`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
141 ) ENGINE
=InnoDB AUTO_INCREMENT
=5 DEFAULT CHARSET
=utf8
;
142 /*!40101 SET character_set_client = @saved_cs_client */;
145 -- Table structure for table `datacenters_images`
148 DROP TABLE IF EXISTS `datacenters_images`
;
149 /*!40101 SET @saved_cs_client = @@character_set_client */;
150 /*!40101 SET character_set_client = utf8 */;
151 CREATE TABLE `datacenters_images`
(
152 `
id`
int(11) NOT NULL AUTO_INCREMENT
,
153 `image_id`
varchar(36) NOT NULL,
154 `datacenter_vim_id`
varchar(36) NOT NULL,
155 `vim_id`
varchar(300) NOT NULL,
156 `status`
enum('ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
158 `created`
enum('true','false') NOT NULL DEFAULT 'false' COMMENT 'Indicates if it has been created by openmano, or already existed',
160 KEY `FK__images`
(`image_id`
),
161 KEY `FK_datacenters_images_datacenter_tenants`
(`datacenter_vim_id`
),
162 CONSTRAINT `FK__images`
FOREIGN KEY (`image_id`
) REFERENCES `images`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
163 CONSTRAINT `FK_datacenters_images_datacenter_tenants`
FOREIGN KEY (`datacenter_vim_id`
) REFERENCES `datacenter_tenants`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
164 ) ENGINE
=InnoDB AUTO_INCREMENT
=5 DEFAULT CHARSET
=utf8
;
165 /*!40101 SET character_set_client = @saved_cs_client */;
168 -- Table structure for table `flavors`
171 DROP TABLE IF EXISTS `flavors`
;
172 /*!40101 SET @saved_cs_client = @@character_set_client */;
173 /*!40101 SET character_set_client = utf8 */;
174 CREATE TABLE `flavors`
(
175 `uuid`
varchar(36) NOT NULL,
176 `
name`
varchar(255) NOT NULL,
177 `description`
varchar(255) DEFAULT NULL,
178 `disk`
smallint(5) unsigned
DEFAULT NULL,
179 `ram`
mediumint(7) unsigned
DEFAULT NULL,
180 `vcpus`
smallint(5) unsigned
DEFAULT NULL,
181 `extended`
varchar(2000) DEFAULT NULL COMMENT 'Extra description json format of needed resources and pining, orginized in sets per numa',
183 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
;
184 /*!40101 SET character_set_client = @saved_cs_client */;
187 -- Table structure for table `images`
190 DROP TABLE IF EXISTS `images`
;
191 /*!40101 SET @saved_cs_client = @@character_set_client */;
192 /*!40101 SET character_set_client = utf8 */;
193 CREATE TABLE `images`
(
194 `uuid`
varchar(36) NOT NULL,
195 `
name`
varchar(255) NOT NULL,
196 `universal_name`
varchar(255) DEFAULT NULL,
197 `checksum`
varchar(32) DEFAULT NULL,
198 `
location`
varchar(200) DEFAULT NULL,
199 `description`
varchar(255) DEFAULT NULL,
200 `metadata`
varchar(2000) DEFAULT NULL,
201 PRIMARY KEY (`uuid`
),
202 UNIQUE KEY `
location`
(`
location`
),
203 UNIQUE KEY `universal_name_checksum`
(`universal_name`
,`checksum`
)
204 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
;
205 /*!40101 SET character_set_client = @saved_cs_client */;
208 -- Table structure for table `instance_actions`
211 DROP TABLE IF EXISTS `instance_actions`
;
212 /*!40101 SET @saved_cs_client = @@character_set_client */;
213 /*!40101 SET character_set_client = utf8 */;
214 CREATE TABLE `instance_actions`
(
215 `uuid`
varchar(36) NOT NULL,
216 `tenant_id`
varchar(36) DEFAULT NULL,
217 `instance_id`
varchar(36) DEFAULT NULL,
218 `description`
varchar(64) DEFAULT NULL COMMENT 'CREATE, DELETE, SCALE OUT/IN, ...',
219 `number_tasks`
smallint(6) NOT NULL DEFAULT '1',
220 `number_done`
smallint(6) NOT NULL DEFAULT '0',
221 `number_failed`
smallint(6) NOT NULL DEFAULT '0',
222 `created_at`
double NOT NULL,
223 `modified_at`
double DEFAULT NULL,
224 PRIMARY KEY (`uuid`
),
225 KEY `FK_actions_tenants`
(`tenant_id`
),
226 CONSTRAINT `FK_actions_tenant`
FOREIGN KEY (`tenant_id`
) REFERENCES `nfvo_tenants`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
227 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
COMMENT='Contains client actions over instances';
228 /*!40101 SET character_set_client = @saved_cs_client */;
231 -- Table structure for table `instance_classifications`
234 DROP TABLE IF EXISTS `instance_classifications`
;
235 /*!40101 SET @saved_cs_client = @@character_set_client */;
236 /*!40101 SET character_set_client = utf8 */;
237 CREATE TABLE `instance_classifications`
(
238 `uuid`
varchar(36) NOT NULL,
239 `instance_scenario_id`
varchar(36) NOT NULL,
240 `vim_classification_id`
varchar(300) DEFAULT NULL,
241 `sce_classifier_match_id`
varchar(36) DEFAULT NULL,
242 `datacenter_id`
varchar(36) DEFAULT NULL,
243 `datacenter_tenant_id`
varchar(36) DEFAULT NULL,
244 `status`
enum('ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','PAUSED','SUSPENDED','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
245 `error_msg`
varchar(1024) DEFAULT NULL,
247 `related`
varchar(36) DEFAULT NULL,
248 `created_at`
double NOT NULL,
249 `modified_at`
double DEFAULT NULL,
250 PRIMARY KEY (`uuid`
),
251 KEY `FK_instance_classifications_instance_scenarios`
(`instance_scenario_id`
),
252 KEY `FK_instance_classifications_sce_classifier_matches`
(`sce_classifier_match_id`
),
253 KEY `FK_instance_classifications_datacenters`
(`datacenter_id`
),
254 KEY `FK_instance_classifications_datacenter_tenants`
(`datacenter_tenant_id`
),
255 CONSTRAINT `FK_instance_classifications_datacenter_tenants`
FOREIGN KEY (`datacenter_tenant_id`
) REFERENCES `datacenter_tenants`
(`uuid`
),
256 CONSTRAINT `FK_instance_classifications_datacenters`
FOREIGN KEY (`datacenter_id`
) REFERENCES `datacenters`
(`uuid`
),
257 CONSTRAINT `FK_instance_classifications_instance_scenarios`
FOREIGN KEY (`instance_scenario_id`
) REFERENCES `instance_scenarios`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
258 CONSTRAINT `FK_instance_classifications_sce_classifier_matches`
FOREIGN KEY (`sce_classifier_match_id`
) REFERENCES `sce_classifier_matches`
(`uuid`
) ON DELETE SET NULL ON UPDATE CASCADE
259 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
;
260 /*!40101 SET character_set_client = @saved_cs_client */;
263 -- Table structure for table `instance_interfaces`
266 DROP TABLE IF EXISTS `instance_interfaces`
;
267 /*!40101 SET @saved_cs_client = @@character_set_client */;
268 /*!40101 SET character_set_client = utf8 */;
269 CREATE TABLE `instance_interfaces`
(
270 `uuid`
varchar(36) NOT NULL,
271 `instance_vm_id`
varchar(36) NOT NULL,
272 `instance_net_id`
varchar(36) NOT NULL,
273 `instance_wim_net_id`
varchar(36) DEFAULT NULL,
274 `interface_id`
varchar(36) DEFAULT NULL,
275 `vim_interface_id`
varchar(300) DEFAULT NULL,
276 `mac_address`
varchar(32) DEFAULT NULL,
277 `ip_address`
varchar(64) DEFAULT NULL,
279 `
type`
enum('internal','external') NOT NULL COMMENT 'Indicates if this interface is external to a vnf, or internal',
280 `model`
varchar(12) DEFAULT NULL,
281 `floating_ip`
tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Indicates if a floating_ip must be associated to this interface',
282 `port_security`
tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Indicates if port security must be enabled or disabled. By default it is enabled',
283 `sdn_port_id`
varchar(36) DEFAULT NULL COMMENT 'Port id in ovim',
284 `compute_node`
varchar(100) DEFAULT NULL COMMENT 'Compute node id used to specify the SDN port mapping',
285 `pci`
varchar(50) DEFAULT NULL COMMENT 'PCI of the physical port in the host',
286 `vlan`
smallint(5) unsigned
DEFAULT NULL COMMENT 'VLAN tag used by the port',
287 `created_at`
double DEFAULT NULL,
288 `modified_at`
double DEFAULT NULL,
289 PRIMARY KEY (`uuid`
),
290 KEY `FK_instance_vms`
(`instance_vm_id`
),
291 KEY `FK_instance_nets`
(`instance_net_id`
),
292 KEY `FK_instance_ids`
(`interface_id`
),
293 CONSTRAINT `FK_instance_ids`
FOREIGN KEY (`interface_id`
) REFERENCES `interfaces`
(`uuid`
) ON DELETE SET NULL ON UPDATE CASCADE,
294 CONSTRAINT `FK_instance_nets`
FOREIGN KEY (`instance_net_id`
) REFERENCES `instance_nets`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
295 CONSTRAINT `FK_instance_vms`
FOREIGN KEY (`instance_vm_id`
) REFERENCES `instance_vms`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
296 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Table with all running associattion among VM instances and net instances';
297 /*!40101 SET character_set_client = @saved_cs_client */;
300 -- Table structure for table `instance_nets`
303 DROP TABLE IF EXISTS `instance_nets`
;
304 /*!40101 SET @saved_cs_client = @@character_set_client */;
305 /*!40101 SET character_set_client = utf8 */;
306 CREATE TABLE `instance_nets`
(
307 `uuid`
varchar(36) NOT NULL,
308 `osm_id`
varchar(255) DEFAULT NULL,
309 `vim_net_id`
varchar(300) DEFAULT NULL,
310 `vim_name`
varchar(255) DEFAULT NULL,
311 `instance_scenario_id`
varchar(36) DEFAULT NULL,
312 `sce_net_id`
varchar(36) DEFAULT NULL,
313 `net_id`
varchar(36) DEFAULT NULL,
314 `datacenter_id`
varchar(36) DEFAULT NULL,
315 `datacenter_tenant_id`
varchar(36) NOT NULL,
316 `status`
enum('ACTIVE','INACTIVE','DOWN','BUILD','ERROR','VIM_ERROR','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
317 `error_msg`
varchar(1024) DEFAULT NULL,
319 `related`
varchar(36) DEFAULT NULL,
320 `multipoint`
enum('true','false') NOT NULL DEFAULT 'true',
321 `created`
enum('true','false') NOT NULL DEFAULT 'false' COMMENT 'Created or already exists at VIM',
322 `created_at`
double NOT NULL,
323 `modified_at`
double DEFAULT NULL,
324 `sdn_net_id`
varchar(36) DEFAULT NULL COMMENT 'Network id in ovim',
325 PRIMARY KEY (`uuid`
),
326 KEY `FK_instance_nets_instance_scenarios`
(`instance_scenario_id`
),
327 KEY `FK_instance_nets_sce_nets`
(`sce_net_id`
),
328 KEY `FK_instance_nets_nets`
(`net_id`
),
329 KEY `FK_instance_nets_datacenters`
(`datacenter_id`
),
330 KEY `FK_instance_nets_datacenter_tenants`
(`datacenter_tenant_id`
),
331 CONSTRAINT `FK_instance_nets_datacenter_tenants`
FOREIGN KEY (`datacenter_tenant_id`
) REFERENCES `datacenter_tenants`
(`uuid`
),
332 CONSTRAINT `FK_instance_nets_datacenters`
FOREIGN KEY (`datacenter_id`
) REFERENCES `datacenters`
(`uuid`
),
333 CONSTRAINT `FK_instance_nets_instance_scenarios`
FOREIGN KEY (`instance_scenario_id`
) REFERENCES `instance_scenarios`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
334 CONSTRAINT `FK_instance_nets_nets`
FOREIGN KEY (`net_id`
) REFERENCES `nets`
(`uuid`
) ON DELETE SET NULL ON UPDATE CASCADE,
335 CONSTRAINT `FK_instance_nets_sce_nets`
FOREIGN KEY (`sce_net_id`
) REFERENCES `sce_nets`
(`uuid`
) ON DELETE SET NULL ON UPDATE CASCADE
336 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Instances of networks';
337 /*!40101 SET character_set_client = @saved_cs_client */;
340 -- Table structure for table `instance_scenarios`
343 DROP TABLE IF EXISTS `instance_scenarios`
;
344 /*!40101 SET @saved_cs_client = @@character_set_client */;
345 /*!40101 SET character_set_client = utf8 */;
346 CREATE TABLE `instance_scenarios`
(
347 `uuid`
varchar(36) NOT NULL,
348 `
name`
varchar(255) NOT NULL,
349 `tenant_id`
varchar(36) DEFAULT NULL,
350 `scenario_id`
varchar(36) DEFAULT NULL,
351 `datacenter_id`
varchar(36) NOT NULL,
352 `datacenter_tenant_id`
varchar(36) NOT NULL,
353 `description`
varchar(255) DEFAULT NULL,
354 `created_at`
double NOT NULL,
355 `modified_at`
double DEFAULT NULL,
356 `cloud_config` mediumtext
,
357 PRIMARY KEY (`uuid`
),
358 KEY `FK_scenarios_nfvo_tenants`
(`tenant_id`
),
359 KEY `FK_instance_scenarios_vim_tenants`
(`datacenter_tenant_id`
),
360 KEY `FK_instance_scenarios_datacenters`
(`datacenter_id`
),
361 KEY `FK_instance_scenarios_scenarios`
(`scenario_id`
),
362 CONSTRAINT `FK_instance_scenarios_datacenter_tenants`
FOREIGN KEY (`datacenter_tenant_id`
) REFERENCES `datacenter_tenants`
(`uuid`
),
363 CONSTRAINT `FK_instance_scenarios_datacenters`
FOREIGN KEY (`datacenter_id`
) REFERENCES `datacenters`
(`uuid`
),
364 CONSTRAINT `FK_instance_scenarios_nfvo_tenants`
FOREIGN KEY (`tenant_id`
) REFERENCES `nfvo_tenants`
(`uuid`
),
365 CONSTRAINT `FK_instance_scenarios_scenarios`
FOREIGN KEY (`scenario_id`
) REFERENCES `scenarios`
(`uuid`
) ON DELETE SET NULL ON UPDATE CASCADE
366 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Instances of scenarios defined by the user';
367 /*!40101 SET character_set_client = @saved_cs_client */;
370 -- Table structure for table `instance_sfis`
373 DROP TABLE IF EXISTS `instance_sfis`
;
374 /*!40101 SET @saved_cs_client = @@character_set_client */;
375 /*!40101 SET character_set_client = utf8 */;
376 CREATE TABLE `instance_sfis`
(
377 `uuid`
varchar(36) NOT NULL,
378 `instance_scenario_id`
varchar(36) NOT NULL,
379 `vim_sfi_id`
varchar(300) DEFAULT NULL,
380 `sce_rsp_hop_id`
varchar(36) DEFAULT NULL,
381 `datacenter_id`
varchar(36) DEFAULT NULL,
382 `datacenter_tenant_id`
varchar(36) DEFAULT NULL,
383 `status`
enum('ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','PAUSED','SUSPENDED','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
384 `error_msg`
varchar(1024) DEFAULT NULL,
386 `related`
varchar(36) DEFAULT NULL,
387 `created_at`
double NOT NULL,
388 `modified_at`
double DEFAULT NULL,
389 PRIMARY KEY (`uuid`
),
390 KEY `FK_instance_sfis_instance_scenarios`
(`instance_scenario_id`
),
391 KEY `FK_instance_sfis_sce_rsp_hops`
(`sce_rsp_hop_id`
),
392 KEY `FK_instance_sfis_datacenters`
(`datacenter_id`
),
393 KEY `FK_instance_sfis_datacenter_tenants`
(`datacenter_tenant_id`
),
394 CONSTRAINT `FK_instance_sfis_datacenter_tenants`
FOREIGN KEY (`datacenter_tenant_id`
) REFERENCES `datacenter_tenants`
(`uuid`
),
395 CONSTRAINT `FK_instance_sfis_datacenters`
FOREIGN KEY (`datacenter_id`
) REFERENCES `datacenters`
(`uuid`
),
396 CONSTRAINT `FK_instance_sfis_instance_scenarios`
FOREIGN KEY (`instance_scenario_id`
) REFERENCES `instance_scenarios`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
397 CONSTRAINT `FK_instance_sfis_sce_rsp_hops`
FOREIGN KEY (`sce_rsp_hop_id`
) REFERENCES `sce_rsp_hops`
(`uuid`
) ON DELETE SET NULL ON UPDATE CASCADE
398 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
;
399 /*!40101 SET character_set_client = @saved_cs_client */;
402 -- Table structure for table `instance_sfps`
405 DROP TABLE IF EXISTS `instance_sfps`
;
406 /*!40101 SET @saved_cs_client = @@character_set_client */;
407 /*!40101 SET character_set_client = utf8 */;
408 CREATE TABLE `instance_sfps`
(
409 `uuid`
varchar(36) NOT NULL,
410 `instance_scenario_id`
varchar(36) NOT NULL,
411 `vim_sfp_id`
varchar(300) DEFAULT NULL,
412 `sce_rsp_id`
varchar(36) DEFAULT NULL,
413 `datacenter_id`
varchar(36) DEFAULT NULL,
414 `datacenter_tenant_id`
varchar(36) DEFAULT NULL,
415 `status`
enum('ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','PAUSED','SUSPENDED','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
416 `error_msg`
varchar(1024) DEFAULT NULL,
418 `related`
varchar(36) DEFAULT NULL,
419 `created_at`
double NOT NULL,
420 `modified_at`
double DEFAULT NULL,
421 PRIMARY KEY (`uuid`
),
422 KEY `FK_instance_sfps_instance_scenarios`
(`instance_scenario_id`
),
423 KEY `FK_instance_sfps_sce_rsps`
(`sce_rsp_id`
),
424 KEY `FK_instance_sfps_datacenters`
(`datacenter_id`
),
425 KEY `FK_instance_sfps_datacenter_tenants`
(`datacenter_tenant_id`
),
426 CONSTRAINT `FK_instance_sfps_datacenter_tenants`
FOREIGN KEY (`datacenter_tenant_id`
) REFERENCES `datacenter_tenants`
(`uuid`
),
427 CONSTRAINT `FK_instance_sfps_datacenters`
FOREIGN KEY (`datacenter_id`
) REFERENCES `datacenters`
(`uuid`
),
428 CONSTRAINT `FK_instance_sfps_instance_scenarios`
FOREIGN KEY (`instance_scenario_id`
) REFERENCES `instance_scenarios`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
429 CONSTRAINT `FK_instance_sfps_sce_rsps`
FOREIGN KEY (`sce_rsp_id`
) REFERENCES `sce_rsps`
(`uuid`
) ON DELETE SET NULL ON UPDATE CASCADE
430 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
;
431 /*!40101 SET character_set_client = @saved_cs_client */;
434 -- Table structure for table `instance_sfs`
437 DROP TABLE IF EXISTS `instance_sfs`
;
438 /*!40101 SET @saved_cs_client = @@character_set_client */;
439 /*!40101 SET character_set_client = utf8 */;
440 CREATE TABLE `instance_sfs`
(
441 `uuid`
varchar(36) NOT NULL,
442 `instance_scenario_id`
varchar(36) NOT NULL,
443 `vim_sf_id`
varchar(300) DEFAULT NULL,
444 `sce_rsp_hop_id`
varchar(36) DEFAULT NULL,
445 `datacenter_id`
varchar(36) DEFAULT NULL,
446 `datacenter_tenant_id`
varchar(36) DEFAULT NULL,
447 `status`
enum('ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','PAUSED','SUSPENDED','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
448 `error_msg`
varchar(1024) DEFAULT NULL,
450 `related`
varchar(36) DEFAULT NULL,
451 `created_at`
double NOT NULL,
452 `modified_at`
double DEFAULT NULL,
453 PRIMARY KEY (`uuid`
),
454 KEY `FK_instance_sfs_instance_scenarios`
(`instance_scenario_id`
),
455 KEY `FK_instance_sfs_sce_rsp_hops`
(`sce_rsp_hop_id`
),
456 KEY `FK_instance_sfs_datacenters`
(`datacenter_id`
),
457 KEY `FK_instance_sfs_datacenter_tenants`
(`datacenter_tenant_id`
),
458 CONSTRAINT `FK_instance_sfs_datacenter_tenants`
FOREIGN KEY (`datacenter_tenant_id`
) REFERENCES `datacenter_tenants`
(`uuid`
),
459 CONSTRAINT `FK_instance_sfs_datacenters`
FOREIGN KEY (`datacenter_id`
) REFERENCES `datacenters`
(`uuid`
),
460 CONSTRAINT `FK_instance_sfs_instance_scenarios`
FOREIGN KEY (`instance_scenario_id`
) REFERENCES `instance_scenarios`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
461 CONSTRAINT `FK_instance_sfs_sce_rsp_hops`
FOREIGN KEY (`sce_rsp_hop_id`
) REFERENCES `sce_rsp_hops`
(`uuid`
) ON DELETE SET NULL ON UPDATE CASCADE
462 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
;
463 /*!40101 SET character_set_client = @saved_cs_client */;
466 -- Table structure for table `instance_vms`
469 DROP TABLE IF EXISTS `instance_vms`
;
470 /*!40101 SET @saved_cs_client = @@character_set_client */;
471 /*!40101 SET character_set_client = utf8 */;
472 CREATE TABLE `instance_vms`
(
473 `uuid`
varchar(36) NOT NULL,
474 `instance_vnf_id`
varchar(36) NOT NULL,
475 `vim_vm_id`
varchar(300) DEFAULT NULL,
476 `vm_id`
varchar(36) DEFAULT NULL,
477 `vim_name`
varchar(255) DEFAULT NULL,
478 `status`
enum('ACTIVE:NoMgmtIP','ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','PAUSED','SUSPENDED','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
479 `error_msg`
varchar(1024) DEFAULT NULL,
481 `related`
varchar(36) DEFAULT NULL,
482 `created_at`
double NOT NULL,
483 `modified_at`
double DEFAULT NULL,
484 PRIMARY KEY (`uuid`
),
485 KEY `FK_instance_vms_vms`
(`vm_id`
),
486 KEY `FK_instance_vms_instance_vnfs`
(`instance_vnf_id`
),
487 CONSTRAINT `FK_instance_vms_instance_vnfs`
FOREIGN KEY (`instance_vnf_id`
) REFERENCES `instance_vnfs`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
488 CONSTRAINT `FK_instance_vms_vms`
FOREIGN KEY (`vm_id`
) REFERENCES `vms`
(`uuid`
) ON DELETE SET NULL ON UPDATE CASCADE
489 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Instances of VMs as part of VNF instances';
490 /*!40101 SET character_set_client = @saved_cs_client */;
493 -- Table structure for table `instance_vnfs`
496 DROP TABLE IF EXISTS `instance_vnfs`
;
497 /*!40101 SET @saved_cs_client = @@character_set_client */;
498 /*!40101 SET character_set_client = utf8 */;
499 CREATE TABLE `instance_vnfs`
(
500 `uuid`
varchar(36) NOT NULL,
501 `instance_scenario_id`
varchar(36) NOT NULL,
502 `vnf_id`
varchar(36) NOT NULL,
503 `sce_vnf_id`
varchar(36) DEFAULT NULL,
504 `datacenter_id`
varchar(36) DEFAULT NULL,
505 `datacenter_tenant_id`
varchar(36) DEFAULT NULL,
506 `created_at`
double NOT NULL,
507 `modified_at`
double DEFAULT NULL,
508 PRIMARY KEY (`uuid`
),
509 KEY `FK_instance_vnfs_vnfs`
(`vnf_id`
),
510 KEY `FK_instance_vnfs_instance_scenarios`
(`instance_scenario_id`
),
511 KEY `FK_instance_vnfs_sce_vnfs`
(`sce_vnf_id`
),
512 KEY `FK_instance_vnfs_datacenters`
(`datacenter_id`
),
513 KEY `FK_instance_vnfs_datacenter_tenants`
(`datacenter_tenant_id`
),
514 CONSTRAINT `FK_instance_vnfs_datacenter_tenants`
FOREIGN KEY (`datacenter_tenant_id`
) REFERENCES `datacenter_tenants`
(`uuid`
),
515 CONSTRAINT `FK_instance_vnfs_datacenters`
FOREIGN KEY (`datacenter_id`
) REFERENCES `datacenters`
(`uuid`
),
516 CONSTRAINT `FK_instance_vnfs_instance_scenarios`
FOREIGN KEY (`instance_scenario_id`
) REFERENCES `instance_scenarios`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
517 CONSTRAINT `FK_instance_vnfs_sce_vnfs`
FOREIGN KEY (`sce_vnf_id`
) REFERENCES `sce_vnfs`
(`uuid`
) ON DELETE SET NULL ON UPDATE CASCADE,
518 CONSTRAINT `FK_instance_vnfs_vnfs`
FOREIGN KEY (`vnf_id`
) REFERENCES `vnfs`
(`uuid`
)
519 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Instances of VNFs as part of a scenario';
520 /*!40101 SET character_set_client = @saved_cs_client */;
523 -- Table structure for table `instance_wim_nets`
526 DROP TABLE IF EXISTS `instance_wim_nets`
;
527 /*!40101 SET @saved_cs_client = @@character_set_client */;
528 /*!40101 SET character_set_client = utf8 */;
529 CREATE TABLE `instance_wim_nets`
(
530 `uuid`
varchar(36) NOT NULL,
531 `wim_internal_id`
varchar(300) DEFAULT NULL COMMENT 'Internal ID used by the WIM to refer to the network',
532 `instance_scenario_id`
varchar(36) DEFAULT NULL,
533 `sce_net_id`
varchar(36) DEFAULT NULL,
534 `wim_id`
varchar(36) DEFAULT NULL,
535 `wim_account_id`
varchar(36) NOT NULL,
536 `status`
enum('ACTIVE','INACTIVE','DOWN','BUILD','ERROR','WIM_ERROR','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
537 `error_msg`
varchar(1024) DEFAULT NULL,
539 `related`
varchar(36) DEFAULT NULL,
540 `multipoint`
enum('true','false') NOT NULL DEFAULT 'false',
541 `created`
enum('true','false') NOT NULL DEFAULT 'false' COMMENT 'Created or already exists at WIM',
542 `sdn`
enum('true','false') NOT NULL DEFAULT 'false',
543 `created_at`
double NOT NULL,
544 `modified_at`
double DEFAULT NULL,
545 PRIMARY KEY (`uuid`
),
546 KEY `FK_instance_wim_nets_instance_scenarios`
(`instance_scenario_id`
),
547 KEY `FK_instance_wim_nets_sce_nets`
(`sce_net_id`
),
548 KEY `FK_instance_wim_nets_wims`
(`wim_id`
),
549 KEY `FK_instance_wim_nets_wim_accounts`
(`wim_account_id`
),
550 CONSTRAINT `FK_instance_wim_nets_instance_scenarios`
FOREIGN KEY (`instance_scenario_id`
) REFERENCES `instance_scenarios`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
551 CONSTRAINT `FK_instance_wim_nets_sce_nets`
FOREIGN KEY (`sce_net_id`
) REFERENCES `sce_nets`
(`uuid`
) ON DELETE SET NULL ON UPDATE CASCADE,
552 CONSTRAINT `FK_instance_wim_nets_wim_accounts`
FOREIGN KEY (`wim_account_id`
) REFERENCES `wim_accounts`
(`uuid`
),
553 CONSTRAINT `FK_instance_wim_nets_wims`
FOREIGN KEY (`wim_id`
) REFERENCES `wims`
(`uuid`
)
554 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Instances of wim networks';
555 /*!40101 SET character_set_client = @saved_cs_client */;
558 -- Table structure for table `interfaces`
561 DROP TABLE IF EXISTS `interfaces`
;
562 /*!40101 SET @saved_cs_client = @@character_set_client */;
563 /*!40101 SET character_set_client = utf8 */;
564 CREATE TABLE `interfaces`
(
565 `uuid`
varchar(36) NOT NULL,
566 `internal_name`
varchar(255) NOT NULL,
567 `external_name`
varchar(255) DEFAULT NULL,
568 `vm_id`
varchar(36) NOT NULL,
569 `net_id`
varchar(36) DEFAULT NULL,
570 `
type`
enum('mgmt','bridge','data') NOT NULL DEFAULT 'data' COMMENT 'Type of network',
571 `vpci`
char(12) DEFAULT NULL,
572 `bw`
mediumint(8) unsigned
DEFAULT NULL COMMENT 'BW expressed in Mbits/s. Maybe this field is not necessary.',
573 `created_at`
double NOT NULL,
574 `modified_at`
double DEFAULT NULL,
575 `model`
varchar(12) DEFAULT NULL,
576 `mac`
char(18) DEFAULT NULL,
577 `ip_address`
varchar(64) DEFAULT NULL,
578 `floating_ip`
tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Indicates if a floating_ip must be associated to this interface',
579 `port_security`
tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Indicates if port security must be enabled or disabled. By default it is enabled',
580 PRIMARY KEY (`uuid`
),
581 UNIQUE KEY `internal_name_vm_id`
(`internal_name`
,`vm_id`
),
582 KEY `FK_interfaces_vms`
(`vm_id`
),
583 KEY `FK_interfaces_nets`
(`net_id`
),
584 CONSTRAINT `FK_interfaces_nets`
FOREIGN KEY (`net_id`
) REFERENCES `nets`
(`uuid`
) ON DELETE CASCADE,
585 CONSTRAINT `FK_interfaces_vms`
FOREIGN KEY (`vm_id`
) REFERENCES `vms`
(`uuid`
) ON DELETE CASCADE
586 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='VM interfaces';
587 /*!40101 SET character_set_client = @saved_cs_client */;
590 -- Table structure for table `ip_profiles`
593 DROP TABLE IF EXISTS `ip_profiles`
;
594 /*!40101 SET @saved_cs_client = @@character_set_client */;
595 /*!40101 SET character_set_client = utf8 */;
596 CREATE TABLE `ip_profiles`
(
597 `
id`
int(11) NOT NULL AUTO_INCREMENT
,
598 `net_id`
varchar(36) DEFAULT NULL,
599 `sce_net_id`
varchar(36) DEFAULT NULL,
600 `instance_net_id`
varchar(36) DEFAULT NULL,
601 `ip_version`
enum('IPv4','IPv6') NOT NULL DEFAULT 'IPv4',
602 `subnet_address`
varchar(64) DEFAULT NULL,
603 `gateway_address`
varchar(64) DEFAULT NULL,
604 `dns_address`
varchar(255) DEFAULT NULL COMMENT 'dns ip list separated by semicolon',
605 `dhcp_enabled`
enum('true','false') NOT NULL DEFAULT 'true',
606 `dhcp_start_address`
varchar(64) DEFAULT NULL,
607 `dhcp_count`
int(11) DEFAULT NULL,
608 `security_group`
varchar(255) DEFAULT NULL,
610 KEY `FK_ipprofiles_nets`
(`net_id`
),
611 KEY `FK_ipprofiles_scenets`
(`sce_net_id`
),
612 KEY `FK_ipprofiles_instancenets`
(`instance_net_id`
),
613 CONSTRAINT `FK_ipprofiles_instancenets`
FOREIGN KEY (`instance_net_id`
) REFERENCES `instance_nets`
(`uuid`
) ON DELETE CASCADE,
614 CONSTRAINT `FK_ipprofiles_nets`
FOREIGN KEY (`net_id`
) REFERENCES `nets`
(`uuid`
) ON DELETE CASCADE,
615 CONSTRAINT `FK_ipprofiles_scenets`
FOREIGN KEY (`sce_net_id`
) REFERENCES `sce_nets`
(`uuid`
) ON DELETE CASCADE
616 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
COMMENT='Table containing the IP parameters of a network, either a net, a sce_net or and instance_net.';
617 /*!40101 SET character_set_client = @saved_cs_client */;
620 -- Table structure for table `logs`
623 DROP TABLE IF EXISTS `logs`
;
624 /*!40101 SET @saved_cs_client = @@character_set_client */;
625 /*!40101 SET character_set_client = utf8 */;
626 CREATE TABLE `logs`
(
627 `
id`
int(10) unsigned
NOT NULL AUTO_INCREMENT
,
628 `created_at`
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
629 `nfvo_tenant_id`
varchar(36) DEFAULT NULL,
630 `related`
varchar(36) NOT NULL COMMENT 'Relevant element for the log',
631 `uuid`
varchar(36) DEFAULT NULL COMMENT 'Uuid of vnf, scenario, etc. that log relates to',
632 `
level`
enum('panic','error','info','debug','verbose') NOT NULL,
633 `description`
varchar(200) NOT NULL,
635 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
;
636 /*!40101 SET character_set_client = @saved_cs_client */;
639 -- Table structure for table `nets`
642 DROP TABLE IF EXISTS `nets`
;
643 /*!40101 SET @saved_cs_client = @@character_set_client */;
644 /*!40101 SET character_set_client = utf8 */;
645 CREATE TABLE `nets`
(
646 `uuid`
varchar(36) NOT NULL,
647 `osm_id`
varchar(255) DEFAULT NULL,
648 `vnf_id`
varchar(36) NOT NULL,
649 `
name`
varchar(255) NOT NULL,
650 `
type`
enum('bridge','data','ptp') NOT NULL DEFAULT 'data' COMMENT 'Type of network',
651 `multipoint`
enum('true','false') NOT NULL DEFAULT 'false',
652 `description`
varchar(255) DEFAULT NULL,
653 `created_at`
double NOT NULL,
654 `modified_at`
double DEFAULT NULL,
655 PRIMARY KEY (`uuid`
),
656 UNIQUE KEY `vnf_id_name`
(`vnf_id`
,`
name`
),
657 CONSTRAINT `FK_nets_vnfs`
FOREIGN KEY (`vnf_id`
) REFERENCES `vnfs`
(`uuid`
) ON DELETE CASCADE
658 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Networks in a VNF definition. These are only the internal networks among VMs of the same VNF.';
659 /*!40101 SET character_set_client = @saved_cs_client */;
662 -- Table structure for table `nfvo_tenants`
665 DROP TABLE IF EXISTS `nfvo_tenants`
;
666 /*!40101 SET @saved_cs_client = @@character_set_client */;
667 /*!40101 SET character_set_client = utf8 */;
668 CREATE TABLE `nfvo_tenants`
(
669 `uuid`
varchar(36) NOT NULL,
670 `
name`
varchar(255) NOT NULL,
671 `description`
varchar(255) DEFAULT NULL,
672 `encrypted_RO_priv_key`
varchar(2000) DEFAULT NULL,
673 `RO_pub_key`
varchar(510) DEFAULT NULL,
674 `created_at`
double NOT NULL,
675 `modified_at`
double DEFAULT NULL,
676 PRIMARY KEY (`uuid`
),
677 UNIQUE KEY `
name`
(`
name`
)
678 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Scenarios defined by the user';
679 /*!40101 SET character_set_client = @saved_cs_client */;
682 -- Table structure for table `sce_classifier_matches`
685 DROP TABLE IF EXISTS `sce_classifier_matches`
;
686 /*!40101 SET @saved_cs_client = @@character_set_client */;
687 /*!40101 SET character_set_client = utf8 */;
688 CREATE TABLE `sce_classifier_matches`
(
689 `uuid`
varchar(36) NOT NULL,
690 `ip_proto`
varchar(2) NOT NULL,
691 `source_ip`
varchar(16) NOT NULL,
692 `destination_ip`
varchar(16) NOT NULL,
693 `source_port`
varchar(5) NOT NULL,
694 `destination_port`
varchar(5) NOT NULL,
695 `sce_classifier_id`
varchar(36) NOT NULL,
696 `created_at`
double NOT NULL,
697 `modified_at`
double DEFAULT NULL,
698 PRIMARY KEY (`uuid`
),
699 KEY `FK_classifiers_classifier_match`
(`sce_classifier_id`
),
700 CONSTRAINT `FK_sce_classifiers_classifier_match`
FOREIGN KEY (`sce_classifier_id`
) REFERENCES `sce_classifiers`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
701 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
;
702 /*!40101 SET character_set_client = @saved_cs_client */;
705 -- Table structure for table `sce_classifiers`
708 DROP TABLE IF EXISTS `sce_classifiers`
;
709 /*!40101 SET @saved_cs_client = @@character_set_client */;
710 /*!40101 SET character_set_client = utf8 */;
711 CREATE TABLE `sce_classifiers`
(
712 `uuid`
varchar(36) NOT NULL,
713 `tenant_id`
varchar(36) DEFAULT NULL,
714 `
name`
varchar(255) NOT NULL,
715 `sce_vnffg_id`
varchar(36) NOT NULL,
716 `sce_rsp_id`
varchar(36) NOT NULL,
717 `sce_vnf_id`
varchar(36) NOT NULL,
718 `interface_id`
varchar(36) NOT NULL,
719 `created_at`
double NOT NULL,
720 `modified_at`
double DEFAULT NULL,
721 PRIMARY KEY (`uuid`
),
722 KEY `FK_sce_vnffgs_classifier`
(`sce_vnffg_id`
),
723 KEY `FK_sce_rsps_classifier`
(`sce_rsp_id`
),
724 KEY `FK_sce_vnfs_classifier`
(`sce_vnf_id`
),
725 KEY `FK_interfaces_classifier`
(`interface_id`
),
726 CONSTRAINT `FK_interfaces_classifier`
FOREIGN KEY (`interface_id`
) REFERENCES `interfaces`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
727 CONSTRAINT `FK_sce_rsps_classifier`
FOREIGN KEY (`sce_rsp_id`
) REFERENCES `sce_rsps`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
728 CONSTRAINT `FK_sce_vnffgs_classifier`
FOREIGN KEY (`sce_vnffg_id`
) REFERENCES `sce_vnffgs`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
729 CONSTRAINT `FK_sce_vnfs_classifier`
FOREIGN KEY (`sce_vnf_id`
) REFERENCES `sce_vnfs`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
730 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
;
731 /*!40101 SET character_set_client = @saved_cs_client */;
734 -- Table structure for table `sce_interfaces`
737 DROP TABLE IF EXISTS `sce_interfaces`
;
738 /*!40101 SET @saved_cs_client = @@character_set_client */;
739 /*!40101 SET character_set_client = utf8 */;
740 CREATE TABLE `sce_interfaces`
(
741 `uuid`
varchar(36) NOT NULL,
742 `sce_vnf_id`
varchar(36) NOT NULL,
743 `sce_net_id`
varchar(36) DEFAULT NULL,
744 `interface_id`
varchar(36) DEFAULT NULL,
745 `ip_address`
varchar(64) DEFAULT NULL,
746 `created_at`
double NOT NULL,
747 `modified_at`
double DEFAULT NULL,
748 PRIMARY KEY (`uuid`
),
749 KEY `FK_sce_interfaces_sce_vnfs`
(`sce_vnf_id`
),
750 KEY `FK_sce_interfaces_sce_nets`
(`sce_net_id`
),
751 KEY `FK_sce_interfaces_interfaces`
(`interface_id`
),
752 CONSTRAINT `FK_sce_interfaces_interfaces`
FOREIGN KEY (`interface_id`
) REFERENCES `interfaces`
(`uuid`
),
753 CONSTRAINT `FK_sce_interfaces_sce_nets`
FOREIGN KEY (`sce_net_id`
) REFERENCES `sce_nets`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
754 CONSTRAINT `FK_sce_interfaces_sce_vnfs`
FOREIGN KEY (`sce_vnf_id`
) REFERENCES `sce_vnfs`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
755 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='VNF interfaces in a scenario definition.';
756 /*!40101 SET character_set_client = @saved_cs_client */;
759 -- Table structure for table `sce_nets`
762 DROP TABLE IF EXISTS `sce_nets`
;
763 /*!40101 SET @saved_cs_client = @@character_set_client */;
764 /*!40101 SET character_set_client = utf8 */;
765 CREATE TABLE `sce_nets`
(
766 `uuid`
varchar(36) NOT NULL,
767 `osm_id`
varchar(255) DEFAULT NULL,
768 `
name`
varchar(255) NOT NULL,
769 `scenario_id`
varchar(36) DEFAULT NULL COMMENT 'NULL if net is matched to several scenarios',
770 `
type`
enum('bridge','data','ptp') NOT NULL DEFAULT 'data' COMMENT 'Type of network',
771 `multipoint`
enum('true','false') NOT NULL DEFAULT 'true',
772 `
external`
enum('true','false') NOT NULL DEFAULT 'false' COMMENT 'If external, net is already present at VIM',
773 `description`
varchar(255) DEFAULT NULL,
774 `vim_network_name`
varchar(255) DEFAULT NULL,
775 `created_at`
double NOT NULL,
776 `modified_at`
double DEFAULT NULL,
777 `graph`
varchar(2000) DEFAULT NULL,
778 PRIMARY KEY (`uuid`
),
779 KEY `FK_sce_nets_scenarios`
(`scenario_id`
),
780 CONSTRAINT `FK_sce_nets_scenarios`
FOREIGN KEY (`scenario_id`
) REFERENCES `scenarios`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
781 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Networks in a scenario definition. It only considers networks among VNFs. Networks among internal VMs are only considered in tble ''nets''.';
782 /*!40101 SET character_set_client = @saved_cs_client */;
785 -- Table structure for table `sce_rsp_hops`
788 DROP TABLE IF EXISTS `sce_rsp_hops`
;
789 /*!40101 SET @saved_cs_client = @@character_set_client */;
790 /*!40101 SET character_set_client = utf8 */;
791 CREATE TABLE `sce_rsp_hops`
(
792 `uuid`
varchar(36) NOT NULL,
793 `if_order`
int(11) NOT NULL DEFAULT '0',
794 `ingress_interface_id`
varchar(36) NOT NULL,
795 `egress_interface_id`
varchar(36) NOT NULL,
796 `sce_vnf_id`
varchar(36) NOT NULL,
797 `sce_rsp_id`
varchar(36) NOT NULL,
798 `created_at`
double NOT NULL,
799 `modified_at`
double DEFAULT NULL,
800 PRIMARY KEY (`uuid`
),
801 KEY `FK_interfaces_rsp_hop`
(`ingress_interface_id`
),
802 KEY `FK_sce_vnfs_rsp_hop`
(`sce_vnf_id`
),
803 KEY `FK_sce_rsps_rsp_hop`
(`sce_rsp_id`
),
804 KEY `FK_interfaces_rsp_hop_egress`
(`egress_interface_id`
),
805 CONSTRAINT `FK_interfaces_rsp_hop_egress`
FOREIGN KEY (`egress_interface_id`
) REFERENCES `interfaces`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
806 CONSTRAINT `FK_interfaces_rsp_hop_ingress`
FOREIGN KEY (`ingress_interface_id`
) REFERENCES `interfaces`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
807 CONSTRAINT `FK_sce_rsps_rsp_hop`
FOREIGN KEY (`sce_rsp_id`
) REFERENCES `sce_rsps`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
808 CONSTRAINT `FK_sce_vnfs_rsp_hop`
FOREIGN KEY (`sce_vnf_id`
) REFERENCES `sce_vnfs`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
809 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
;
810 /*!40101 SET character_set_client = @saved_cs_client */;
813 -- Table structure for table `sce_rsps`
816 DROP TABLE IF EXISTS `sce_rsps`
;
817 /*!40101 SET @saved_cs_client = @@character_set_client */;
818 /*!40101 SET character_set_client = utf8 */;
819 CREATE TABLE `sce_rsps`
(
820 `uuid`
varchar(36) NOT NULL,
821 `tenant_id`
varchar(36) DEFAULT NULL,
822 `
name`
varchar(255) NOT NULL,
823 `sce_vnffg_id`
varchar(36) NOT NULL,
824 `created_at`
double NOT NULL,
825 `modified_at`
double DEFAULT NULL,
826 PRIMARY KEY (`uuid`
),
827 KEY `FK_sce_vnffgs_rsp`
(`sce_vnffg_id`
),
828 CONSTRAINT `FK_sce_vnffgs_rsp`
FOREIGN KEY (`sce_vnffg_id`
) REFERENCES `sce_vnffgs`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
829 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
;
830 /*!40101 SET character_set_client = @saved_cs_client */;
833 -- Table structure for table `sce_vnffgs`
836 DROP TABLE IF EXISTS `sce_vnffgs`
;
837 /*!40101 SET @saved_cs_client = @@character_set_client */;
838 /*!40101 SET character_set_client = utf8 */;
839 CREATE TABLE `sce_vnffgs`
(
840 `uuid`
varchar(36) NOT NULL,
841 `tenant_id`
varchar(36) DEFAULT NULL,
842 `
name`
varchar(255) NOT NULL,
843 `description`
varchar(255) DEFAULT NULL,
844 `vendor`
varchar(255) DEFAULT NULL,
845 `scenario_id`
varchar(36) NOT NULL,
846 `created_at`
double NOT NULL,
847 `modified_at`
double DEFAULT NULL,
848 PRIMARY KEY (`uuid`
),
849 KEY `FK_scenarios_sce_vnffg`
(`scenario_id`
),
850 KEY `FK_scenarios_vnffg`
(`tenant_id`
),
851 CONSTRAINT `FK_scenarios_vnffg`
FOREIGN KEY (`tenant_id`
) REFERENCES `scenarios`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
852 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
;
853 /*!40101 SET character_set_client = @saved_cs_client */;
856 -- Table structure for table `sce_vnfs`
859 DROP TABLE IF EXISTS `sce_vnfs`
;
860 /*!40101 SET @saved_cs_client = @@character_set_client */;
861 /*!40101 SET character_set_client = utf8 */;
862 CREATE TABLE `sce_vnfs`
(
863 `uuid`
varchar(36) NOT NULL,
864 `member_vnf_index`
varchar(255) DEFAULT NULL,
865 `
name`
varchar(255) NOT NULL,
866 `scenario_id`
varchar(36) NOT NULL,
867 `vnf_id`
varchar(36) NOT NULL,
868 `description`
varchar(255) DEFAULT NULL,
869 `created_at`
double NOT NULL,
870 `modified_at`
double DEFAULT NULL,
871 `graph`
varchar(2000) DEFAULT NULL,
872 PRIMARY KEY (`uuid`
),
873 UNIQUE KEY `name_scenario_id`
(`
name`
,`scenario_id`
),
874 KEY `FK_sce_vnfs_scenarios`
(`scenario_id`
),
875 KEY `FK_sce_vnfs_vnfs`
(`vnf_id`
),
876 CONSTRAINT `FK_sce_vnfs_scenarios`
FOREIGN KEY (`scenario_id`
) REFERENCES `scenarios`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
877 CONSTRAINT `FK_sce_vnfs_vnfs`
FOREIGN KEY (`vnf_id`
) REFERENCES `vnfs`
(`uuid`
)
878 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='VNFs in scenario definitions. This table also contains the Physical Network Functions and the external elements such as MAN, Core, etc.\r\n';
879 /*!40101 SET character_set_client = @saved_cs_client */;
882 -- Table structure for table `scenarios`
885 DROP TABLE IF EXISTS `scenarios`
;
886 /*!40101 SET @saved_cs_client = @@character_set_client */;
887 /*!40101 SET character_set_client = utf8 */;
888 CREATE TABLE `scenarios`
(
889 `uuid`
varchar(36) NOT NULL,
890 `osm_id`
varchar(255) DEFAULT NULL,
891 `
name`
varchar(255) NOT NULL,
892 `short_name`
varchar(255) DEFAULT NULL,
893 `tenant_id`
varchar(36) DEFAULT NULL,
894 `description`
varchar(255) DEFAULT NULL,
895 `vendor`
varchar(255) DEFAULT NULL,
896 `
public`
enum('true','false') NOT NULL DEFAULT 'false',
897 `created_at`
double NOT NULL,
898 `modified_at`
double DEFAULT NULL,
899 `
descriptor`
text COMMENT 'Original text descriptor used for create the scenario',
900 `cloud_config` mediumtext
,
901 PRIMARY KEY (`uuid`
),
902 UNIQUE KEY `osm_id_tenant_id`
(`osm_id`
,`tenant_id`
),
903 KEY `FK_scenarios_nfvo_tenants`
(`tenant_id`
),
904 CONSTRAINT `FK_scenarios_nfvo_tenants`
FOREIGN KEY (`tenant_id`
) REFERENCES `nfvo_tenants`
(`uuid`
)
905 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Scenarios defined by the user';
906 /*!40101 SET character_set_client = @saved_cs_client */;
909 -- Table structure for table `schema_version`
912 DROP TABLE IF EXISTS `schema_version`
;
913 /*!40101 SET @saved_cs_client = @@character_set_client */;
914 /*!40101 SET character_set_client = utf8 */;
915 CREATE TABLE `schema_version`
(
916 `version_int`
int(11) NOT NULL COMMENT 'version as a number. Must not contain gaps',
917 `
version`
varchar(20) NOT NULL COMMENT 'version as a text',
918 `openmano_ver`
varchar(20) NOT NULL COMMENT 'openmano version',
919 `
comments`
varchar(2000) DEFAULT NULL COMMENT 'changes to database',
920 `
date`
date DEFAULT NULL,
921 PRIMARY KEY (`version_int`
)
922 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
COMMENT='database schema control version';
923 /*!40101 SET character_set_client = @saved_cs_client */;
926 -- Table structure for table `tenants_datacenters`
929 DROP TABLE IF EXISTS `tenants_datacenters`
;
930 /*!40101 SET @saved_cs_client = @@character_set_client */;
931 /*!40101 SET character_set_client = utf8 */;
932 CREATE TABLE `tenants_datacenters`
(
933 `
id`
int(11) NOT NULL AUTO_INCREMENT
,
934 `nfvo_tenant_id`
varchar(36) NOT NULL,
935 `datacenter_id`
varchar(36) NOT NULL,
936 `datacenter_tenant_id`
varchar(36) NOT NULL,
937 `created_at`
double NOT NULL,
938 `modified_at`
double DEFAULT NULL,
940 UNIQUE KEY `datacenter_nfvo_tenant`
(`datacenter_id`
,`nfvo_tenant_id`
),
941 KEY `FK_nfvo_tenants_datacenters`
(`datacenter_id`
),
942 KEY `FK_nfvo_tenants_vim_tenants`
(`datacenter_tenant_id`
),
943 KEY `FK_tenants_datacenters_nfvo_tenants`
(`nfvo_tenant_id`
),
944 CONSTRAINT `FK_tenants_datacenters_datacenter_tenants`
FOREIGN KEY (`datacenter_tenant_id`
) REFERENCES `datacenter_tenants`
(`uuid`
),
945 CONSTRAINT `FK_tenants_datacenters_datacenters`
FOREIGN KEY (`datacenter_id`
) REFERENCES `datacenters`
(`uuid`
),
946 CONSTRAINT `FK_tenants_datacenters_nfvo_tenants`
FOREIGN KEY (`nfvo_tenant_id`
) REFERENCES `nfvo_tenants`
(`uuid`
)
947 ) ENGINE
=InnoDB AUTO_INCREMENT
=11 DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='Scenarios defined by the user';
948 /*!40101 SET character_set_client = @saved_cs_client */;
951 -- Table structure for table `uuids`
954 DROP TABLE IF EXISTS `uuids`
;
955 /*!40101 SET @saved_cs_client = @@character_set_client */;
956 /*!40101 SET character_set_client = utf8 */;
957 CREATE TABLE `uuids`
(
958 `uuid`
varchar(36) NOT NULL,
959 `root_uuid`
varchar(36) DEFAULT NULL COMMENT 'Some related UUIDs can be grouped by this field, so that they can be deleted at once',
960 `created_at`
double NOT NULL,
961 `used_at`
varchar(36) DEFAULT NULL COMMENT 'Table that uses this UUID',
963 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
COMMENT='Table with all unique IDs used to avoid UUID repetitions among different elements';
964 /*!40101 SET character_set_client = @saved_cs_client */;
967 -- Table structure for table `vim_wim_actions`
970 DROP TABLE IF EXISTS `vim_wim_actions`
;
971 /*!40101 SET @saved_cs_client = @@character_set_client */;
972 /*!40101 SET character_set_client = utf8 */;
973 CREATE TABLE `vim_wim_actions`
(
974 `instance_action_id`
varchar(36) NOT NULL,
975 `task_index`
int(6) NOT NULL,
976 `worker`
varchar(64) DEFAULT NULL,
977 `related`
varchar(36) DEFAULT NULL,
978 `datacenter_vim_id`
varchar(36) DEFAULT NULL,
979 `vim_id`
varchar(300) DEFAULT NULL,
980 `wim_account_id`
varchar(36) DEFAULT NULL,
981 `wim_internal_id`
varchar(64) DEFAULT NULL,
982 `
action`
varchar(36) NOT NULL COMMENT 'CREATE,DELETE,START,STOP...',
983 `item`
enum('datacenters_flavors','datacenter_images','instance_nets','instance_vms','instance_interfaces','instance_sfis','instance_sfs','instance_classifications','instance_sfps','instance_wim_nets') NOT NULL COMMENT 'table where the item is stored',
984 `item_id`
varchar(36) DEFAULT NULL COMMENT 'uuid of the entry in the table',
985 `status`
enum('SCHEDULED','BUILD','DONE','FAILED','SUPERSEDED','FINISHED') NOT NULL DEFAULT 'SCHEDULED',
986 `extra`
text COMMENT 'json with params:, depends_on: for the task',
987 `error_msg`
varchar(1024) DEFAULT NULL,
988 `created_at`
double NOT NULL,
989 `modified_at`
double DEFAULT NULL,
990 PRIMARY KEY (`task_index`
,`instance_action_id`
),
991 KEY `FK_actions_instance_actions`
(`instance_action_id`
),
992 KEY `FK_actions_vims`
(`datacenter_vim_id`
),
993 KEY `item_type_id`
(`item`
,`item_id`
),
994 KEY `FK_actions_wims`
(`wim_account_id`
),
995 CONSTRAINT `FK_actions_instance_actions`
FOREIGN KEY (`instance_action_id`
) REFERENCES `instance_actions`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
996 CONSTRAINT `FK_actions_vims`
FOREIGN KEY (`datacenter_vim_id`
) REFERENCES `datacenter_tenants`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
997 CONSTRAINT `FK_actions_wims`
FOREIGN KEY (`wim_account_id`
) REFERENCES `wim_accounts`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
998 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
COMMENT='Table with the individual VIM actions.';
999 /*!40101 SET character_set_client = @saved_cs_client */;
1002 -- Table structure for table `vms`
1005 DROP TABLE IF EXISTS `vms`
;
1006 /*!40101 SET @saved_cs_client = @@character_set_client */;
1007 /*!40101 SET character_set_client = utf8 */;
1008 CREATE TABLE `vms`
(
1009 `uuid`
varchar(36) NOT NULL,
1010 `osm_id`
varchar(255) DEFAULT NULL,
1011 `pdu_type`
varchar(255) DEFAULT NULL,
1012 `
name`
varchar(255) NOT NULL,
1013 `vnf_id`
varchar(36) NOT NULL,
1014 `
count`
smallint(6) NOT NULL DEFAULT '1',
1015 `flavor_id`
varchar(36) NOT NULL COMMENT 'Link to flavor table',
1016 `image_id`
varchar(36) DEFAULT NULL COMMENT 'Link to image table',
1017 `image_list`
text COMMENT 'Alternative images',
1018 `image_path`
varchar(100) DEFAULT NULL COMMENT 'Path where the image of the VM is located',
1020 `description`
varchar(255) DEFAULT NULL,
1021 `created_at`
double NOT NULL,
1022 `modified_at`
double DEFAULT NULL,
1023 `availability_zone`
varchar(255) DEFAULT NULL,
1024 PRIMARY KEY (`uuid`
),
1025 UNIQUE KEY `name_vnf_id`
(`
name`
,`vnf_id`
),
1026 KEY `FK_vms_vnfs`
(`vnf_id`
),
1027 KEY `FK_vms_images`
(`image_id`
),
1028 KEY `FK_vms_flavors`
(`flavor_id`
),
1029 CONSTRAINT `FK_vms_flavors`
FOREIGN KEY (`flavor_id`
) REFERENCES `flavors`
(`uuid`
),
1030 CONSTRAINT `FK_vms_images`
FOREIGN KEY (`image_id`
) REFERENCES `images`
(`uuid`
),
1031 CONSTRAINT `FK_vms_vnfs`
FOREIGN KEY (`vnf_id`
) REFERENCES `vnfs`
(`uuid`
) ON DELETE CASCADE
1032 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='VM definitions. It contains the set of VMs used by the VNF definitions.';
1033 /*!40101 SET character_set_client = @saved_cs_client */;
1036 -- Table structure for table `vnfs`
1039 DROP TABLE IF EXISTS `vnfs`
;
1040 /*!40101 SET @saved_cs_client = @@character_set_client */;
1041 /*!40101 SET character_set_client = utf8 */;
1042 CREATE TABLE `vnfs`
(
1043 `uuid`
varchar(36) NOT NULL,
1044 `osm_id`
varchar(255) DEFAULT NULL,
1045 `
name`
varchar(255) NOT NULL,
1046 `short_name`
varchar(255) DEFAULT NULL,
1047 `tenant_id`
varchar(36) DEFAULT NULL,
1048 `physical`
enum('true','false') NOT NULL DEFAULT 'false',
1049 `
public`
enum('true','false') NOT NULL DEFAULT 'false',
1050 `description`
varchar(255) DEFAULT NULL,
1051 `vendor`
varchar(255) DEFAULT NULL,
1052 `mgmt_access`
varchar(2000) DEFAULT NULL,
1053 `created_at`
double NOT NULL,
1054 `modified_at`
double DEFAULT NULL,
1055 `
class`
varchar(36) DEFAULT 'MISC',
1056 `
descriptor`
text COMMENT 'Original text descriptor used for create the VNF',
1057 PRIMARY KEY (`uuid`
),
1058 UNIQUE KEY `osm_id_tenant_id`
(`osm_id`
,`tenant_id`
),
1059 KEY `FK_vnfs_nfvo_tenants`
(`tenant_id`
),
1060 CONSTRAINT `FK_vnfs_nfvo_tenants`
FOREIGN KEY (`tenant_id`
) REFERENCES `nfvo_tenants`
(`uuid`
) ON DELETE SET NULL ON UPDATE CASCADE
1061 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='VNF definitions. This is the catalogue of VNFs. It also includes Physical Network Functions or Physical Elements.\r\n';
1062 /*!40101 SET character_set_client = @saved_cs_client */;
1065 -- Table structure for table `wim_accounts`
1068 DROP TABLE IF EXISTS `wim_accounts`
;
1069 /*!40101 SET @saved_cs_client = @@character_set_client */;
1070 /*!40101 SET character_set_client = utf8 */;
1071 CREATE TABLE `wim_accounts`
(
1072 `uuid`
varchar(36) NOT NULL,
1073 `
name`
varchar(255) DEFAULT NULL,
1074 `wim_id`
varchar(36) NOT NULL,
1075 `sdn`
enum('true','false') NOT NULL DEFAULT 'false',
1076 `
user`
varchar(64) DEFAULT NULL,
1077 `
password`
varchar(64) DEFAULT NULL,
1079 `created_at`
double NOT NULL,
1080 `modified_at`
double DEFAULT NULL,
1081 PRIMARY KEY (`uuid`
),
1082 KEY `FK_wim_accounts_wims`
(`wim_id`
),
1083 CONSTRAINT `FK_wim_accounts_wims`
FOREIGN KEY (`wim_id`
) REFERENCES `wims`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
1084 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='WIM accounts by the user';
1085 /*!40101 SET character_set_client = @saved_cs_client */;
1088 -- Table structure for table `wim_nfvo_tenants`
1091 DROP TABLE IF EXISTS `wim_nfvo_tenants`
;
1092 /*!40101 SET @saved_cs_client = @@character_set_client */;
1093 /*!40101 SET character_set_client = utf8 */;
1094 CREATE TABLE `wim_nfvo_tenants`
(
1095 `
id`
int(11) NOT NULL AUTO_INCREMENT
,
1096 `nfvo_tenant_id`
varchar(36) NOT NULL,
1097 `wim_id`
varchar(36) NOT NULL,
1098 `wim_account_id`
varchar(36) NOT NULL,
1099 `created_at`
double NOT NULL,
1100 `modified_at`
double DEFAULT NULL,
1102 UNIQUE KEY `wim_nfvo_tenant`
(`wim_id`
,`nfvo_tenant_id`
),
1103 KEY `FK_wims_nfvo_tenants`
(`wim_id`
),
1104 KEY `FK_wim_accounts_nfvo_tenants`
(`wim_account_id`
),
1105 KEY `FK_nfvo_tenants_wim_accounts`
(`nfvo_tenant_id`
),
1106 CONSTRAINT `FK_nfvo_tenants_wim_accounts`
FOREIGN KEY (`nfvo_tenant_id`
) REFERENCES `nfvo_tenants`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
1107 CONSTRAINT `FK_wim_accounts_nfvo_tenants`
FOREIGN KEY (`wim_account_id`
) REFERENCES `wim_accounts`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
1108 CONSTRAINT `FK_wims_nfvo_tenants`
FOREIGN KEY (`wim_id`
) REFERENCES `wims`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
1109 ) ENGINE
=InnoDB AUTO_INCREMENT
=2 DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='WIM accounts mapping to NFVO tenants';
1110 /*!40101 SET character_set_client = @saved_cs_client */;
1113 -- Table structure for table `wim_port_mappings`
1116 DROP TABLE IF EXISTS `wim_port_mappings`
;
1117 /*!40101 SET @saved_cs_client = @@character_set_client */;
1118 /*!40101 SET character_set_client = utf8 */;
1119 CREATE TABLE `wim_port_mappings`
(
1120 `
id`
int(11) NOT NULL AUTO_INCREMENT
,
1121 `wim_id`
varchar(36) NOT NULL,
1122 `datacenter_id`
varchar(36) NOT NULL,
1123 `device_id`
varchar(64) DEFAULT NULL,
1124 `device_interface_id`
varchar(64) DEFAULT NULL,
1125 `service_endpoint_id`
varchar(256) NOT NULL,
1126 `switch_dpid`
varchar(64) DEFAULT NULL,
1127 `switch_port`
varchar(64) DEFAULT NULL,
1128 `service_mapping_info`
text,
1129 `created_at`
double NOT NULL,
1130 `modified_at`
double DEFAULT NULL,
1132 UNIQUE KEY `unique_wim_port_mapping`
(`wim_id`
,`service_endpoint_id`
),
1133 KEY `FK_wims_wim_physical_connections`
(`wim_id`
),
1134 KEY `FK_datacenters_wim_port_mappings`
(`datacenter_id`
),
1135 CONSTRAINT `FK_datacenters_wim_port_mappings`
FOREIGN KEY (`datacenter_id`
) REFERENCES `datacenters`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE,
1136 CONSTRAINT `FK_wims_wim_port_mappings`
FOREIGN KEY (`wim_id`
) REFERENCES `wims`
(`uuid`
) ON DELETE CASCADE ON UPDATE CASCADE
1137 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8
COMMENT='WIM port mappings managed by the WIM.';
1138 /*!40101 SET character_set_client = @saved_cs_client */;
1141 -- Table structure for table `wims`
1144 DROP TABLE IF EXISTS `wims`
;
1145 /*!40101 SET @saved_cs_client = @@character_set_client */;
1146 /*!40101 SET character_set_client = utf8 */;
1147 CREATE TABLE `wims`
(
1148 `uuid`
varchar(36) NOT NULL,
1149 `
name`
varchar(255) NOT NULL,
1150 `description`
varchar(255) DEFAULT NULL,
1151 `
type`
varchar(36) NOT NULL DEFAULT 'odl',
1152 `wim_url`
varchar(150) NOT NULL,
1154 `created_at`
double NOT NULL,
1155 `modified_at`
double DEFAULT NULL,
1156 PRIMARY KEY (`uuid`
)
1157 ) ENGINE
=InnoDB
DEFAULT CHARSET
=utf8 ROW_FORMAT
=COMPACT
COMMENT='WIMs managed by the NFVO.';
1158 /*!40101 SET character_set_client = @saved_cs_client */;
1161 -- Dumping routines for database 'mano_db'
1163 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1165 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
1166 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
1167 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
1168 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1169 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1170 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1171 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1173 -- Dump completed on 2020-07-15 22:32:14
1179 -- MySQL dump 10.13 Distrib 5.7.30, for Linux (x86_64)
1181 -- Host: localhost Database: {{mano_db}}
1182 -- ------------------------------------------------------
1183 -- Server version 5.7.27
1185 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
1186 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
1187 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
1188 /*!40101 SET NAMES utf8 */;
1189 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
1190 /*!40103 SET TIME_ZONE='+00:00' */;
1191 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
1192 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
1193 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
1194 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
1197 -- Dumping data for table `schema_version`
1200 LOCK TABLES `schema_version`
WRITE;
1201 /*!40000 ALTER TABLE `schema_version` DISABLE KEYS */;
1202 INSERT INTO `schema_version`
VALUES
1203 (0,'0.0','0.0.0','Database in init process','2015-05-08'),
1204 (1,'0.1','0.2.2','insert schema_version','2015-05-08'),
1205 (2,'0.2','0.2.5','new tables images,flavors','2015-07-13'),
1206 (3,'0.3','0.3.3','alter vim_tenant tables','2015-07-28'),
1207 (4,'0.4','0.3.5','enlarge graph field at sce_vnfs/nets','2015-10-20'),
1208 (5,'0.5','0.4.1','Add mac address for bridge interfaces','2015-12-14'),
1209 (6,'0.6','0.4.2','Adding VIM status info','2015-12-22'),
1210 (7,'0.7','0.4.3','Changing created_at time at database','2016-01-25'),
1211 (8,'0.8','0.4.32','Enlarging name at database','2016-02-01'),
1212 (9,'0.9','0.4.33','Add ACTIVE:NoMgmtIP to instance_vms table','2016-02-05'),
1213 (10,'0.10','0.4.36','tenant management of vnfs,scenarios','2016-03-08'),
1214 (11,'0.11','0.4.43','remove unique name at scenarios,instance_scenarios','2016-07-18'),
1215 (12,'0.12','0.4.46','create ip_profiles table, with foreign keys to all nets tables, and add ip_address column to interfaces and sce_interfaces','2016-08-29'),
1216 (13,'0.13','0.4.47','insert cloud-config at scenarios,instance_scenarios','2016-08-30'),
1217 (14,'0.14','0.4.57','remove unique index vim_net_id, instance_scenario_id','2016-09-26'),
1218 (15,'0.15','0.4.59','add columns universal_name and checksum at table images, add unique index universal_name_checksum, and change location to allow NULL; change column image_path in table vms to allow NULL','2016-09-27'),
1219 (16,'0.16','0.5.2','enlarge vim_tenant_name and id. New config at datacenter_tenants','2016-10-11'),
1220 (17,'0.17','0.5.3','Extra description json format of additional devices in datacenter_flavors','2016-12-20'),
1221 (18,'0.18','0.5.4','Add columns \'floating_ip\' and \'port_security\' at tables \'interfaces\' and \'instance_interfaces\'','2017-01-09'),
1222 (19,'0.19','0.5.5','Extra Boot-data content at VNFC (vms)','2017-01-11'),
1223 (20,'0.20','0.5.9','Added columns to store dataplane connectivity info','2017-03-13'),
1224 (21,'0.21','0.5.15','Edit instance_nets to allow instance_scenario_id=None and enlarge column dns_address at table ip_profiles','2017-06-02'),
1225 (22,'0.22','0.5.16','Changed type of ram in flavors from SMALLINT to MEDIUMINT','2017-06-02'),
1226 (23,'0.23','0.5.20','Changed type of ram in flavors from SMALLINT to MEDIUMINT','2017-08-29'),
1227 (24,'0.24','0.5.21','Added vnfd fields','2017-08-29'),
1228 (25,'0.25','0.5.22','Added osm_id to vnfs,scenarios','2017-09-01'),
1229 (26,'0.26','0.5.23','Several changes','2017-09-09'),
1230 (27,'0.27','0.5.25','Added encrypted_RO_priv_key,RO_pub_key to table nfvo_tenants','2017-09-29'),
1231 (28,'0.28','0.5.28','Adding VNFFG-related tables','2017-11-20'),
1232 (29,'0.29','0.5.59','Change member_vnf_index to str accordingly to the model','2018-04-11'),
1233 (30,'0.30','0.5.60','Add image_list to vms','2018-04-24'),
1234 (31,'0.31','0.5.61','Add vim_network_name to sce_nets','2018-05-03'),
1235 (32,'0.32','0.5.70','Add vim_name to instance vms','2018-06-28'),
1236 (33,'0.33','0.5.82','Add pdu information to vms','2018-11-13'),
1237 (34,'0.34','0.6.00','Added WIM tables','2018-09-10'),
1238 (35,'0.35','0.6.02','Adding ingress and egress ports for RSPs','2018-12-11'),
1239 (36,'0.36','0.6.03','Allow vm without image_id for PDUs','2018-12-19'),
1240 (37,'0.37','0.6.09','Adding the enum tags for SFC','2019-02-07'),
1241 (38,'0.38','0.6.11','Adding related to vim_wim_actions','2019-03-07'),
1242 (39,'0.39','0.6.20','Enlarge vim_id to 300 at all places','2019-05-23'),
1243 (40,'0.40','6.0.4','Chagnes to SDN ','2019-10-23'),
1244 (41,'0.41','8.0.0','Removing unique name for wims/wim_accounts','2020-07-16');
1245 /*!40000 ALTER TABLE `schema_version` ENABLE KEYS */;
1247 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1249 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
1250 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
1251 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
1252 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1253 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1254 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1255 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1257 -- Dump completed on 2020-07-15 22:32:14