def __init__(self): super(DriverRegistry, self).__init__() self.drivers.update({ base.BaseDriver.get_name(): base.BaseDriver(), optnvp.OptimizedNVPDriver.get_name(): optnvp.OptimizedNVPDriver(), unmanaged.UnmanagedDriver.get_name(): unmanaged.UnmanagedDriver(), ironic.IronicDriver.get_name(): ironic.IronicDriver() }) # You may optionally specify a port-level driver name that will # be used intead of the underlying network driver. This map determines # which drivers are allowed to be used in this way. # example: {"MY_DRIVER": ["MY_OTHER_DRIVER"]} # The above example would allow ports created with "MY_DRIVER" # specified to be used with networks that use "MY_OTHER_DRIVER", # but *not* the inverse. # Note that drivers are automatically compatible with themselves. self.port_driver_compat_map = { ironic.IronicDriver.get_name(): [ base.BaseDriver.get_name(), optnvp.OptimizedNVPDriver.get_name(), unmanaged.UnmanagedDriver.get_name() ] }
def setUp(self): super(TestUnmanagedDriver, self).setUp() self.strategy = {"public_network": {"bridge": "xenbr0", "subnets": {"4": "public"}}} strategy_json = json.dumps(self.strategy) self.driver = unmanaged.UnmanagedDriver() unmanaged.STRATEGY = network_strategy.JSONStrategy(strategy_json)
def __init__(self): super(DriverRegistry, self).__init__() self.drivers.update({ base.BaseDriver.get_name(): base.BaseDriver(), optnvp.OptimizedNVPDriver.get_name(): optnvp.OptimizedNVPDriver(), unmanaged.UnmanagedDriver.get_name(): unmanaged.UnmanagedDriver()})
def __init__(self): self.drivers = { base.BaseDriver.get_name(): base.BaseDriver(), optnvp.OptimizedNVPDriver.get_name(): optnvp.OptimizedNVPDriver(), unmanaged.UnmanagedDriver.get_name(): unmanaged.UnmanagedDriver()}