def setUp(self): self.browser = self.get_browser() data_setup.create_device(device_class="IDE") #needed for device page data_setup.create_distro() # needed for distro page data_setup.create_job() # needed for job page data_setup.create_task() #create task system = data_setup.create_system(shared=True) system.activity.append(data_setup.create_system_activity())
def test_filtering_by_device(self): network_class = data_setup.create_device_class(u'NETWORK') with_e1000 = data_setup.create_system() with_e1000.devices.append(data_setup.create_device( device_class_id=network_class.id, vendor_id=u'8086', device_id=u'107c', subsys_vendor_id=u'8086', subsys_device_id=u'1376', bus=u'pci', driver=u'e1000', description=u'82541PI Gigabit Ethernet Controller')) with_tg3 = data_setup.create_system() with_tg3.devices.append(data_setup.create_device( device_class_id=network_class.id, vendor_id=u'14e4', device_id=u'1645', subsys_vendor_id=u'10a9', subsys_device_id=u'8010', bus=u'pci', driver=u'tg3', description=u'NetXtreme BCM5701 Gigabit Ethernet')) self.check_filter(""" <hostRequires> <device op="=" driver="e1000" /> </hostRequires> """, present=[with_e1000], absent=[with_tg3]) # preferred spelling of this is <not><... op="=" ..></not> # but we support the counter-intuitive != as well self.check_filter(""" <hostRequires> <device op="!=" driver="e1000" /> </hostRequires> """, present=[with_tg3], absent=[with_e1000]) self.check_filter(""" <hostRequires> <device op="like" description="82541PI%" /> </hostRequires> """, present=[with_e1000], absent=[with_tg3]) self.check_filter(""" <hostRequires> <device op="=" type="network" vendor_id="8086" /> </hostRequires> """, present=[with_e1000], absent=[with_tg3]) self.check_filter(""" <hostRequires> <device op="=" vendor_id="14E4" device_id="1645" /> </hostRequires> """, present=[with_tg3], absent=[with_e1000]) # this filter does nothing, but at least it shouldn't explode self.check_filter(""" <hostRequires> <device op="=" /> </hostRequires> """, present=[with_e1000, with_tg3])
def setUp(self): self.verificationErrors = [] self.selenium = self.get_selenium() self.selenium.start() data_setup.create_device(device_class="IDE") #needed for device page data_setup.create_distro() # needed for distro page data_setup.create_job() # needed for job page data_setup.create_task() #create task system = data_setup.create_system() system.shared = True system.activity.append(data_setup.create_system_activity())
def setUp(self): self.verificationErrors = [] self.selenium = self.get_selenium() self.selenium.start() try: self.logout() except:pass with session.begin(): data_setup.create_device(device_class="IDE") self.login()
def test_by_device(self): with session.begin(): system = data_setup.create_system() device = data_setup.create_device( device_class='testclass', subsys_vendor_id='1111', subsys_device_id='1112') system.devices.append(device) another_system = data_setup.create_system() another_device = data_setup.create_device( device_class='testclass', subsys_vendor_id='2223', subsys_device_id='2224') another_system.devices.append(another_device) b = self.browser perform_search(b, [('Devices/Subsys_device_id', 'is', '1112')]) check_system_search_results(b, present=[system], absent=[another_system]) perform_search(b, [('Devices/Subsys_vendor_id', 'is not', '1111'), ('Devices/Subsys_device_id', 'is', '2224')]) check_system_search_results(b, present=[another_system], absent=[system])
def setUp(self): with session.begin(): data_setup.create_device(device_class="IDE") self.browser = self.get_browser() login(self.browser)