From e73cbc8e2b735bd1c411efbc4485d10b19e8da79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Sun, 11 May 2014 01:40:09 +0200 Subject: [PATCH] indent using 4 spaces (2/3) As advised in I072cf8bf6748d0c910fecffdf2282bcc4656d038, code should use 4 spaces for indentation. This commit enforces the use of 4 spaces indentation. In order to simplify the review process, this patch only cover the following elements: - nagios3 - network-utils - neutron-openvswitch - nova-api - nova-baremetal - nova-compute - nova-kvm - openstack-client - openstack-db - openstack-ssl Change-Id: I489746d384c0c2c5a4f2b12444606e3bf8e3ce11 --- elements/nagios3/install.d/17-nagios | 2 +- elements/network-utils/bin/ensure-bridge | 18 ++++----- .../network-utils/install.d/70-network-utils | 2 +- .../bin/init-neutron-ovs | 12 +++--- .../install.d/nova-source-install/80-nova-api | 6 +-- elements/nova-baremetal/install.d/80-pxelinux | 8 ++-- .../nova-source-install/80-nova-compute | 4 +- .../install.d/nova-source-install/80-nova-kvm | 2 +- .../bin/install-openstack-client | 40 +++++++++---------- .../openstack-db/install.d/50-openstack-db | 4 +- .../install.d/70-install-stunnel | 2 +- 11 files changed, 50 insertions(+), 50 deletions(-) diff --git a/elements/nagios3/install.d/17-nagios b/elements/nagios3/install.d/17-nagios index e50785f97..d49ec1644 100755 --- a/elements/nagios3/install.d/17-nagios +++ b/elements/nagios3/install.d/17-nagios @@ -7,7 +7,7 @@ install-packages nagios3 sed -i "s/check_external_commands=0/check_external_commands=1/" /etc/nagios3/nagios.cfg # fix a minior display issue if [ -f /etc/nagios3/conf.d/extinfo_nagios2.cfg ]; then - sed -i "s/base\/debian/debian/g" /etc/nagios3/conf.d/extinfo_nagios2.cfg + sed -i "s/base\/debian/debian/g" /etc/nagios3/conf.d/extinfo_nagios2.cfg fi # set all servers as having ssh sed -i '0,/ssh-servers/! s/localhost/*/' /etc/nagios3/conf.d/hostgroups_nagios2.cfg diff --git a/elements/network-utils/bin/ensure-bridge b/elements/network-utils/bin/ensure-bridge index 71410e023..b4c5ed865 100755 --- a/elements/network-utils/bin/ensure-bridge +++ b/elements/network-utils/bin/ensure-bridge @@ -48,7 +48,7 @@ BOOTPROTO=none HOTPLUG=no EOF_CAT - #bridge config +#bridge config if [ -z "$bridge_ip_addr" ]; then cat > $tmp_bridge_config <> $tmp_config <<-EOF_CAT auto $interface allow-$bridge $interface @@ -114,7 +114,7 @@ allow-$bridge $interface ovs_type OVSPort EOF_CAT -#bridge config + #bridge config if [ -z "$bridge_ip_addr" ]; then cat >> $tmp_config < /dev/null 2>&1; then - groupadd -f libvirtd + groupadd -f libvirtd fi usermod -a -G libvirtd nova diff --git a/elements/openstack-clients/bin/install-openstack-client b/elements/openstack-clients/bin/install-openstack-client index a376ec905..c371b628f 100755 --- a/elements/openstack-clients/bin/install-openstack-client +++ b/elements/openstack-clients/bin/install-openstack-client @@ -3,13 +3,13 @@ set -eux function usage() { - echo "options:" - echo " -h show usage and exit" - echo " -c client bin name" - echo " -i Optional: installation directory for the virtualenv." - echo " If not specified defaults to /opt/stack/venv/python-client" - echo " -s enable --system-site-packages in the virtualenv." - exit $1 + echo "options:" + echo " -h show usage and exit" + echo " -c client bin name" + echo " -i Optional: installation directory for the virtualenv." + echo " If not specified defaults to /opt/stack/venv/python-client" + echo " -s enable --system-site-packages in the virtualenv." + exit $1 } client="" @@ -30,8 +30,8 @@ while getopts "hsi:c:" opt; do done if [[ -z "$client" ]]; then - echo "missing required 'client' parameter" - exit 1 + echo "missing required 'client' parameter" + exit 1 fi repo=python-${client}client @@ -58,20 +58,20 @@ set -u pushd /opt/stack/$repo client_manifest=$(get-pip-manifest ${repo}) if [ -n "$client_manifest" ]; then - use-pip-manifest $client_manifest + use-pip-manifest $client_manifest else - # Need setuptools>=1.0 to manage connections when - # downloading from pypi using http_proxy and https_proxy - pip install -U 'setuptools>=1.0' + # Need setuptools>=1.0 to manage connections when + # downloading from pypi using http_proxy and https_proxy + pip install -U 'setuptools>=1.0' - # bug #1293812 : Avoid easy_install triggering on pbr. - pip install -U 'pbr>=0.5.21,<1.0' + # bug #1293812 : Avoid easy_install triggering on pbr. + pip install -U 'pbr>=0.5.21,<1.0' - if [ -e requirements.txt ]; then - pip install -r requirements.txt - elif [ -e tools/pip-requires ]; then - pip install -r tools/pip-requires - fi + if [ -e requirements.txt ]; then + pip install -r requirements.txt + elif [ -e tools/pip-requires ]; then + pip install -r tools/pip-requires + fi fi # Always replay this, as we cannot use the entry this would generate in the manifest diff --git a/elements/openstack-db/install.d/50-openstack-db b/elements/openstack-db/install.d/50-openstack-db index 6bb4596e6..c44fdd4d7 100755 --- a/elements/openstack-db/install.d/50-openstack-db +++ b/elements/openstack-db/install.d/50-openstack-db @@ -5,9 +5,9 @@ install-packages mysql-server python-mysqldb my_cnf= if [ -f /etc/mysql/my.cnf ]; then - my_cnf=/etc/mysql/my.cnf # Ubuntu + my_cnf=/etc/mysql/my.cnf # Ubuntu elif [ -f /etc/my.cnf ]; then - my_cnf=/etc/my.cnf # Fedora/RHEL + my_cnf=/etc/my.cnf # Fedora/RHEL fi sed -i 's/127.0.0.1/0.0.0.0/g' $my_cnf diff --git a/elements/openstack-ssl/install.d/70-install-stunnel b/elements/openstack-ssl/install.d/70-install-stunnel index 65e30d8df..d8f7ff0d4 100755 --- a/elements/openstack-ssl/install.d/70-install-stunnel +++ b/elements/openstack-ssl/install.d/70-install-stunnel @@ -22,7 +22,7 @@ install-packages stunnel4 # Debian/Ubuntu don't install stunnel4 in a working configuration. if [ -e /etc/default/stunnel4 ]; then - cat > /etc/default/stunnel4 << EOF + cat > /etc/default/stunnel4 << EOF ENABLED=1 FILES="/etc/stunnel/*.conf" OPTIONS=""