-
Notifications
You must be signed in to change notification settings - Fork 1
Synchronise migrations to 15fc8592d #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: stable/sap/3.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| def upgrade(ta, td, a, d) | ||
| a["volume_defaults"]["nfs"] = ta["volume_defaults"]["nfs"] | ||
| return a, d | ||
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| a["volume_defaults"].delete("nfs") | ||
| return a, d | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| def upgrade(ta, td, a, d) | ||
| unless a.key? "use_multipath" | ||
| a["use_multipath"] = ta["use_multipath"] | ||
| end | ||
| return a, d | ||
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta.key? "use_multipath" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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) |
||
| del a["use_multipath"] | ||
| end | ||
| return a, d | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| def upgrade(ta, td, a, d) | ||
| unless a["volume_defaults"].key?("hitachi") | ||
| a["volume_defaults"]["hitachi"] = ta["volume_defaults"]["hitachi"] | ||
| end | ||
| return a, d | ||
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| a["volume_defaults"].delete("hitachi") unless ta["volume_defaults"].key?("hitachi") | ||
| return a, d | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| def upgrade(ta, td, a, d) | ||
| a["rpc_workers"] = ta["rpc_workers"] unless a.key?("rpc_workers") | ||
|
|
||
| # From 055_add_tunnel_csum.rb | ||
| a["ovs"] ||= {} | ||
| a["ovs"]["tunnel_csum"] = ta["ovs"]["tunnel_csum"] | ||
|
|
||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout/EmptyLines: Extra blank line detected. (https://github.com/bbatsov/ruby-style-guide#two-or-more-empty-lines) |
||
| return a, d | ||
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| a.delete("rpc_workers") | ||
|
|
||
| # From 055_add_tunnel_csum | ||
| if a.key?("ovs") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style/IfUnlessModifier: Favor modifier if 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) |
||
| a["ovs"].delete("tunnel_csum") | ||
| end | ||
|
|
||
| return a, d | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| def upgrade(ta, td, a, d) | ||
| a["apic"] = ta["apic"] unless a.key? "apic" | ||
| return a, d | ||
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| a.delete("apic") unless ta.key? "apic" | ||
| return a, d | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| def upgrade(ta, td, a, d) | ||
| z = a["zvm"] | ||
|
|
||
| unless z.key? "zvm_user_default_password" | ||
| z["zvm_user_default_password"] = ta["zvm"]["zvm_user_default_password"] | ||
| end | ||
| unless z.key? "zvm_user_default_privilege" | ||
| z["zvm_user_default_privilege"] = ta["zvm"]["zvm_user_default_privilege"] | ||
| end | ||
| unless z.key? "zvm_reachable_timeout" | ||
| z["zvm_reachable_timeout"] = ta["zvm"]["zvm_reachable_timeout"] | ||
| end | ||
|
|
||
| return a, d | ||
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| z = a["zvm"] | ||
|
|
||
| unless ta["zvm"].key? "zvm_user_default_password" | ||
| z.delete("zvm_user_default_password") | ||
| end | ||
| unless ta["zvm"].key? "zvm_user_default_privilege" | ||
| z.delete("zvm_user_default_privilege") | ||
| end | ||
| unless ta["zvm"].key? "zvm_reachable_timeout" | ||
| z.delete("zvm_reachable_timeout") | ||
| end | ||
|
|
||
| return a, d | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| def upgrade(ta, td, a, d) | ||
| unless a["zvm"].key? "zvm_xcat_network" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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) |
||
| a["zvm"]["zvm_xcat_network"] = "admin" | ||
| end | ||
|
|
||
| return a, d | ||
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta["zvm"].key? "zvm_xcat_network" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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) |
||
| a["zvm"].delete("zvm_xcat_network") | ||
| end | ||
|
|
||
| return a, d | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| def upgrade(ta, td, a, d) | ||
| unless a.key? "cross_az_attach" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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) |
||
| a["cross_az_attach"] = ta["cross_az_attach"] | ||
| end | ||
| return a, d | ||
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta.key? "cross_az_attach" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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) |
||
| a.delete("cross_az_attach") | ||
| end | ||
| return a, d | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| def upgrade(ta, td, a, d) | ||
| unless a.key? "migration" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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) |
||
| a["migration"] = ta["migration"] | ||
| end | ||
| return a, d | ||
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta.key? "migration" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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) |
||
| a.delete("migration") | ||
| end | ||
| return a, d | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| def upgrade(ta, td, a, d) | ||
| unless a.key? "image_cache_manager_interval" | ||
| a["image_cache_manager_interval"] = ta["image_cache_manager_interval"] | ||
| end | ||
| return a, d | ||
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta.key? "image_cache_manager_interval" | ||
| a.delete("image_cache_manager_interval") | ||
| end | ||
| return a, d | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)