Moshe Levi [Wed, 24 Jun 2015 15:10:05 +0000 (18:10 +0300)]
AgentExtensionsManager and AgentCoreResourceExtension
This patch introduces the following classes:
L2Agent - abstract class for common L2Agent implementions.
AgentExtensionsManager - to load AgentCoreResourceExtension.
AgentCoreResourceExtension - interface class to define
the AgentCoreResourceExtension API.
This allows better segregation between L2 Agent Core
and L2 Agent Extensions.
The patch is missing unit test but it was tested manually.
I added a unit tests @TODO comments to come back
to them later.
Miguel Angel Ajo [Thu, 11 Jun 2015 13:21:28 +0000 (15:21 +0200)]
Generic rpc callback mechanism which could be reused
This is a publisher/subscriber messaging mechanism optimized
for agent consumption and server production without the need
of creating new rpc messages when new resources are introduced.
Oslo versionedobjects are the perfect match to ensure
cross version compatibility even if the published/subscribed
resources format change over time.
This is still a basic stub allowing get_info of the resources,
and the next change will introduce the RPC methods to call
get_info: I0ac8a009e781b6edb283d8634b1a2f047db092dc
The plugin is returning stub objects to be consumed from the
agent to test the basic behaviour until we have DB.
TODO: Update documentation, according to code changes,
enforce versioned objects only doing deserial/serialization.
Co-Authored-By: Miguel Angel Ajo <mangelajo@redhat.com> Co-Authored-By: Eran Gampel <eran@gampel.net>
Change-Id: I524cf5a14e99dc6bee4d4261557d98c75efa0809
Ramanjaneya [Wed, 24 Jun 2015 11:54:11 +0000 (17:24 +0530)]
QoS: db models and migration rules
This patch includes db models and migration rules for initial QoS objects.
Comparing to the spec, it adds two more service tables to maintain links
between networks and ports and their respective policies. We maintain
uniqueness as a unique constraint.
In some parallel world, we could have an additional field for networks
and ports that could be nullable to point to a policy. That said, it
breaks qos isolation a bit, and will also be a bit more painful if and
when we decide to spin out qos service pieces outside the tree.
blueprint quantum-qos-api
Co-Authored-By: Ramanjaneya <ramanjieee@gmail.com> Co-Authored-By: vikram.choudhary <vikram.choudhary@huawei.com> Co-Authored-By: Ihar Hrachyshka <ihrachys@redhat.com> Co-Authored-By: Miguel Angel Ajo <mangelajo@redhat.com>
Change-Id: I55a7dac602e2e770c21b6c7957430cb7115e5bdc
Assaf Muller [Tue, 30 Jun 2015 17:22:17 +0000 (13:22 -0400)]
Disable pylint job
Disabling pylint until it gets unbroken. Pylint 1.4.1 is using
logilab-common, which had a release on the 30th, breaking pylint.
Pylint developers are planning a logilab-common release tomorrow
which should unbreak pylint once again, at which point I'll
re-enable pylint.
Russell Bryant [Tue, 26 May 2015 21:07:37 +0000 (17:07 -0400)]
Move windows requirements to requirements.txt
Commit 276028cca26af573c14938255e40c58358eabd4a added these
requirements to setup.py from a custom build hook. These requirements
can now be expressed in requirements.txt. We need to move them there
so that the global requirements sync job can continue to keep setup.py
in sync with the global version.
Kevin Benton [Tue, 30 Jun 2015 05:24:22 +0000 (22:24 -0700)]
Increase ping count on ARP spoof test
The other IPv4 tests all have a count of 2 to tolerate
ping failures due to slow ARP response/interface setup/etc.
This patch increases test_arp_spoof_allowed_address_pairs_0cidr
to 2 to match.
Assaf Muller [Mon, 29 Jun 2015 15:38:51 +0000 (11:38 -0400)]
Remove failing SafeFixture tests
The fixtures 1.3 release attempted to fix the fixtures resource
leak issue, but failed to do so completely. Our own SafeFixture
is still needed: The 1.3 release broke our SafeFixture tests,
but not the usage of SafeFixture itself. This patch removes
those failing tests for now to unbreak the gate. Jakub reported
a bug on fixtures 1.3:
https://bugs.launchpad.net/python-fixtures/+bug/1469759
We will continue to use SafeFixture until that bug is fixed
in fixtures, at which point we will be able to require
fixtures > 1.3.
Miguel Angel Ajo [Fri, 19 Jun 2015 14:28:26 +0000 (16:28 +0200)]
Create the QoS API extension stub
This patch introduces the QoS API extension, in a basic
form where we could, in combination with the service plugin
stub, start creating some experimental test jobs that install
the service plugin.
Please not that URL mapping is not fully according to spec,
neither it does include any testing. We need to work that out.
We pulled all of the plugins out of the tree, many of which still inherit
from neutron test classes. This change then stated that we no longer
support testing other plugins. I think this is a bit premature and should
have been discussed under the subject
"Neutron plugins can't use neutron plugin unit tests" or something
similar.
Tomoaki Sato [Mon, 29 Jun 2015 01:02:20 +0000 (10:02 +0900)]
Fix subnet updating failure on valid allocation pools
Currently subnet updating with both allocation-pool and
gateway_ip options is failing because of wrong parameter check.
The check always checks gateway_ip against allocation pools in
db, even when the allocation_pool parameter is given.The fix
checks if given parameter of gateway_ip option doesn't conflict
with given parameters of allocation-pool.
When troubleshooting problems with cluster it would be
very convenient to have information about agent heartbeats
logged with some searchable identifier which could create
1-to-1 mapping between events in agent's logs and server's logs.
Currently agent's heartbeats are not logged at all on server side.
Since on a large cluster that could create too much logging
(even for troubleshooting cases), it might make sense to make
this configurable both on neutron-server side and on agent-side.
Assaf Muller [Fri, 26 Jun 2015 21:17:14 +0000 (17:17 -0400)]
Revert "Fix 'router_gateway' port status can't be updated"
This patch breaks multinode fullstack tests and in my opinion
is generally speaking wrong. I've added a comment to explain
in the patch that's being reverted.
This reverts commit with change ID:
If428eadadfd36a9b19ea75920120e48ac49659f2
Jakub Libosvar [Wed, 17 Jun 2015 13:10:13 +0000 (13:10 +0000)]
Move NetcatTester to common/net_helpers
The NetcatTester is a testing tool that can be used also in fullstack
tests so I think it should go there to avoid imports in fullstack tests
from functional.
Jakub Libosvar [Fri, 5 Jun 2015 14:32:51 +0000 (14:32 +0000)]
Refactor NetcatTester class
Following capabilities were added:
- used transport protocol is passed as a constant instead of bool
- src port for testing was added
- connection can be established explicitly
- change constructor parameters of NetcatTester
As a part of removing bool for protocol definition
get_free_namespace_port() was also modified to match the behavior.
Kevin Benton [Fri, 26 Jun 2015 01:34:38 +0000 (18:34 -0700)]
Add a double-mock guard to the base test case
Use mock to patch mock with a check to prevent multiple active
patches to the same target. Multiple patches to the same target
result in non-deterministic behavior when stopall() tries to
undo the patches.[1]
Kevin Benton [Fri, 26 Jun 2015 05:08:41 +0000 (22:08 -0700)]
Remove duplicated mock patch of ip_lib
The functional tests for agents were patching ip_lib in the
function to configure an agent, so any tests that relied on
multiple agents would patch ip_lib multiple times.
Kyle Mestery [Thu, 25 Jun 2015 20:36:47 +0000 (20:36 +0000)]
Consolidate sriov agent and driver code
In preparation for decomposing the built-in reference implementation,
this commits consolidates the sriov agent and driver code into a
coherent place for it's life in the new repository. I've also given
the unit tests a new home.
Kyle Mestery [Wed, 24 Jun 2015 19:12:06 +0000 (19:12 +0000)]
Restructure agent code in preparation for decomp
This commit moves the L2 agents (Linuxbridge and OVS) into the
ML2 directory, while at the same time also moving the ML2 server
bits into toplevel directories. It also moves the configuration
files and unit tests. We also move the l2pop RPC mixin while
here as well.
sridhargaddam [Mon, 22 Jun 2015 14:13:56 +0000 (14:13 +0000)]
Fix ip_lib get_gateway for default gateway on an iface
Currently get_gateway() of IpRouteCommand class always assumes
the presence of gateway_ip when default_route is seen.
Since we can also have interface routes without the gw_ip,
this patch fixes the issue by parsing the output accordingly.
IPv6 does not have a subnet broadcast address so the last IP
address can be used as a regular address. This patch tweaks the
automatic allocation pool generation to include that last address
on v6 networks.
This was found because
NetworksTestDHCPv6.test_dhcp_stateful_fixedips_outrange makes the
assumption that the default generated pools cover the entire usable
address space.
Pavel Bondar [Thu, 25 Jun 2015 13:52:08 +0000 (16:52 +0300)]
Extend SubnetRequestFactory to access subnet dict
SubnetRequestFactory incorporates logic for preparing arguments and
building right request.
Subnet dict, context and subnetpool are used to make decision on
what kind of reqest should be created.
SubnetRequestFactory can be overriden on ipam driver level,
it allows to easily extend existent Request model.
Kevin Benton [Fri, 26 Jun 2015 01:31:38 +0000 (18:31 -0700)]
Remove duplicated call to setup_coreplugin
The test case for vlan_transparent was calling setup_coreplugin
before calling the super setUp method which already calls
setup_coreplugin. This was causing duplicate core plugin fixtures
which resulted in patching the dhcp periodic check twice.
Kevin Benton [Fri, 26 Jun 2015 01:29:37 +0000 (18:29 -0700)]
Remove double mock of dhcp agent periodic check
The test case for the periodic check was patching a target
that the core plugin fixture already patched out. This removes
that and exposes the mock from the fixture so the test case
can reference it.
Kevin Benton [Fri, 26 Jun 2015 00:55:16 +0000 (17:55 -0700)]
Remove double callback manager mocks
setup_test_registry_instance() in the base test case class gives
each test its own registry by mocking out the get_callback_manager.
The L3 agent test cases were duplicating this.
Kevin Benton [Thu, 25 Jun 2015 23:57:30 +0000 (16:57 -0700)]
Remove ensure_dirs double-patch
test_spawn_radvd called mock.patch on ensure_dirs after the
setup method already patched it out. This causes issues when
mock.patch.stopall() is called because the mocks are stored
as a set and are unwound in a non-deterministic fashion.[1]
So some of the time they will be undone correctly, but others
will leave a monkey-patched in mock, causing the ensure_dir
test to fail.
Sukhdev Kapur [Thu, 25 Jun 2015 22:11:28 +0000 (15:11 -0700)]
Fix tenant-id in Arista ML2 driver to support HA router
When HA router is created, the framework creates a network and does
not specify the tenant-id. This casuse Arista ML2 driver to fail.
This patch sets the tenant-id when it is not passed explicitly by
by the network_create() call from the HA router framework.
Even though original issue was discovered for network_create()
it turns out the same issue applies for port_create() as well
so all the methods are fixed in this patch
Cedric Brandily [Wed, 24 Jun 2015 19:31:33 +0000 (21:31 +0200)]
Avoid env variable duplication in tox.ini
Some environment variables are defined multiple times in tox.ini. This
change defines "fake" tox jobs and refactors existing jobs to reduce
duplicated environment variables.