Пример #1
0
 def _get_inspector(self, parsed_url):
     if parsed_url.scheme not in self.inspectors:
         try:
             driver = insloader.get_inspector(parsed_url)
             self.inspectors[parsed_url.scheme] = driver
         except Exception as err:
             LOG.exception(_("Can NOT load inspector %(name)s: %(err)s"), dict(name=parsed_url.scheme, err=err))
             raise err
     return self.inspectors[parsed_url.scheme]
Пример #2
0
 def _get_inspector(self, parsed_url):
     if parsed_url.scheme not in self.inspectors:
         try:
             driver = insloader.get_inspector(parsed_url)
             self.inspectors[parsed_url.scheme] = driver
         except Exception as err:
             LOG.exception(_("Can NOT load inspector %(name)s: %(err)s"),
                           dict(name=parsed_url.scheme, err=err))
             raise err
     return self.inspectors[parsed_url.scheme]
Пример #3
0
 def test_get_inspector(self):
     url = netutils.urlsplit("snmp://")
     driver = inspector.get_inspector(url)
     self.assertTrue(driver)