diff --git a/bin/swift-get-nodes b/bin/swift-get-nodes index 435cf0bda6..b8d068bc37 100755 --- a/bin/swift-get-nodes +++ b/bin/swift-get-nodes @@ -26,7 +26,7 @@ if __name__ == '__main__': usage = ''' Shows the nodes responsible for the item specified. - Usage: %prog [-a] [] [] + Usage: %prog [-a] [ []] Or: %prog [-a] -p partition Or: %prog [-a] -P policy_name Note: account, container, object can also be a single arg separated by / diff --git a/doc/manpages/swift-get-nodes.1 b/doc/manpages/swift-get-nodes.1 index e268ec2690..608a18488d 100644 --- a/doc/manpages/swift-get-nodes.1 +++ b/doc/manpages/swift-get-nodes.1 @@ -25,7 +25,7 @@ .SH SYNOPSIS .LP .B swift-get-nodes -\ [] [] +\ [ []] .SH DESCRIPTION .PP diff --git a/swift/cli/info.py b/swift/cli/info.py index 2f140afee8..ab6d32e490 100644 --- a/swift/cli/info.py +++ b/swift/cli/info.py @@ -382,7 +382,7 @@ def print_obj(datafile, check_etag=True, swift_dir='/etc/swift', if (policy_index is not None and policy_index_for_name is not None and policy_index != policy_index_for_name): - print 'Attention: Ring does not match policy!' + print 'Warning: Ring does not match policy!' print 'Double check your policy name!' if not ring and policy_index_for_name: ring = POLICIES.get_object_ring(policy_index_for_name, @@ -472,9 +472,9 @@ def print_item_locations(ring, ring_name=None, account=None, container=None, policy = POLICIES.get_by_name(policy_name) if policy: if ring_name != policy.ring_name: - print 'Attention! mismatch between ring and policy detected!' + print 'Warning: mismatch between ring and policy name!' else: - print 'Attention! Policy %s is not valid' % policy_name + print 'Warning: Policy %s is not valid' % policy_name policy_index = None if ring is None and (obj or part): @@ -518,14 +518,16 @@ def print_item_locations(ring, ring_name=None, account=None, container=None, ring = Ring(swift_dir, ring_name='container') else: if ring_name != 'container': - print 'Attention! mismatch between ring and item detected!' + print 'Warning: account/container specified ' + \ + 'but ring not named "container"' if account and not container and not obj: loc = 'accounts' if not any([ring, ring_name]): ring = Ring(swift_dir, ring_name='account') else: if ring_name != 'account': - print 'Attention! mismatch between ring and item detected!' + print 'Warning: account specified ' + \ + 'but ring not named "account"' print '\nAccount \t%s' % account print 'Container\t%s' % container diff --git a/test/unit/cli/test_info.py b/test/unit/cli/test_info.py index 4e702abd5f..c9452ae5ac 100644 --- a/test/unit/cli/test_info.py +++ b/test/unit/cli/test_info.py @@ -411,7 +411,7 @@ class TestPrintObjFullMeta(TestCliInfoBase): out = StringIO() with mock.patch('sys.stdout', out): print_obj(self.datafile, policy_name='two', swift_dir=self.testdir) - ring_alert_msg = 'Attention: Ring does not match policy' + ring_alert_msg = 'Warning: Ring does not match policy!' self.assertTrue(ring_alert_msg in out.getvalue()) def test_valid_etag(self):