21 lines
562 B
Django/Jinja
21 lines
562 B
Django/Jinja
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
odl_ip={{ address('opendaylight') | gethostbyname }}
|
|
|
|
odl_port={{ opendaylight.ovs_port.cont }}
|
|
|
|
ovs-vsctl set-manager tcp:$odl_ip:$odl_port
|
|
|
|
ovs_id=$(ovs-vsctl get Open_vSwitch . _uuid)
|
|
local_ip="{{ network_topology["private"]["address"] }}"
|
|
ovs-vsctl set Open_vSwitch $ovs_id other_config:local_ip=$local_ip
|
|
|
|
provider_mappings=
|
|
{%- for net in neutron.physnets -%}
|
|
{%- if not loop.first %},{% endif -%}
|
|
{{ net.name }}:{{ net.interface }}
|
|
{%- endfor %}
|
|
ovs-vsctl set Open_vSwitch $ovs_id other_config:provider_mappings="$provider_mappings"
|