Skip to content

Conversation

@matelakat
Copy link

This change picks only the added databag items. This way the data bag
migrations will not cause an issue if people want to update the package
from released 3.0 to the SAP version.

This change picks only the added databag items. This way the data bag
migrations will not cause an issue if people want to update the package
from released 3.0 to the SAP version.
end

def downgrade(ta, td, a, d)
unless ta.key? "migration"

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)

@@ -0,0 +1,13 @@
def upgrade(ta, td, a, d)
unless a.key? "migration"

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)

end

def downgrade(ta, td, a, d)
unless ta.key? "cross_az_attach"

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)

@@ -0,0 +1,13 @@
def upgrade(ta, td, a, d)
unless a.key? "cross_az_attach"

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)

end

def downgrade(ta, td, a, d)
unless ta["zvm"].key? "zvm_xcat_network"

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)

@@ -0,0 +1,15 @@
def upgrade(ta, td, a, d)
unless a["zvm"].key? "zvm_xcat_network"

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)

end

def downgrade(ta, td, a, d)
if a.key?("ovs")

Choose a reason for hiding this comment

The 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)

end

def downgrade(ta, td, a, d)
unless ta.key? "use_multipath"

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)

@@ -0,0 +1,13 @@
def upgrade(ta, td, a, d)
unless a.key? "use_multipath"

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)

We had multiple 55 migrations in the code. As a fix the newer 55
migration 055_add_tunnel_csum has been merged to 56, so it will be
executed.
a.delete("rpc_workers")

# From 055_add_tunnel_csum
if a.key?("ovs")

Choose a reason for hiding this comment

The 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"] ||= {}
a["ovs"]["tunnel_csum"] = ta["ovs"]["tunnel_csum"]


Choose a reason for hiding this comment

The 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants