Commit Graph

18 Commits

Author SHA1 Message Date
Zane Bitter db7ab8de2c Get rid of bogus debug logging in parameter groups
This didn't log anything useful, just a couple of object pointers. Mostly
it was just noise.

Change-Id: Icb3cbd9383d06be4674e56713d81d14fb90efa5a
2015-12-04 19:56:56 -05:00
Zane Bitter 388ee0257f Fix garbled docstrings
The process of bringing us into compliance with the H405 pep8 rule has left
us with a lot of docstrings that either don't follow the recommendations of
PEP0257, are misleading, wrong, or nonsensical. This patch attempts to fix
them up.

Change-Id: Icfe90b5ba3102a7e13ab659038a8b2af9019e9e6
2015-11-10 11:12:36 -05:00
Peter Razumovsky 2da170c435 Fix [H405] pep rule in heat/engine
Fix [H405] rule in heat/engine python
files.

Implements bp docstring-improvements

Change-Id: Iaa1541eb03c4db837ef3a0e4eb22393ba32e270f
2015-09-21 14:51:46 +03:00
Rabi Mishra bb15fcc3be Fix validation error for parameter group
Fix bug introduced by change
I2b1b096b314b52b2a51d09c47c46b902e6647c59

Change-Id: I9cda70f60c3c7651e433f9464ea5926d64659721
Closes-Bug: #1465110
2015-06-30 11:38:33 +05:30
Peter Razumovsky 5791d52c95 Improve StackValidationFailed resp param_groups
Use StackValidationFailed exception's parameters
error and path in parameter groups validation for
fuller error message: which error has been raised,
where this error has been raised and why.
This patch relies on topic [1].

[1]: https://review.openstack.org/#/q/status:merged+project:openstack/heat+branch:master+topic:improve-validation-error,n,z
Change-Id: I2b1b096b314b52b2a51d09c47c46b902e6647c59
2015-06-03 14:05:54 +00:00
Rabi Mishra d3d4f62395 Add validation for parameter_groups
This fix adds validation to raise error when the parameter_groups
is not a list and parameters in a parameter_group is not a list.

Change-Id: I35cdca9ce07522b5dbcfcf02d2c30393a4c15d1f
Partial-Bug: #1454559
2015-05-18 18:46:56 +05:30
Steven Hardy 70112c103a Move logging to use oslo_log library
The oslo-incubator log modlule has been removed, so port to the oslo_log
library.  Note this uses the new (non namespaced, e.g oslo.log) import
convention, we'll need to align other imports in a future commit.

Some import reordering was required due to pedantic H30[57] checks, and
the services have all been converted to initialize the oslo_log library
as this is done differently to the log.py in incubator.

Change-Id: Ib5a97123fe1b287bc531e42d7887c13ba6205628
2015-02-17 09:23:34 +00:00
Pavlo Shchelokovskyy 8415baf6cc Enable E265 style check
block comment should start with '# '

Change-Id: Iffae1b10e81b12ca8455139eae609ddca5e8dd09
2015-01-05 11:58:27 +02:00
Angus Salkeld 08431c7c06 Add "parameter_defaults" to the environment
This give the user a way to set defaults recursively down nested stacks
without having to create the parameter in every template (it's ignored
if the template does not have the parameter).

blueprint env-nested-usability
Change-Id: Ie6b4481417204a527d322fd532c341b9acbce473
2014-12-15 09:44:11 +10:00
Peter Razumovsky 03b3cf777e Fix [H302] errors in heat/engine
Change-Id: Ib3e1a6f9d5e82e9fb29b000157b57dbc3883b42e
2014-11-26 16:43:55 +03:00
Ethan Lynn c2211f0e0a Switch heat engine to oslo.i18n
Remove gettextutils from heat engine and import oslo.i18n.

blueprint oslo-i18n

Change-Id: Iadf4cfc0f9a0b94c1f2fa1eb71f807539247b34e
2014-09-16 14:08:53 +08:00
Sergey Kraynev ecd8d3999d Replacing variable logger on LOG
Commit https://review.openstack.org/#/c/94255/1 introduces check for
translating log messages. This check uses in pattern name 'LOG', so in
heat code also should be used this name intead of 'logger'. Also same
name is used in other projects.

Change-Id: Iba24c7eb1c13e68a91d090d7bcdbcb40d6e16071
Partial-Bug: #1321283
2014-05-27 15:48:33 -04:00
Thomas Spatzier 19f83e8426 Do not validate constraints in schema constructor
This patch moves validation of constraints out of the constructor of
schema objects into a separate method that can be invoked on the
schema objects after creation. This gives us more control over when
validation shall be invoked.

This patch fixes an issue with custom constraints that could not be
validated when having a default value, since they require the RPC
context to be present. However, the context was not present in the
places where needed.
The short-sighted fix would have been to change a lot of method
signatures to pass the context properly, but that did not seem to be
really clean. The better fix seemed to be to move validation into
a separate method that can be invoked with the proper context. This
will also give us more control on when we do validation, and which
validation we do.

This patch
Closes-Bug: #1314240

This patch will also enable to fix
Partial-Bug: #1314401

For that bug it will be necessary to switch off validation under
certain conditions, which was not possible before when doing
validation right in the constructor.

Change-Id: I19e1fb520551eb42bf36bb380f1cc28c81bbaedd
2014-05-20 11:17:40 +02:00
Christian Berendt 94920c5551 debug level logs should not be translated
According to the OpenStack translation policy available at
https://wiki.openstack.org/wiki/LoggingStandards debug messages
should not be translated. Like mentioned in several changes in
Nova by garyk this is to help prioritize log translation.

Change-Id: I770dfc2fd474123a8ccc37311ef69d0c03e85545
Closes-Bug: #1318713
2014-05-14 21:28:27 +02:00
Jenkins 06ac482ac5 Merge "Order imports in alphabetical order (5/9)" 2014-04-11 00:24:30 +00:00
Pavlo Shchelokovskyy bcceff368d Order imports in alphabetical order (5/9)
This patch is one in a series to re-enable H306 style check rule
(imports are in alphabetical order).
It touches engine files (without resources).

Implements: blueprint reduce-flake8-ignored-rules (partial)
Change-Id: Ifd36fc49199c48af891bd8e7cc2d2262a53032eb
2014-04-07 21:35:23 +03:00
Jason Dunsmore af464c9afc Make the first line of every file consistent.
Change-Id: I2e1a809cfca8e88693551d58d33e747f54ee5eb1
2014-03-04 09:03:04 -06:00
Tim Schnell e048bb246e Updates template_validate call to validate parameter_groups.
When calling template_validate, the parameter_groups will now
be checked for valid parameter references and parameter integrity
across groups.

Change-Id: I0cbca0d443b68b8932a155a637a9aedc8eb0c2f9
Implements: blueprint parameter-grouping-ordering
2014-02-05 20:01:09 +00:00