

@classmethod
def _host(cls, name, up=True, enabled=True):
    h = mock.Mock()
    h.host = name
    h.host_name = name
    h.state = ('up' if up else 'down')
    h.status = ('enabled' if enabled else 'disabled')
    return h

dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/tests/lib/os/compute/test_nova.py ComputeHostsTestCase._host/original