Example #1
0
    def test_update_ibmi_settings(self, mock_lparw, mock_ibmi):
        instance = mock.MagicMock()

        # Test update load source with vscsi boot
        boot_type = 'vscsi'
        vm.update_ibmi_settings(self.apt, instance, boot_type)
        mock_ibmi.assert_called_once_with(self.apt, mock.ANY, 'vscsi')
        mock_ibmi.reset_mock()

        # Test update load source with npiv boot
        boot_type = 'npiv'
        vm.update_ibmi_settings(self.apt, instance, boot_type)
        mock_ibmi.assert_called_once_with(self.apt, mock.ANY, 'npiv')
Example #2
0
 def execute(self):
     LOG.info(_LI('Update settings of instance %s.'),
              self.instance.name)
     vm.update_ibmi_settings(
         self.adapter, self.instance, self.host_uuid, self.boot_type)
Example #3
0
 def execute_impl(self):
     vm.update_ibmi_settings(self.adapter, self.instance, self.boot_type)