def indices_to_disk_list(disk_indices_str): disk_indices = to_disk_indices(disk_indices_str) if disk_indices: ret = VNXDiskList(disk_indices=disk_indices) else: ret = tuple() return ret
def get_available_disks(self): pool_feature = VNXPoolFeature(self._cli) pool_feature.poll = self.poll disks = pool_feature.available_disks if disks: disks.poll = self.poll else: disks = VNXDiskList(cli=self._cli, disk_indices='N/A') return disks
def test_resource_class_name(self): assert_that(VNXDiskList.resource_class_name(), equal_to('VNXDisk'))
def get_disk_list_t1(cli): return VNXDiskList(cli=cli).update()
def available_disks(self): return VNXDiskList(self._cli, self.available_disk_indices)
def disks(self): return VNXDiskList(self._cli, self.disk_indices)
def test_filter(self): disks = VNXDiskList(t_cli(), ['0_0_C8', '4_0_D0', '4_0_E8']) assert_that(len(disks), equal_to(3))
def test_all(self): disks = VNXDiskList(t_cli()) assert_that(len(disks), equal_to(180))
def disks(self): return VNXDiskList(self._cli, self.list_of_disks)
def test_get_same_disks_available(self): disks = VNXDiskList(t_cli(), ['0_0_C8', '4_0_D0', '4_0_E8']) disks.same_disks(2) assert_that(len(disks), equal_to(2))
def test_multiple_filters(self): disks = VNXDiskList(t_cli()) disks.set_drive_type('NL SAS') assert_that(len(disks), equal_to(42)) disks.set_capacity(2817564) assert_that(len(disks), equal_to(40))