This will remove the need of import random in unit/objects/test_base.py
as its already done in tests/tools.py and some of the functions are
called from there.
Handle empty bridge case in OVSBridge.get_ports_attributes
Before this patch, get_ports_attributes would call
get_port_name_list. In the case of an empty bridge,
get_port_name_list would return an empty list and feed that
in to ovsdb.db_list, thereby returning all ports instead of
no ports.
The fix for https://review.openstack.org/#/c/218350/ has few
more occurrences. This patch addresses those and also changes
"local_port" from "port" in order not to confuse the parameter
with method argument.
Now that we forbid branch points as part of check_migration, there is no
technical need in maintaining the file. It only slows down developers that are
forced to resolve git conflicts after every new migration merged.
We remove the file as part of new 'revision' generation.
Now that the file is not present, we introspect the alembic scripts to
determine whether the subproject uses split migrations (presense of a branch
point indicates that).
Andreas Jaeger [Thu, 24 Sep 2015 18:48:59 +0000 (20:48 +0200)]
Cleanup of Translations
In preparation for the release, do some cleanups for translations.
Removes all po files that are partially translated. The translation
team has decided to exclude files with less than 66 % of translated
content. There is no content lost, all data is in the translation
server, we just remove it from the repository.
This updates also recreates pot (translation source files) to
reflect the state of the repository in case there was no recent
import for them.
This change needs to be done manually since the automatic import does
not handle some of these cases.
SimpleInterfaceMonitor: get rid of self.data_received flag
It's not used anywhere outside tests, and there are better ways to
wait for updates.
The flag was once used to influence the state of activeness for the
monitor, but not anymore [1].
This cleanup also allows us to remove custom _read_stdout from the
monitor and reuse the one inherited from AsyncProcess. Meaning, we
also can safely get rid of another pile of duplicate tests.
Fixes 'ovs-agent fails to start on Windows beacause of SIGHUP'
Change Ic0cf8a9ca7f3a16b556a6825e2979471ae136c33 has added the handling
of SIGHUP in neutron_ovs_agent. This does not work on Windows as there is
no SIGHUP signal on windows.
The fix consists in checking if signal has SIGHUP attr before setting the handler
for SIGHUP.
Forbid more than one branch point in alembic dependency chains
This change will allow us to get rid of HEADS file that currently serves as a
caution guard against excessive branching due to git conflicts it invokes on
any new migration merged.
This simple patch ensures usage for security group rules is
marked as dirty when a security group rule is deleted.
To this aim, the security group rule is deleted using ORM
in order to ensure the sqlalchemy even if fired.
Fixes 'ovs-agent cannot start on Windows because root_helper opt is not found'
Change Ie1224f8a1c17268cd7d1c474ed82fdfb8852eaa8 removed
config.register_root_helper() from ovs_neutron_agent:main, thus the agent
cannot start on Windows since root_helper config option is never
registered.
The fix consists in adding config.register_root_helper in the Windows side
utils.
The link to Dashboard is broken in the generated docuemnt
http://docs.openstack.org/developer/neutron/
This patch fixes it and addresses warnings so that
tox -e docs works.
Also add a reference to Gerrit Dashboard Creator
so that developers can customize it to what they want.
Miguel Lavalle [Tue, 22 Sep 2015 22:22:31 +0000 (17:22 -0500)]
Eliminate autoaddress check for DNS integration
The autoaddress check for DNS integartion is not required anymore. It is
removed from the DB plugin. This check was being performed to reflect
incorrect functionality in the DHCP agent as indicated in bug
https://bugs.launchpad.net/neutron/+bug/1498665
Carl Baldwin [Wed, 16 Sep 2015 21:53:54 +0000 (21:53 +0000)]
Only get host data for floating ips on DVR routers
First, we are only interested in setting the host attribute when
the router is a DVR router. Second, we don't need to query all of
the ports on the host, we just need to query the ports that are
referenced by the set of floating ips that we already have.
Ryan Moats [Mon, 21 Sep 2015 20:56:26 +0000 (15:56 -0500)]
Link dashboards into generated documentation
Move the dashboard directory under the source tree so that
it is available on generated builds. In addition, recast
image pages as RST so that they will be rendered
Change-Id: I316128491e8dae70ac06e260f5bdd8f440d285aa Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
ml2: don't consider drivers with no bind_port for qos supported rule types
If the driver is not going to bind a port, we should not use it as
justification to limit the subset of rule types available for the user.
The most common scenario for that would be l2pop, that does not handle port
binding, but merely modifies the implementation details of node
interconnection.
service_provider is a 'special' configuration. It is a MultiStr
option that used to be in neutron.conf, but moved into its own *-aas
config files after the service split. We allow for the definition to
be available 'anywhere': either in neutron.conf or in the *-aas
service's config file.
The list of 'service_provider' can include drivers from within the *-aas
tree, or from elsewhere, and can apply to different service types. Due to
the polymorphic nature of this variable it is very tricky to identify only
the drivers that pertain a specific service module: the service module
may as well implement more than one service type and may have support
from drivers out of tree.
For this reason it is best to relax this check and rely on query filters
when the ServiceManager.get_service_providers() is invoked. Furthermore,
without this fix there was a situation where the value returned by
'service_providers' may be differ depending on how the configuration is
passed on the CLI, and this inconsistency may only cause headaches.
ovsdb monitor: get rid of custom _read_stdout/_read_stderr methods
Those methods do the same thing as AsyncProcess counterparts, just
with logging the received output. It's better to move the logging into
AsyncProcess and control it with __init__ arguments.
This allows us to get rid of some duplicate tests for ovsdb monitor.
delete_port: ensure quota usage is marked as dirty
To this aim the ORM session mapper must be used.
This patch simply uses context.session.delete rather than
query.delete, and handles UnmappedInstanceError to safely
complete the operation when the record is deleted by
another transaction.
Miguel Angel Ajo [Thu, 11 Jun 2015 11:15:17 +0000 (13:15 +0200)]
Fix hostname roaming for ml2 tunnel endpoints.
Change I75c6581fcc9f47a68bde29cbefcaa1a2a082344e introduced
a bug where host name changes broke tunneling endpoint updates.
Tunneling endpoint updates roaming a hostname from IP to IP
are a common method for active/passive HA with pacemaker and
should happen automatically without the need for API/CLI calls [1].
delete_endpoint_by_host_or_ip is introduced to allow cleanup of
endpoints that potentially belonged to the newly registered agent,
while preventing the race condition found when deleting ip1 & ip2
in the next situation at step 4:
1) we have hostA: ip1
2) hostA goes offline
3) hostB goes online, with ip1, and registers
4) hostA goes online, with ip2, and registers
Kahou Lei [Sun, 13 Sep 2015 01:48:04 +0000 (18:48 -0700)]
Fix adding tap failure if bridge mapping is not provided
When bridge mapping option is not provided, tap interface cannot be
added properly. The root cause is that linux bridge agent is expecting
bridge mapping option is provided if physical network is presented.
However it is not always the case as Kilo was working fine
without existing bridge mapping
Rename a class variable so that it will be checked by the base class.
Certain tests were not being run correctly due to subclasses
incorrectly overriding a base class variable. This change names
the variable correctly in the subclasses to fix the problem.
For every router interface added to a router
with a default gateway there will be an internal
SNAT port generated and will be required by the
L3 Agent to process the SNAT rules.
This bug was introduced by the change ID below
Icc099c1a97e3e68eeaf4690bc83167ba30d8099a.
When the gateway is removed these ports have to
be removed from the namespace. These ports are
cached in the router_info and should be provided
to the get_snat_port_for_internal_port function
when called from external_gateway_removed or when
called from _dvr_internal_network_removed.
Kevin Benton [Fri, 18 Sep 2015 14:15:45 +0000 (07:15 -0700)]
Don't write DHCP opts for SLAAC entries
Change I81b4669eadaa9119e08c6a5e1d2a7b5959babdcc
caused DHCP options to be written for SLAAC entries
when they previously were not. This restores the previous
behavior.
Ann Kamyshnikova [Fri, 18 Sep 2015 15:21:44 +0000 (18:21 +0300)]
Update _TestModelMigration
_TestModelMigrationTest contain some duplication of code from oslo.db.
As change 94d583acde16860e7ca535bd7a960e8993cd12d2 was merged and
included in oslo.db 2.4.1 this duplication can be avoid.
Pecan defines several efficient mechanism for routing requests to
the appropriate controller, but the current code for Neutron's
Pecan WSGI server basically uses Pecan hooks to route requests.
This patch partially fixes that, removing the 'resource_identifier'
pecan hook and replacing it with explicit pecan routes between
controllers added at resource registration time.
All the remaining hooks, like attribute_population and
policy_enforments, which were relying on finding the resource
name in the pecan.request threadlocal variable have been updated.
This patch also:
- ensures the appropriate plugin is always selected for a given
resource
- add a common NeutronPecanController base class for the classes
CollectionsController and ItemaController
- Fixes the way in which plurals and singulars are handled in
neutron.api.v2.resource_heper