Exemplo n.º 1
0
    def test__power_off(self, ipmi_mock):
        ipmicmd = ipmi_mock.return_value
        ipmicmd.set_power.return_value = {'powerstate': 'off'}

        self.config(retry_timeout=500, group='ipmi')
        state = ipminative._power_off(self.info)
        ipmicmd.set_power.assert_called_once_with('off', 500)
        self.assertEqual(states.POWER_OFF, state)
Exemplo n.º 2
0
    def test__power_off(self):
        ipmicmd = self.ipmi_mock.return_value
        ipmicmd.set_power.return_value = {'powerstate': 'off'}

        self.config(native_ipmi_waiting_time=500)
        state = ipminative._power_off(self.info)
        ipmicmd.set_power.assert_called_once_with('off', 500)
        self.assertEqual(state, states.POWER_OFF)
Exemplo n.º 3
0
    def test__power_off(self):
        ipmicmd = self.ipmi_mock.return_value
        ipmicmd.set_power.return_value = {'powerstate': 'off'}

        self.config(retry_timeout=500, group='ipmi')
        state = ipminative._power_off(self.info)
        ipmicmd.set_power.assert_called_once_with('off', 500)
        self.assertEqual(state, states.POWER_OFF)
Exemplo n.º 4
0
    def test__power_off(self):
        ipmicmd = self.ipmi_mock.return_value
        ipmicmd.set_power.return_value = {"powerstate": "off"}

        self.config(retry_timeout=500, group="ipmi")
        state = ipminative._power_off(self.info)
        ipmicmd.set_power.assert_called_once_with("off", 500)
        self.assertEqual(state, states.POWER_OFF)