Fixed removing multiple devices
Added a confirmation flag for swift-ring-builder command when multiple devices are found to be removed. func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/656 Closes-Bug: #1937289 Change-Id: Ieeb326e7d9af21a77954e95e909d6fcf20a3092c
This commit is contained in:
parent
13fef16326
commit
d92cf5756e
@ -641,7 +641,7 @@ def remove_from_ring(ring_path, search_value):
|
||||
:type search_value: str
|
||||
:raises: SwiftProxyCharmException
|
||||
"""
|
||||
cmd = ['swift-ring-builder', ring_path, 'remove', search_value]
|
||||
cmd = ['swift-ring-builder', ring_path, 'remove', search_value, '-y']
|
||||
try:
|
||||
subprocess.check_call(cmd)
|
||||
except subprocess.CalledProcessError as e:
|
||||
|
@ -40,6 +40,7 @@ tests:
|
||||
- zaza.openstack.charm_tests.swift.tests.S3APITest
|
||||
- swift_gr_region1:
|
||||
- zaza.openstack.charm_tests.swift.tests.SwiftGlobalReplicationTests
|
||||
- zaza.openstack.charm_tests.swift.tests.SwiftProxyMultiZoneTests
|
||||
|
||||
tests_options:
|
||||
force_deploy:
|
||||
|
@ -562,7 +562,8 @@ class SwiftUtilsTestCase(unittest.TestCase):
|
||||
check_call.assert_called_once_with(['swift-ring-builder',
|
||||
'/etc/swift/account.builder',
|
||||
'remove',
|
||||
'd1'])
|
||||
'd1',
|
||||
'-y'])
|
||||
|
||||
@mock.patch.object(subprocess, 'check_call')
|
||||
def test_set_weight_in_ring(self, check_call):
|
||||
|
Loading…
Reference in New Issue
Block a user