Exemplo n.º 1
0
 def test_create_pool(self):
     cli = t_rest()
     disk_group = UnityDiskGroup.get(cli=cli, _id='dg_15')
     raid_group_0 = RaidGroupParameter(
         disk_group=disk_group,
         disk_num=3,
         raid_type=RaidTypeEnum.RAID5,
         stripe_width=RaidStripeWidthEnum.BEST_FIT)
     raid_groups = [raid_group_0]
     pool = UnityPool.create(cli=cli,
                             name='test_pool',
                             description='Unity test pool.',
                             raid_groups=raid_groups,
                             alert_threshold=15,
                             is_harvest_enabled=True,
                             is_snap_harvest_enabled=True,
                             pool_harvest_high_threshold=80,
                             pool_harvest_low_threshold=40,
                             snap_harvest_high_threshold=80,
                             snap_harvest_low_threshold=40,
                             is_fast_cache_enabled=True,
                             is_fastvp_enabled=True,
                             pool_type=StoragePoolTypeEnum.DYNAMIC)
     assert_that(pool.id, equal_to('pool_4'))
     assert_that(pool.pool_type, equal_to(StoragePoolTypeEnum.DYNAMIC))
     assert_that(pool.is_all_flash, equal_to(False))
Exemplo n.º 2
0
    def create_pool(self, name, raid_groups, description=None, **kwargs):
        """Create pool based on RaidGroupParameter.

        :param name: pool name
        :param raid_groups: a list of *RaidGroupParameter*
        :param description: pool description
        :param alert_threshold: Threshold at which the system will generate
               alerts about the free space in the pool, specified as
               a percentage.
        :param is_harvest_enabled:
               True - Enable pool harvesting for the pool.
               False - Disable pool harvesting for the pool.
        :param is_snap_harvest_enabled:
               True - Enable snapshot harvesting for the pool.
               False - Disable snapshot harvesting for the pool.
        :param pool_harvest_high_threshold: Pool used space high threshold at
               which the system will automatically starts to delete snapshots
               in the pool
        :param pool_harvest_low_threshold: Pool used space low threshold under
               which the system will automatically stop deletion of snapshots
               in the pool
        :param snap_harvest_high_threshold: Snapshot used space high threshold
               at which the system automatically starts to delete snapshots
               in the pool
        :param snap_harvest_low_threshold: Snapshot used space low threshold
               below which the system will stop automatically deleting
               snapshots in the pool
        :param is_fast_cache_enabled:
               True - FAST Cache will be enabled for this pool.
               False - FAST Cache will be disabled for this pool.
        :param is_fastvp_enabled:
               True - Enable scheduled data relocations for the pool.
               False - Disable scheduled data relocations for the pool.
        :param pool_type:
               PoolTypeEnum.TRADITIONAL - Create traditional pool.
               PoolTypeEnum.DYNAMIC - Create dynamic pool. (default)
        """
        return UnityPool.create(self._cli,
                                name=name,
                                description=description,
                                raid_groups=raid_groups,
                                **kwargs)
Exemplo n.º 3
0
 def _inner():
     UnityPool.create(cli=cli,
                      name='duplicate_pool',
                      description='Unity test pool.',
                      raid_groups=raid_groups)