'Create a sample ring with four devices
At least four devices are needed to test removing
a device, since having less devices than replicas
is not allowed.'

def create_sample_ring(self, part_power=6):

    try:
        os.remove(self.tmpfile)
    except OSError:
        pass
    ring = RingBuilder(part_power, 3, 1)
    ring.add_dev({'weight': 100.0, 'region': 0, 'zone': 0, 'ip': '127.0.0.1', 'port': 6200, 'device': 'sda1', 'meta': 'some    meta    data'})
    ring.add_dev({'weight': 100.0, 'region': 1, 'zone': 1, 'ip': '127.0.0.2', 'port': 6201, 'device': 'sda2'})
    ring.add_dev({'weight': 100.0, 'region': 2, 'zone': 2, 'ip': '127.0.0.3', 'port': 6202, 'device': 'sdc3'})
    ring.add_dev({'weight': 100.0, 'region': 3, 'zone': 3, 'ip': '127.0.0.4', 'port': 6203, 'device': 'sdd4'})
    ring.save(self.tmpfile)
    return ring
