Ejemplo n.º 1
0
 def test_get_limit_ctrl(self):
     limit_ctrl = VNXCtrlMethod(method=VNXCtrlMethod.LIMIT_CTRL,
                                metric='bw',
                                value=100)
     options = limit_ctrl.get_option()
     assert_that(
         options,
         equal_to(['-ctrlmethod', 'limit', '-gmetric', 'bw', '-gval', 100]))
Ejemplo n.º 2
0
 def test_get_cruise_ctrl(self):
     cruise_ctrl = VNXCtrlMethod(method=VNXCtrlMethod.CRUISE_CTRL,
                                 metric='bw',
                                 value=100,
                                 tolerance=10)
     options = cruise_ctrl.get_option()
     assert_that(
         options,
         equal_to([
             '-ctrlmethod', 'cruise', '-gmetric', 'bw', '-gval', 100,
             '-gtol', 10
         ]))
Ejemplo n.º 3
0
 def _inner():
     invalid = VNXCtrlMethod(method='invalid')
     invalid.get_option()
Ejemplo n.º 4
0
 def test_get_fix_ctrl(self):
     fixed_ctrl = VNXCtrlMethod(method=VNXCtrlMethod.FIXED_CTRL, value=100)
     options = fixed_ctrl.get_option()
     assert_that(options, equal_to(['-ctrlmethod', 'fixed', '-gval', 100]))
Ejemplo n.º 5
0
 def test_get_no_ctrl(self):
     no_ctrl = VNXCtrlMethod(method=VNXCtrlMethod.NO_CTRL)
     options = no_ctrl.get_option()
     assert_that(options, equal_to(['-noctrl']))