Merge "Add translation markers for object commands"
This commit is contained in:
		@@ -18,6 +18,8 @@ from osc_lib.command import command
 | 
			
		||||
from osc_lib import utils
 | 
			
		||||
import six
 | 
			
		||||
 | 
			
		||||
from openstackclient.i18n import _
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class SetAccount(command.Command):
 | 
			
		||||
    """Set account properties"""
 | 
			
		||||
@@ -29,8 +31,8 @@ class SetAccount(command.Command):
 | 
			
		||||
            metavar="<key=value>",
 | 
			
		||||
            required=True,
 | 
			
		||||
            action=parseractions.KeyValueAction,
 | 
			
		||||
            help="Set a property on this account "
 | 
			
		||||
                 "(repeat option to set multiple properties)"
 | 
			
		||||
            help=_("Set a property on this account "
 | 
			
		||||
                   "(repeat option to set multiple properties)")
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -61,8 +63,8 @@ class UnsetAccount(command.Command):
 | 
			
		||||
            required=True,
 | 
			
		||||
            action='append',
 | 
			
		||||
            default=[],
 | 
			
		||||
            help='Property to remove from account '
 | 
			
		||||
                 '(repeat option to remove multiple properties)',
 | 
			
		||||
            help=_('Property to remove from account '
 | 
			
		||||
                   '(repeat option to remove multiple properties)'),
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,7 @@ class CreateContainer(command.Lister):
 | 
			
		||||
            'containers',
 | 
			
		||||
            metavar='<container-name>',
 | 
			
		||||
            nargs="+",
 | 
			
		||||
            help='New container name(s)',
 | 
			
		||||
            help=_('New container name(s)'),
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -71,13 +71,13 @@ class DeleteContainer(command.Command):
 | 
			
		||||
            '--recursive', '-r',
 | 
			
		||||
            action='store_true',
 | 
			
		||||
            default=False,
 | 
			
		||||
            help='Recursively delete objects and container',
 | 
			
		||||
            help=_('Recursively delete objects and container'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'containers',
 | 
			
		||||
            metavar='<container>',
 | 
			
		||||
            nargs="+",
 | 
			
		||||
            help='Container(s) to delete',
 | 
			
		||||
            help=_('Container(s) to delete'),
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -105,35 +105,35 @@ class ListContainer(command.Lister):
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "--prefix",
 | 
			
		||||
            metavar="<prefix>",
 | 
			
		||||
            help="Filter list using <prefix>",
 | 
			
		||||
            help=_("Filter list using <prefix>"),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "--marker",
 | 
			
		||||
            metavar="<marker>",
 | 
			
		||||
            help="Anchor for paging",
 | 
			
		||||
            help=_("Anchor for paging"),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "--end-marker",
 | 
			
		||||
            metavar="<end-marker>",
 | 
			
		||||
            help="End anchor for paging",
 | 
			
		||||
            help=_("End anchor for paging"),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "--limit",
 | 
			
		||||
            metavar="<limit>",
 | 
			
		||||
            type=int,
 | 
			
		||||
            help="Limit the number of containers returned",
 | 
			
		||||
            help=_("Limit the number of containers returned"),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            '--long',
 | 
			
		||||
            action='store_true',
 | 
			
		||||
            default=False,
 | 
			
		||||
            help='List additional fields in output',
 | 
			
		||||
            help=_('List additional fields in output'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            '--all',
 | 
			
		||||
            action='store_true',
 | 
			
		||||
            default=False,
 | 
			
		||||
            help='List all containers (default is 10000)',
 | 
			
		||||
            help=_('List all containers (default is 10000)'),
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -175,7 +175,7 @@ class SaveContainer(command.Command):
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'container',
 | 
			
		||||
            metavar='<container>',
 | 
			
		||||
            help='Container to save',
 | 
			
		||||
            help=_('Container to save'),
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -193,15 +193,15 @@ class SetContainer(command.Command):
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'container',
 | 
			
		||||
            metavar='<container>',
 | 
			
		||||
            help='Container to modify',
 | 
			
		||||
            help=_('Container to modify'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "--property",
 | 
			
		||||
            metavar="<key=value>",
 | 
			
		||||
            required=True,
 | 
			
		||||
            action=parseractions.KeyValueAction,
 | 
			
		||||
            help="Set a property on this container "
 | 
			
		||||
                 "(repeat option to set multiple properties)"
 | 
			
		||||
            help=_("Set a property on this container "
 | 
			
		||||
                   "(repeat option to set multiple properties)")
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -220,7 +220,7 @@ class ShowContainer(command.ShowOne):
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'container',
 | 
			
		||||
            metavar='<container>',
 | 
			
		||||
            help='Container to display',
 | 
			
		||||
            help=_('Container to display'),
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -243,7 +243,7 @@ class UnsetContainer(command.Command):
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'container',
 | 
			
		||||
            metavar='<container>',
 | 
			
		||||
            help='Container to modify',
 | 
			
		||||
            help=_('Container to modify'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            '--property',
 | 
			
		||||
@@ -251,8 +251,8 @@ class UnsetContainer(command.Command):
 | 
			
		||||
            required=True,
 | 
			
		||||
            action='append',
 | 
			
		||||
            default=[],
 | 
			
		||||
            help='Property to remove from container '
 | 
			
		||||
                 '(repeat option to remove multiple properties)',
 | 
			
		||||
            help=_('Property to remove from container '
 | 
			
		||||
                   '(repeat option to remove multiple properties)'),
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -37,19 +37,19 @@ class CreateObject(command.Lister):
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'container',
 | 
			
		||||
            metavar='<container>',
 | 
			
		||||
            help='Container for new object',
 | 
			
		||||
            help=_('Container for new object'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'objects',
 | 
			
		||||
            metavar='<filename>',
 | 
			
		||||
            nargs="+",
 | 
			
		||||
            help='Local filename(s) to upload',
 | 
			
		||||
            help=_('Local filename(s) to upload'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            '--name',
 | 
			
		||||
            metavar='<name>',
 | 
			
		||||
            help='Upload a file and rename it. '
 | 
			
		||||
                 'Can only be used when uploading a single object'
 | 
			
		||||
            help=_('Upload a file and rename it. '
 | 
			
		||||
                   'Can only be used when uploading a single object')
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -88,13 +88,13 @@ class DeleteObject(command.Command):
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'container',
 | 
			
		||||
            metavar='<container>',
 | 
			
		||||
            help='Delete object(s) from <container>',
 | 
			
		||||
            help=_('Delete object(s) from <container>'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'objects',
 | 
			
		||||
            metavar='<object>',
 | 
			
		||||
            nargs="+",
 | 
			
		||||
            help='Object(s) to delete',
 | 
			
		||||
            help=_('Object(s) to delete'),
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -115,45 +115,45 @@ class ListObject(command.Lister):
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "container",
 | 
			
		||||
            metavar="<container>",
 | 
			
		||||
            help="Container to list",
 | 
			
		||||
            help=_("Container to list"),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "--prefix",
 | 
			
		||||
            metavar="<prefix>",
 | 
			
		||||
            help="Filter list using <prefix>",
 | 
			
		||||
            help=_("Filter list using <prefix>"),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "--delimiter",
 | 
			
		||||
            metavar="<delimiter>",
 | 
			
		||||
            help="Roll up items with <delimiter>",
 | 
			
		||||
            help=_("Roll up items with <delimiter>"),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "--marker",
 | 
			
		||||
            metavar="<marker>",
 | 
			
		||||
            help="Anchor for paging",
 | 
			
		||||
            help=_("Anchor for paging"),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "--end-marker",
 | 
			
		||||
            metavar="<end-marker>",
 | 
			
		||||
            help="End anchor for paging",
 | 
			
		||||
            help=_("End anchor for paging"),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "--limit",
 | 
			
		||||
            metavar="<limit>",
 | 
			
		||||
            type=int,
 | 
			
		||||
            help="Limit the number of objects returned",
 | 
			
		||||
            help=_("Limit the number of objects returned"),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            '--long',
 | 
			
		||||
            action='store_true',
 | 
			
		||||
            default=False,
 | 
			
		||||
            help='List additional fields in output',
 | 
			
		||||
            help=_('List additional fields in output'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            '--all',
 | 
			
		||||
            action='store_true',
 | 
			
		||||
            default=False,
 | 
			
		||||
            help='List all objects in container (default is 10000)',
 | 
			
		||||
            help=_('List all objects in container (default is 10000)'),
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -204,17 +204,17 @@ class SaveObject(command.Command):
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "--file",
 | 
			
		||||
            metavar="<filename>",
 | 
			
		||||
            help="Destination filename (defaults to object name)",
 | 
			
		||||
            help=_("Destination filename (defaults to object name)"),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'container',
 | 
			
		||||
            metavar='<container>',
 | 
			
		||||
            help='Download <object> from <container>',
 | 
			
		||||
            help=_('Download <object> from <container>'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "object",
 | 
			
		||||
            metavar="<object>",
 | 
			
		||||
            help="Object to save",
 | 
			
		||||
            help=_("Object to save"),
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -234,20 +234,20 @@ class SetObject(command.Command):
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'container',
 | 
			
		||||
            metavar='<container>',
 | 
			
		||||
            help='Modify <object> from <container>',
 | 
			
		||||
            help=_('Modify <object> from <container>'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'object',
 | 
			
		||||
            metavar='<object>',
 | 
			
		||||
            help='Object to modify',
 | 
			
		||||
            help=_('Object to modify'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            "--property",
 | 
			
		||||
            metavar="<key=value>",
 | 
			
		||||
            required=True,
 | 
			
		||||
            action=parseractions.KeyValueAction,
 | 
			
		||||
            help="Set a property on this object "
 | 
			
		||||
                 "(repeat option to set multiple properties)"
 | 
			
		||||
            help=_("Set a property on this object "
 | 
			
		||||
                   "(repeat option to set multiple properties)")
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -267,12 +267,12 @@ class ShowObject(command.ShowOne):
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'container',
 | 
			
		||||
            metavar='<container>',
 | 
			
		||||
            help='Display <object> from <container>',
 | 
			
		||||
            help=_('Display <object> from <container>'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'object',
 | 
			
		||||
            metavar='<object>',
 | 
			
		||||
            help='Object to display',
 | 
			
		||||
            help=_('Object to display'),
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
@@ -296,12 +296,12 @@ class UnsetObject(command.Command):
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'container',
 | 
			
		||||
            metavar='<container>',
 | 
			
		||||
            help='Modify <object> from <container>',
 | 
			
		||||
            help=_('Modify <object> from <container>'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            'object',
 | 
			
		||||
            metavar='<object>',
 | 
			
		||||
            help='Object to modify',
 | 
			
		||||
            help=_('Object to modify'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            '--property',
 | 
			
		||||
@@ -309,8 +309,8 @@ class UnsetObject(command.Command):
 | 
			
		||||
            required=True,
 | 
			
		||||
            action='append',
 | 
			
		||||
            default=[],
 | 
			
		||||
            help='Property to remove from object '
 | 
			
		||||
                 '(repeat option to remove multiple properties)',
 | 
			
		||||
            help=_('Property to remove from object '
 | 
			
		||||
                   '(repeat option to remove multiple properties)'),
 | 
			
		||||
        )
 | 
			
		||||
        return parser
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user