@rbac('*')
    def time_estimate(self, resource_desc):
        retcode, info = self.check_compatibility(resource_desc)
        if retcode != 0:
            return (retcode, info)

        hostnames = self._get_hosts()
        if not hostnames:
            return (-2, {'hostnames': 'no hosts available'})

        if 'min_cpus' in resource_desc:
            value = resource_desc['min_cpus']
            if len(hostnames) < value:
                return (-2, {'min_cpus': 'want %s, have %s'
                                          % (value, len(hostnames))})
        criteria = {
            'hostnames'  : hostnames,
            'total_cpus' : len(hostnames),
        }
        return (0, criteria)
Returns data to pass to the JavaScript View during instantiation.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/grid_engine.py/GridEngineAllocator.time_estimate--crossover with--dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/reviews/ui/base.py/ReviewUI.get_js_view_data