Skip to content

Commit 1c74570

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Change to plural form of object in multi delete error message in networkv2"
2 parents 52cb503 + 5e06d6a commit 1c74570

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

openstackclient/network/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def take_action(self, parsed_args):
111111

112112
if ret:
113113
total = len(resources)
114-
msg = _("%(num)s of %(total)s %(resource)s failed to delete.") % {
114+
msg = _("%(num)s of %(total)s %(resource)ss failed to delete.") % {
115115
"num": ret,
116116
"total": total,
117117
"resource": self.resource,

openstackclient/tests/network/v2/test_floating_ip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def test_multi_floating_ips_delete_with_exception(self):
211211
self.cmd.take_action(parsed_args)
212212
self.fail('CommandError should be raised.')
213213
except exceptions.CommandError as e:
214-
self.assertEqual('1 of 2 floating_ip failed to delete.', str(e))
214+
self.assertEqual('1 of 2 floating_ips failed to delete.', str(e))
215215

216216
self.network.find_ip.assert_any_call(
217217
self.floating_ips[0].id, ignore_missing=False)
@@ -462,7 +462,7 @@ def test_multi_floating_ips_delete_with_exception(self):
462462
self.cmd.take_action(parsed_args)
463463
self.fail('CommandError should be raised.')
464464
except exceptions.CommandError as e:
465-
self.assertEqual('1 of 2 floating_ip failed to delete.', str(e))
465+
self.assertEqual('1 of 2 floating_ips failed to delete.', str(e))
466466

467467
self.compute.floating_ips.get.assert_any_call(
468468
self.floating_ips[0].id)

openstackclient/tests/network/v2/test_security_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def test_multi_security_groups_delete_with_exception(self):
296296
self.cmd.take_action(parsed_args)
297297
self.fail('CommandError should be raised.')
298298
except exceptions.CommandError as e:
299-
self.assertEqual('1 of 2 group failed to delete.', str(e))
299+
self.assertEqual('1 of 2 groups failed to delete.', str(e))
300300

301301
self.network.find_security_group.assert_any_call(
302302
self._security_groups[0].name, ignore_missing=False)
@@ -384,7 +384,7 @@ def test_multi_security_groups_delete_with_exception(self):
384384
self.cmd.take_action(parsed_args)
385385
self.fail('CommandError should be raised.')
386386
except exceptions.CommandError as e:
387-
self.assertEqual('1 of 2 group failed to delete.', str(e))
387+
self.assertEqual('1 of 2 groups failed to delete.', str(e))
388388

389389
self.compute.security_groups.get.assert_any_call(
390390
self._security_groups[0].id)

openstackclient/tests/network/v2/test_security_group_rule.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ def test_multi_security_group_rules_delete_with_exception(self):
739739
self.cmd.take_action(parsed_args)
740740
self.fail('CommandError should be raised.')
741741
except exceptions.CommandError as e:
742-
self.assertEqual('1 of 2 rule failed to delete.', str(e))
742+
self.assertEqual('1 of 2 rules failed to delete.', str(e))
743743

744744
self.network.find_security_group_rule.assert_any_call(
745745
self._security_group_rules[0].id, ignore_missing=False)
@@ -819,7 +819,7 @@ def test_multi_security_group_rules_delete_with_exception(self):
819819
self.cmd.take_action(parsed_args)
820820
self.fail('CommandError should be raised.')
821821
except exceptions.CommandError as e:
822-
self.assertEqual('1 of 2 rule failed to delete.', str(e))
822+
self.assertEqual('1 of 2 rules failed to delete.', str(e))
823823

824824
self.compute.security_group_rules.delete.assert_any_call(
825825
self._security_group_rules[0].id)

0 commit comments

Comments
 (0)