blob: 747ffe27a6bec51cd4490616cc433db6e2d2a32d [file] [log] [blame]
tierno7edb6752016-03-21 17:37:52 +01001/**
tierno92021022018-09-12 16:29:23 +02002* Copyright 2017 Telefonica Investigacion y Desarrollo, S.A.U.
tierno7edb6752016-03-21 17:37:52 +01003* This file is part of openmano
4* All Rights Reserved.
5*
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
9*
10* http://www.apache.org/licenses/LICENSE-2.0
11*
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
16* under the License.
17*
18* For those usages not covered by the Apache License, Version 2.0 please
19* contact with: nfvlabs@tid.es
20**/
tierno392f2852016-05-13 12:28:55 +020021
tiernofc7df372018-12-21 10:19:38 +000022-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64)
tierno7edb6752016-03-21 17:37:52 +010023--
tierno11f81f62017-04-27 17:22:14 +020024-- Host: localhost Database: {{mano_db}}
tierno7edb6752016-03-21 17:37:52 +010025-- ------------------------------------------------------
tiernofc7df372018-12-21 10:19:38 +000026-- Server version 5.7.24
tierno7edb6752016-03-21 17:37:52 +010027
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 */;
38
39--
tierno11f81f62017-04-27 17:22:14 +020040-- Current Database: `{{mano_db}}`
41--
42
43/*!40000 DROP DATABASE IF EXISTS `{{mano_db}}`*/;
44
tiernofc7df372018-12-21 10:19:38 +000045CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{{mano_db}}` /*!40100 DEFAULT CHARACTER SET utf8 */;
tierno11f81f62017-04-27 17:22:14 +020046
47USE `{{mano_db}}`;
48
49--
tierno7edb6752016-03-21 17:37:52 +010050-- Table structure for table `datacenter_nets`
51--
52
53DROP TABLE IF EXISTS `datacenter_nets`;
54/*!40101 SET @saved_cs_client = @@character_set_client */;
55/*!40101 SET character_set_client = utf8 */;
56CREATE TABLE `datacenter_nets` (
57 `uuid` varchar(36) NOT NULL,
tierno392f2852016-05-13 12:28:55 +020058 `name` varchar(255) NOT NULL,
tierno7edb6752016-03-21 17:37:52 +010059 `vim_net_id` varchar(36) 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',
tierno392f2852016-05-13 12:28:55 +020064 `description` varchar(255) DEFAULT NULL,
65 `created_at` double NOT NULL,
66 `modified_at` double DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +010067 PRIMARY KEY (`uuid`),
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 */;
73
74--
tierno392f2852016-05-13 12:28:55 +020075-- Table structure for table `datacenter_tenants`
76--
77
78DROP TABLE IF EXISTS `datacenter_tenants`;
79/*!40101 SET @saved_cs_client = @@character_set_client */;
80/*!40101 SET character_set_client = utf8 */;
81CREATE TABLE `datacenter_tenants` (
82 `uuid` varchar(36) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +010083 `name` varchar(255) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +020084 `datacenter_id` varchar(36) NOT NULL COMMENT 'Datacenter of this tenant',
tierno11f81f62017-04-27 17:22:14 +020085 `vim_tenant_name` varchar(256) DEFAULT NULL,
86 `vim_tenant_id` varchar(256) DEFAULT NULL COMMENT 'Tenant ID at VIM',
tierno392f2852016-05-13 12:28:55 +020087 `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,
tierno11f81f62017-04-27 17:22:14 +020090 `config` varchar(4000) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +020091 `created_at` double NOT NULL,
92 `modified_at` double DEFAULT NULL,
93 PRIMARY KEY (`uuid`),
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 */;
98
99--
tierno7edb6752016-03-21 17:37:52 +0100100-- Table structure for table `datacenters`
101--
102
103DROP TABLE IF EXISTS `datacenters`;
104/*!40101 SET @saved_cs_client = @@character_set_client */;
105/*!40101 SET character_set_client = utf8 */;
106CREATE TABLE `datacenters` (
107 `uuid` varchar(36) NOT NULL,
tierno392f2852016-05-13 12:28:55 +0200108 `name` varchar(255) NOT NULL,
109 `description` varchar(255) DEFAULT NULL,
110 `type` varchar(36) NOT NULL DEFAULT 'openvim',
tierno7edb6752016-03-21 17:37:52 +0100111 `vim_url` varchar(150) NOT NULL COMMENT 'URL of the VIM for the REST API',
112 `vim_url_admin` varchar(150) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200113 `config` varchar(4000) DEFAULT NULL COMMENT 'extra config information in json',
114 `created_at` double NOT NULL,
115 `modified_at` double DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100116 PRIMARY KEY (`uuid`),
117 UNIQUE KEY `name` (`name`)
118) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='Datacenters managed by the NFVO.';
119/*!40101 SET character_set_client = @saved_cs_client */;
120
121--
tierno392f2852016-05-13 12:28:55 +0200122-- Table structure for table `datacenters_flavors`
123--
124
125DROP TABLE IF EXISTS `datacenters_flavors`;
126/*!40101 SET @saved_cs_client = @@character_set_client */;
127/*!40101 SET character_set_client = utf8 */;
128CREATE TABLE `datacenters_flavors` (
129 `id` int(11) NOT NULL AUTO_INCREMENT,
130 `flavor_id` varchar(36) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +0100131 `datacenter_vim_id` varchar(36) NOT NULL,
tierno392f2852016-05-13 12:28:55 +0200132 `vim_id` varchar(36) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +0100133 `status` enum('ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
134 `vim_info` text,
tierno392f2852016-05-13 12:28:55 +0200135 `created` enum('true','false') NOT NULL DEFAULT 'false' COMMENT 'Indicates if it has been created by openmano, or already existed',
tierno11f81f62017-04-27 17:22:14 +0200136 `extended` varchar(2000) DEFAULT NULL COMMENT 'Extra description json format of additional devices',
tierno392f2852016-05-13 12:28:55 +0200137 PRIMARY KEY (`id`),
138 KEY `FK__flavors` (`flavor_id`),
tierno182e3d12017-11-23 10:31:32 +0100139 KEY `FK_datacenters_flavors_datacenter_tenants` (`datacenter_vim_id`),
140 CONSTRAINT `FK__flavors` FOREIGN KEY (`flavor_id`) REFERENCES `flavors` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
141 CONSTRAINT `FK_datacenters_flavors_datacenter_tenants` FOREIGN KEY (`datacenter_vim_id`) REFERENCES `datacenter_tenants` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
tierno392f2852016-05-13 12:28:55 +0200142) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
143/*!40101 SET character_set_client = @saved_cs_client */;
144
145--
146-- Table structure for table `datacenters_images`
147--
148
149DROP TABLE IF EXISTS `datacenters_images`;
150/*!40101 SET @saved_cs_client = @@character_set_client */;
151/*!40101 SET character_set_client = utf8 */;
152CREATE TABLE `datacenters_images` (
153 `id` int(11) NOT NULL AUTO_INCREMENT,
154 `image_id` varchar(36) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +0100155 `datacenter_vim_id` varchar(36) NOT NULL,
tierno392f2852016-05-13 12:28:55 +0200156 `vim_id` varchar(36) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +0100157 `status` enum('ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
158 `vim_info` text,
tierno392f2852016-05-13 12:28:55 +0200159 `created` enum('true','false') NOT NULL DEFAULT 'false' COMMENT 'Indicates if it has been created by openmano, or already existed',
160 PRIMARY KEY (`id`),
161 KEY `FK__images` (`image_id`),
tierno182e3d12017-11-23 10:31:32 +0100162 KEY `FK_datacenters_images_datacenter_tenants` (`datacenter_vim_id`),
163 CONSTRAINT `FK__images` FOREIGN KEY (`image_id`) REFERENCES `images` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
164 CONSTRAINT `FK_datacenters_images_datacenter_tenants` FOREIGN KEY (`datacenter_vim_id`) REFERENCES `datacenter_tenants` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
tierno392f2852016-05-13 12:28:55 +0200165) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
166/*!40101 SET character_set_client = @saved_cs_client */;
167
168--
169-- Table structure for table `flavors`
170--
171
172DROP TABLE IF EXISTS `flavors`;
173/*!40101 SET @saved_cs_client = @@character_set_client */;
174/*!40101 SET character_set_client = utf8 */;
175CREATE TABLE `flavors` (
176 `uuid` varchar(36) NOT NULL,
177 `name` varchar(255) NOT NULL,
178 `description` varchar(255) DEFAULT NULL,
179 `disk` smallint(5) unsigned DEFAULT NULL,
tierno182e3d12017-11-23 10:31:32 +0100180 `ram` mediumint(7) unsigned DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200181 `vcpus` smallint(5) unsigned DEFAULT NULL,
182 `extended` varchar(2000) DEFAULT NULL COMMENT 'Extra description json format of needed resources and pining, orginized in sets per numa',
183 PRIMARY KEY (`uuid`)
184) ENGINE=InnoDB DEFAULT CHARSET=utf8;
185/*!40101 SET character_set_client = @saved_cs_client */;
186
187--
188-- Table structure for table `images`
189--
190
191DROP TABLE IF EXISTS `images`;
192/*!40101 SET @saved_cs_client = @@character_set_client */;
193/*!40101 SET character_set_client = utf8 */;
194CREATE TABLE `images` (
195 `uuid` varchar(36) NOT NULL,
196 `name` varchar(255) NOT NULL,
tierno11f81f62017-04-27 17:22:14 +0200197 `universal_name` varchar(255) DEFAULT NULL,
198 `checksum` varchar(32) DEFAULT NULL,
199 `location` varchar(200) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200200 `description` varchar(255) DEFAULT NULL,
201 `metadata` varchar(2000) DEFAULT NULL,
202 PRIMARY KEY (`uuid`),
tierno11f81f62017-04-27 17:22:14 +0200203 UNIQUE KEY `location` (`location`),
204 UNIQUE KEY `universal_name_checksum` (`universal_name`,`checksum`)
tierno392f2852016-05-13 12:28:55 +0200205) ENGINE=InnoDB DEFAULT CHARSET=utf8;
206/*!40101 SET character_set_client = @saved_cs_client */;
207
208--
tierno182e3d12017-11-23 10:31:32 +0100209-- Table structure for table `instance_actions`
210--
211
212DROP TABLE IF EXISTS `instance_actions`;
213/*!40101 SET @saved_cs_client = @@character_set_client */;
214/*!40101 SET character_set_client = utf8 */;
215CREATE TABLE `instance_actions` (
216 `uuid` varchar(36) NOT NULL,
217 `tenant_id` varchar(36) DEFAULT NULL,
218 `instance_id` varchar(36) DEFAULT NULL,
219 `description` varchar(64) DEFAULT NULL COMMENT 'CREATE, DELETE, SCALE OUT/IN, ...',
220 `number_tasks` smallint(6) NOT NULL DEFAULT '1',
221 `number_done` smallint(6) NOT NULL DEFAULT '0',
222 `number_failed` smallint(6) NOT NULL DEFAULT '0',
223 `created_at` double NOT NULL,
224 `modified_at` double DEFAULT NULL,
225 PRIMARY KEY (`uuid`),
226 KEY `FK_actions_tenants` (`tenant_id`),
227 CONSTRAINT `FK_actions_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `nfvo_tenants` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
228) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Contains client actions over instances';
229/*!40101 SET character_set_client = @saved_cs_client */;
230
231--
tiernofc7df372018-12-21 10:19:38 +0000232-- Table structure for table `instance_classifications`
233--
234
235DROP TABLE IF EXISTS `instance_classifications`;
236/*!40101 SET @saved_cs_client = @@character_set_client */;
237/*!40101 SET character_set_client = utf8 */;
238CREATE TABLE `instance_classifications` (
239 `uuid` varchar(36) NOT NULL,
240 `instance_scenario_id` varchar(36) NOT NULL,
241 `vim_classification_id` varchar(36) DEFAULT NULL,
242 `sce_classifier_match_id` varchar(36) DEFAULT NULL,
243 `datacenter_id` varchar(36) DEFAULT NULL,
244 `datacenter_tenant_id` varchar(36) DEFAULT NULL,
245 `status` enum('ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','PAUSED','SUSPENDED','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
246 `error_msg` varchar(1024) DEFAULT NULL,
247 `vim_info` text,
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 */;
261
262--
tierno7edb6752016-03-21 17:37:52 +0100263-- Table structure for table `instance_interfaces`
264--
265
266DROP TABLE IF EXISTS `instance_interfaces`;
267/*!40101 SET @saved_cs_client = @@character_set_client */;
268/*!40101 SET character_set_client = utf8 */;
269CREATE 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,
tierno182e3d12017-11-23 10:31:32 +0100273 `interface_id` varchar(36) DEFAULT NULL,
274 `vim_interface_id` varchar(128) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200275 `mac_address` varchar(32) DEFAULT NULL,
276 `ip_address` varchar(64) DEFAULT NULL,
277 `vim_info` text,
tierno7edb6752016-03-21 17:37:52 +0100278 `type` enum('internal','external') NOT NULL COMMENT 'Indicates if this interface is external to a vnf, or internal',
tierno11f81f62017-04-27 17:22:14 +0200279 `floating_ip` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Indicates if a floating_ip must be associated to this interface',
280 `port_security` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Indicates if port security must be enabled or disabled. By default it is enabled',
281 `sdn_port_id` varchar(36) DEFAULT NULL COMMENT 'Port id in ovim',
282 `compute_node` varchar(100) DEFAULT NULL COMMENT 'Compute node id used to specify the SDN port mapping',
tierno182e3d12017-11-23 10:31:32 +0100283 `pci` varchar(50) DEFAULT NULL COMMENT 'PCI of the physical port in the host',
tierno11f81f62017-04-27 17:22:14 +0200284 `vlan` smallint(5) unsigned DEFAULT NULL COMMENT 'VLAN tag used by the port',
tierno7edb6752016-03-21 17:37:52 +0100285 PRIMARY KEY (`uuid`),
286 KEY `FK_instance_vms` (`instance_vm_id`),
287 KEY `FK_instance_nets` (`instance_net_id`),
288 KEY `FK_instance_ids` (`interface_id`),
tierno182e3d12017-11-23 10:31:32 +0100289 CONSTRAINT `FK_instance_ids` FOREIGN KEY (`interface_id`) REFERENCES `interfaces` (`uuid`) ON DELETE SET NULL ON UPDATE CASCADE,
tierno7edb6752016-03-21 17:37:52 +0100290 CONSTRAINT `FK_instance_nets` FOREIGN KEY (`instance_net_id`) REFERENCES `instance_nets` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
291 CONSTRAINT `FK_instance_vms` FOREIGN KEY (`instance_vm_id`) REFERENCES `instance_vms` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
292) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='Table with all running associattion among VM instances and net instances';
293/*!40101 SET character_set_client = @saved_cs_client */;
294
295--
296-- Table structure for table `instance_nets`
297--
298
299DROP TABLE IF EXISTS `instance_nets`;
300/*!40101 SET @saved_cs_client = @@character_set_client */;
301/*!40101 SET character_set_client = utf8 */;
302CREATE TABLE `instance_nets` (
303 `uuid` varchar(36) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +0100304 `vim_net_id` varchar(128) DEFAULT NULL,
tiernofc7df372018-12-21 10:19:38 +0000305 `vim_name` varchar(255) DEFAULT NULL,
tierno182e3d12017-11-23 10:31:32 +0100306 `instance_scenario_id` varchar(36) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200307 `sce_net_id` varchar(36) DEFAULT NULL,
308 `net_id` varchar(36) DEFAULT NULL,
309 `datacenter_id` varchar(36) DEFAULT NULL,
310 `datacenter_tenant_id` varchar(36) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +0100311 `status` enum('ACTIVE','INACTIVE','DOWN','BUILD','ERROR','VIM_ERROR','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
tierno392f2852016-05-13 12:28:55 +0200312 `error_msg` varchar(1024) DEFAULT NULL,
313 `vim_info` text,
tierno7edb6752016-03-21 17:37:52 +0100314 `multipoint` enum('true','false') NOT NULL DEFAULT 'true',
tierno11f81f62017-04-27 17:22:14 +0200315 `created` enum('true','false') NOT NULL DEFAULT 'false' COMMENT 'Created or already exists at VIM',
tierno392f2852016-05-13 12:28:55 +0200316 `created_at` double NOT NULL,
317 `modified_at` double DEFAULT NULL,
tierno11f81f62017-04-27 17:22:14 +0200318 `sdn_net_id` varchar(36) DEFAULT NULL COMMENT 'Network id in ovim',
tierno7edb6752016-03-21 17:37:52 +0100319 PRIMARY KEY (`uuid`),
tierno7edb6752016-03-21 17:37:52 +0100320 KEY `FK_instance_nets_instance_scenarios` (`instance_scenario_id`),
tierno392f2852016-05-13 12:28:55 +0200321 KEY `FK_instance_nets_sce_nets` (`sce_net_id`),
322 KEY `FK_instance_nets_nets` (`net_id`),
323 KEY `FK_instance_nets_datacenters` (`datacenter_id`),
324 KEY `FK_instance_nets_datacenter_tenants` (`datacenter_tenant_id`),
325 CONSTRAINT `FK_instance_nets_datacenter_tenants` FOREIGN KEY (`datacenter_tenant_id`) REFERENCES `datacenter_tenants` (`uuid`),
326 CONSTRAINT `FK_instance_nets_datacenters` FOREIGN KEY (`datacenter_id`) REFERENCES `datacenters` (`uuid`),
327 CONSTRAINT `FK_instance_nets_instance_scenarios` FOREIGN KEY (`instance_scenario_id`) REFERENCES `instance_scenarios` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
328 CONSTRAINT `FK_instance_nets_nets` FOREIGN KEY (`net_id`) REFERENCES `nets` (`uuid`) ON DELETE SET NULL ON UPDATE CASCADE,
329 CONSTRAINT `FK_instance_nets_sce_nets` FOREIGN KEY (`sce_net_id`) REFERENCES `sce_nets` (`uuid`) ON DELETE SET NULL ON UPDATE CASCADE
tierno7edb6752016-03-21 17:37:52 +0100330) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='Instances of networks';
331/*!40101 SET character_set_client = @saved_cs_client */;
332
333--
334-- Table structure for table `instance_scenarios`
335--
336
337DROP TABLE IF EXISTS `instance_scenarios`;
338/*!40101 SET @saved_cs_client = @@character_set_client */;
339/*!40101 SET character_set_client = utf8 */;
340CREATE TABLE `instance_scenarios` (
341 `uuid` varchar(36) NOT NULL,
tierno392f2852016-05-13 12:28:55 +0200342 `name` varchar(255) NOT NULL,
343 `tenant_id` varchar(36) DEFAULT NULL,
tierno182e3d12017-11-23 10:31:32 +0100344 `scenario_id` varchar(36) DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100345 `datacenter_id` varchar(36) NOT NULL,
tierno392f2852016-05-13 12:28:55 +0200346 `datacenter_tenant_id` varchar(36) NOT NULL,
347 `description` varchar(255) DEFAULT NULL,
348 `created_at` double NOT NULL,
349 `modified_at` double DEFAULT NULL,
tierno11f81f62017-04-27 17:22:14 +0200350 `cloud_config` mediumtext,
tierno7edb6752016-03-21 17:37:52 +0100351 PRIMARY KEY (`uuid`),
tierno392f2852016-05-13 12:28:55 +0200352 KEY `FK_scenarios_nfvo_tenants` (`tenant_id`),
353 KEY `FK_instance_scenarios_vim_tenants` (`datacenter_tenant_id`),
tierno7edb6752016-03-21 17:37:52 +0100354 KEY `FK_instance_scenarios_datacenters` (`datacenter_id`),
355 KEY `FK_instance_scenarios_scenarios` (`scenario_id`),
tierno392f2852016-05-13 12:28:55 +0200356 CONSTRAINT `FK_instance_scenarios_datacenter_tenants` FOREIGN KEY (`datacenter_tenant_id`) REFERENCES `datacenter_tenants` (`uuid`),
tierno7edb6752016-03-21 17:37:52 +0100357 CONSTRAINT `FK_instance_scenarios_datacenters` FOREIGN KEY (`datacenter_id`) REFERENCES `datacenters` (`uuid`),
tierno392f2852016-05-13 12:28:55 +0200358 CONSTRAINT `FK_instance_scenarios_nfvo_tenants` FOREIGN KEY (`tenant_id`) REFERENCES `nfvo_tenants` (`uuid`),
tierno182e3d12017-11-23 10:31:32 +0100359 CONSTRAINT `FK_instance_scenarios_scenarios` FOREIGN KEY (`scenario_id`) REFERENCES `scenarios` (`uuid`) ON DELETE SET NULL ON UPDATE CASCADE
tierno7edb6752016-03-21 17:37:52 +0100360) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='Instances of scenarios defined by the user';
361/*!40101 SET character_set_client = @saved_cs_client */;
362
363--
tiernofc7df372018-12-21 10:19:38 +0000364-- Table structure for table `instance_sfis`
365--
366
367DROP TABLE IF EXISTS `instance_sfis`;
368/*!40101 SET @saved_cs_client = @@character_set_client */;
369/*!40101 SET character_set_client = utf8 */;
370CREATE TABLE `instance_sfis` (
371 `uuid` varchar(36) NOT NULL,
372 `instance_scenario_id` varchar(36) NOT NULL,
373 `vim_sfi_id` varchar(36) DEFAULT NULL,
374 `sce_rsp_hop_id` varchar(36) DEFAULT NULL,
375 `datacenter_id` varchar(36) DEFAULT NULL,
376 `datacenter_tenant_id` varchar(36) DEFAULT NULL,
377 `status` enum('ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','PAUSED','SUSPENDED','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
378 `error_msg` varchar(1024) DEFAULT NULL,
379 `vim_info` text,
380 `created_at` double NOT NULL,
381 `modified_at` double DEFAULT NULL,
382 PRIMARY KEY (`uuid`),
383 KEY `FK_instance_sfis_instance_scenarios` (`instance_scenario_id`),
384 KEY `FK_instance_sfis_sce_rsp_hops` (`sce_rsp_hop_id`),
385 KEY `FK_instance_sfis_datacenters` (`datacenter_id`),
386 KEY `FK_instance_sfis_datacenter_tenants` (`datacenter_tenant_id`),
387 CONSTRAINT `FK_instance_sfis_datacenter_tenants` FOREIGN KEY (`datacenter_tenant_id`) REFERENCES `datacenter_tenants` (`uuid`),
388 CONSTRAINT `FK_instance_sfis_datacenters` FOREIGN KEY (`datacenter_id`) REFERENCES `datacenters` (`uuid`),
389 CONSTRAINT `FK_instance_sfis_instance_scenarios` FOREIGN KEY (`instance_scenario_id`) REFERENCES `instance_scenarios` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
390 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
391) ENGINE=InnoDB DEFAULT CHARSET=utf8;
392/*!40101 SET character_set_client = @saved_cs_client */;
393
394--
395-- Table structure for table `instance_sfps`
396--
397
398DROP TABLE IF EXISTS `instance_sfps`;
399/*!40101 SET @saved_cs_client = @@character_set_client */;
400/*!40101 SET character_set_client = utf8 */;
401CREATE TABLE `instance_sfps` (
402 `uuid` varchar(36) NOT NULL,
403 `instance_scenario_id` varchar(36) NOT NULL,
404 `vim_sfp_id` varchar(36) DEFAULT NULL,
405 `sce_rsp_id` varchar(36) DEFAULT NULL,
406 `datacenter_id` varchar(36) DEFAULT NULL,
407 `datacenter_tenant_id` varchar(36) DEFAULT NULL,
408 `status` enum('ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','PAUSED','SUSPENDED','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
409 `error_msg` varchar(1024) DEFAULT NULL,
410 `vim_info` text,
411 `created_at` double NOT NULL,
412 `modified_at` double DEFAULT NULL,
413 PRIMARY KEY (`uuid`),
414 KEY `FK_instance_sfps_instance_scenarios` (`instance_scenario_id`),
415 KEY `FK_instance_sfps_sce_rsps` (`sce_rsp_id`),
416 KEY `FK_instance_sfps_datacenters` (`datacenter_id`),
417 KEY `FK_instance_sfps_datacenter_tenants` (`datacenter_tenant_id`),
418 CONSTRAINT `FK_instance_sfps_datacenter_tenants` FOREIGN KEY (`datacenter_tenant_id`) REFERENCES `datacenter_tenants` (`uuid`),
419 CONSTRAINT `FK_instance_sfps_datacenters` FOREIGN KEY (`datacenter_id`) REFERENCES `datacenters` (`uuid`),
420 CONSTRAINT `FK_instance_sfps_instance_scenarios` FOREIGN KEY (`instance_scenario_id`) REFERENCES `instance_scenarios` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
421 CONSTRAINT `FK_instance_sfps_sce_rsps` FOREIGN KEY (`sce_rsp_id`) REFERENCES `sce_rsps` (`uuid`) ON DELETE SET NULL ON UPDATE CASCADE
422) ENGINE=InnoDB DEFAULT CHARSET=utf8;
423/*!40101 SET character_set_client = @saved_cs_client */;
424
425--
426-- Table structure for table `instance_sfs`
427--
428
429DROP TABLE IF EXISTS `instance_sfs`;
430/*!40101 SET @saved_cs_client = @@character_set_client */;
431/*!40101 SET character_set_client = utf8 */;
432CREATE TABLE `instance_sfs` (
433 `uuid` varchar(36) NOT NULL,
434 `instance_scenario_id` varchar(36) NOT NULL,
435 `vim_sf_id` varchar(36) DEFAULT NULL,
436 `sce_rsp_hop_id` varchar(36) DEFAULT NULL,
437 `datacenter_id` varchar(36) DEFAULT NULL,
438 `datacenter_tenant_id` varchar(36) DEFAULT NULL,
439 `status` enum('ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','PAUSED','SUSPENDED','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
440 `error_msg` varchar(1024) DEFAULT NULL,
441 `vim_info` text,
442 `created_at` double NOT NULL,
443 `modified_at` double DEFAULT NULL,
444 PRIMARY KEY (`uuid`),
445 KEY `FK_instance_sfs_instance_scenarios` (`instance_scenario_id`),
446 KEY `FK_instance_sfs_sce_rsp_hops` (`sce_rsp_hop_id`),
447 KEY `FK_instance_sfs_datacenters` (`datacenter_id`),
448 KEY `FK_instance_sfs_datacenter_tenants` (`datacenter_tenant_id`),
449 CONSTRAINT `FK_instance_sfs_datacenter_tenants` FOREIGN KEY (`datacenter_tenant_id`) REFERENCES `datacenter_tenants` (`uuid`),
450 CONSTRAINT `FK_instance_sfs_datacenters` FOREIGN KEY (`datacenter_id`) REFERENCES `datacenters` (`uuid`),
451 CONSTRAINT `FK_instance_sfs_instance_scenarios` FOREIGN KEY (`instance_scenario_id`) REFERENCES `instance_scenarios` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
452 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
453) ENGINE=InnoDB DEFAULT CHARSET=utf8;
454/*!40101 SET character_set_client = @saved_cs_client */;
455
456--
tierno7edb6752016-03-21 17:37:52 +0100457-- Table structure for table `instance_vms`
458--
459
460DROP TABLE IF EXISTS `instance_vms`;
461/*!40101 SET @saved_cs_client = @@character_set_client */;
462/*!40101 SET character_set_client = utf8 */;
463CREATE TABLE `instance_vms` (
464 `uuid` varchar(36) NOT NULL,
465 `instance_vnf_id` varchar(36) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +0100466 `vm_id` varchar(36) DEFAULT NULL,
467 `vim_vm_id` varchar(128) DEFAULT NULL,
tiernofc7df372018-12-21 10:19:38 +0000468 `vim_name` varchar(255) DEFAULT NULL,
tierno182e3d12017-11-23 10:31:32 +0100469 `status` enum('ACTIVE:NoMgmtIP','ACTIVE','INACTIVE','BUILD','ERROR','VIM_ERROR','PAUSED','SUSPENDED','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
tierno392f2852016-05-13 12:28:55 +0200470 `error_msg` varchar(1024) DEFAULT NULL,
471 `vim_info` text,
472 `created_at` double NOT NULL,
473 `modified_at` double DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100474 PRIMARY KEY (`uuid`),
475 UNIQUE KEY `vim_vm_id` (`vim_vm_id`),
476 KEY `FK_instance_vms_vms` (`vm_id`),
477 KEY `FK_instance_vms_instance_vnfs` (`instance_vnf_id`),
478 CONSTRAINT `FK_instance_vms_instance_vnfs` FOREIGN KEY (`instance_vnf_id`) REFERENCES `instance_vnfs` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
tierno182e3d12017-11-23 10:31:32 +0100479 CONSTRAINT `FK_instance_vms_vms` FOREIGN KEY (`vm_id`) REFERENCES `vms` (`uuid`) ON DELETE SET NULL ON UPDATE CASCADE
tierno7edb6752016-03-21 17:37:52 +0100480) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='Instances of VMs as part of VNF instances';
481/*!40101 SET character_set_client = @saved_cs_client */;
482
483--
484-- Table structure for table `instance_vnfs`
485--
486
487DROP TABLE IF EXISTS `instance_vnfs`;
488/*!40101 SET @saved_cs_client = @@character_set_client */;
489/*!40101 SET character_set_client = utf8 */;
490CREATE TABLE `instance_vnfs` (
491 `uuid` varchar(36) NOT NULL,
492 `instance_scenario_id` varchar(36) NOT NULL,
493 `vnf_id` varchar(36) NOT NULL,
tierno392f2852016-05-13 12:28:55 +0200494 `sce_vnf_id` varchar(36) DEFAULT NULL,
495 `datacenter_id` varchar(36) DEFAULT NULL,
496 `datacenter_tenant_id` varchar(36) DEFAULT NULL,
497 `created_at` double NOT NULL,
498 `modified_at` double DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100499 PRIMARY KEY (`uuid`),
500 KEY `FK_instance_vnfs_vnfs` (`vnf_id`),
501 KEY `FK_instance_vnfs_instance_scenarios` (`instance_scenario_id`),
tierno392f2852016-05-13 12:28:55 +0200502 KEY `FK_instance_vnfs_sce_vnfs` (`sce_vnf_id`),
503 KEY `FK_instance_vnfs_datacenters` (`datacenter_id`),
504 KEY `FK_instance_vnfs_datacenter_tenants` (`datacenter_tenant_id`),
505 CONSTRAINT `FK_instance_vnfs_datacenter_tenants` FOREIGN KEY (`datacenter_tenant_id`) REFERENCES `datacenter_tenants` (`uuid`),
506 CONSTRAINT `FK_instance_vnfs_datacenters` FOREIGN KEY (`datacenter_id`) REFERENCES `datacenters` (`uuid`),
tierno7edb6752016-03-21 17:37:52 +0100507 CONSTRAINT `FK_instance_vnfs_instance_scenarios` FOREIGN KEY (`instance_scenario_id`) REFERENCES `instance_scenarios` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
tierno392f2852016-05-13 12:28:55 +0200508 CONSTRAINT `FK_instance_vnfs_sce_vnfs` FOREIGN KEY (`sce_vnf_id`) REFERENCES `sce_vnfs` (`uuid`) ON DELETE SET NULL ON UPDATE CASCADE,
tierno7edb6752016-03-21 17:37:52 +0100509 CONSTRAINT `FK_instance_vnfs_vnfs` FOREIGN KEY (`vnf_id`) REFERENCES `vnfs` (`uuid`)
510) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='Instances of VNFs as part of a scenario';
511/*!40101 SET character_set_client = @saved_cs_client */;
512
513--
tiernofc7df372018-12-21 10:19:38 +0000514-- Table structure for table `instance_wim_nets`
515--
516
517DROP TABLE IF EXISTS `instance_wim_nets`;
518/*!40101 SET @saved_cs_client = @@character_set_client */;
519/*!40101 SET character_set_client = utf8 */;
520CREATE TABLE `instance_wim_nets` (
521 `uuid` varchar(36) NOT NULL,
522 `wim_internal_id` varchar(128) DEFAULT NULL COMMENT 'Internal ID used by the WIM to refer to the network',
523 `instance_scenario_id` varchar(36) DEFAULT NULL,
524 `sce_net_id` varchar(36) DEFAULT NULL,
525 `wim_id` varchar(36) DEFAULT NULL,
526 `wim_account_id` varchar(36) NOT NULL,
527 `status` enum('ACTIVE','INACTIVE','DOWN','BUILD','ERROR','WIM_ERROR','DELETED','SCHEDULED_CREATION','SCHEDULED_DELETION') NOT NULL DEFAULT 'BUILD',
528 `error_msg` varchar(1024) DEFAULT NULL,
529 `wim_info` text,
530 `multipoint` enum('true','false') NOT NULL DEFAULT 'false',
531 `created` enum('true','false') NOT NULL DEFAULT 'false' COMMENT 'Created or already exists at WIM',
532 `created_at` double NOT NULL,
533 `modified_at` double DEFAULT NULL,
534 PRIMARY KEY (`uuid`),
535 KEY `FK_instance_wim_nets_instance_scenarios` (`instance_scenario_id`),
536 KEY `FK_instance_wim_nets_sce_nets` (`sce_net_id`),
537 KEY `FK_instance_wim_nets_wims` (`wim_id`),
538 KEY `FK_instance_wim_nets_wim_accounts` (`wim_account_id`),
539 CONSTRAINT `FK_instance_wim_nets_instance_scenarios` FOREIGN KEY (`instance_scenario_id`) REFERENCES `instance_scenarios` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
540 CONSTRAINT `FK_instance_wim_nets_sce_nets` FOREIGN KEY (`sce_net_id`) REFERENCES `sce_nets` (`uuid`) ON DELETE SET NULL ON UPDATE CASCADE,
541 CONSTRAINT `FK_instance_wim_nets_wim_accounts` FOREIGN KEY (`wim_account_id`) REFERENCES `wim_accounts` (`uuid`),
542 CONSTRAINT `FK_instance_wim_nets_wims` FOREIGN KEY (`wim_id`) REFERENCES `wims` (`uuid`)
543) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='Instances of wim networks';
544/*!40101 SET character_set_client = @saved_cs_client */;
545
546--
tierno7edb6752016-03-21 17:37:52 +0100547-- Table structure for table `interfaces`
548--
549
550DROP TABLE IF EXISTS `interfaces`;
551/*!40101 SET @saved_cs_client = @@character_set_client */;
552/*!40101 SET character_set_client = utf8 */;
553CREATE TABLE `interfaces` (
554 `uuid` varchar(36) NOT NULL,
tierno392f2852016-05-13 12:28:55 +0200555 `internal_name` varchar(255) NOT NULL,
556 `external_name` varchar(255) DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100557 `vm_id` varchar(36) NOT NULL,
558 `net_id` varchar(36) DEFAULT NULL,
559 `type` enum('mgmt','bridge','data') NOT NULL DEFAULT 'data' COMMENT 'Type of network',
560 `vpci` char(12) DEFAULT NULL,
561 `bw` mediumint(8) unsigned DEFAULT NULL COMMENT 'BW expressed in Mbits/s. Maybe this field is not necessary.',
tierno392f2852016-05-13 12:28:55 +0200562 `created_at` double NOT NULL,
563 `modified_at` double DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100564 `model` varchar(12) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200565 `mac` char(18) DEFAULT NULL,
tierno11f81f62017-04-27 17:22:14 +0200566 `ip_address` varchar(64) DEFAULT NULL,
567 `floating_ip` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Indicates if a floating_ip must be associated to this interface',
568 `port_security` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Indicates if port security must be enabled or disabled. By default it is enabled',
tierno7edb6752016-03-21 17:37:52 +0100569 PRIMARY KEY (`uuid`),
570 UNIQUE KEY `internal_name_vm_id` (`internal_name`,`vm_id`),
571 KEY `FK_interfaces_vms` (`vm_id`),
572 KEY `FK_interfaces_nets` (`net_id`),
573 CONSTRAINT `FK_interfaces_nets` FOREIGN KEY (`net_id`) REFERENCES `nets` (`uuid`) ON DELETE CASCADE,
574 CONSTRAINT `FK_interfaces_vms` FOREIGN KEY (`vm_id`) REFERENCES `vms` (`uuid`) ON DELETE CASCADE
575) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='VM interfaces';
576/*!40101 SET character_set_client = @saved_cs_client */;
577
578--
tierno11f81f62017-04-27 17:22:14 +0200579-- Table structure for table `ip_profiles`
580--
581
582DROP TABLE IF EXISTS `ip_profiles`;
583/*!40101 SET @saved_cs_client = @@character_set_client */;
584/*!40101 SET character_set_client = utf8 */;
585CREATE TABLE `ip_profiles` (
586 `id` int(11) NOT NULL AUTO_INCREMENT,
587 `net_id` varchar(36) DEFAULT NULL,
588 `sce_net_id` varchar(36) DEFAULT NULL,
589 `instance_net_id` varchar(36) DEFAULT NULL,
590 `ip_version` enum('IPv4','IPv6') NOT NULL DEFAULT 'IPv4',
591 `subnet_address` varchar(64) DEFAULT NULL,
592 `gateway_address` varchar(64) DEFAULT NULL,
tierno182e3d12017-11-23 10:31:32 +0100593 `dns_address` varchar(255) DEFAULT NULL COMMENT 'dns ip list separated by semicolon',
tierno11f81f62017-04-27 17:22:14 +0200594 `dhcp_enabled` enum('true','false') NOT NULL DEFAULT 'true',
595 `dhcp_start_address` varchar(64) DEFAULT NULL,
596 `dhcp_count` int(11) DEFAULT NULL,
tierno182e3d12017-11-23 10:31:32 +0100597 `security_group` varchar(255) DEFAULT NULL,
tierno11f81f62017-04-27 17:22:14 +0200598 PRIMARY KEY (`id`),
599 KEY `FK_ipprofiles_nets` (`net_id`),
600 KEY `FK_ipprofiles_scenets` (`sce_net_id`),
601 KEY `FK_ipprofiles_instancenets` (`instance_net_id`),
602 CONSTRAINT `FK_ipprofiles_instancenets` FOREIGN KEY (`instance_net_id`) REFERENCES `instance_nets` (`uuid`) ON DELETE CASCADE,
603 CONSTRAINT `FK_ipprofiles_nets` FOREIGN KEY (`net_id`) REFERENCES `nets` (`uuid`) ON DELETE CASCADE,
604 CONSTRAINT `FK_ipprofiles_scenets` FOREIGN KEY (`sce_net_id`) REFERENCES `sce_nets` (`uuid`) ON DELETE CASCADE
605) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table containing the IP parameters of a network, either a net, a sce_net or and instance_net.';
606/*!40101 SET character_set_client = @saved_cs_client */;
607
608--
tierno7edb6752016-03-21 17:37:52 +0100609-- Table structure for table `logs`
610--
611
612DROP TABLE IF EXISTS `logs`;
613/*!40101 SET @saved_cs_client = @@character_set_client */;
614/*!40101 SET character_set_client = utf8 */;
615CREATE TABLE `logs` (
616 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
617 `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
618 `nfvo_tenant_id` varchar(36) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200619 `related` varchar(36) NOT NULL COMMENT 'Relevant element for the log',
tierno7edb6752016-03-21 17:37:52 +0100620 `uuid` varchar(36) DEFAULT NULL COMMENT 'Uuid of vnf, scenario, etc. that log relates to',
621 `level` enum('panic','error','info','debug','verbose') NOT NULL,
622 `description` varchar(200) NOT NULL,
623 PRIMARY KEY (`id`)
tierno392f2852016-05-13 12:28:55 +0200624) ENGINE=InnoDB AUTO_INCREMENT=3423 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
tierno7edb6752016-03-21 17:37:52 +0100625/*!40101 SET character_set_client = @saved_cs_client */;
626
627--
628-- Table structure for table `nets`
629--
630
631DROP TABLE IF EXISTS `nets`;
632/*!40101 SET @saved_cs_client = @@character_set_client */;
633/*!40101 SET character_set_client = utf8 */;
634CREATE TABLE `nets` (
635 `uuid` varchar(36) NOT NULL,
tiernofc7df372018-12-21 10:19:38 +0000636 `osm_id` varchar(255) DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100637 `vnf_id` varchar(36) NOT NULL,
tierno392f2852016-05-13 12:28:55 +0200638 `name` varchar(255) NOT NULL,
tierno7edb6752016-03-21 17:37:52 +0100639 `type` enum('bridge','data','ptp') NOT NULL DEFAULT 'data' COMMENT 'Type of network',
640 `multipoint` enum('true','false') NOT NULL DEFAULT 'false',
tierno392f2852016-05-13 12:28:55 +0200641 `description` varchar(255) DEFAULT NULL,
642 `created_at` double NOT NULL,
643 `modified_at` double DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100644 PRIMARY KEY (`uuid`),
645 UNIQUE KEY `vnf_id_name` (`vnf_id`,`name`),
646 CONSTRAINT `FK_nets_vnfs` FOREIGN KEY (`vnf_id`) REFERENCES `vnfs` (`uuid`) ON DELETE CASCADE
647) 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.';
648/*!40101 SET character_set_client = @saved_cs_client */;
649
650--
651-- Table structure for table `nfvo_tenants`
652--
653
654DROP TABLE IF EXISTS `nfvo_tenants`;
655/*!40101 SET @saved_cs_client = @@character_set_client */;
656/*!40101 SET character_set_client = utf8 */;
657CREATE TABLE `nfvo_tenants` (
658 `uuid` varchar(36) NOT NULL,
tierno392f2852016-05-13 12:28:55 +0200659 `name` varchar(255) NOT NULL,
660 `description` varchar(255) DEFAULT NULL,
tierno182e3d12017-11-23 10:31:32 +0100661 `encrypted_RO_priv_key` varchar(2000) DEFAULT NULL,
662 `RO_pub_key` varchar(510) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200663 `created_at` double NOT NULL,
664 `modified_at` double DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100665 PRIMARY KEY (`uuid`),
666 UNIQUE KEY `name` (`name`)
667) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='Scenarios defined by the user';
668/*!40101 SET character_set_client = @saved_cs_client */;
669
670--
tiernofc7df372018-12-21 10:19:38 +0000671-- Table structure for table `sce_classifier_matches`
672--
673
674DROP TABLE IF EXISTS `sce_classifier_matches`;
675/*!40101 SET @saved_cs_client = @@character_set_client */;
676/*!40101 SET character_set_client = utf8 */;
677CREATE TABLE `sce_classifier_matches` (
678 `uuid` varchar(36) NOT NULL,
679 `ip_proto` varchar(2) NOT NULL,
680 `source_ip` varchar(16) NOT NULL,
681 `destination_ip` varchar(16) NOT NULL,
682 `source_port` varchar(5) NOT NULL,
683 `destination_port` varchar(5) NOT NULL,
684 `sce_classifier_id` varchar(36) NOT NULL,
685 `created_at` double NOT NULL,
686 `modified_at` double DEFAULT NULL,
687 PRIMARY KEY (`uuid`),
688 KEY `FK_classifiers_classifier_match` (`sce_classifier_id`),
689 CONSTRAINT `FK_sce_classifiers_classifier_match` FOREIGN KEY (`sce_classifier_id`) REFERENCES `sce_classifiers` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
690) ENGINE=InnoDB DEFAULT CHARSET=utf8;
691/*!40101 SET character_set_client = @saved_cs_client */;
692
693--
694-- Table structure for table `sce_classifiers`
695--
696
697DROP TABLE IF EXISTS `sce_classifiers`;
698/*!40101 SET @saved_cs_client = @@character_set_client */;
699/*!40101 SET character_set_client = utf8 */;
700CREATE TABLE `sce_classifiers` (
701 `uuid` varchar(36) NOT NULL,
702 `tenant_id` varchar(36) DEFAULT NULL,
703 `name` varchar(255) NOT NULL,
704 `sce_vnffg_id` varchar(36) NOT NULL,
705 `sce_rsp_id` varchar(36) NOT NULL,
706 `sce_vnf_id` varchar(36) NOT NULL,
707 `interface_id` varchar(36) NOT NULL,
708 `created_at` double NOT NULL,
709 `modified_at` double DEFAULT NULL,
710 PRIMARY KEY (`uuid`),
711 KEY `FK_sce_vnffgs_classifier` (`sce_vnffg_id`),
712 KEY `FK_sce_rsps_classifier` (`sce_rsp_id`),
713 KEY `FK_sce_vnfs_classifier` (`sce_vnf_id`),
714 KEY `FK_interfaces_classifier` (`interface_id`),
715 CONSTRAINT `FK_interfaces_classifier` FOREIGN KEY (`interface_id`) REFERENCES `interfaces` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
716 CONSTRAINT `FK_sce_rsps_classifier` FOREIGN KEY (`sce_rsp_id`) REFERENCES `sce_rsps` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
717 CONSTRAINT `FK_sce_vnffgs_classifier` FOREIGN KEY (`sce_vnffg_id`) REFERENCES `sce_vnffgs` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
718 CONSTRAINT `FK_sce_vnfs_classifier` FOREIGN KEY (`sce_vnf_id`) REFERENCES `sce_vnfs` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
719) ENGINE=InnoDB DEFAULT CHARSET=utf8;
720/*!40101 SET character_set_client = @saved_cs_client */;
721
722--
tierno7edb6752016-03-21 17:37:52 +0100723-- Table structure for table `sce_interfaces`
724--
725
726DROP TABLE IF EXISTS `sce_interfaces`;
727/*!40101 SET @saved_cs_client = @@character_set_client */;
728/*!40101 SET character_set_client = utf8 */;
729CREATE TABLE `sce_interfaces` (
730 `uuid` varchar(36) NOT NULL,
731 `sce_vnf_id` varchar(36) NOT NULL,
732 `sce_net_id` varchar(36) DEFAULT NULL,
733 `interface_id` varchar(36) DEFAULT NULL,
tierno11f81f62017-04-27 17:22:14 +0200734 `ip_address` varchar(64) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200735 `created_at` double NOT NULL,
736 `modified_at` double DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100737 PRIMARY KEY (`uuid`),
738 KEY `FK_sce_interfaces_sce_vnfs` (`sce_vnf_id`),
739 KEY `FK_sce_interfaces_sce_nets` (`sce_net_id`),
740 KEY `FK_sce_interfaces_interfaces` (`interface_id`),
741 CONSTRAINT `FK_sce_interfaces_interfaces` FOREIGN KEY (`interface_id`) REFERENCES `interfaces` (`uuid`),
742 CONSTRAINT `FK_sce_interfaces_sce_nets` FOREIGN KEY (`sce_net_id`) REFERENCES `sce_nets` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
743 CONSTRAINT `FK_sce_interfaces_sce_vnfs` FOREIGN KEY (`sce_vnf_id`) REFERENCES `sce_vnfs` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
744) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='VNF interfaces in a scenario definition.';
745/*!40101 SET character_set_client = @saved_cs_client */;
746
747--
748-- Table structure for table `sce_nets`
749--
750
751DROP TABLE IF EXISTS `sce_nets`;
752/*!40101 SET @saved_cs_client = @@character_set_client */;
753/*!40101 SET character_set_client = utf8 */;
754CREATE TABLE `sce_nets` (
755 `uuid` varchar(36) NOT NULL,
tiernofc7df372018-12-21 10:19:38 +0000756 `osm_id` varchar(255) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200757 `name` varchar(255) NOT NULL,
tierno7edb6752016-03-21 17:37:52 +0100758 `scenario_id` varchar(36) DEFAULT NULL COMMENT 'NULL if net is matched to several scenarios',
759 `type` enum('bridge','data','ptp') NOT NULL DEFAULT 'data' COMMENT 'Type of network',
760 `multipoint` enum('true','false') NOT NULL DEFAULT 'true',
761 `external` enum('true','false') NOT NULL DEFAULT 'false' COMMENT 'If external, net is already present at VIM',
tierno392f2852016-05-13 12:28:55 +0200762 `description` varchar(255) DEFAULT NULL,
tiernofc7df372018-12-21 10:19:38 +0000763 `vim_network_name` varchar(255) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200764 `created_at` double NOT NULL,
765 `modified_at` double DEFAULT NULL,
766 `graph` varchar(2000) DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100767 PRIMARY KEY (`uuid`),
768 KEY `FK_sce_nets_scenarios` (`scenario_id`),
769 CONSTRAINT `FK_sce_nets_scenarios` FOREIGN KEY (`scenario_id`) REFERENCES `scenarios` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
770) 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''.';
771/*!40101 SET character_set_client = @saved_cs_client */;
772
773--
tiernofc7df372018-12-21 10:19:38 +0000774-- Table structure for table `sce_rsp_hops`
775--
776
777DROP TABLE IF EXISTS `sce_rsp_hops`;
778/*!40101 SET @saved_cs_client = @@character_set_client */;
779/*!40101 SET character_set_client = utf8 */;
780CREATE TABLE `sce_rsp_hops` (
781 `uuid` varchar(36) NOT NULL,
782 `if_order` int(11) NOT NULL DEFAULT '0',
783 `interface_id` varchar(36) NOT NULL,
784 `sce_vnf_id` varchar(36) NOT NULL,
785 `sce_rsp_id` varchar(36) NOT NULL,
786 `created_at` double NOT NULL,
787 `modified_at` double DEFAULT NULL,
788 PRIMARY KEY (`uuid`),
789 KEY `FK_interfaces_rsp_hop` (`interface_id`),
790 KEY `FK_sce_vnfs_rsp_hop` (`sce_vnf_id`),
791 KEY `FK_sce_rsps_rsp_hop` (`sce_rsp_id`),
792 CONSTRAINT `FK_interfaces_rsp_hop` FOREIGN KEY (`interface_id`) REFERENCES `interfaces` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
793 CONSTRAINT `FK_sce_rsps_rsp_hop` FOREIGN KEY (`sce_rsp_id`) REFERENCES `sce_rsps` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
794 CONSTRAINT `FK_sce_vnfs_rsp_hop` FOREIGN KEY (`sce_vnf_id`) REFERENCES `sce_vnfs` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
795) ENGINE=InnoDB DEFAULT CHARSET=utf8;
796/*!40101 SET character_set_client = @saved_cs_client */;
797
798--
799-- Table structure for table `sce_rsps`
800--
801
802DROP TABLE IF EXISTS `sce_rsps`;
803/*!40101 SET @saved_cs_client = @@character_set_client */;
804/*!40101 SET character_set_client = utf8 */;
805CREATE TABLE `sce_rsps` (
806 `uuid` varchar(36) NOT NULL,
807 `tenant_id` varchar(36) DEFAULT NULL,
808 `name` varchar(255) NOT NULL,
809 `sce_vnffg_id` varchar(36) NOT NULL,
810 `created_at` double NOT NULL,
811 `modified_at` double DEFAULT NULL,
812 PRIMARY KEY (`uuid`),
813 KEY `FK_sce_vnffgs_rsp` (`sce_vnffg_id`),
814 CONSTRAINT `FK_sce_vnffgs_rsp` FOREIGN KEY (`sce_vnffg_id`) REFERENCES `sce_vnffgs` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
815) ENGINE=InnoDB DEFAULT CHARSET=utf8;
816/*!40101 SET character_set_client = @saved_cs_client */;
817
818--
819-- Table structure for table `sce_vnffgs`
820--
821
822DROP TABLE IF EXISTS `sce_vnffgs`;
823/*!40101 SET @saved_cs_client = @@character_set_client */;
824/*!40101 SET character_set_client = utf8 */;
825CREATE TABLE `sce_vnffgs` (
826 `uuid` varchar(36) NOT NULL,
827 `tenant_id` varchar(36) DEFAULT NULL,
828 `name` varchar(255) NOT NULL,
829 `description` varchar(255) DEFAULT NULL,
830 `vendor` varchar(255) DEFAULT NULL,
831 `scenario_id` varchar(36) NOT NULL,
832 `created_at` double NOT NULL,
833 `modified_at` double DEFAULT NULL,
834 PRIMARY KEY (`uuid`),
835 KEY `FK_scenarios_sce_vnffg` (`scenario_id`),
836 KEY `FK_scenarios_vnffg` (`tenant_id`),
837 CONSTRAINT `FK_scenarios_vnffg` FOREIGN KEY (`tenant_id`) REFERENCES `scenarios` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
838) ENGINE=InnoDB DEFAULT CHARSET=utf8;
839/*!40101 SET character_set_client = @saved_cs_client */;
840
841--
tierno7edb6752016-03-21 17:37:52 +0100842-- Table structure for table `sce_vnfs`
843--
844
845DROP TABLE IF EXISTS `sce_vnfs`;
846/*!40101 SET @saved_cs_client = @@character_set_client */;
847/*!40101 SET character_set_client = utf8 */;
848CREATE TABLE `sce_vnfs` (
849 `uuid` varchar(36) NOT NULL,
tiernofc7df372018-12-21 10:19:38 +0000850 `member_vnf_index` varchar(255) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200851 `name` varchar(255) NOT NULL,
tierno7edb6752016-03-21 17:37:52 +0100852 `scenario_id` varchar(36) NOT NULL,
853 `vnf_id` varchar(36) NOT NULL,
tierno392f2852016-05-13 12:28:55 +0200854 `description` varchar(255) DEFAULT NULL,
855 `created_at` double NOT NULL,
856 `modified_at` double DEFAULT NULL,
857 `graph` varchar(2000) DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100858 PRIMARY KEY (`uuid`),
859 UNIQUE KEY `name_scenario_id` (`name`,`scenario_id`),
860 KEY `FK_sce_vnfs_scenarios` (`scenario_id`),
861 KEY `FK_sce_vnfs_vnfs` (`vnf_id`),
862 CONSTRAINT `FK_sce_vnfs_scenarios` FOREIGN KEY (`scenario_id`) REFERENCES `scenarios` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
863 CONSTRAINT `FK_sce_vnfs_vnfs` FOREIGN KEY (`vnf_id`) REFERENCES `vnfs` (`uuid`)
864) 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';
865/*!40101 SET character_set_client = @saved_cs_client */;
866
867--
868-- Table structure for table `scenarios`
869--
870
871DROP TABLE IF EXISTS `scenarios`;
872/*!40101 SET @saved_cs_client = @@character_set_client */;
873/*!40101 SET character_set_client = utf8 */;
874CREATE TABLE `scenarios` (
875 `uuid` varchar(36) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +0100876 `osm_id` varchar(255) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200877 `name` varchar(255) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +0100878 `short_name` varchar(255) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200879 `tenant_id` varchar(36) DEFAULT NULL,
880 `description` varchar(255) DEFAULT NULL,
tierno182e3d12017-11-23 10:31:32 +0100881 `vendor` varchar(255) DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100882 `public` enum('true','false') NOT NULL DEFAULT 'false',
tierno392f2852016-05-13 12:28:55 +0200883 `created_at` double NOT NULL,
884 `modified_at` double DEFAULT NULL,
885 `descriptor` text COMMENT 'Original text descriptor used for create the scenario',
tierno11f81f62017-04-27 17:22:14 +0200886 `cloud_config` mediumtext,
tierno7edb6752016-03-21 17:37:52 +0100887 PRIMARY KEY (`uuid`),
tierno182e3d12017-11-23 10:31:32 +0100888 UNIQUE KEY `osm_id_tenant_id` (`osm_id`,`tenant_id`),
tierno392f2852016-05-13 12:28:55 +0200889 KEY `FK_scenarios_nfvo_tenants` (`tenant_id`),
890 CONSTRAINT `FK_scenarios_nfvo_tenants` FOREIGN KEY (`tenant_id`) REFERENCES `nfvo_tenants` (`uuid`)
tierno7edb6752016-03-21 17:37:52 +0100891) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='Scenarios defined by the user';
892/*!40101 SET character_set_client = @saved_cs_client */;
893
894--
tierno392f2852016-05-13 12:28:55 +0200895-- Table structure for table `schema_version`
896--
897
898DROP TABLE IF EXISTS `schema_version`;
899/*!40101 SET @saved_cs_client = @@character_set_client */;
900/*!40101 SET character_set_client = utf8 */;
901CREATE TABLE `schema_version` (
902 `version_int` int(11) NOT NULL COMMENT 'version as a number. Must not contain gaps',
903 `version` varchar(20) NOT NULL COMMENT 'version as a text',
904 `openmano_ver` varchar(20) NOT NULL COMMENT 'openmano version',
905 `comments` varchar(2000) DEFAULT NULL COMMENT 'changes to database',
906 `date` date DEFAULT NULL,
907 PRIMARY KEY (`version_int`)
908) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='database schema control version';
909/*!40101 SET character_set_client = @saved_cs_client */;
910
911--
tierno7edb6752016-03-21 17:37:52 +0100912-- Table structure for table `tenants_datacenters`
913--
914
915DROP TABLE IF EXISTS `tenants_datacenters`;
916/*!40101 SET @saved_cs_client = @@character_set_client */;
917/*!40101 SET character_set_client = utf8 */;
918CREATE TABLE `tenants_datacenters` (
919 `id` int(11) NOT NULL AUTO_INCREMENT,
920 `nfvo_tenant_id` varchar(36) NOT NULL,
921 `datacenter_id` varchar(36) NOT NULL,
tierno392f2852016-05-13 12:28:55 +0200922 `datacenter_tenant_id` varchar(36) NOT NULL,
923 `created_at` double NOT NULL,
924 `modified_at` double DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +0100925 PRIMARY KEY (`id`),
926 UNIQUE KEY `datacenter_nfvo_tenant` (`datacenter_id`,`nfvo_tenant_id`),
927 KEY `FK_nfvo_tenants_datacenters` (`datacenter_id`),
tierno392f2852016-05-13 12:28:55 +0200928 KEY `FK_nfvo_tenants_vim_tenants` (`datacenter_tenant_id`),
tierno7edb6752016-03-21 17:37:52 +0100929 KEY `FK_tenants_datacenters_nfvo_tenants` (`nfvo_tenant_id`),
tierno392f2852016-05-13 12:28:55 +0200930 CONSTRAINT `FK_tenants_datacenters_datacenter_tenants` FOREIGN KEY (`datacenter_tenant_id`) REFERENCES `datacenter_tenants` (`uuid`),
tierno7edb6752016-03-21 17:37:52 +0100931 CONSTRAINT `FK_tenants_datacenters_datacenters` FOREIGN KEY (`datacenter_id`) REFERENCES `datacenters` (`uuid`),
tierno392f2852016-05-13 12:28:55 +0200932 CONSTRAINT `FK_tenants_datacenters_nfvo_tenants` FOREIGN KEY (`nfvo_tenant_id`) REFERENCES `nfvo_tenants` (`uuid`)
933) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='Scenarios defined by the user';
tierno7edb6752016-03-21 17:37:52 +0100934/*!40101 SET character_set_client = @saved_cs_client */;
935
936--
937-- Table structure for table `uuids`
938--
939
940DROP TABLE IF EXISTS `uuids`;
941/*!40101 SET @saved_cs_client = @@character_set_client */;
942/*!40101 SET character_set_client = utf8 */;
943CREATE TABLE `uuids` (
944 `uuid` varchar(36) NOT NULL,
945 `root_uuid` varchar(36) DEFAULT NULL COMMENT 'Some related UUIDs can be grouped by this field, so that they can be deleted at once',
tierno392f2852016-05-13 12:28:55 +0200946 `created_at` double NOT NULL,
947 `used_at` varchar(36) DEFAULT NULL COMMENT 'Table that uses this UUID',
tierno7edb6752016-03-21 17:37:52 +0100948 PRIMARY KEY (`uuid`)
949) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table with all unique IDs used to avoid UUID repetitions among different elements';
950/*!40101 SET character_set_client = @saved_cs_client */;
951
952--
tiernofc7df372018-12-21 10:19:38 +0000953-- Table structure for table `vim_wim_actions`
tierno182e3d12017-11-23 10:31:32 +0100954--
955
tiernofc7df372018-12-21 10:19:38 +0000956DROP TABLE IF EXISTS `vim_wim_actions`;
tierno182e3d12017-11-23 10:31:32 +0100957/*!40101 SET @saved_cs_client = @@character_set_client */;
958/*!40101 SET character_set_client = utf8 */;
tiernofc7df372018-12-21 10:19:38 +0000959CREATE TABLE `vim_wim_actions` (
tierno182e3d12017-11-23 10:31:32 +0100960 `instance_action_id` varchar(36) NOT NULL,
961 `task_index` int(6) NOT NULL,
tiernofc7df372018-12-21 10:19:38 +0000962 `datacenter_vim_id` varchar(36) DEFAULT NULL,
tierno182e3d12017-11-23 10:31:32 +0100963 `vim_id` varchar(64) DEFAULT NULL,
tiernofc7df372018-12-21 10:19:38 +0000964 `wim_account_id` varchar(36) DEFAULT NULL,
965 `wim_internal_id` varchar(64) DEFAULT NULL,
tierno182e3d12017-11-23 10:31:32 +0100966 `action` varchar(36) NOT NULL COMMENT 'CREATE,DELETE,START,STOP...',
tiernofc7df372018-12-21 10:19:38 +0000967 `item` enum('datacenters_flavors','datacenter_images','instance_nets','instance_vms','instance_interfaces','instance_wim_nets') NOT NULL COMMENT 'table where the item is stored',
tierno182e3d12017-11-23 10:31:32 +0100968 `item_id` varchar(36) DEFAULT NULL COMMENT 'uuid of the entry in the table',
969 `status` enum('SCHEDULED','BUILD','DONE','FAILED','SUPERSEDED') NOT NULL DEFAULT 'SCHEDULED',
970 `extra` text COMMENT 'json with params:, depends_on: for the task',
971 `error_msg` varchar(1024) DEFAULT NULL,
972 `created_at` double NOT NULL,
973 `modified_at` double DEFAULT NULL,
974 PRIMARY KEY (`task_index`,`instance_action_id`),
975 KEY `FK_actions_instance_actions` (`instance_action_id`),
976 KEY `FK_actions_vims` (`datacenter_vim_id`),
tiernofc7df372018-12-21 10:19:38 +0000977 KEY `item_type_id` (`item`,`item_id`),
978 KEY `FK_actions_wims` (`wim_account_id`),
tierno182e3d12017-11-23 10:31:32 +0100979 CONSTRAINT `FK_actions_instance_actions` FOREIGN KEY (`instance_action_id`) REFERENCES `instance_actions` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
tiernofc7df372018-12-21 10:19:38 +0000980 CONSTRAINT `FK_actions_vims` FOREIGN KEY (`datacenter_vim_id`) REFERENCES `datacenter_tenants` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
981 CONSTRAINT `FK_actions_wims` FOREIGN KEY (`wim_account_id`) REFERENCES `wim_accounts` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
tierno182e3d12017-11-23 10:31:32 +0100982) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table with the individual VIM actions.';
983/*!40101 SET character_set_client = @saved_cs_client */;
984
985--
tierno7edb6752016-03-21 17:37:52 +0100986-- Table structure for table `vms`
987--
988
989DROP TABLE IF EXISTS `vms`;
990/*!40101 SET @saved_cs_client = @@character_set_client */;
991/*!40101 SET character_set_client = utf8 */;
992CREATE TABLE `vms` (
993 `uuid` varchar(36) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +0100994 `osm_id` varchar(255) DEFAULT NULL,
tiernofc7df372018-12-21 10:19:38 +0000995 `pdu_type` varchar(255) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +0200996 `name` varchar(255) NOT NULL,
tierno7edb6752016-03-21 17:37:52 +0100997 `vnf_id` varchar(36) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +0100998 `count` smallint(6) NOT NULL DEFAULT '1',
tierno392f2852016-05-13 12:28:55 +0200999 `flavor_id` varchar(36) NOT NULL COMMENT 'Link to flavor table',
1000 `image_id` varchar(36) NOT NULL COMMENT 'Link to image table',
tiernofc7df372018-12-21 10:19:38 +00001001 `image_list` text COMMENT 'Alternative images',
tierno11f81f62017-04-27 17:22:14 +02001002 `image_path` varchar(100) DEFAULT NULL COMMENT 'Path where the image of the VM is located',
1003 `boot_data` text,
tierno392f2852016-05-13 12:28:55 +02001004 `description` varchar(255) DEFAULT NULL,
1005 `created_at` double NOT NULL,
1006 `modified_at` double DEFAULT NULL,
tierno182e3d12017-11-23 10:31:32 +01001007 `availability_zone` varchar(255) DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +01001008 PRIMARY KEY (`uuid`),
1009 UNIQUE KEY `name_vnf_id` (`name`,`vnf_id`),
1010 KEY `FK_vms_vnfs` (`vnf_id`),
tierno392f2852016-05-13 12:28:55 +02001011 KEY `FK_vms_images` (`image_id`),
1012 KEY `FK_vms_flavors` (`flavor_id`),
1013 CONSTRAINT `FK_vms_flavors` FOREIGN KEY (`flavor_id`) REFERENCES `flavors` (`uuid`),
1014 CONSTRAINT `FK_vms_images` FOREIGN KEY (`image_id`) REFERENCES `images` (`uuid`),
tierno7edb6752016-03-21 17:37:52 +01001015 CONSTRAINT `FK_vms_vnfs` FOREIGN KEY (`vnf_id`) REFERENCES `vnfs` (`uuid`) ON DELETE CASCADE
1016) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='VM definitions. It contains the set of VMs used by the VNF definitions.';
1017/*!40101 SET character_set_client = @saved_cs_client */;
1018
1019--
1020-- Table structure for table `vnfs`
1021--
1022
1023DROP TABLE IF EXISTS `vnfs`;
1024/*!40101 SET @saved_cs_client = @@character_set_client */;
1025/*!40101 SET character_set_client = utf8 */;
1026CREATE TABLE `vnfs` (
1027 `uuid` varchar(36) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +01001028 `osm_id` varchar(255) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +02001029 `name` varchar(255) NOT NULL,
tierno182e3d12017-11-23 10:31:32 +01001030 `short_name` varchar(255) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +02001031 `tenant_id` varchar(36) DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +01001032 `physical` enum('true','false') NOT NULL DEFAULT 'false',
tierno392f2852016-05-13 12:28:55 +02001033 `public` enum('true','false') NOT NULL DEFAULT 'false',
1034 `description` varchar(255) DEFAULT NULL,
tierno182e3d12017-11-23 10:31:32 +01001035 `vendor` varchar(255) DEFAULT NULL,
1036 `mgmt_access` varchar(2000) DEFAULT NULL,
tierno392f2852016-05-13 12:28:55 +02001037 `created_at` double NOT NULL,
1038 `modified_at` double DEFAULT NULL,
tierno7edb6752016-03-21 17:37:52 +01001039 `class` varchar(36) DEFAULT 'MISC',
tierno392f2852016-05-13 12:28:55 +02001040 `descriptor` text COMMENT 'Original text descriptor used for create the VNF',
tierno7edb6752016-03-21 17:37:52 +01001041 PRIMARY KEY (`uuid`),
tierno182e3d12017-11-23 10:31:32 +01001042 UNIQUE KEY `osm_id_tenant_id` (`osm_id`,`tenant_id`),
tierno392f2852016-05-13 12:28:55 +02001043 KEY `FK_vnfs_nfvo_tenants` (`tenant_id`),
1044 CONSTRAINT `FK_vnfs_nfvo_tenants` FOREIGN KEY (`tenant_id`) REFERENCES `nfvo_tenants` (`uuid`) ON DELETE SET NULL ON UPDATE CASCADE
tierno7edb6752016-03-21 17:37:52 +01001045) 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';
1046/*!40101 SET character_set_client = @saved_cs_client */;
1047
1048--
tiernofc7df372018-12-21 10:19:38 +00001049-- Table structure for table `wim_accounts`
1050--
1051
1052DROP TABLE IF EXISTS `wim_accounts`;
1053/*!40101 SET @saved_cs_client = @@character_set_client */;
1054/*!40101 SET character_set_client = utf8 */;
1055CREATE TABLE `wim_accounts` (
1056 `uuid` varchar(36) NOT NULL,
1057 `name` varchar(255) DEFAULT NULL,
1058 `wim_id` varchar(36) NOT NULL,
1059 `created` enum('true','false') NOT NULL DEFAULT 'false',
1060 `user` varchar(64) DEFAULT NULL,
1061 `password` varchar(64) DEFAULT NULL,
1062 `config` varchar(4000) DEFAULT NULL,
1063 `created_at` double NOT NULL,
1064 `modified_at` double DEFAULT NULL,
1065 PRIMARY KEY (`uuid`),
1066 UNIQUE KEY `wim_name` (`wim_id`,`name`),
1067 KEY `FK_wim_accounts_wims` (`wim_id`),
1068 CONSTRAINT `FK_wim_accounts_wims` FOREIGN KEY (`wim_id`) REFERENCES `wims` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
1069) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='WIM accounts by the user';
1070/*!40101 SET character_set_client = @saved_cs_client */;
1071
1072--
1073-- Table structure for table `wim_nfvo_tenants`
1074--
1075
1076DROP TABLE IF EXISTS `wim_nfvo_tenants`;
1077/*!40101 SET @saved_cs_client = @@character_set_client */;
1078/*!40101 SET character_set_client = utf8 */;
1079CREATE TABLE `wim_nfvo_tenants` (
1080 `id` int(11) NOT NULL AUTO_INCREMENT,
1081 `nfvo_tenant_id` varchar(36) NOT NULL,
1082 `wim_id` varchar(36) NOT NULL,
1083 `wim_account_id` varchar(36) NOT NULL,
1084 `created_at` double NOT NULL,
1085 `modified_at` double DEFAULT NULL,
1086 PRIMARY KEY (`id`),
1087 UNIQUE KEY `wim_nfvo_tenant` (`wim_id`,`nfvo_tenant_id`),
1088 KEY `FK_wims_nfvo_tenants` (`wim_id`),
1089 KEY `FK_wim_accounts_nfvo_tenants` (`wim_account_id`),
1090 KEY `FK_nfvo_tenants_wim_accounts` (`nfvo_tenant_id`),
1091 CONSTRAINT `FK_nfvo_tenants_wim_accounts` FOREIGN KEY (`nfvo_tenant_id`) REFERENCES `nfvo_tenants` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
1092 CONSTRAINT `FK_wim_accounts_nfvo_tenants` FOREIGN KEY (`wim_account_id`) REFERENCES `wim_accounts` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
1093 CONSTRAINT `FK_wims_nfvo_tenants` FOREIGN KEY (`wim_id`) REFERENCES `wims` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
1094) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='WIM accounts mapping to NFVO tenants';
1095/*!40101 SET character_set_client = @saved_cs_client */;
1096
1097--
1098-- Table structure for table `wim_port_mappings`
1099--
1100
1101DROP TABLE IF EXISTS `wim_port_mappings`;
1102/*!40101 SET @saved_cs_client = @@character_set_client */;
1103/*!40101 SET character_set_client = utf8 */;
1104CREATE TABLE `wim_port_mappings` (
1105 `id` int(11) NOT NULL AUTO_INCREMENT,
1106 `wim_id` varchar(36) NOT NULL,
1107 `datacenter_id` varchar(36) NOT NULL,
1108 `pop_switch_dpid` varchar(64) NOT NULL,
1109 `pop_switch_port` varchar(64) NOT NULL,
1110 `wan_service_endpoint_id` varchar(256) NOT NULL COMMENT 'this field contains a unique identifier used to check the mapping_info consistency',
1111 `wan_service_mapping_info` text,
1112 `created_at` double NOT NULL,
1113 `modified_at` double DEFAULT NULL,
1114 PRIMARY KEY (`id`),
1115 UNIQUE KEY `unique_datacenter_port_mapping` (`datacenter_id`,`pop_switch_dpid`,`pop_switch_port`),
1116 UNIQUE KEY `unique_wim_port_mapping` (`wim_id`,`wan_service_endpoint_id`),
1117 KEY `FK_wims_wim_physical_connections` (`wim_id`),
1118 KEY `FK_datacenters_wim_port_mappings` (`datacenter_id`),
1119 CONSTRAINT `FK_datacenters_wim_port_mappings` FOREIGN KEY (`datacenter_id`) REFERENCES `datacenters` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
1120 CONSTRAINT `FK_wims_wim_port_mappings` FOREIGN KEY (`wim_id`) REFERENCES `wims` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
1121) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='WIM port mappings managed by the WIM.';
1122/*!40101 SET character_set_client = @saved_cs_client */;
1123
1124--
1125-- Table structure for table `wims`
1126--
1127
1128DROP TABLE IF EXISTS `wims`;
1129/*!40101 SET @saved_cs_client = @@character_set_client */;
1130/*!40101 SET character_set_client = utf8 */;
1131CREATE TABLE `wims` (
1132 `uuid` varchar(36) NOT NULL,
1133 `name` varchar(255) NOT NULL,
1134 `description` varchar(255) DEFAULT NULL,
1135 `type` varchar(36) NOT NULL DEFAULT 'odl',
1136 `wim_url` varchar(150) NOT NULL,
1137 `config` varchar(4000) DEFAULT NULL,
1138 `created_at` double NOT NULL,
1139 `modified_at` double DEFAULT NULL,
1140 PRIMARY KEY (`uuid`),
1141 UNIQUE KEY `name` (`name`)
1142) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='WIMs managed by the NFVO.';
1143/*!40101 SET character_set_client = @saved_cs_client */;
1144
1145--
1146-- Dumping routines for database 'mano_db'
tierno7edb6752016-03-21 17:37:52 +01001147--
1148/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1149
1150/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
1151/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
1152/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
1153/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1154/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1155/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1156/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1157
tiernofc7df372018-12-21 10:19:38 +00001158-- Dump completed on 2018-12-10 9:58:03
tierno392f2852016-05-13 12:28:55 +02001159
1160
1161
1162
1163
tiernofc7df372018-12-21 10:19:38 +00001164-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64)
tierno392f2852016-05-13 12:28:55 +02001165--
tierno11f81f62017-04-27 17:22:14 +02001166-- Host: localhost Database: {{mano_db}}
tierno392f2852016-05-13 12:28:55 +02001167-- ------------------------------------------------------
tiernofc7df372018-12-21 10:19:38 +00001168-- Server version 5.7.24
tierno392f2852016-05-13 12:28:55 +02001169
1170/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
1171/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
1172/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
1173/*!40101 SET NAMES utf8 */;
1174/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
1175/*!40103 SET TIME_ZONE='+00:00' */;
1176/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
1177/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
1178/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
1179/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
1180
1181--
1182-- Dumping data for table `schema_version`
1183--
1184
1185LOCK TABLES `schema_version` WRITE;
1186/*!40000 ALTER TABLE `schema_version` DISABLE KEYS */;
tiernofc7df372018-12-21 10:19:38 +00001187INSERT INTO `schema_version` VALUES
1188(0,'0.0','0.0.0','Database in init process','2015-05-08'),
1189(1,'0.1','0.2.2','insert schema_version','2015-05-08'),
1190(2,'0.2','0.2.5','new tables images,flavors','2015-07-13'),
1191(3,'0.3','0.3.3','alter vim_tenant tables','2015-07-28'),
1192(4,'0.4','0.3.5','enlarge graph field at sce_vnfs/nets','2015-10-20'),
1193(5,'0.5','0.4.1','Add mac address for bridge interfaces','2015-12-14'),
1194(6,'0.6','0.4.2','Adding VIM status info','2015-12-22'),
1195(7,'0.7','0.4.3','Changing created_at time at database','2016-01-25'),
1196(8,'0.8','0.4.32','Enlarging name at database','2016-02-01'),
1197(9,'0.9','0.4.33','Add ACTIVE:NoMgmtIP to instance_vms table','2016-02-05'),
1198(10,'0.10','0.4.36','tenant management of vnfs,scenarios','2016-03-08'),
1199(11,'0.11','0.4.43','remove unique name at scenarios,instance_scenarios','2016-07-18'),
1200(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'),
1201(13,'0.13','0.4.47','insert cloud-config at scenarios,instance_scenarios','2016-08-30'),
1202(14,'0.14','0.4.57','remove unique index vim_net_id, instance_scenario_id','2016-09-26'),
1203(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'),
1204(16,'0.16','0.5.2','enlarge vim_tenant_name and id. New config at datacenter_tenants','2016-10-11'),
1205(17,'0.17','0.5.3','Extra description json format of additional devices in datacenter_flavors','2016-12-20'),
1206(18,'0.18','0.5.4','Add columns \'floating_ip\' and \'port_security\' at tables \'interfaces\' and \'instance_interfaces\'','2017-01-09'),
1207(19,'0.19','0.5.5','Extra Boot-data content at VNFC (vms)','2017-01-11'),
1208(20,'0.20','0.5.9','Added columns to store dataplane connectivity info','2017-03-13'),
1209(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'),
1210(22,'0.22','0.5.16','Changed type of ram in flavors from SMALLINT to MEDIUMINT','2017-06-02'),
1211(23,'0.23','0.5.20','Changed type of ram in flavors from SMALLINT to MEDIUMINT','2017-08-29'),
1212(24,'0.24','0.5.21','Added vnfd fields','2017-08-29'),
1213(25,'0.25','0.5.22','Added osm_id to vnfs,scenarios','2017-09-01'),
1214(26,'0.26','0.5.23','Several changes','2017-09-09'),
1215(27,'0.27','0.5.25','Added encrypted_RO_priv_key,RO_pub_key to table nfvo_tenants','2017-09-29'),
1216(28,'0.28','0.5.28','Adding VNFFG-related tables','2017-11-20'),
1217(29,'0.29','0.5.59','Change member_vnf_index to str accordingly to the model','2018-04-11'),
1218(30,'0.30','0.5.60','Add image_list to vms','2018-04-24'),
1219(31,'0.31','0.5.61','Add vim_network_name to sce_nets','2018-05-03'),
1220(32,'0.32','0.5.70','Add vim_name to instance vms','2018-06-28'),
1221(33,'0.33','0.5.82','Add pdu information to vms','2018-11-13'),
1222(34,'0.34','0.6.00','Added WIM tables','2018-09-10'),
1223(35,'0.35','0.6.02','Adding ingress and egress ports for RSPs','2018-12-11'),
1224(36,'0.36','0.6.03','Allow vm without image_id for PDUs','2018-12-19');
tierno392f2852016-05-13 12:28:55 +02001225/*!40000 ALTER TABLE `schema_version` ENABLE KEYS */;
1226UNLOCK TABLES;
1227/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1228
1229/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
1230/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
1231/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
1232/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1233/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1234/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1235/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1236
tiernofc7df372018-12-21 10:19:38 +00001237-- Dump completed on 2018-12-10 9:58:03