Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: Ibe31e2d17b8baf88c40e00e3beaa019b13594c7c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
In before, only one binding driver is allowed. This patch introduces
a new config to support multiple binding drivers. The first use case
is to allow SR-IOV binding to be co-existed with other binding.
* Rename the config 'driver' to 'default_driver' in 'binding' group.
This is for making it clear that it is allowed to have more than
one type of bindings.
* Introduce a new config called 'enabled_drivers'.
* Allow client to pass a driver name to port_bind and port_unbind.
If this parameter is None, kuryr will load the default driver.
Partial-Implements: blueprint sriov-binding
Change-Id: I14b23379de9f2459ba97d5d82dfdb51553370cb1
This patch modifies allocate_segmentation_id so that the vlan_id
returned is randomly selected between the available ids.
The main rationale behind is to avoid vlan_id collisions, for
instance in active-active deployments, among different calls.
Note this will minimize the collision if nested containers are
created by using both kubernetes and docker in the same VM.
Partially Implements blueprint containers-in-instances
Change-Id: Iba2c94707c4932d59483c793452da88c43d4215c