Commit Graph

17 Commits

Author SHA1 Message Date
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
Hongbin Lu 0f118fee78 Avoid hard-coding of 'neutron' config group
The name of neutron config group is specified in file
kuryr/lib/config.py. If we want to retrieve the name of this config
group, we should read it from that file instead of hard-coding it.

Change-Id: Id6ebc4fc8433a802edc04b941a591e03d23c489e
2016-12-27 18:13:21 -06:00
Antoni Segura Puimedon 854a8028b6
binding: Add driver based subsystem
This patch introduces a new hierarchy of drivers to perform the port
binding and unbinding in a similar fashion as how it is done with
Neutron plugins.

The initial three drivers are:
* veth: The one that we have been using up until now and that uses
  the usr/libexec/kuryr/* scripts to bind the host side
* ipvlan: L2 ipvlan motivated mostly container-in-vm use cases so that
  the instance interface will have linked devices that get addresses
  of other ports of the same subnet.
* macvlan: bridged mode ipvlan for OSes that do not support vlan.

Co-Authored-by: Louise Daly <louise.m.daly@intel.com>
Implements: blueprint driver-binding-ipvlan
Change-Id: I1d94ab324ab2a65a6d3e782e23ea6c59b110ff67
2016-10-03 12:28:01 +02:00
Vikas Choudhary d5e87557f1 Add 'deployment_type' configuration parameter
Value of this parameter will be refered in the code to determine
if containers are being launched inside virtual machines or on baremetal
machines.

Partially Implements blueprint containers-in-instances

Change-Id: Icbd561504c9bc39dbf7ef4b0f97561882dd8b1c2
2016-09-26 13:29:42 +00:00
Antoni Segura Puimedon 632fda4c32
auth: use keystoneauth1 for neutron access
This patch moves, as was discussed in the weekly IRC meeting,
[keystone] and [neutron] options, that were just for talking to
Neutron, inside [neutron].

The new organization is consistent with how Nova talks to Neutron
and how Neutron notifies nova. In doing so, we also reduce our codebase
since we can leverage the nice things offered by keystoneauth1.

Closes-bug: #1563011
Change-Id: Ia56b22963f5a2130a722403a14ee1a233ac6cff9
Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
2016-09-11 11:05:05 +02:00
Vikas Choudhary 6438b8f06d Avoid registration of config parameters
Configuration parameters should be registered by module which is user
of kuryr-lib.

Change-Id: I39dc27a8a9430327cdc75191f63c268354d07dab
Closes-bug: #1615942
2016-08-24 18:00:15 +05:30
vikaschoudhary16 e3ebe9758b Remove libnetwork specific config parameters
This patch removes configuration parameters which are specific to
libnetwork. Currently these parameters are present at both repos and
thus lead to duplicate option error.

Change-Id: I2c3473a7ce89e26c78aeb35510650836f7043157
Closes-bug: #1605079
2016-07-21 12:15:38 +05:30
vikaschoudhary16 47490acec9 Refactoring: Drop all the code except common one
Related patchset in kuryr-libnetwork:
https://review.openstack.org/#/c/337350/

Implements blueprint code-refactoring
Change-Id: I91a402a159817462535e77296217a9dd7eb0fd08
2016-07-19 14:56:17 +05:30
bailinzhang 9be3bf32b5 Remove mox from test_config.py
This patch replaces mox with mock partially in
kuryr\tests\unit\test_config.py.

Change-Id: I2e155ca2940c05eca3ad39592b48ec120434f088
Partial-Bug: #1593906
2016-06-21 12:05:14 +00:00
vikaschoudhary16 54448b0175 Add default subnetpools to configuration
Currently default subnetpools expected to be configured
using environment variables. This is being moved to configuration
file.

Change-Id: I15562a0e479ff847b764e18eb286dc3565188a64
Closes-bug: #1542026
2016-06-17 09:45:57 +05:30
Taku Fukushima 409cffac1d
Add oslo.log and use its config options by default
This patch introduces oslo.log as the new dependency and modifies the
configuration to use its options by default. Options can be configured
through the generated config file.

Change-Id: Iad9ccc5a521ffc49fe813a90ab0ce4997db707d1
Signed-off-by: Taku Fukushima <f.tac.mac@gmail.com>
Closes-Bug: #1569672
2016-04-13 20:36:47 +09:00
Taku Fukushima 02b9558c03
Make logging level configurable
This patch makes the logging level configurable in the config file.

Change-Id: Id51c92ab8a51aab0eac3b60700d3d013b13293d0
Signed-off-by: Taku Fukushima <f.tac.mac@gmail.com>
Closes-Bug: #1525088
2016-04-12 17:43:47 +09:00
Jordan Pittier 685d66b0d7 Revert "Use assertTrue/False instead of assertEqual(T/F)"
assertTrue is weaker than assertEqual(True,..) because
assertEqual also compares the type. If we expect a boolean
we should assert for a boolean, not for some true-ish
value

This reverts commit 992630a4ab.

Change-Id: Ia5e880b7384e0a8b599cc5f87b1b9a27427fb419
2016-01-28 17:10:32 +00:00
LiuNanke 992630a4ab Use assertTrue/False instead of assertEqual(T/F)
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).
This patch fixes the same in keystone.
Closes-Bug: #1512207

Change-Id: I800fe2c849ff089882064656c21350354b729025
2016-01-10 02:00:57 +08:00
Baohua Yang 6d5ebc088e Add debug flag in the config
1) Let server read the debug flag from config
2) Write the test case, use assertEqual for explicity
3) Keep the value to True for current usage

Change-Id: I83e4ae92e43b8be92cf92ff257f317ed1bf9491e
Closes-Bug: #1531073
2016-01-05 05:23:17 -06:00
Mohammad Banikazemi 494fca6578 Adding version for neutronclient
While authenticating with user name and password, the version
has tp be specified in the auth_url as shown here:
http://docs.openstack.org/developer/python-neutronclient/

Making the config option contain the full path, including the
version.

Change-Id: I290b0fbef5bfdfbae7c473f09e2aa676ea3602f9
2015-12-14 15:02:37 -05:00
Gal Sagie 0e45ee44f5 Separate unit tests from fullstack tests
With this patch the tox command only runs the unit tests
at the ./kuryr/tests/unit lib.
Another test job is added for fullstack which is meant to be
run only with a working devstack setup and will run
at the gate with tempest.
You can run the tests there for debugging with 'tox -e fullstack'

implements blueprint: fullstack-testing

Change-Id: Ia646b3f1a2b25f0a7fd4d01ed72ea1b51bb3b21c
2015-12-08 09:08:04 +02:00