def find_component(co_id):
        """
        find a component from the Ariane server cache depending on its id
        :param co_id: the component id to find
        :return: the component if found and None if not
        """
        LOGGER.debug("InjectorCachedComponentService.find_component")
        ret = None
        if co_id is not None:
            args = {'properties': {'OPERATION': 'PULL_COMPONENT_FROM_CACHE',
                                   'REMOTE_COMPONENT': str({'componentId': co_id}).replace("'", '"'),
                                   'CACHE_ID': InjectorCachedComponentService.cache_id}}

            result = InjectorCachedComponentService.requester.call(args).get()
            if result.rc == 0:
                ret = InjectorCachedComponent.json_2_injector_component(result.response_properties)
                ret.blob = result.response_content
            elif result.rc != 404:
                err_msg = 'InjectorCachedComponentService.find_component - Problem while finding component ( id : ' + \
                          co_id + \
                          'Reason: ' + str(result.response_content) + '-' + str(result.error_message) + \
                          " (" + str(result.rc) + ")"
                LOGGER.warning(err_msg)
        return ret
def find_component ( co_id ) : LOGGER . debug ( "InjectorCachedComponentService.find_component" ) ret = None if co_id is not None : args = { 'properties' : { 'OPERATION' : 'PULL_COMPONENT_FROM_CACHE' , 'REMOTE_COMPONENT' : str ( { 'componentId' : co_id } ) . replace ( "'" , '"' ) , 'CACHE_ID' : InjectorCachedComponentService . cache_id } } result = InjectorCachedComponentService . requester . call ( args ) . get ( ) if result . rc == 0 : ret = InjectorCachedComponent . json_2_injector_component ( result . response_properties ) ret . blob = result . response_content elif result . rc != 404 : err_msg = 'InjectorCachedComponentService.find_component - Problem while finding component ( id : ' + co_id + 'Reason: ' + str ( result . response_content ) + '-' + str ( result . error_message ) + " (" + str ( result . rc ) + ")" LOGGER . warning ( err_msg ) return ret
find a component from the Ariane server cache depending on its id
        :param co_id: the component id to find
        :return: the component if found and None if not