def get_available_resource(self, nodename):
    'Retrieve resource information.\n\n        This method is called when nova-compute launches, and\n        as part of a periodic task that records the results in the DB.\n\n        :param nodename: will be put in PCI device\n        :returns: dictionary containing resource info\n        '
    stats = self.get_host_stats(refresh=True)
    stats['supported_instances'] = jsonutils.dumps(stats['supported_instances'])
    return stats
Retrieve resource information.

This method is called when nova-compute launches, and
as part of a periodic task that records the results in the DB.

:param nodename: will be put in PCI device
:returns: dictionary containing resource info
def get_available_resource(self, nodename):
    'Retrieve resource information.\n\n        This method is called when nova-compute launches, and\n        as part of a periodic task that records the results in the DB.\n\n        :param nodename: will be put in PCI device\n        :returns: dictionary containing resource info\n        '
    stats = self.get_host_stats(refresh=True)
    stats['supported_instances'] = jsonutils.dumps(stats['supported_instances'])
    return stats