示例#1
0
文件: cli.py 项目: optionalg/storops
 def _get_tier_opt(tier):
     ret = []
     if tier is not None:
         possible_tiers = VNXTieringEnum.get_all()
         if tier in possible_tiers:
             ret += VNXTieringEnum.get_opt(tier)
         else:
             raise ValueError('not supported tiering type: {}.  '
                              'valid candidates: {}'
                              .format(tier, possible_tiers))
     return ret
示例#2
0
 def _get_tier_opt(tier):
     ret = []
     if tier is not None:
         possible_tiers = VNXTieringEnum.get_all()
         if tier in possible_tiers:
             ret += VNXTieringEnum.get_opt(tier)
         else:
             raise ValueError('not supported tiering type: {}.  '
                              'valid candidates: {}'.format(
                                  tier, possible_tiers))
     return ret
示例#3
0
 def test_get_opt(self):
     opt = VNXTieringEnum.get_opt(VNXTieringEnum.HIGH_AUTO)
     self.assertEqual(
         '-initialTier highestAvailable -tieringPolicy autoTier',
         ' '.join(opt))
示例#4
0
 def f():
     VNXTieringEnum.get_opt('na')
示例#5
0
 def test_get_opt(self):
     opt = VNXTieringEnum.get_opt(VNXTieringEnum.HIGH_AUTO)
     assert_that(
         ' '.join(opt),
         equal_to('-initialTier highestAvailable -tieringPolicy autoTier'))
示例#6
0
 def f():
     VNXTieringEnum.get_opt('na')
示例#7
0
 def test_get_opt(self):
     opt = VNXTieringEnum.get_opt(VNXTieringEnum.HIGH_AUTO)
     assert_that(
         ' '.join(opt),
         equal_to('-initialTier highestAvailable -tieringPolicy autoTier'))