1 #Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 class opnfv::network {
17 ###use 8081 as a default work around swift service
18 if $odl_rest_port == '' {$odl_rest_port = '8081'}
20 if ($odl_flag != '') and str2bool($odl_flag) {
21 $ml2_mech_drivers = ['opendaylight']
22 $this_agent = 'opendaylight'
23 class {"opendaylight":
24 odl_rest_port => $odl_rest_port,
25 extra_features => ['odl-base-all', 'odl-aaa-authn', 'odl-restconf', 'odl-nsf-all', 'odl-adsal-northbound', 'odl-mdsal-apidocs', 'odl-ovsdb-openstack', 'odl-ovsdb-northbound', 'odl-dlux-core'],
29 $ml2_mech_drivers = ['openvswitch','l2population']
35 if $ovs_tunnel_if == '' { fail('ovs_tunnel_if is empty') }
36 if $private_ip == '' { fail('private_ip is empty') }
38 if $odl_control_ip == '' { fail('odl_controL_ip is empty, should be the IP of your network node private interface') }
40 if $mysql_ip == '' { fail('mysql_ip is empty') }
41 if $amqp_ip == '' { fail('amqp_ip is empty') }
43 if $nova_user_password == '' { fail('nova_user_password is empty') }
44 if $nova_db_password == '' { fail('nova_db_password is empty') }
46 if $neutron_user_password == '' { fail('neutron_user_password is empty') }
47 if $neutron_db_password == '' { fail('neutron_db_password is empty') }
48 if $neutron_metadata_shared_secret == '' { fail('neutron_metadata_shared_secret is empty') }
50 class { "quickstack::neutron::networker":
51 agent_type => $this_agent,
52 neutron_metadata_proxy_secret => $neutron_metadata_shared_secret,
53 neutron_db_password => $neutron_db_password,
54 neutron_user_password => $neutron_user_password,
55 nova_db_password => $nova_db_password,
56 nova_user_password => $nova_user_password,
58 controller_priv_host => $private_ip,
60 enable_tunneling => true,
61 ovs_tunnel_iface => $ovs_tunnel_if,
62 ovs_tunnel_network => '',
63 ovs_l2_population => 'True',
64 ovs_tunnel_types => ['vxlan'],
65 external_network_bridge => 'br-ex',
66 tenant_network_type => 'vxlan',
67 tunnel_id_ranges => '1:1000',
69 mysql_host => $mysql_ip,
70 amqp_host => $amqp_ip,
71 amqp_username => 'guest',
72 amqp_password => 'guest',
74 ml2_mechanism_drivers => $ml2_mech_drivers,
75 odl_controller_ip => $odl_control_ip,