gongysh [Fri, 22 Feb 2013 15:34:57 +0000 (23:34 +0800)]
Add scheduling feature basing on agent management extension
3rd part of blueprint quantum-scheduler
1. Allow networks to be hosted by certain dhcp agents.
Network to dhcp agent is a
many to many relationship. Provide a simple
scheduler to schedule a network randomly
to an active dhcp agent when a network or port is created.
2. Allow admin user to (de)schedule network to a
certain dhcp agent manually.
3. Allow routers to be hosted by a certain l3 agent.
Router to l3 agent is a many to one relationship.
Provide a simple scheduler to
schedule a router to l3 agent if the router is not
scheduled when the router is updated.
4. Auto schedule networks and routers to agents when agents
start.
5. Only support ovs plugin at this point
Due to recent changes in notification logic between Quantum and the DHCP
agent, the notifier the NVP plugin previously used for metadata access
network was not working anymore and needed to be replaced
Monty Taylor [Wed, 6 Feb 2013 06:01:30 +0000 (17:01 +1100)]
Use testtools instead of unittest or unittest2.
As part of the move towards testr and parallel test running, we
start to use testtools and fixtures to make the test suite
resilient and more pedantic.
Akihiro MOTOKI [Tue, 26 Feb 2013 04:14:26 +0000 (13:14 +0900)]
Enables packetfilter ext in NEC plugin based on its driver config
packet filter extension in NEC plugin should be determined based on
a return value of filter_supported method in the backend driver.
Previously filter_supported was not called actually and packetfilter
extension was always enabled.
Akihiro MOTOKI [Tue, 26 Feb 2013 03:37:37 +0000 (12:37 +0900)]
Set default api_extensions_path for NEC plugin
NEC plugin has a plugin specific extension in its plugin directory.
api_extension_path must be set in quantum.conf to enable quantum-server
to load the extension, but users sometimes forget to set it. It provides
better usability if api_extensions_path is set appropriately by default.
This fixes the bug by changing LoadBalancerPluginDbTestCase to inherit
from test_db_plugin.QuantumDbPluginV2TestCase. This allows for the
plugin to access context managers for core resources. Additionally,
this change adds subresource and service_plugin support to
QuantumDbPluginV2TestCase.
Aaron Rosen [Thu, 21 Feb 2013 23:50:21 +0000 (15:50 -0800)]
Provide a default api_extensions_path for nvp_plugin
The NVP plugin has several extensions within it's plugin directory. In order
to tell quantum-server to load this, api_extensions_path must be set in
quantum.conf. This is sort of painful because one needs to set this value.
Aaron Rosen [Thu, 21 Feb 2013 22:44:16 +0000 (14:44 -0800)]
AttributeError: No such RPC function 'report_state'
This patch changes dhcp_agent_manager to be DhcpAgent instead of
DhcpAgentWithStateReport since not all plugins support DhcpAgentWithStateReport
and having this as the default breaks all current deployments that upgrade
source without changing their config files.
This patch adds an API extension, the relevant DB logic, and the NVP
plugin logic for managing a NVP-specific feature, Layer-2 Network
Gateway, through the Quantum API.
The proposed extension is meant to be used with the NVP plugin only.
Nachi Ueno [Thu, 17 Jan 2013 01:52:47 +0000 (17:52 -0800)]
Routing table configuration support on L3
Implements bp quantum-l3-routes
-- Adding the extraroute extension
-- Updating the routing table based on routes attribute on route
-- Updated OVS plugin, linuxbridge plugin, metaplugin
NEC plugin, Ryu plugin
User can configure the routes through quantum client API by
using the extension feature.
sample
quantum router-update <router_id> \
--routes type=dict list=true destination=40.0.1.0/24,nexthop=10.1.0.10
He Jie Xu [Thu, 1 Nov 2012 08:05:44 +0000 (16:05 +0800)]
Supporting pagination in api v2.0
Implements bp support-pagination-in-api-v2.0
Add sort and pagination feature for api v2.0.
*Add sort_key, sort_dir for sorting feature.
*Add limit, marker, page_reverse for pagination feature.
*Add emulated sorting and pagination
Allows the NVP plugin to leverage the metadata proxy, by creating an
ad-hoc topology for allowing access to a metadata proxy from a NVP
router leveraging existing agents.
This patch also removes previous code for metadata support in the
NVP plugin, which was based on DHCP Option 121. This is now provided
by the dhcp agent as well.
Network cannot be created in NEC plugin when OFC network ID is
unique inside a tenant. Some OFC implmenetations generate a network
ID unique inside a tenant. In this case generated network IDs on can
be duplicated in system-wide. To fix it, this changes resource ID on
OFC to REST URI to make sure IDs on OFC globally unique.
In Quantum resource relationship is not limited inside a tenant.
E.g., a non-owner tenant can create a port on a shared network.
To deal with it the provider layer should not be aware of tenants
each resource belongs to even when it has a kind of tenant concept.
This commit changes ofc_manager to pass a parent resource for resource
creation and identify a resouce by REST URI used to access OFC resources.
It decouples Quantum resource access model from OFC resource models.
OFC IDs created before this commit are also looked up.
Primary keys of OFC ID mapping tables are changed to quantum_id because
most of all accesses to these mapping tables are done by quantum_id.
However the current version of alembic does not support changing primary
keys, so new OFC ID mapping tables for tenant, network, port and packet
filter are created. Dropping the previous mapping tables will be done
along with the data migration logic.
This commit also changes the following minor issues.
- Make sure ID on ProgrammableFlow OpenFlow controller (PFC) is less than
32 chars. The current PFC accepts only 31 chars max as ID and 127 chars
as a description string.
- Some database accesses created their own session and did not support
subtransactions. Make sure to use context.session passed from the API layer.
- Removes Unused methods (update_network, update_port) in trema/pfc drivers.
Tomoe Sugihara [Mon, 18 Feb 2013 06:24:55 +0000 (15:24 +0900)]
Fix SG interface to reflect the reality
The signitures of abstract methods in SecurityGroupPluginBase
has diverged from db mixin implementation.
This patch updates the methods to fix the divergence, mainly
by removing update method from the base. Note that there's an
issue for missing update(bug #1124865).
Aaron Rosen [Mon, 18 Feb 2013 02:49:40 +0000 (18:49 -0800)]
Need to pass port['port'] to _get_tenant_id_for_create()
This change set I9ac44a8e moved this logic out of the transaction
which caused this bug. Unit tests did not catch this because
this error is caused on NVP since the tenant_id is passed in as a tag
and this change resulted in the tenant_id becoming None which is not
an allowed tag value. Will improve error handling and edge cases like
this to fake_nvpapiclient in different commit.
Aaron Rosen [Sun, 17 Feb 2013 00:26:14 +0000 (16:26 -0800)]
Improve error handling when nvp and quantum are out of sync
Previouly when nvp and quantum were out of sync an exception would
be raised notifying the user of this. This patch changes the behavior so that
now when elements are found in the quantum db but not in NVP they are
put into error state. In addition there error state elements are now able
to be deleted if not found in nvp.
This patch also removes outdated doc strings that seem to keep being adding.
Aaron Rosen [Sun, 17 Feb 2013 23:45:24 +0000 (15:45 -0800)]
Decouple helper functions from L3NatDBTestCase
In order to use the helper functions i.e _create_router in L3NatDBTestCase as
a mixin one needs to also run all the unit tests within L3NatDBTestCase.
These helper functions should be decoupled in the same way that
QuantumDbPluginV2TestCase() is done.
This patch also removes any unused variables within test_l3_plugin.py
Mark McLoughlin [Mon, 11 Feb 2013 00:00:19 +0000 (19:00 -0500)]
Use oslo-config-2013.1b3
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.
Add the 2013.1b3 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.
Remove the 'deps = pep8' from tox.ini as it means all the other deps
get installed with easy_install which can't install oslo-config from
the URL.
Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).