@pytest.fixture
def add_host():

    def _inner(hostname, rack, rank, appliance):
        cmd = f'stack add host {hostname} rack={rack} rank={rank} appliance={appliance}'
        result = subprocess.run(cmd.split())
        if (result.returncode != 0):
            pytest.fail('unable to add a dummy host')
    _inner('backend-0-0', '0', '0', 'backend')
    return _inner
@pytest.fixture
def add_host():

    def _inner(hostname, rack, rank, appliance):
        cmd = f'stack add host {hostname} rack={rack} rank={rank} appliance={appliance}'
        result = subprocess.run(cmd.split())
        if (result.returncode != 0):
            pytest.fail('unable to add a dummy host')
    _inner('backend-0-0', '0', '0', 'backend')
    return _inner