commit d3213fb1fe00ae649ba198577b7e8b37180d3753
Author: Christian Schwede <email address hidden>
Date: Tue Mar 31 08:51:18 2015 +0000
Check if device name is valid when adding to the ring
Currently device names can be empty or start and/or end with spaces.
This can create unexpected results, for example these three commands
are all valid:
Reviewed: https:/ /review. openstack. org/169231 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=d3213fb1fe0 0ae649ba198577b 7e8b37180d3753
Committed: https:/
Submitter: Jenkins
Branch: master
commit d3213fb1fe00ae6 49ba198577b7e8b 37180d3753
Author: Christian Schwede <email address hidden>
Date: Tue Mar 31 08:51:18 2015 +0000
Check if device name is valid when adding to the ring
Currently device names can be empty or start and/or end with spaces.
This can create unexpected results, for example these three commands
are all valid:
swift- ring-builder account.builder add "r1z1-127. 0.0.1:6000/ " 1 ring-builder account.builder add "r1z1-127. 0.0.1:6000/ sda " 1 ring-builder account.builder add "r1z1-127. 0.0.1:6000/ meta" 1
swift-
swift-
This patch validates device names and prevents empty names or names
starting and/or ending with spaces.
Also fixed the test "test_warn_at_risk" - the test passed if the
exception was not raised.
Closes-Bug: 1438579
Change-Id: I811b0eae7db503 279e6429d985275 bbab8b29c9f