Merge branch 'stable-2.16' into stable-2.17
[ganeti-github.git] / Makefile.am
index cb81b6a..d71e145 100644 (file)
@@ -235,17 +235,17 @@ DIRS = \
        test/data/ovfdata \
        test/data/ovfdata/other \
        test/data/cgroup_root \
-        test/data/cgroup_root/memory \
-        test/data/cgroup_root/memory/lxc \
-        test/data/cgroup_root/memory/lxc/instance1 \
-        test/data/cgroup_root/cpuset \
-        test/data/cgroup_root/cpuset/some_group \
-        test/data/cgroup_root/cpuset/some_group/lxc \
-        test/data/cgroup_root/cpuset/some_group/lxc/instance1 \
-        test/data/cgroup_root/devices \
-        test/data/cgroup_root/devices/some_group \
-        test/data/cgroup_root/devices/some_group/lxc \
-        test/data/cgroup_root/devices/some_group/lxc/instance1 \
+       test/data/cgroup_root/memory \
+       test/data/cgroup_root/memory/lxc \
+       test/data/cgroup_root/memory/lxc/instance1 \
+       test/data/cgroup_root/cpuset \
+       test/data/cgroup_root/cpuset/some_group \
+       test/data/cgroup_root/cpuset/some_group/lxc \
+       test/data/cgroup_root/cpuset/some_group/lxc/instance1 \
+       test/data/cgroup_root/devices \
+       test/data/cgroup_root/devices/some_group \
+       test/data/cgroup_root/devices/some_group/lxc \
+       test/data/cgroup_root/devices/some_group/lxc/instance1 \
        test/py \
        test/py/testutils \
        test/py/cmdlib \
@@ -540,9 +540,9 @@ hypervisor_PYTHON = \
        lib/hypervisor/hv_xen.py
 
 hypervisor_hv_kvm_PYTHON = \
-  lib/hypervisor/hv_kvm/__init__.py \
-  lib/hypervisor/hv_kvm/monitor.py \
-  lib/hypervisor/hv_kvm/netdev.py
+       lib/hypervisor/hv_kvm/__init__.py \
+       lib/hypervisor/hv_kvm/monitor.py \
+       lib/hypervisor/hv_kvm/netdev.py
 
 jqueue_PYTHON = \
        lib/jqueue/__init__.py \
@@ -1233,11 +1233,11 @@ endif
        PYTHONPATH=. ENABLE_MANPAGES=$(ENABLE_MANPAGES) COPY_DOC=1 \
         HTML_THEME=$(SPHINX_HTML_THEME) \
        $(RUN_IN_TEMPDIR) autotools/sphinx-wrapper $(SPHINX) -q -W -b html \
-           -d . \
-           -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
-           -D release="$(PACKAGE_VERSION)" \
-           -D graphviz_dot="$(DOT)" \
-           doc $(CURDIR)/$$dir && \
+               -d . \
+               -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
+               -D release="$(PACKAGE_VERSION)" \
+               -D graphviz_dot="$(DOT)" \
+       doc $(CURDIR)/$$dir && \
        rm -f $$dir/.buildinfo $$dir/objects.inv
        touch $@
 
@@ -1515,10 +1515,10 @@ dist_sbin_SCRIPTS = \
 
 nodist_sbin_SCRIPTS = \
        daemons/ganeti-cleaner \
-  src/ganeti-kvmd \
-  src/ganeti-luxid \
-  src/ganeti-confd \
-  src/ganeti-wconfd
+       src/ganeti-kvmd \
+       src/ganeti-luxid \
+       src/ganeti-confd \
+       src/ganeti-wconfd
 
 src/ganeti-luxid: src/hluxid
        cp -f $< $@
@@ -1572,7 +1572,7 @@ dist_tools_python_SCRIPTS = \
 
 nodist_tools_python_SCRIPTS = \
        tools/node-cleanup \
-        $(python_scripts_shebang)
+       $(python_scripts_shebang)
 
 tools_python_basenames = \
        $(patsubst shebang/%,%,\
@@ -1652,7 +1652,7 @@ EXTRA_DIST += \
        tools/vif-ganeti-metad.in \
        tools/net-common.in \
        tools/vcluster-setup.in \
-        $(python_scripts) \
+       $(python_scripts) \
        $(docinput) \
        doc/html \
        $(BUILT_EXAMPLES:%=%.in) \
@@ -1863,9 +1863,9 @@ TEST_FILES = \
        test/data/bdev-rbd/output_invalid.txt \
        test/data/cert1.pem \
        test/data/cert2.pem \
-        test/data/cgroup_root/memory/lxc/instance1/memory.limit_in_bytes \
-        test/data/cgroup_root/cpuset/some_group/lxc/instance1/cpuset.cpus \
-        test/data/cgroup_root/devices/some_group/lxc/instance1/devices.list \
+       test/data/cgroup_root/memory/lxc/instance1/memory.limit_in_bytes \
+       test/data/cgroup_root/cpuset/some_group/lxc/instance1/cpuset.cpus \
+       test/data/cgroup_root/devices/some_group/lxc/instance1/devices.list \
        test/data/cluster_config_2.7.json \
        test/data/cluster_config_2.8.json \
        test/data/cluster_config_2.9.json \
@@ -1922,7 +1922,7 @@ TEST_FILES = \
        test/data/ovfdata/wrong_ova.ova \
        test/data/ovfdata/wrong_xml.ovf \
        test/data/proc_cgroup.txt \
-        test/data/proc_diskstats.txt \
+       test/data/proc_diskstats.txt \
        test/data/proc_drbd8.txt \
        test/data/proc_drbd80-emptyline.txt \
        test/data/proc_drbd80-emptyversion.txt \
@@ -2757,13 +2757,27 @@ PEP8_EXCLUDE = $(subst $(space),$(comma),$(strip $(notdir $(built_python_sources
 
 # A space-separated list of pylint warnings to completely ignore:
 # I0013 = disable warnings for ignoring whole files
-LINT_DISABLE = I0013
+# R0912 = disable too many branches warning. It's useful, but ganeti requires
+#         a lot of refactoring to fix this.
+# R0204 = disable redefined-variable-type warning. There are a large number of
+#         cases where Ganeti assigns multiple types (eg set/list, float/int) to
+#         the same variable, and these are benign.
+# C0325 = disable superfluous-parens. There are a lot of cases where this is
+#         overzealous, eg where we use parens to make it clear that we're
+#         deliberately doing a comparison that should yield bool, or are using
+#         parens clarify precedence or to allow multi-line expressions.
+# C0330 = disable wrong indentation warnings. pylint is much more strict than
+#         pep8, and it would be too invasive to fix all these.
+LINT_DISABLE = I0013 R0912 R0204 C0325 C0330
 # Additional pylint options
 LINT_OPTS =
 # The combined set of pylint options
 LINT_OPTS_ALL = $(LINT_OPTS) \
   $(addprefix --disable=,$(LINT_DISABLE))
 
+# Whitelist loading pycurl C extension for attribute checking
+LINT_OPTS_ALL += --extension-pkg-whitelist=pycurl
+
 LINT_TARGETS = pylint pylint-qa pylint-test
 if HAS_PEP8
 LINT_TARGETS += pep8
@@ -2964,7 +2978,7 @@ TAGS: $(GENERATED_FILES)
          $(filter-out -O -Werror,$(HFLAGS)) \
                -osuf tags.o \
                -hisuf tags.hi \
-    -lcurl \
+       -lcurl \
          $(HS_LIBTEST_SRCS)
        find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \
          -path './daemons/ganeti-*' -o -path './tools/*' -o \