# Path: vmcatcher/output_json.py
# class output_driver_json(output_driver_display_metadata, output_driver_lister_json,output_driver_base):
#     def __init__(self):
#         output_driver_base.__init__(self)
#         output_driver_lister_json.__init__(self)
#         output_driver_display_metadata.__init__(self)
#         self.log = logging.getLogger("output_driver_json")
# 
# Path: vmcatcher/output_lines.py
# class output_driver_lines(output_driver_display_metadata, output_driver_lister,output_driver_base):
#     def __init__(self):
#         output_driver_base.__init__(self)
#         output_driver_lister.__init__(self)
#         output_driver_display_metadata.__init__(self)
#         self.log = logging.getLogger("output_driver_lines")
# 
# Path: vmcatcher/output_smime.py
# class output_driver_smime(output_driver_display_message,output_driver_lister,output_driver_base):
# 
#     def __init__(self):
#         output_driver_base.__init__(self)
#         output_driver_lister.__init__(self)
#         output_driver_display_message.__init__(self)
#         self.log = logging.getLogger("output_driver_smime")
# 
#     def info(self, *args, **kwargs):
#         found = set(kwargs.keys())
#         if "ImageListInstance" in found:
#             argImageInstance = kwargs.get('ImageListInstance', None)
#             self.fpOutput.write (argImageInstance.data)
#             return True
#         return False
# 
#     def display_ImageListInstance(self,imagelist):
#         if imagelist == None:
#             self.log.error("Imagelist not yet available.")
#             return False
#         if imagelist.data == None:
#             self.log.error("Message not yet available.")
#             return False
#         self.fpOutput.write (imagelist.data)
#         return True
# 
# Path: vmcatcher/output_msg.py
# class output_driver_message(output_driver_display_message,output_driver_lister,output_driver_base):
#     def __init__(self):
#         output_driver_base.__init__(self)
#         output_driver_lister.__init__(self)
#         output_driver_display_message.__init__(self)
#         self.log = logging.getLogger("output_driver_message")
# 
#     def display_ImageListInstance(self,imagelist):
#         if imagelist.data == None:
#             self.log.warning("No imagelist found.")
#             return True
#         if self.x509anchor == None:
#             self.log.warning("No trust anchor found so can not decode.")
#             self.fpOutput.write (str(imagelist.data))
#             return True
#         smimeProcessor =  smimeX509validation(self.x509anchor)
#         try:
#             smimeProcessor.Process(str(imagelist.data))
#         except smimeX509ValidationError as expt:
#             self.log.error("Failed to validate text for '%s' produced error '%s'" % (imagelist, expt))
#             return False
#         if not smimeProcessor.verified:
#             self.log.error("Failed to validate text for '%s'" % (imagelist))
#             return False
#         self.fpOutput.write (smimeProcessor.InputDaraStringIO.getvalue())
#         return True
# 
# 
# 
#     def info(self, *args, **kwargs):
#         found = set(kwargs.keys())
#         if "ImageListInstance" in found:
#             argImageInstance = kwargs.get('ImageListInstance', None)
# 
#             return self.display_ImageListInstance(argImageInstance)
#         return False
# 
# 
# 
# 
# 
#     def display_subscription(self,subscription):
#         subauthq = self.saSession.query(model.ImageListInstance).\
#             filter(model.Subscription.id == subscription.id).\
#             filter(model.ImageInstance.fkIdentifier == model.ImageDefinition.id).\
#             filter(model.ImageInstance.fkimagelistinstance == model.ImageListInstance.id).\
#             filter(model.Subscription.imagelist_latest == model.ImageListInstance.id)
#         sub = subauthq.first()
#         if sub == None:
#             return True
#         return self.display_ImageListInstance(sub)


import logging
from vmcatcher.output_json import output_driver_json
from vmcatcher.output_lines import output_driver_lines
from vmcatcher.output_smime import output_driver_smime
from vmcatcher.output_msg import output_driver_message
        if not hasattr(self, '_uploaderImp'):
            error = outputFacadeInputError("Property 'format' has invalid value.")
            raise error
        return self._uploaderImp.list_vmcatcher_image()

    def display_subscription(self,item):
        self.log.debug("display_subscription")
        if not hasattr(self, '_uploaderImp'):
            error = outputFacadeInputError("Property 'format' has invalid value.")
            raise error
        return self._uploaderImp.display_subscription(item)

    def display_endorser(self,endorser):
        self.log.debug("display_endorser")
        if not hasattr(self, '_uploaderImp'):
            error = outputFacadeInputError("Property 'format' has invalid value.")
            raise error
        return self._uploaderImp.display_endorser(endorser)

    def display_imagedef(self,endorser):
        self.log.debug("display_imagedef")
        if not hasattr(self, '_uploaderImp'):
            error = outputFacadeInputError("Property 'format' has invalid value.")
            raise error
        return self._uploaderImp.display_imagedef(endorser)

    def info(self, *args, **kwargs):
        self.log.debug("info")
        #expected_keys = ["ImageDefinition","ImageInstance",""]
        #self.env = kwargs.get('env', {})

