From 00c2f0e00eb024fc8b9faf32932447b53e86b124 Mon Sep 17 00:00:00 2001 From: Swaminathan Vasudevan Date: Mon, 31 Mar 2014 12:19:03 -0700 Subject: [PATCH] Add L3 Extension for Distributed Routers This patch introduces the model and extension framework for implementing distributed virtual routing on top of Open vSwitch. A new admin-only 'distributed' (as opposed to a 'centralized' or legacy-mode) attribute is added to the API router resource. It is possible to convert an existing (centralized) router to a distributed one; the opposite conversion, even though allowed by the API, may not be honored by the underlying plugin implementation and an appropriate error will be reported. When creating a router (regardless of the user role), Neutron will rely on a system wide configuration, whose default currently allows to create 'centralized' routers. Tests are added for basic unit coverage; when the first building blocks for neutron-testing-refactor are complete, functional testing will be added. This is because we should be moving away from how extension tests have been done up until now. Partially-implements: blueprint neutron-ovs-dvr DocImpact Change-Id: I7227fbe2718eba6665a5afb5dcaaaa77b341091f Authored-by: Swaminathan Vasudevan Co-Authored-By: Armando Migliaccio --- etc/policy.json | 3 +++ neutron/db/migration/models/head.py | 1 + 2 files changed, 4 insertions(+) diff --git a/etc/policy.json b/etc/policy.json index 369e0a80..81fe4955 100644 --- a/etc/policy.json +++ b/etc/policy.json @@ -63,7 +63,9 @@ "delete_port": "rule:admin_or_owner", "create_router:external_gateway_info:enable_snat": "rule:admin_only", + "create_router:distributed": "rule:admin_only", "update_router:external_gateway_info:enable_snat": "rule:admin_only", + "update_router:distributed": "rule:admin_only", "create_firewall": "", "get_firewall": "rule:admin_or_owner", @@ -104,6 +106,7 @@ "create_router": "rule:regular_user", "get_router": "rule:admin_or_owner", + "get_router:distributed": "rule:admin_only", "update_router:add_router_interface": "rule:admin_or_owner", "update_router:remove_router_interface": "rule:admin_or_owner", "delete_router": "rule:admin_or_owner", diff --git a/neutron/db/migration/models/head.py b/neutron/db/migration/models/head.py index 8bbfe21a..9a36d210 100644 --- a/neutron/db/migration/models/head.py +++ b/neutron/db/migration/models/head.py @@ -29,6 +29,7 @@ from neutron.db import extradhcpopt_db # noqa from neutron.db import extraroute_db # noqa from neutron.db.firewall import firewall_db # noqa from neutron.db import l3_agentschedulers_db # noqa +from neutron.db import l3_attrs_db # noqa from neutron.db import l3_db # noqa from neutron.db import l3_gwmode_db # noqa from neutron.db.loadbalancer import loadbalancer_db # noqa