Initial openvim v0.4.6 upload
[osm/openvim.git] / database_utils / nets.sql
1 ##
2 # Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
3 # 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 ##
21
22 /*
23 This table contains a list of networks created from the begining
24 The following fields are needed
25 uuid: provide a valid uuid format
26 type: ptp, data (point to point, or point to multipoint) are openflow dadaplane nets
27 bridge_man, bridge_data are virtio/bridge controlplane nets
28 name: useful human readable name
29 shared: by default true
30 vlan: default vlan of the dataplane net
31 bind: for control plane:
32 default: default network
33 macvtap:host_iface. Connect to a direct macvtap host interface
34 bridge:bridge_name. Connect to this host bridge_name interface
35 for dataplane: NULL, because the binding is done with a external port
36 */
37
38
39 LOCK TABLES `nets` WRITE;
40 /*
41 INSERT INTO `nets`
42 (uuid, `type`, name, shared, vlan, bind)
43 VALUES
44 ('00000000-0000-0000-0000-000000000000','bridge_man', 'default', 'true', NULL, 'default'),
45 ('11111111-1111-1111-1111-111111111111','bridge_man', 'direct:em1','true', NULL, 'macvtap:em1'),
46 ('aaaaaaaa-1111-aaaa-aaaa-aaaaaaaaaaaa','data', 'coreIPv4', 'true', 702, NULL),
47 ('aaaaaaaa-aaaa-0000-1111-aaaaaaaaaaaa','bridge_data','virbrMan2', 'true', 2002, 'bridge:virbrMan2') # last row without ','
48 ;
49 */
50
51 UNLOCK TABLES;
52
53 /* External PORTS are necessary to connect a dataplane network to an external switch port
54 The following fields are needed
55 uuid: provide a valid uuid format
56 name: useful human readable name
57 net_id: uuid of the net where this port must be connected
58 Mbps: only informative, indicates the expected bandwidth in megabits/s
59 type: only external has meaning here
60 vlan: if the traffic at that port must be vlan tagged
61 switch_port: port name at switch:
62 */
63
64 LOCK TABLES `ports` WRITE;
65 /*
66 INSERT INTO `ports`
67 (uuid, name, net_id, Mbps, type, vlan, switch_port)
68 VALUES
69 ('6d536a80-52e9-11e4-9e31-5254006d6777','CoreIPv4', 'aaaaaaaa-1111-aaaa-aaaa-aaaaaaaaaaaa',10000,'external',702, 'Te0/47') # last row without ','
70 ;
71 */
72
73 UNLOCK TABLES;
74