def test_add_configuration(self):
     test_string = 'test attribute'
     test_module = types.ModuleType('test_config')
     test_module.TEST_ATTRIBUTE = test_string
     db = DriverBootstrap()
     db.add_config(test_module)
     db.initialize()
     self.assertTrue(inject.instance('config').TEST_ATTRIBUTE == test_string)
 def __init__(self, config=None, connectivity_operations=None, send_command_operations=None, autoload=None):
     super(BrocadeNetIronResourceDriver, self).__init__()
     self.connectivity_operations = connectivity_operations
     self.send_command_operations = send_command_operations
     self.autoload = autoload
     bootstrap = Bootstrap()
     bootstrap.add_config(driver_config)
     if config:
         bootstrap.add_config(config)
     bootstrap.initialize()
 def __init__(self,
              config=None,
              connectivity_operations=None,
              send_command_operations=None,
              autoload=None):
     super(BrocadeFastIronResourceDriver, self).__init__()
     self.connectivity_operations = connectivity_operations
     self.send_command_operations = send_command_operations
     self.autoload = autoload
     bootstrap = Bootstrap()
     bootstrap.add_config(driver_config)
     if config:
         bootstrap.add_config(config)
     bootstrap.initialize()
 def test_initialization(self):
     db = DriverBootstrap()
     db.initialize()
     self.assertTrue(inject.is_configured())
Пример #5
0
 def __init__(self):
     bootstrap = DriverBootstrap()
     bootstrap.initialize()
     self.handler = RaritanHandler()
 def __init__(self):
     super(EricssonIPOSResourceDriver, self).__init__()
     bootstrap = DriverBootstrap()
     bootstrap.add_config(driver_config)
     bootstrap.initialize()