Пример #1
0
 def test__max_volume_size_bytes_raid1(self, mock_get_system):
     spans = redfish_raid._calculate_spans('1', 2)
     max_size = redfish_raid._max_volume_size_bytes(
         '1',
         self.physical_disks[0:2],
         self.free_space_bytes,
         spans_count=spans)
     self.assertEqual(899460104192, max_size)
Пример #2
0
 def test__max_volume_size_bytes_raid6(self, mock_get_system):
     spans = redfish_raid._calculate_spans('6', 4)
     max_size = redfish_raid._max_volume_size_bytes(
         '6',
         self.physical_disks[0:4],
         self.free_space_bytes,
         spans_count=spans)
     self.assertEqual(1798920208384, max_size)
Пример #3
0
 def test__max_volume_size_bytes_raid0(self, mock_get_system):
     spans = redfish_raid._calculate_spans('0', 3)
     max_size = redfish_raid._max_volume_size_bytes(
         '0',
         self.physical_disks[0:3],
         self.free_space_bytes,
         spans_count=spans)
     self.assertEqual(2698380312576, max_size)
Пример #4
0
 def test__volume_usage_per_disk_bytes_raid5(self, mock_get_system):
     logical_disk = {
         'size_gb':
         100,
         'raid_level':
         '5',
         'controller':
         'Smart Array P822 in Slot 3',
         'physical_disks':
         ['35D38F11ACEF7BD3', '3F5A8C54207B7233', '32ADF365C6C1B7BD'],
         'is_root_volume':
         True
     }
     logical_disk['size_bytes'] = logical_disk['size_gb'] * units.Gi
     del logical_disk['size_gb']
     spans = redfish_raid._calculate_spans('5', 3)
     usage_bytes = redfish_raid._volume_usage_per_disk_bytes(
         logical_disk, self.physical_disks[0:3], spans_count=spans)
     self.assertEqual(53687091200, usage_bytes)
Пример #5
0
 def test__volume_usage_per_disk_bytes_raid10(self, mock_get_system):
     logical_disk = {
         'size_gb':
         50,
         'raid_level':
         '1+0',
         'controller':
         'RAID.Integrated.1-1',
         'volume_name':
         'root_volume',
         'is_root_volume':
         True,
         'physical_disks': [
             '35D38F11ACEF7BD3', '3F5A8C54207B7233', '32ADF365C6C1B7BD',
             '3D58ECBC375FD9F2'
         ]
     }
     logical_disk['size_bytes'] = logical_disk['size_gb'] * units.Gi
     del logical_disk['size_gb']
     spans = redfish_raid._calculate_spans('1+0', 4)
     usage_bytes = redfish_raid._volume_usage_per_disk_bytes(
         logical_disk, self.physical_disks[0:4], spans_count=spans)
     self.assertEqual(26843545600, usage_bytes)