Beispiel #1
0
 def test_get_all(self):
     disks = VNXDisk.get(t_cli())
     assert_that(len(disks), equal_to(180))
     for disk in disks:
         if disk.index == '4_0_e8':
             verify_disk_4_0_e8(disk)
             break
Beispiel #2
0
 def get_disk(self, disk_index=None):
     return VNXDisk.get(self._cli, disk_index)
 def disk_001(self):
     return VNXDisk('0_0_1', t_cli())
 def test_get_disk(self):
     disk = VNXDisk.get(t_cli(), '4_0_e8')
     verify_disk_4_0_e8(disk)
 def f():
     VNXDisk.parse_index('abcdefg')
 def test_parse_index(self):
     bus, enc, disk = VNXDisk.parse_index('1_10_A4')
     assert_that(bus, equal_to("1"))
     assert_that(enc, equal_to("10"))
     assert_that(disk, equal_to("A4"))
 def f():
     VNXDisk('abcde')
Beispiel #8
0
 def test_parse_index(self):
     bus, enc, disk = VNXDisk.parse_index('1_10_A4')
     assert_that(bus, equal_to("1"))
     assert_that(enc, equal_to("10"))
     assert_that(disk, equal_to("A4"))
Beispiel #9
0
 def delete_disk(self, disk_index):
     self._delete_resource(VNXDisk(disk_index, self._cli))
Beispiel #10
0
 def _update_disk_capacity(self):
     disks = VNXDisk.get(self._cli)
     self._total = mb_to_gb(
         sum([cap for cap in disks.capacity if cap is not None]))
     self._free_raw_disk = mb_to_gb(
         sum([disk.capacity for disk in disks if disk.state == 'Unbound']))
Beispiel #11
0
 def test_install_disk(self):
     disk = VNXDisk('0_0_1', t_cli())
     ret = disk.install()
     assert_that(ret, has_items(''))
Beispiel #12
0
 def test_remove_disk(self):
     disk = VNXDisk('0_0_1', t_cli())
     ret = disk.remove()
     assert_that(ret, has_items(''))
Beispiel #13
0
 def test_get_disk(self):
     disk = VNXDisk.get(t_cli(), '4_0_e8')
     verify_disk_4_0_e8(disk)
Beispiel #14
0
 def f():
     VNXDisk.parse_index('abcdefg')
Beispiel #15
0
 def remove_disk(self, disk_index):
     self._remove_resource(VNXDisk(disk_index, self._cli))
Beispiel #16
0
def get_disks():
    return VNXDisk.get(t_cli())
Beispiel #17
0
 def install_disk(self, disk_index):
     disk = VNXDisk(disk_index, self._cli)
     disk.install()
Beispiel #18
0
 def test_delete_disk(self):
     disk = VNXDisk('0_0_1', t_cli())
     ret = disk.delete()
     assert_that(ret, has_items(''))