fix bug:range() is not same in py3.x and py2.x

in python3.x, there is no method named xrange(),it
has replaced by range(),which is equal to xrange() in
python2.x. so we must fix this issue.we use six module
to fix this issue.

Change-Id: If4fd7478865e8024025af3e57e42f2a24e1e2bbc
Closes-Bug: #1268439
Check first matching rule for protected properties

When using roles to define protected properties, the first matching rule
in the config file should be used to grant/deny access. This change
enforces that behaviour.

Fixes bug 1271426

Change-Id: I11ece25ae85ff868516bcd1839a4e430e9c51370
Enable gating on H501

H501 - "avoid locals() on string formatting" passes
currently, so no reason to blacklist it.

Change-Id: I9fb1823a598679c0e95c88a8ce4f93629508a80c
Merge "fix bug:range() is not same in py3.x and py2.x"
Merge "Check first matching rule for protected properties"
Merge "Enable gating on H501"