Commit Graph

9 Commits

Author SHA1 Message Date
Slawek Kaplonski 1e970f1aa0 Switch to new engine facade in extensions unit tests
Partially-Implements blueprint: enginefacade-switch

Change-Id: I582848bc8deec98a5e78f9e4b5c7f219a924aa47
2020-03-20 06:28:46 +01:00
Boden R ee77344ac1 use api def ALIAS in supported_extension_aliases
Today a number of classes define their supported_extension_aliases
using static strings rather than API definition ALIASes. This patch
switches them to use the ALIAS where applicable.

Change-Id: I716270c68a9fcd850c3c26de31bc13ea16def23d
2019-04-08 08:30:20 -06:00
Hongbin Lu 12bb26fd0e Use constant IP_VERSION_4/6 in unit tests
Change-Id: I54bec2c06940b0b1362fecacef7860361d081601
2018-08-27 21:45:39 +00:00
Brian Haley 90cd939047 Fix W503 pep8 warnings
Fix W503 (line break before binary operator) pep8 warnings
and no longer ignore new failures.

Trivialfix

Change-Id: I7539f3b7187f2ad40681781f74b6e05a01bac474
2018-04-17 14:22:58 +00:00
Boden R 933b9fa57e use extra_dhcp_opt api-def from neutron-lib
neutron-lib 1.6.0 is out and among other things contains the rehomed
extra_dhcp_opt API definition. This patch switches usage of such
references from neutron to neutron-lib.

NeutronLibImpact

Change-Id: I8a400bc92b5958e5eab557bd7a2b27330754dcbf
2017-05-31 15:06:35 +00:00
Yatin Kumbhare 6b4be76e14 Fix params order in assertEqual
Fix params order to correspond to real signature:
assertEqual(expected, actual)

Change-Id: I722b998f6eae47076f3d10213073296a0a9a2081
Closes-Bug: #1277104
2016-02-03 11:54:29 +05:30
ChangBo Guo(gcb) 06174a41e4 Trival: Remove unused logging import
Change-Id: I13298e642f25c9f70dcff9b1e056b418edf0a461
2015-12-26 12:49:56 +08:00
David Edery 3837427189 Enable specific extra_dhcp_opt to be left blank
In some cases there is a need for a blank value of the "router" extra
dhcp option. This fix addresses this issue by introducing a simple
mechanism in the code that allows specific extra dhcp options to be left
blank by applying a different opt_value validation of the data received
from the REST call and different validation on the value that will be
written to the DB.

This fix also takes into consideration bug #1257467 which claims that
in case of a blank "server-ip-address" option a segmentation fault
occurs in dnsmasq. I did not check this claim with a newer dnsmasq
version since it seemed logical that the list of potentially blank
options should be limited to options that are known to work well when
blank and have functional justification for being blank (e.g. "router")

APIImpact
"router" and "classless-static-route" extra dhcp options can be blank
(e.g. opt-name="router", opt-value="")

DocImpact
During port creation/update, Specific extra-dhcp-options can be left
blank ("router" and/or "classless-static-route"). This causes dnsmasq
to have an empty option in the "opts" file related to the network to
which the port is related.
For example:
tag:tag0,option:classless-static-route,
tag:tag0,option:router,

Closes-Bug: #1437695
Related-Bug: #1257467

Change-Id: I0ac76e132c4bd86da39863674d4cf8a22dad7034
2015-10-15 14:16:17 +03:00
Maru Newby 1105782e39 Reorganize unit test tree
This change ensures that the structure of the unit test tree matches
that of the code tree to make it obvious where to find tests for a
given module.  A check is added to the pep8 job to protect against
regressions.

The plugin test paths are relocated to neutron/tests/unit/plugins
but are otherwise ignored for now.

Change-Id: If307593259139171be21a71c58e3a34bf148cc7f
Partial-Bug: #1440834
2015-04-06 23:28:31 +00:00