示例#1
0
 def test_get_with_shadow_copy(self):
     lun_list = get_lun_list()
     pools = VNXPool.get(t_cli(), system_lun_list=lun_list)
     assert_that(lun_list.timestamp, not_none())
     assert_that(len(pools), greater_than(0))
     for pool in pools:
         assert_that(pool.lun_list.timestamp, equal_to(lun_list.timestamp))
示例#2
0
 def _update_free_pool_capacity(self):
     pools = VNXPool.get(self._cli)
     free_in_pool = sum(pools.available_capacity_gbs)
     rgs = VNXRaidGroup.get(self._cli)
     free_in_rg = sum([
         rg.available_capacity_gbs for rg in rgs
         if len(rg.list_of_luns) != 0
     ])
     self._free_storage_pool = free_in_pool + free_in_rg
示例#3
0
    def test_pool_tier(self):
        pool1 = VNXPool.get(t_cli(), name='tier_test')
        assert_that(pool1.tiers, not_none())
        assert_that(len(pool1.tiers), equal_to(2))
        tier = pool1.tiers[0]

        assert_that(tier.tier_name, equal_to('Performance'))
        assert_that(tier.raid_type, equal_to(VNXPoolRaidType.RAID5))
        assert_that(tier.user_capacity_gb, equal_to(1639.70))
        assert_that(tier.consumed_capacity_gb, equal_to(129.25))
        assert_that(tier.available_capacity_gb, equal_to(1510.44))
        assert_that(tier.percent_subscribed, equal_to(7.88))
        assert_that(tier.data_targeted_for_higher_tier_gb, equal_to(0.0))
        assert_that(tier.data_targeted_for_lower_tier, equal_to(0.0))
        assert_that(tier.data_targeted_within_tier, equal_to(0.0))
示例#4
0
 def test_get_pool_get_by_id(self):
     pool = VNXPool.get(t_cli(), pool_id=0)
     verify_pool_0(pool)
示例#5
0
 def test_get_pool_get_by_name(self):
     pool = VNXPool.get(t_cli(), name='Pool4File')
     verify_pool_0(pool)
示例#6
0
 def test_get_pool_from_list(self):
     pools = VNXPool.get(t_cli())
     pool = next(p for p in pools if p.pool_id == 4)
     # no error should be thrown here
     pool.update()
示例#7
0
 def test_get_pool_get_all(self):
     pools = VNXPool.get(t_cli())
     assert_that(len(pools), equal_to(5))
示例#8
0
 def get_pool(self, name=None, pool_id=None):
     return VNXPool.get(pool_id=pool_id, name=name, cli=self._cli)
示例#9
0
 def get_pool(self, name=None, pool_id=None, system_lun_list=None):
     return VNXPool.get(pool_id=pool_id,
                        name=name,
                        cli=self._cli,
                        system_lun_list=system_lun_list)
示例#10
0
 def test_get_pool_get_by_id(self):
     pool = VNXPool.get(t_cli(), pool_id=0)
     verify_pool_0(pool)
示例#11
0
 def test_get_pool_get_by_name(self):
     pool = VNXPool.get(t_cli(), name='Pool4File')
     verify_pool_0(pool)
示例#12
0
 def test_get_pool_from_list(self):
     pools = VNXPool.get(t_cli())
     pool = next(p for p in pools if p.pool_id == 4)
     # no error should be thrown here
     pool.update()
示例#13
0
 def test_get_pool_get_all(self):
     pools = VNXPool.get(t_cli())
     assert_that(len(pools), equal_to(5))
示例#14
0
 def test_get_pool_from_list(self):
     pools = VNXPool.get(t_cli())
     pool = pools[0]
     # no error should be thrown here
     pool.update()