Ejemplo n.º 1
0
 def tearDownClass(self):
     """
     clean up
     :return:
     """
     self.logging.info('--> TestStorageIODevices.tearDownClass()')
     self.logging.debug('unconfigure eckd and fcp devices')
     if self.online_dasdeckd_device:
         utils.bring_eckd_offline(self.session, self.online_dasdeckd_device)
     if self.offline_dasdeckd_device:
         utils.bring_eckd_offline(self.session, self.offline_dasdeckd_device)
     if self.online_zfcp_device:
         utils.bring_zfcp_offline(self.session, self.online_zfcp_device)
     if self.offline_zfcp_device:
         utils.bring_zfcp_offline(self.session, self.offline_zfcp_device)
     self.logging.info('<-- TestStorageIODevices.tearDownClass()')
Ejemplo n.º 2
0
 def setUpClass(self):
     super(TestStorageIODevices, self).setUpClass()
     self.logging.info('--> TestStorageIODevices.setUpClass()')
     self.logging.debug(
         'Reading storage i/o devices information from config file')
     self.online_dasdeckd_device = utils.readconfig(
         self.session, CONFIGFILE, STORAGE_DEVICES_SECTION,
         ONLINE_DASDECKD_OPT)
     self.offline_dasdeckd_device = utils.readconfig(
         self.session, CONFIGFILE, STORAGE_DEVICES_SECTION,
         OFFLINE_DASDECKD_OPT)
     self.online_zfcp_device = utils.readconfig(
         self.session, CONFIGFILE, STORAGE_DEVICES_SECTION,
         ONLINE_ZFCP_OPT)
     self.offline_zfcp_device = utils.readconfig(
         self.session, CONFIGFILE, STORAGE_DEVICES_SECTION,
         OFFLINE_ZFCP_OPT)
     self.logging.debug(
         'Successfully read storage i/o devices information from config '
         'file. Online dasd-eckd device: %s, offline dasd-eckd device: '
         '%s, online zfcp device: %s, offline zfcp device: %s'
         % (self.online_dasdeckd_device, self.offline_dasdeckd_device,
            self.online_zfcp_device, self.offline_zfcp_device))
     self.logging.debug('configure eckd and fcp devices')
     if utils.bring_eckd_online(self.session, self.online_dasdeckd_device):
         # if failed to bring device online, make it None
         self.online_dasdeckd_device = None
     if utils.bring_eckd_offline(
             self.session, self.offline_dasdeckd_device):
         # if failed to bring device offline, make it None
         self.offline_dasdeckd_device = None
     if utils.bring_zfcp_online(self.session,  self.online_zfcp_device):
         # if failed to bring device online, make it None
         self.online_zfcp_device = None
     if utils.bring_zfcp_online(self.session, self.offline_zfcp_device):
         self.offline_zfcp_device =None
     self.logging.info('<-- TestStorageIODevices.setUpClass()()')