Exemple #1
0
 def test_create_iops_policy(self):
     policy = UnityIoLimitPolicy.create(t_rest(),
                                        'max_iops_4321',
                                        max_iops=4321,
                                        description='storops')
     assert_that(policy.name, equal_to('max_iops_4321'))
     assert_that(policy.is_paused, equal_to(False))
     setting = policy.io_limit_rule_settings[0]
     assert_that(setting.max_iops, equal_to(4321))
     assert_that(setting.name, equal_to('max_iops_4321_rule'))
Exemple #2
0
 def create_io_limit_policy(self, name, max_iops=None, max_kbps=None,
                            policy_type=None, is_shared=None,
                            description=None, max_iops_density=None,
                            max_kbps_density=None):
     return UnityIoLimitPolicy.create(
         self._cli, name, max_iops=max_iops, max_kbps=max_kbps,
         policy_type=policy_type, is_shared=is_shared,
         description=description,
         max_iops_density=max_iops_density,
         max_kbps_density=max_kbps_density)
Exemple #3
0
 def f():
     UnityIoLimitPolicy.create(t_rest(), 'test1', max_kbps=1)
Exemple #4
0
 def f():
     UnityIoLimitPolicy.create(t_rest(),
                               'float_type_kbps',
                               max_kbps=1.0)