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
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')
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 delete_disk(self, disk_index): self._delete_resource(VNXDisk(disk_index, self._cli))
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']))
def test_install_disk(self): disk = VNXDisk('0_0_1', t_cli()) ret = disk.install() assert_that(ret, has_items(''))
def test_remove_disk(self): disk = VNXDisk('0_0_1', t_cli()) ret = disk.remove() assert_that(ret, has_items(''))
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 remove_disk(self, disk_index): self._remove_resource(VNXDisk(disk_index, self._cli))
def get_disks(): return VNXDisk.get(t_cli())
def install_disk(self, disk_index): disk = VNXDisk(disk_index, self._cli) disk.install()
def test_delete_disk(self): disk = VNXDisk('0_0_1', t_cli()) ret = disk.delete() assert_that(ret, has_items(''))