def services_list(self, io_handler, specification=None):
        """
        Lists the services in the framework. Possibility to filter on an exact
        specification.
        """
        # Head of the table
        headers = ("ID", "Specifications", "Bundle", "Ranking")

        # Lines
        references = (
            self._context.get_all_service_references(specification, None) or []
        )

        # Construct the list of services
        lines = [
            [
                str(entry)
                for entry in (
                    ref.get_property(constants.SERVICE_ID),
                    ref.get_property(constants.OBJECTCLASS),
                    ref.get_bundle(),
                    ref.get_property(constants.SERVICE_RANKING),
                )
            ]
            for ref in references
        ]

        if not lines and specification:
            # No matching service found
            io_handler.write_line("No service provides '{0}'", specification)
            return False

        # Print'em all
        io_handler.write(self._utils.make_table(headers, lines))
        io_handler.write_line("{0} services registered", len(lines))
        return None
def services_list ( self , io_handler , specification = None ) : headers = ( "ID" , "Specifications" , "Bundle" , "Ranking" ) references = ( self . _context . get_all_service_references ( specification , None ) or [ ] ) lines = [ [ str ( entry ) for entry in ( ref . get_property ( constants . SERVICE_ID ) , ref . get_property ( constants . OBJECTCLASS ) , ref . get_bundle ( ) , ref . get_property ( constants . SERVICE_RANKING ) , ) ] for ref in references ] if not lines and specification : io_handler . write_line ( "No service provides '{0}'" , specification ) return False io_handler . write ( self . _utils . make_table ( headers , lines ) ) io_handler . write_line ( "{0} services registered" , len ( lines ) ) return None
Lists the services in the framework. Possibility to filter on an exact
        specification.