Пример #1
0
    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()
            ]
        }
Пример #2
0
 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)
Пример #3
0
    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()})
Пример #4
0
 def __init__(self):
     self.drivers = {
         base.BaseDriver.get_name(): base.BaseDriver(),
         optnvp.OptimizedNVPDriver.get_name(): optnvp.OptimizedNVPDriver(),
         unmanaged.UnmanagedDriver.get_name(): unmanaged.UnmanagedDriver()}