'Factory function/property to create a new HostState.'

def host_state_cls(self, host, node, cell, **kwargs):

    compute = kwargs.get('compute')
    if (compute and self._is_ironic_compute(compute)):
        return IronicNodeState(host, node, cell)
    else:
        return host_manager.HostState(host, node, cell)
