def create_pool(self, name, disks=None, raid_type=None): @retry(on_error=VNXDiskUsedError) def create_with_default_disks(): _disks = self.get_available_disks() disk_count = VNXPoolRaidType.parse(raid_type).min_disk_requirement _disks.same_disks(disk_count) return VNXPool.create(self._cli, name, _disks, raid_type) if raid_type is None: raid_type = VNXPoolRaidType.RAID5 if disks is None: ret = create_with_default_disks() else: ret = VNXPool.create(self._cli, name, disks, raid_type) return ret
def create_pool(self, name, disks=None, raid_type=None): @retry(on_error=VNXDiskUsedError) def create_with_default_disks(): _disks = self.get_available_disks() disk_count = VNXPoolRaidType.parse(raid_type).min_disk_requirement _disks.same_disks(disk_count) return VNXPool.create(self._cli, name, _disks, raid_type) if raid_type is None: raid_type = VNXPoolRaidType.RAID5 if disks is None: ret = create_with_default_disks() else: ret = VNXPool.create(self._cli, name, disks, raid_type) return ret
def f(): VNXPool.create(t_cli(), 'p0', ['1_0_0', '1_0_1'], 'r_5')
def create_pool(self, name, disks, raid_type=None): return VNXPool.create(self._cli, name, disks, raid_type)
def create_with_default_disks(): _disks = self.get_available_disks() disk_count = VNXPoolRaidType.parse(raid_type).min_disk_requirement _disks.same_disks(disk_count) return VNXPool.create(self._cli, name, _disks, raid_type)
def create_with_default_disks(): _disks = self.get_available_disks() disk_count = VNXPoolRaidType.parse(raid_type).min_disk_requirement _disks.same_disks(disk_count) return VNXPool.create(self._cli, name, _disks, raid_type)
def f(): VNXPool.create(t_cli(), 'p0', ['1_0_0', '1_0_1'], 'r_5')