Пример #1
0
    def _verify_disks(self, vm):
        persistent_disks = [
            disk for disk in vm.layout.disk
            if is_persistent_disk(disk.diskFile)
        ]

        if persistent_disks:
            raise OperationNotAllowedException("persistent disks attached")
Пример #2
0
    def _verify_disks(self, vm):
        persistent_disks = [
            disk for disk in vm.layout.disk
            if is_persistent_disk(disk.diskFile)
        ]

        if persistent_disks:
            raise OperationNotAllowedException("persistent disks attached")
 def test_is_what_disk(self, disk_files, image, ephemeral, persistent):
     assert_that(is_image(disk_files), equal_to(image))
     assert_that(is_ephemeral_disk(disk_files), equal_to(ephemeral))
     assert_that(is_persistent_disk(disk_files), equal_to(persistent))
 def test_is_what_disk(self, disk_files, image, ephemeral, persistent):
     assert_that(is_image(disk_files), equal_to(image))
     assert_that(is_ephemeral_disk(disk_files), equal_to(ephemeral))
     assert_that(is_persistent_disk(disk_files), equal_to(persistent))