aodh: Add config for alarm_history_ttl (bsc#1073703)#1689
Conversation
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta.key? "alarm_history_ttl" |
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| return a, d | ||
| end | ||
|
|
||
| def downgrade(ta, td, a, d) |
There was a problem hiding this comment.
Naming/UncommunicativeMethodParamName: Method parameter must be at least 3 characters long.
| @@ -0,0 +1,13 @@ | |||
| def upgrade(ta, td, a, d) | |||
| unless a.key? "alarm_history_ttl" | |||
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| @@ -0,0 +1,13 @@ | |||
| def upgrade(ta, td, a, d) | |||
There was a problem hiding this comment.
Naming/UncommunicativeMethodParamName: Method parameter must be at least 3 characters long.
stefannica
left a comment
There was a problem hiding this comment.
Don't you need a new schema revision (101) ?
|
There is no 100 migration here, so I used this one as the first one (aodh is empty of migrations). There are other cases like barbican that start in 100, but there are other that choose 101 here. I do not mind to use 101 as the first one. |
The alarm_history_ttl config option for aodh was not previously configurable. (cherry picked from commit 47a7d26)
d4fe231 to
25c1200
Compare
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta.key? "alarm_history_ttl" |
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| return a, d | ||
| end | ||
|
|
||
| def downgrade(ta, td, a, d) |
There was a problem hiding this comment.
Naming/UncommunicativeMethodParamName: Method parameter must be at least 3 characters long.
| @@ -0,0 +1,13 @@ | |||
| def upgrade(ta, td, a, d) | |||
| unless a.key? "alarm_history_ttl" | |||
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| @@ -0,0 +1,13 @@ | |||
| def upgrade(ta, td, a, d) | |||
There was a problem hiding this comment.
Naming/UncommunicativeMethodParamName: Method parameter must be at least 3 characters long.
stefannica
left a comment
There was a problem hiding this comment.
Thanks, looks good now.
The alarm_history_ttl config option for aodh was
not previously configurable.
(cherry picked from commit 47a7d26)