Commit Graph

4 Commits

Author SHA1 Message Date
xuanyandong e1edbc4661 Remove six
Change-Id: I9f6f057fde95f378071c25dba7f27ed3f3a4c27b
2020-09-30 17:01:51 +08:00
Sean McGinnis 0f47555b38
Use unittest.mock instead of third party mock
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>
2020-04-18 11:53:47 -05:00
Hongbin Lu da736d115b Allow multiple binding drivers
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
2017-10-17 12:06:57 -04:00
Luis Tomas Bolivar af9d0eb0d6 Add randomness to the returned vlan_ids
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
2017-02-01 09:34:21 +00:00