# 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
            if is_nested:
                try:
                    nested_resources = self.heat_client.resources.list(
                        r.physical_resource_id)
                    nested_appended = self._append_failed_resources(
                        failures, nested_resources, next_resource_path)
                except exc.HTTPNotFound:
                    # there is a failed resource but no stack
                    pass
            if not nested_appended:
                failures['.'.join(next_resource_path)] = r
            appended = True
        return appended

    def _build_software_deployments(self, resources):
        """Build a dict of software deployments from the supplied resources.

        The key is the deployment ID.
        """
        df = {}
        if not resources:
            return df
        for r in resources.values():
            if r.resource_type not in ('OS::Heat::StructuredDeployment',
                                       'OS::Heat::SoftwareDeployment'):
                continue
            try:
                sd = self.heat_client.software_deployments.get(
                    deployment_id=r.physical_resource_id)
                df[r.physical_resource_id] = sd

# 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

            if is_nested:
                try:
                    nested_resources = self.heat_client.resources.list(
                        r.physical_resource_id)
                    nested_appended = self._append_failed_resources(
                        failures, nested_resources, next_resource_path)
                except exc.HTTPNotFound:
                    # there is a failed resource but no stack
                    pass
            if not nested_appended:
                failures['.'.join(next_resource_path)] = r
            appended = True
        return appended

    def _build_software_deployments(self, resources):
        """Build a dict of software deployments from the supplied resources.

        The key is the deployment ID.
        """
        df = {}
        if not resources:
            return df
        for r in resources.values():
            if r.resource_type not in ('OS::Heat::StructuredDeployment',
                                       'OS::Heat::SoftwareDeployment'):
                continue
            try:
                sd = self.heat_client.software_deployments.get(
                    deployment_id=r.physical_resource_id)
                df[r.physical_resource_id] = sd

            except exc.HTTPNotFound: