def setUpClass(self): super(TestFCLuns, self).setUpClass() self.logging.info('--> TestFCLuns.setUpClass()') self.logging.debug('enable the fcp adapter ' 'specified in config file') self.hba_id = utils.readconfig(self, 'config', 'FCLUNs', 'hba_id') try: utils.bring_zfcp_online(self.session, self.hba_id) except Exception, err: self.logging.error(str(err)) raise Exception(str(err))
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()()')