# Path: heatclient/common/format_utils.py
# class RawFormat(command.ShowOne):
# class JsonFormat(RawFormat):
# class YamlFormat(RawFormat):
# class ShellFormat(RawFormat):
# class ValueFormat(RawFormat):
#     def produce_output(self, parsed_args, column_names, data):
#     def formatter_default(self):
#     def formatter_default(self):
#     def formatter_default(self):
#     def formatter_default(self):
# def indent_and_truncate(txt, spaces=0, truncate=False, truncate_limit=10,
#                         truncate_prefix=None, truncate_postfix=None):
# def print_software_deployment_output(data, name, out=sys.stdout, long=False):
# 
# Path: heatclient/exc.py
# class BaseException(Exception):
# class CommandError(BaseException):
# class InvalidEndpoint(BaseException):
# class CommunicationError(BaseException):
# class HTTPException(BaseException):
# class HTTPMultipleChoices(HTTPException):
# class BadRequest(HTTPException):
# class HTTPBadRequest(BadRequest):
# class Unauthorized(HTTPException):
# class HTTPUnauthorized(Unauthorized):
# class Forbidden(HTTPException):
# class HTTPForbidden(Forbidden):
# class NotFound(HTTPException):
# class HTTPNotFound(NotFound):
# class NoUniqueMatch(HTTPException):
# class HTTPMethodNotAllowed(HTTPException):
# class Conflict(HTTPException):
# class HTTPConflict(Conflict):
# class OverLimit(HTTPException):
# class HTTPOverLimit(OverLimit):
# class HTTPUnsupported(HTTPException):
# class HTTPInternalServerError(HTTPException):
# class HTTPNotImplemented(HTTPException):
# class HTTPBadGateway(HTTPException):
# class ServiceUnavailable(HTTPException):
# class HTTPServiceUnavailable(ServiceUnavailable):
# class NoTokenLookupException(Exception):
# class EndpointNotFound(Exception):
# class StackFailure(Exception):
#     def __init__(self, message=None):
#     def __str__(self):
#     def __init__(self, message=None, code=None):
#     def __str__(self):
#     def __str__(self):
# def from_response(response):


import logging
import sys
import six
from osc_lib.command import command
from osc_lib import exceptions as exc
from osc_lib.i18n import _
from osc_lib import utils
from heatclient.common import format_utils
from heatclient import exc as heat_exc
                                   {'stack': parsed_args.stack,
                                    'snapshot': parsed_args.snapshot})


class CreateSnapshot(command.ShowOne):
    """Create stack snapshot."""

    log = logging.getLogger(__name__ + ".CreateSnapshot")

    def get_parser(self, prog_name):
        parser = super(CreateSnapshot, self).get_parser(prog_name)
        parser.add_argument(
            'stack',
            metavar='<stack>',
            help=_('Name or ID of stack')
        )
        parser.add_argument(
            '--name',
            metavar='<name>',
            help=_('Name of snapshot')
        )
        return parser

    def take_action(self, parsed_args):
        self.log.debug('take_action(%s)', parsed_args)
        heat_client = self.app.client_manager.orchestration

        try:
            data = heat_client.stacks.snapshot(parsed_args.stack,
                                               parsed_args.name)

# Path: heatclient/common/format_utils.py
# class RawFormat(command.ShowOne):
# class JsonFormat(RawFormat):
# class YamlFormat(RawFormat):
# class ShellFormat(RawFormat):
# class ValueFormat(RawFormat):
#     def produce_output(self, parsed_args, column_names, data):
#     def formatter_default(self):
#     def formatter_default(self):
#     def formatter_default(self):
#     def formatter_default(self):
# def indent_and_truncate(txt, spaces=0, truncate=False, truncate_limit=10,
#                         truncate_prefix=None, truncate_postfix=None):
# def print_software_deployment_output(data, name, out=sys.stdout, long=False):
# 
# Path: heatclient/exc.py
# class BaseException(Exception):
# class CommandError(BaseException):
# class InvalidEndpoint(BaseException):
# class CommunicationError(BaseException):
# class HTTPException(BaseException):
# class HTTPMultipleChoices(HTTPException):
# class BadRequest(HTTPException):
# class HTTPBadRequest(BadRequest):
# class Unauthorized(HTTPException):
# class HTTPUnauthorized(Unauthorized):
# class Forbidden(HTTPException):
# class HTTPForbidden(Forbidden):
# class NotFound(HTTPException):
# class HTTPNotFound(NotFound):
# class NoUniqueMatch(HTTPException):
# class HTTPMethodNotAllowed(HTTPException):
# class Conflict(HTTPException):
# class HTTPConflict(Conflict):
# class OverLimit(HTTPException):
# class HTTPOverLimit(OverLimit):
# class HTTPUnsupported(HTTPException):
# class HTTPInternalServerError(HTTPException):
# class HTTPNotImplemented(HTTPException):
# class HTTPBadGateway(HTTPException):
# class ServiceUnavailable(HTTPException):
# class HTTPServiceUnavailable(ServiceUnavailable):
# class NoTokenLookupException(Exception):
# class EndpointNotFound(Exception):
# class StackFailure(Exception):
#     def __init__(self, message=None):
#     def __str__(self):
#     def __init__(self, message=None, code=None):
#     def __str__(self):
#     def __str__(self):
# def from_response(response):


# Path: heatclient/osc/v1/snapshot.py
import logging
import sys
import six
from osc_lib.command import command
from osc_lib import exceptions as exc
from osc_lib.i18n import _
from osc_lib import utils
from heatclient.common import format_utils
from heatclient import exc as heat_exc

                                   {'stack': parsed_args.stack,
                                    'snapshot': parsed_args.snapshot})


class CreateSnapshot(command.ShowOne):
    """Create stack snapshot."""

    log = logging.getLogger(__name__ + ".CreateSnapshot")

    def get_parser(self, prog_name):
        parser = super(CreateSnapshot, self).get_parser(prog_name)
        parser.add_argument(
            'stack',
            metavar='<stack>',
            help=_('Name or ID of stack')
        )
        parser.add_argument(
            '--name',
            metavar='<name>',
            help=_('Name of snapshot')
        )
        return parser

    def take_action(self, parsed_args):
        self.log.debug('take_action(%s)', parsed_args)
        heat_client = self.app.client_manager.orchestration

        try:
            data = heat_client.stacks.snapshot(parsed_args.stack,
                                               parsed_args.name)

        except heat_exc.HTTPNotFound: