Example #1
0
 def test_get_nested_resource_properties(self):
     pools = UnityPoolList(cli=t_rest())
     pool = next(pool for pool in pools if pool.id == 'pool_1')
     tier = next(t for t in pool.tiers if t.name == 'Performance')
     unit = next(u for u in tier.pool_units if u.id == 'rg_2')
     assert_that(unit.type, equal_to(PoolUnitTypeEnum.RAID_GROUP))
     assert_that(unit.tier_type, equal_to(TierTypeEnum.PERFORMANCE))
     assert_that(unit.name, equal_to("RAID5, #2, pool:perfpool1130"))
     assert_that(unit.description, equal_to('123'))
     assert_that(unit.wwn, equal_to(
         '06:00:00:00:05:00:00:00:01:00:00:00:00:00:00:64'))
     assert_that(unit.size_total, equal_to(1181501882368))
     assert_that(unit.pool, instance_of(UnityPool))
Example #2
0
 def test_get_nested_resource_filter_by_non_id(self):
     pools = UnityPoolList(cli=t_rest())
     pool = next(pool for pool in pools if pool.id == 'pool_1')
     tier = next(t for t in pool.tiers if t.name == 'Performance')
     unit = next(u for u in tier.pool_units if u.description == '123')
     assert_that(unit.id, equal_to('rg_2'))
Example #3
0
    def test_get_all(self):
        pools = UnityPoolList(cli=t_rest())
        assert_that(len(pools), equal_to(2))

        pool = next(pool for pool in pools if pool.id == 'pool_1')
        self.verify_pool_1(pool)