'Test the parsing of the old style initator config variables.'

@mock.patch.object(iscsi.LOG, 'warning')
@mock.patch.object(iscsi.LOG, 'error')
@mock.patch.object(iscsi, 'factory_zfssa')
def test_parse_initiator_config(self, _factory_zfssa, elog, wlog):

    lcfg = self.configuration
    with mock.patch.object(lcfg, 'zfssa_initiator_config', ''):
        with mock.patch.object(lcfg, 'zfssa_initiator_group', ''):
            self.assertRaises(exception.InvalidConfigurationValue, self.drv.do_setup, {})
        with mock.patch.object(lcfg, 'zfssa_initiator', ''):
            self.assertRaises(exception.InvalidConfigurationValue, self.drv.do_setup, {})
        with mock.patch.object(lcfg, 'zfssa_initiator_group', 'default'):
            self.drv.do_setup({})
            wlog.assert_called_with(mock.ANY, {'inigrp': lcfg.zfssa_initiator_group, 'ini': lcfg.zfssa_initiator})
