14 Commits

Author SHA1 Message Date
Zane Bitter
22da551c8c Use correct raw string format
You're not supposed to just randomly put backslashes in front of other
characters that don't need escaping unless it's a raw string. This is
deprecated in Python 3.6.

Change-Id: I7a69ba6dd10412bb065f2b6ba405840d0a98663a
2017-11-16 18:23:58 -05:00
Jenkins
dbd92e29b3 Merge "Check all resources with custom guidelines" 2017-04-03 10:01:07 +00:00
liyi
8f10215ffd Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: Ieec8028305099422e1b0f8fc84bc90c9ca6c694f
2017-03-25 17:11:50 +08:00
Peter Razumovsky
8d6d1ac935 Check all resources with custom guidelines
If resource has available_resource_mapping method and
it's not available, custom guidelines check will skip it,
which is incorrect. This patch improves list of resources:
now only hidden, contrib and manually excluded resources
don't checked.

Change-Id: Ic2cb37fb3fe4aefb8b3efb911aecf46155541469
Closes-bug: #1674949
2017-03-22 14:24:18 +04:00
Peter Razumovsky
0ff37ff859 Don't raise error in custom guidelines on IOError
In some merge issues files or modules can be removed, but
still registered in global env. In that cases custom guidelines
raises an error with the message "No such file or directory".
Add exception handling to avoid error raising. Instead of error,
call warning and skip such class.

Change-Id: I71af2fffc2bdec414cb68c40eaf3268fe81134de
Closes-bug: #1613669
2016-08-24 09:36:02 +00:00
Zane Bitter
4200c6ccc0 Refactor confusing code in custom_guidelines.py
Change-Id: Iae7efbb8fe4157301deebd0776139489832f470f
2016-05-09 11:38:56 -04:00
Steve Baker
6e2d1a459a Exclude plugins from custom_guidelines.py
This is broken by our plugin package magic, so lets exclude
the plugin package from this tool.

Change-Id: I2da474b706cdb33e98675edabb0f607106c816d0
2016-05-09 08:57:24 +12:00
Sergey Kraynev
af0903a916 Ignore template res types during guideline checks
Global environment during registering resources also load resources from
/etc/environment.d . As result it loads two resources mapped on
templates:
- 'AWS::CloudWatch::Alarm'
- 'AWS::RDS::DBInstance'

However execute guideline checks for these resources is not possible due
to these resources use template_resource object and can not be processed
as usual *.py file.

This patch add ignoring for these two resource types.
Note: this error is not displayed on pep8 gate job due to we don't
install devstack during execution this job, but this error affects all
environments with installed devstack.

Closes-Bug: #1552194

Change-Id: I29abdfa1a4f4a17dfbcdaaf6f0c6665359bab17a
2016-03-02 08:25:58 -05:00
Peter Razumovsky
a5338c90c3 Fix all trailing spaces for custom guidelines
There are several trailing spaces error raised by
custom guidelines check. Need to fix them for successful
pep8 running.

implements bp custom-guidelines

Change-Id: Ibf50208155315e75795d7b9c8a8dbe487f9046ac
2016-02-26 15:50:31 +03:00
Peter Razumovsky
753f4c65e2 Fix all method errors for custom guidelines
There are several method error raised during custom
guidelines check. Need to fix it for successful running
pep8.

implements bp custom-guidelines

Change-Id: I55883bb8d314f982161aaa21c010e9d1467bf903
2016-02-26 15:50:29 +03:00
Peter Razumovsky
e4dc942ce1 Fix resources descriptions for custom guidelines
There're several errors, raised by custom guidelines check,
need to fix it for successful pep8 running.

implements bp custom-guidelines

Change-Id: Ibef41cad9b20715a740cedac7b98e9647bd3d6b7
2016-02-26 15:47:46 +03:00
Peter Razumovsky
2da713fa91 Fix all attributes error for custom guidelines
There are several errors during attributes descriptions
checking by custom guidelines. Need to fix them for
successful pep8 running.

implements bp custom-guidelines

Change-Id: I3df75c6343217723fd4490f9e70eb2d8499eb5ae
2016-02-26 15:47:46 +03:00
Peter Razumovsky
1d16909dfd Fix all properties errors for custom guidelines
There are several errors, raised during properties schemas
checking by custom guidelines. Need to fix them for successful
pep8 running.

implements bp custom-guidelines

Change-Id: Icd24498b8d36106412a61d4b82b00eb92095ffe9
2016-02-26 15:47:46 +03:00
Peter Razumovsky
874a9ba7da Implement custom guidelines
Implement custom guidelines for next cases:

 * resources descriptions
 * properties schemas descriptions
 * attributes schemas descriptions
 * methods descriptions
 * trailing spaces in attributes and properties
   descriptions

Also, enable custom guidelines check in pep8 checking.

implements bp custom-guidelines

Change-Id: Ic7b1061abfb42880c476602edb45bc40da291eb0
2016-02-19 18:37:59 +03:00