Пример #1
0
    def test__save_disk_layout(self):
        info = dict(INST_INFO_DICT)
        info['ephemeral_gb'] = 10
        info['swap_mb'] = 0
        info['root_gb'] = 10
        info['preserve_ephemeral'] = False
        self.node.instance_info = info

        iscsi_deploy._save_disk_layout(self.node, info)
        self.node.refresh()
        for param in ('ephemeral_gb', 'swap_mb', 'root_gb'):
            self.assertEqual(info[param],
                             self.node.driver_internal_info['instance'][param])
Пример #2
0
    def test__save_disk_layout(self):
        info = dict(INST_INFO_DICT)
        info['ephemeral_gb'] = 10
        info['swap_mb'] = 0
        info['root_gb'] = 10
        info['preserve_ephemeral'] = False
        self.node.instance_info = info

        iscsi_deploy._save_disk_layout(self.node, info)
        self.node.refresh()
        for param in ('ephemeral_gb', 'swap_mb', 'root_gb'):
            self.assertEqual(
                info[param], self.node.driver_internal_info['instance'][param]
            )
Пример #3
0
 def test__save_disk_layout(self):
     info = dict(INST_INFO_DICT)
     info['ephemeral_gb'] = 10
     info['swap_mb'] = 0
     info['root_gb'] = 10
     info['preserve_ephemeral'] = False
     node = obj_utils.create_test_node(
         self.context, instance_info=info,
         driver_internal_info=DRV_INTERNAL_INFO_DICT,
     )
     iscsi_deploy._save_disk_layout(node, info)
     node.refresh()
     for param in ('ephemeral_gb', 'swap_mb', 'root_gb'):
         self.assertEqual(
             info[param], node.driver_internal_info['instance'][param]
         )
Пример #4
0
 def test__save_disk_layout(self):
     info = dict(INST_INFO_DICT)
     info['ephemeral_gb'] = 10
     info['swap_mb'] = 0
     info['root_gb'] = 10
     info['preserve_ephemeral'] = False
     node = obj_utils.create_test_node(
         self.context,
         instance_info=info,
         driver_internal_info=DRV_INTERNAL_INFO_DICT,
     )
     iscsi_deploy._save_disk_layout(node, info)
     node.refresh()
     for param in ('ephemeral_gb', 'swap_mb', 'root_gb'):
         self.assertEqual(info[param],
                          node.driver_internal_info['instance'][param])