CP-7292: add pylintrc 0.21.1 standard template

As pylintrc-0.13.1, this backup can helps us to identify our setup
customization when we upgrade to newer release of pylint in the future.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
CP-7292: port our customization onto the new pylintrc template

Get the customization we previously made by diffing the current
pylintrc and pylintrc 0.13.1 template we backed up, then ported
it onto the new pylintrc (based on pylintrc 0.21.1 template).

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
CP-7292: remove the pylintrc 0.13.1 template backup

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
CP-7292: E1201 is now deprecated

Putting it in the config would stop pylint from working.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
CP-7292: Inherit XenError from the Exception base class (E0710)

Let XenError inherit from the Exception base class, so that we can
get rid of the E0710 exemption. Otherwise pylint complains with

E0710: Raising a new style class which doesn't inherit from BaseException

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
CP-7292: Remove E1101 from the exemption list

E1101: Used when a variable is accessed for a nonexistent member.

Some type magic in a small portion of blktap2.py is too advanced
for pylint to comprehend. So we explicitly tell pylint to ignore
that particular warning on that particular section.

By doing so, we can now enable E1101 for all the rest part of our
code to achieve better safety.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
CP-7292: remove the dependency on simplejson

The extra dependency on simplejson makes pylint to complain, because
the 3rd party module is not available in our building environment.

Replacing this single instance with python's standard json lib, we
can achieve equally good result for our simple object.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
CP-7292: remove dependency on iofi

iofi is a customize module which doesn't exist in either xenbuilder
chroot or a standard XenServer host. Hence pylint complains about
the reference to a non-existed module.

My understanding is that the module is for debugging purpose and can
be purposely copied onto the system when necessary. But in general
cases, it won't be on the system.

The change workaround the pylint complain by using dynamic loading
via module name. This also fits the conditional loading concept
in context, where loading which module could be calculated and
dynamically decided (though not necessary in this instance).

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
CP-7292: Make use of the exit code of pylint

In the previous version of pylint we use, the exit code of a pylint
process is always zero (regardless there are issues found or not).
So we have to capture the output of pylint to make a judgement call
ourselves.

The newer vesion of pylint exit with non-zero code if any issue
has been found. So we can now interpreter the exit code rathe than
the output text, which makes things simpler.

Unfortunately, a bug in the exact version 0.21.1 [1] stops us from
passing all the python files to check to pylint all at once, so we
still have to iterate over all the files one by one and record the
existence of any errors. The code can become considerablly simpler
when we move to a even newer version of pylint with this bug fixed.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591670

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Merge CP-7292: Update pylint config for CentOS 6.4

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>

Github: closes #71 on xapi-project/sm