Beispiel #1
0
 def setUp(self):
     super(LinuxSCSITestCase, self).setUp()
     self.cmds = []
     mock.patch.object(os.path, 'realpath', return_value='/dev/sdc').start()
     mock.patch.object(os, 'stat', returns=os.stat(__file__)).start()
     self.addCleanup(mock.patch.stopall)
     self.linuxscsi = linuxscsi.LinuxSCSI(None, execute=self.fake_execute)
Beispiel #2
0
 def setUp(self):
     super(LinuxSCSITestCase, self).setUp()
     self.cmds = []
     self.realpath = os.path.realpath
     self.mock_object(os.path, 'realpath', return_value='/dev/sdc')
     self.mock_object(os, 'stat', returns=os.stat(__file__))
     self.linuxscsi = linuxscsi.LinuxSCSI(None, execute=self.fake_execute)
Beispiel #3
0
    def __init__(self, root_helper: str, driver=None, execute=None,
                 *args, **kwargs):
        self._linuxscsi = linuxscsi.LinuxSCSI(root_helper, execute=execute)

        if not driver:
            driver = host_driver.HostDriver()
        self.set_driver(driver)

        super(BaseLinuxConnector, self).__init__(root_helper, execute=execute,
                                                 *args, **kwargs)