# Path: heatclient/_i18n.py
# def get_available_languages():
# def enable_lazy():
# 
# 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 collections
from osc_lib.command import command
from heatclient._i18n import _
from heatclient.common import format_utils
from heatclient import exc
#   WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#   License for the specific language governing permissions and limitations
#   under the License.
#





class ListStackFailures(command.Command):
    """Show information about failed stack resources."""

    def take_action(self, parsed_args):
        self.heat_client = self.app.client_manager.orchestration
        failures = self._build_failed_resources(parsed_args.stack)
        deployment_failures = self._build_software_deployments(failures)
        self._print_failures(failures, deployment_failures,
                             long=parsed_args.long)

    def get_parser(self, prog_name):
        parser = super(ListStackFailures, self).get_parser(prog_name)
        parser.add_argument(
            'stack',
            metavar='<stack>',
            help=_('Stack to display (name or ID)'),
        )
        parser.add_argument(
            '--long',
            action='store_true',
            default=False,

# Path: heatclient/_i18n.py
# def get_available_languages():
# def enable_lazy():
# 
# 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/stack_failures.py
import collections
from osc_lib.command import command
from heatclient._i18n import _
from heatclient.common import format_utils
from heatclient import exc

#   WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#   License for the specific language governing permissions and limitations
#   under the License.
#





class ListStackFailures(command.Command):
    """Show information about failed stack resources."""

    def take_action(self, parsed_args):
        self.heat_client = self.app.client_manager.orchestration
        failures = self._build_failed_resources(parsed_args.stack)
        deployment_failures = self._build_software_deployments(failures)
        self._print_failures(failures, deployment_failures,
                             long=parsed_args.long)

    def get_parser(self, prog_name):
        parser = super(ListStackFailures, self).get_parser(prog_name)
        parser.add_argument(
            'stack',
            metavar='<stack>',
            help=_('Stack to display (name or ID)'),
        )
        parser.add_argument(
            '--long',
            action='store_true',
            default=False,

            help=_('Show full deployment logs in output'),