diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-04-28 15:30:37 +0000 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-05-01 14:13:14 +0000 |
commit | 792e3d5cd79c76c912ace410a17fa45275f4a439 (patch) | |
tree | 57506171c5be9ddca6f0a63abb2731d19b2a5821 | |
parent | 55496bf01f072f9b45e9ec7733c4bf02080bb3a0 (diff) | |
download | definitions-792e3d5cd79c76c912ace410a17fa45275f4a439.tar.gz |
openstack: improve network configuration extension
Also ensure that the /etc/openstack directory exists.
Change-Id: I633cf3e9add94ff1d9622062e55b4d15db541cbf
-rw-r--r-- | openstack-network.configure | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/openstack-network.configure b/openstack-network.configure index a4d43a6a..10be5a1c 100644 --- a/openstack-network.configure +++ b/openstack-network.configure @@ -18,13 +18,26 @@ set -e ROOT="$1" -ln -sf "/usr/lib/systemd/system/openvswitch-setup.service" \ - "$ROOT/etc/systemd/system/multi-user.target.wants/openvswitch-setup.service" +enable(){ + ln -sf "/usr/lib/systemd/system/$1.service" \ + "$ROOT/etc/systemd/system/multi-user.target.wants/$1.service" +} -ln -sf "/usr/lib/systemd/system/openstack-network-setup.service" \ - "$ROOT/etc/systemd/system/multi-user.target.wants/openstack-network-setup.service" +################### +# Enable services # +################### -python <<'EOF' >"$ROOT/etc/openstack/network.conf" +enable openvswitch-setup +enable openstack-network-setup + +########################################################################## +# Generate config variable shell snippet +########################################################################## + +OPENSTACK_DATA="$ROOT/etc/openstack" +mkdir -p "$OPENSTACK_DATA" + +python <<'EOF' >"$OPENSTACK_DATA/network.conf" import os, sys, yaml network_configuration = {} |