test_filesystemgroup.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:maas 作者: maas 项目源码 文件源码
def test_create_raid_with_block_device_from_other_node_fails(self):
        node1 = factory.make_Node()
        node2 = factory.make_Node()
        block_devices_1 = [
            factory.make_PhysicalBlockDevice(node=node1)
            for _ in range(5)
        ]
        block_devices_2 = [
            factory.make_PhysicalBlockDevice(node=node2)
            for _ in range(5)
        ]
        uuid = str(uuid4())
        with ExpectedException(
                ValidationError,
                re.escape(
                    "{'__all__': ['All added filesystems must belong to the "
                    "same node.']}")):
            RAID.objects.create_raid(
                name='md0',
                level=FILESYSTEM_GROUP_TYPE.RAID_1,
                uuid=uuid,
                block_devices=block_devices_1 + block_devices_2,
                partitions=[],
                spare_devices=[],
                spare_partitions=[])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号