blob: 1f76b0f2a371452edc8b3c455aaeb8d6e8404670 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
#!/bin/bash
#
# devstack/plugin.sh
# Functions to control the configuration and operation of the opendaylight service
# Save trace setting
_XTRACE_NETWORKING_ODL=$(set +o | grep xtrace)
set +o xtrace
# OpenDaylight directories
NETWORKING_ODL_DIR=$DEST/networking-odl
ODL_DIR=$DEST/opendaylight
# Make sure $ODL_DIR exists
mkdir -p $ODL_DIR
# Import utility functions
source $TOP_DIR/functions
source $NETWORKING_ODL_DIR/devstack/functions
# Import bridge data
source $TOP_DIR/lib/neutron_plugins/ovs_base
# Import ODL settings
source $NETWORKING_ODL_DIR/devstack/settings.odl
source $NETWORKING_ODL_DIR/devstack/odl-releases/$ODL_RELEASE
# Utilities functions for setting up Java
source $NETWORKING_ODL_DIR/devstack/setup_java.sh
# Import Entry Points
# -------------------
source $NETWORKING_ODL_DIR/devstack/entry_points
# Restore xtrace
$_XTRACE_NETWORKING_ODL
if [[ "$ODL_USING_EXISTING_JAVA" == "True" ]]
then
echo 'Using installed java.'
java -version || exit 1
fi
# main loop
if is_service_enabled odl-server; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
setup_opendaylight_package
install_opendaylight
configure_opendaylight
init_opendaylight
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
configure_neutron_odl
# This has to start before Neutron
start_opendaylight
elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then
# no-op
:
fi
if [[ "$1" == "unstack" ]]; then
stop_opendaylight
cleanup_opendaylight
fi
if [[ "$1" == "clean" ]]; then
# no-op
:
fi
fi
if is_service_enabled odl-compute; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
install_opendaylight_compute
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
if is_service_enabled nova; then
create_nova_conf_neutron
fi
bind_opendaylight_controller
wait_for_active_bridge $OVS_BR $ODL_RETRY_SLEEP_INTERVAL $ODL_BOOT_WAIT
if [ "${ODL_L3}" == "True" ]; then
configure_opendaylight_l3
fi
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# no-op
:
elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then
# no-op
:
fi
if [[ "$1" == "unstack" ]]; then
cleanup_opendaylight_compute
fi
if [[ "$1" == "clean" ]]; then
# no-op
:
fi
fi
if is_service_enabled odl-neutron; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
install_opendaylight_neutron_thin_ml2_driver
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
configure_neutron_odl
elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then
# no-op
:
fi
if [[ "$1" == "unstack" ]]; then
# no-op
:
fi
if [[ "$1" == "clean" ]]; then
# no-op
:
fi
fi
if is_service_enabled odl-lightweight-testing; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
install_opendaylight_neutron_thin_ml2_driver
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
configure_neutron_odl
configure_neutron_odl_lightweight_testing
elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then
# no-op
:
fi
if [[ "$1" == "unstack" ]]; then
# no-op
:
fi
if [[ "$1" == "clean" ]]; then
# no-op
:
fi
fi
# Tell emacs to use shell-script-mode
## Local variables:
## mode: shell-script
## End:
|