# Path: vmcatcher/output_json.py
# class output_driver_json(output_driver_display_metadata, output_driver_lister_json,output_driver_base):
#     def __init__(self):
#         output_driver_base.__init__(self)
#         output_driver_lister_json.__init__(self)
#         output_driver_display_metadata.__init__(self)
#         self.log = logging.getLogger("output_driver_json")
# 
# Path: vmcatcher/output_lines.py
# class output_driver_lines(output_driver_display_metadata, output_driver_lister,output_driver_base):
#     def __init__(self):
#         output_driver_base.__init__(self)
#         output_driver_lister.__init__(self)
#         output_driver_display_metadata.__init__(self)
#         self.log = logging.getLogger("output_driver_lines")
# 
# Path: vmcatcher/output_smime.py
# class output_driver_smime(output_driver_display_message,output_driver_lister,output_driver_base):
# 
#     def __init__(self):
#         output_driver_base.__init__(self)
#         output_driver_lister.__init__(self)
#         output_driver_display_message.__init__(self)
#         self.log = logging.getLogger("output_driver_smime")
# 
#     def info(self, *args, **kwargs):
#         found = set(kwargs.keys())
#         if "ImageListInstance" in found:
#             argImageInstance = kwargs.get('ImageListInstance', None)
#             self.fpOutput.write (argImageInstance.data)
#             return True
#         return False
# 
#     def display_ImageListInstance(self,imagelist):
#         if imagelist == None:
#             self.log.error("Imagelist not yet available.")
#             return False
#         if imagelist.data == None:
#             self.log.error("Message not yet available.")
#             return False
#         self.fpOutput.write (imagelist.data)
#         return True
# 
# Path: vmcatcher/output_msg.py
# class output_driver_message(output_driver_display_message,output_driver_lister,output_driver_base):
#     def __init__(self):
#         output_driver_base.__init__(self)
#         output_driver_lister.__init__(self)
#         output_driver_display_message.__init__(self)
#         self.log = logging.getLogger("output_driver_message")
# 
#     def display_ImageListInstance(self,imagelist):
#         if imagelist.data == None:
#             self.log.warning("No imagelist found.")
#             return True
#         if self.x509anchor == None:
#             self.log.warning("No trust anchor found so can not decode.")
#             self.fpOutput.write (str(imagelist.data))
#             return True
#         smimeProcessor =  smimeX509validation(self.x509anchor)
#         try:
#             smimeProcessor.Process(str(imagelist.data))
#         except smimeX509ValidationError as expt:
#             self.log.error("Failed to validate text for '%s' produced error '%s'" % (imagelist, expt))
#             return False
#         if not smimeProcessor.verified:
#             self.log.error("Failed to validate text for '%s'" % (imagelist))
#             return False
#         self.fpOutput.write (smimeProcessor.InputDaraStringIO.getvalue())
#         return True
# 
# 
# 
#     def info(self, *args, **kwargs):
#         found = set(kwargs.keys())
#         if "ImageListInstance" in found:
#             argImageInstance = kwargs.get('ImageListInstance', None)
# 
#             return self.display_ImageListInstance(argImageInstance)
#         return False
# 
# 
# 
# 
# 
#     def display_subscription(self,subscription):
#         subauthq = self.saSession.query(model.ImageListInstance).\
#             filter(model.Subscription.id == subscription.id).\
#             filter(model.ImageInstance.fkIdentifier == model.ImageDefinition.id).\
#             filter(model.ImageInstance.fkimagelistinstance == model.ImageListInstance.id).\
#             filter(model.Subscription.imagelist_latest == model.ImageListInstance.id)
#         sub = subauthq.first()
#         if sub == None:
#             return True
#         return self.display_ImageListInstance(sub)


# Path: vmcatcher/outputfacard.py
import logging
from vmcatcher.output_json import output_driver_json
from vmcatcher.output_lines import output_driver_lines
from vmcatcher.output_smime import output_driver_smime
from vmcatcher.output_msg import output_driver_message

        if not hasattr(self, '_uploaderImp'):
            error = outputFacadeInputError("Property 'format' has invalid value.")
            raise error
        return self._uploaderImp.list_vmcatcher_image()

    def display_subscription(self,item):
        self.log.debug("display_subscription")
        if not hasattr(self, '_uploaderImp'):
            error = outputFacadeInputError("Property 'format' has invalid value.")
            raise error
        return self._uploaderImp.display_subscription(item)

    def display_endorser(self,endorser):
        self.log.debug("display_endorser")
        if not hasattr(self, '_uploaderImp'):
            error = outputFacadeInputError("Property 'format' has invalid value.")
            raise error
        return self._uploaderImp.display_endorser(endorser)

    def display_imagedef(self,endorser):
        self.log.debug("display_imagedef")
        if not hasattr(self, '_uploaderImp'):
            error = outputFacadeInputError("Property 'format' has invalid value.")
            raise error
        return self._uploaderImp.display_imagedef(endorser)

    def info(self, *args, **kwargs):
        self.log.debug("info")
        #expected_keys = ["ImageDefinition","ImageInstance",""]
        #self.env = kwargs.get('env', {})

        if not hasattr(self, '_uploaderImp'):