Change to plural form of object in multi delete error message in networkv2
Usually, the error message of multi delete is: "'result' of 'total' 'objects' failed to delete" the objects is a plural form. To match the other multi delete error messages in OSC, change the object in delete error message in networkv2 to a plural form. Just add a 's' in the message. Change-Id: I17e0735d025bb61014db709d2639813565015b3d
This commit is contained in:
		| @@ -111,7 +111,7 @@ class NetworkAndComputeDelete(NetworkAndComputeCommand): | ||||
|  | ||||
|         if ret: | ||||
|             total = len(resources) | ||||
|             msg = _("%(num)s of %(total)s %(resource)s failed to delete.") % { | ||||
|             msg = _("%(num)s of %(total)s %(resource)ss failed to delete.") % { | ||||
|                 "num": ret, | ||||
|                 "total": total, | ||||
|                 "resource": self.resource, | ||||
|   | ||||
| @@ -211,7 +211,7 @@ class TestDeleteFloatingIPNetwork(TestFloatingIPNetwork): | ||||
|             self.cmd.take_action(parsed_args) | ||||
|             self.fail('CommandError should be raised.') | ||||
|         except exceptions.CommandError as e: | ||||
|             self.assertEqual('1 of 2 floating_ip failed to delete.', str(e)) | ||||
|             self.assertEqual('1 of 2 floating_ips failed to delete.', str(e)) | ||||
|  | ||||
|         self.network.find_ip.assert_any_call( | ||||
|             self.floating_ips[0].id, ignore_missing=False) | ||||
| @@ -462,7 +462,7 @@ class TestDeleteFloatingIPCompute(TestFloatingIPCompute): | ||||
|             self.cmd.take_action(parsed_args) | ||||
|             self.fail('CommandError should be raised.') | ||||
|         except exceptions.CommandError as e: | ||||
|             self.assertEqual('1 of 2 floating_ip failed to delete.', str(e)) | ||||
|             self.assertEqual('1 of 2 floating_ips failed to delete.', str(e)) | ||||
|  | ||||
|         self.compute.floating_ips.get.assert_any_call( | ||||
|             self.floating_ips[0].id) | ||||
|   | ||||
| @@ -296,7 +296,7 @@ class TestDeleteSecurityGroupNetwork(TestSecurityGroupNetwork): | ||||
|             self.cmd.take_action(parsed_args) | ||||
|             self.fail('CommandError should be raised.') | ||||
|         except exceptions.CommandError as e: | ||||
|             self.assertEqual('1 of 2 group failed to delete.', str(e)) | ||||
|             self.assertEqual('1 of 2 groups failed to delete.', str(e)) | ||||
|  | ||||
|         self.network.find_security_group.assert_any_call( | ||||
|             self._security_groups[0].name, ignore_missing=False) | ||||
| @@ -384,7 +384,7 @@ class TestDeleteSecurityGroupCompute(TestSecurityGroupCompute): | ||||
|             self.cmd.take_action(parsed_args) | ||||
|             self.fail('CommandError should be raised.') | ||||
|         except exceptions.CommandError as e: | ||||
|             self.assertEqual('1 of 2 group failed to delete.', str(e)) | ||||
|             self.assertEqual('1 of 2 groups failed to delete.', str(e)) | ||||
|  | ||||
|         self.compute.security_groups.get.assert_any_call( | ||||
|             self._security_groups[0].id) | ||||
|   | ||||
| @@ -739,7 +739,7 @@ class TestDeleteSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork): | ||||
|             self.cmd.take_action(parsed_args) | ||||
|             self.fail('CommandError should be raised.') | ||||
|         except exceptions.CommandError as e: | ||||
|             self.assertEqual('1 of 2 rule failed to delete.', str(e)) | ||||
|             self.assertEqual('1 of 2 rules failed to delete.', str(e)) | ||||
|  | ||||
|         self.network.find_security_group_rule.assert_any_call( | ||||
|             self._security_group_rules[0].id, ignore_missing=False) | ||||
| @@ -819,7 +819,7 @@ class TestDeleteSecurityGroupRuleCompute(TestSecurityGroupRuleCompute): | ||||
|             self.cmd.take_action(parsed_args) | ||||
|             self.fail('CommandError should be raised.') | ||||
|         except exceptions.CommandError as e: | ||||
|             self.assertEqual('1 of 2 rule failed to delete.', str(e)) | ||||
|             self.assertEqual('1 of 2 rules failed to delete.', str(e)) | ||||
|  | ||||
|         self.compute.security_group_rules.delete.assert_any_call( | ||||
|             self._security_group_rules[0].id) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Huanxuan Ao
					Huanxuan Ao