# Path: zaqarclient/_i18n.py

# 
# Path: zaqarclient/queues/v1/cli.py
# def _get_client(obj, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
# class CreateQueue(command.ShowOne):
# class OldCreateQueue(CreateQueue):
# class DeleteQueue(command.Command):
# class OldDeleteQueue(DeleteQueue):
# class ListQueues(command.Lister):
# class OldListQueues(ListQueues):
# class CheckQueueExistence(command.ShowOne):
# class OldQueueExistence(CheckQueueExistence):
# class SetQueueMetadata(command.Command):
# class OldSetQueueMetadata(SetQueueMetadata):
# class GetQueueMetadata(command.ShowOne):
# class OldGetQueueMetadata(GetQueueMetadata):
# class GetQueueStats(command.ShowOne):
# class OldGetQueueStats(GetQueueStats):
# class CreatePool(command.ShowOne):
# class OldCreatePool(CreatePool):
# class ShowPool(command.ShowOne):
# class OldShowPool(ShowPool):
# class UpdatePool(command.ShowOne):
# class OldUpdatePool(UpdatePool):
# class DeletePool(command.Command):
# class OldDeletePool(DeletePool):
# class ListPools(command.Lister):
# class OldListPools(ListPools):
# class UpdateFlavor(command.ShowOne):
# class CreateFlavor(command.ShowOne):
# class DeleteFlavor(command.Command):
# class ShowFlavor(command.ShowOne):
# class ListFlavors(command.Lister):
# class CreateClaim(command.Lister):
# class OldCreateClaim(CreateClaim):
# class QueryClaim(command.Lister):
# class OldQueryClaim(QueryClaim):
# class RenewClaim(command.Lister):
# class OldRenewClaim(RenewClaim):
# class ReleaseClaim(command.Command):
# class OldReleaseClaim(ReleaseClaim):


import json
import os
from osc_lib.command import command
from osc_lib import utils
from oslo_log import log as logging
from zaqarclient._i18n import _
from zaqarclient.queues.v1 import cli
            "messages",
            type=json.loads,
            metavar="<messages>",
            help="Messages to be posted.")
        parser.add_argument(
            "--client-id",
            metavar="<client_id>",
            default=os.environ.get("OS_MESSAGE_CLIENT_ID"),
            help="A UUID for each client instance.")
        return parser

    def take_action(self, parsed_args):
        client = _get_client(self, parsed_args)

        if not parsed_args.client_id:
            raise AttributeError("<--client-id> option is missing and "
                                 "environment variable OS_MESSAGE_CLIENT_ID "
                                 "is not set. Please at least either pass in "
                                 "the client id or set the environment "
                                 "variable")
        else:
            client.client_uuid = parsed_args.client_id

        queue = client.queue(parsed_args.queue_name)
        queue.post(parsed_args.messages)


class OldPostMessages(PostMessages):
    """Post messages for a given queue"""


# Path: zaqarclient/_i18n.py

# 
# Path: zaqarclient/queues/v1/cli.py
# def _get_client(obj, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def take_action(self, parsed_args):
# class CreateQueue(command.ShowOne):
# class OldCreateQueue(CreateQueue):
# class DeleteQueue(command.Command):
# class OldDeleteQueue(DeleteQueue):
# class ListQueues(command.Lister):
# class OldListQueues(ListQueues):
# class CheckQueueExistence(command.ShowOne):
# class OldQueueExistence(CheckQueueExistence):
# class SetQueueMetadata(command.Command):
# class OldSetQueueMetadata(SetQueueMetadata):
# class GetQueueMetadata(command.ShowOne):
# class OldGetQueueMetadata(GetQueueMetadata):
# class GetQueueStats(command.ShowOne):
# class OldGetQueueStats(GetQueueStats):
# class CreatePool(command.ShowOne):
# class OldCreatePool(CreatePool):
# class ShowPool(command.ShowOne):
# class OldShowPool(ShowPool):
# class UpdatePool(command.ShowOne):
# class OldUpdatePool(UpdatePool):
# class DeletePool(command.Command):
# class OldDeletePool(DeletePool):
# class ListPools(command.Lister):
# class OldListPools(ListPools):
# class UpdateFlavor(command.ShowOne):
# class CreateFlavor(command.ShowOne):
# class DeleteFlavor(command.Command):
# class ShowFlavor(command.ShowOne):
# class ListFlavors(command.Lister):
# class CreateClaim(command.Lister):
# class OldCreateClaim(CreateClaim):
# class QueryClaim(command.Lister):
# class OldQueryClaim(QueryClaim):
# class RenewClaim(command.Lister):
# class OldRenewClaim(RenewClaim):
# class ReleaseClaim(command.Command):
# class OldReleaseClaim(ReleaseClaim):


# Path: zaqarclient/queues/v2/cli.py
import json
import os
from osc_lib.command import command
from osc_lib import utils
from oslo_log import log as logging
from zaqarclient._i18n import _
from zaqarclient.queues.v1 import cli

            "messages",
            type=json.loads,
            metavar="<messages>",
            help="Messages to be posted.")
        parser.add_argument(
            "--client-id",
            metavar="<client_id>",
            default=os.environ.get("OS_MESSAGE_CLIENT_ID"),
            help="A UUID for each client instance.")
        return parser

    def take_action(self, parsed_args):
        client = _get_client(self, parsed_args)

        if not parsed_args.client_id:
            raise AttributeError("<--client-id> option is missing and "
                                 "environment variable OS_MESSAGE_CLIENT_ID "
                                 "is not set. Please at least either pass in "
                                 "the client id or set the environment "
                                 "variable")
        else:
            client.client_uuid = parsed_args.client_id

        queue = client.queue(parsed_args.queue_name)
        queue.post(parsed_args.messages)


class OldPostMessages(PostMessages):
    """Post messages for a given queue"""


    _description = _("Post messages for a given queue")