992 Commits

Author SHA1 Message Date
Jenkins
2768da320d Merge "Moved CORS middleware configuration into oslo-config-generator" 2016-03-10 09:22:23 +00:00
Jenkins
774303cfa3 Merge "Autogenerate macvtap agent config file" 2016-03-04 07:06:43 +00:00
Andreas Scheuring
2bcedf27a1 Autogenerate macvtap agent config file
Enable autogeneration of /etc/neutron/ config file for macvtap agent.

Change-Id: I3637d16e3ab53248ba9b84eeb8b7d979af0ecaae
Closes-Bug: #1552742
2016-03-03 16:11:18 +01:00
Michael Krotscheck
aae181817e Moved CORS middleware configuration into oslo-config-generator
The default values needed for neutron's implementation of cors
middleware have been moved from paste.ini into the configuration
hooks provided by oslo.config. Furthermore, these values have been
added to neutron's default configuration parsing. This ensures
that if a value remains unset in neutron.conf, it will be set to use
sane defaults, and that an operator modifying the configuration
file will be presented with a default set of necessary sane headers.

Change-Id: I327d1d7ce50dd4a20d781e6251a5af81c57e6ca1
Closes-Bug: 1551836
2016-03-01 12:21:33 -08:00
Jenkins
49fa08969d Merge "Add API extension for reporting IP availability usage statistics" 2016-03-01 18:51:18 +00:00
Jenkins
be922997e7 Merge "Add support for QoS for LinuxBridge agent" 2016-03-01 16:35:25 +00:00
Sławek Kapłoński
45410d76be Add support for QoS for LinuxBridge agent
There is a new QoS extension driver for the linuxbridge agent
being added. This driver provides support for QoS configuring
on the linuxbridge agent.
This patch introduces two new config options for Linuxbridge agent:
kernel_hz - HZ value of host kernel,
tbf_latency - value of latency in tbf qdisc to calculate size of queue.

Co-Authored-By: vikram.choudhary <vikram.choudhary@huawei.com>

Change-Id: I457ca2569b5d4a916ba09e71040505cd0ad3257b
Closes-Bug: #1500012
Closes-Bug: #1550514
DocImpact Update agent configuration to show settings related to
          QoS and bandwidth limiting
2016-03-01 10:45:02 +00:00
Mike Dorman
2f741ca5f9 Add API extension for reporting IP availability usage statistics
Implements an API extension for reporting availibility of IP
addresses on Neutron networks/subnets based on the blueprint
proposed at https://review.openstack.org/#/c/180803/

This provides an easy way for operators to count the number of
used and total IP addresses on any or all networks and/or
subnets.

Co-Authored-By: David Bingham <dbingham@godaddy.com>
Co-Authored-By: Craig Jellick <craig.jellick@gmail.com>

APIImpact
DocImpact: As a new API, will need all new docs. See devref for details.

Implements: blueprint network-ip-usage-api
Closes-Bug: 1457986
Change-Id: I81406054d46b2c0e0ffcd56e898e329f943ba46f
2016-02-29 05:31:48 +00:00
Hong Hui Xiao
ac8efa9255 Revert the unused code for address scope
Remove the code that is not used by address scope

Change-Id: I5f0c929b8c6daec6b6865602fc6165b37c2265ab
Closes-Bug: #1548217
2016-02-22 10:48:40 -05:00
vikram.choudhary
fbe754b04b BGP Dynamic Routing: introduce BgpDrAgent
This patch implements a new agent named "BgpDrAgent". The new agent
will host different BGP speaking drivers and makes the required BGP
peering session/s for neutron. The agent takes the needed "peer/s and
route/s" information from the BGP speaker entity and synchronize the
same to the registerd driver.

For realizing HA, two BgpDrAgents should host the same BGP speaker.

Partially-Implements: blueprint bgp-dynamic-routing
Co-Authored-By: Ryan Tidwell <ryan.tidwell@hpe.com>
Co-Authored-By: Jaume Devesa <devvesa@gmail.com>
Co-Authored-By: Numan Siddique <nusiddiq@redhat.com>
Change-Id: I3217795bdd0fa2d9d4b39274f4f95fc013c8d29d
2016-02-18 10:46:55 -08:00
vikram.choudhary
bede37f5e2 BGP Dynamic Routing: introduce BgpDrScheduler model
This patch implements a new extension called "bgp_dragentscheduler" which
does instant & auto scheuling of BgpSpeakers to an active BgpDrAgent. In
addition to this the patch also implements the basic CRUD requirement for
binding BgpSpeakers and BgpDrAgent.

BgpSpeaker to BgpDrAgent association can be 1-to-n. An admin user can only
associate/disassociate BgpSpeaker to/from a BgpDRAgent. Default scheduler
class will only assign non-scheduled BgpSpeaker to an active BgpDrAgent.

Partially-Implements: blueprint bgp-dynamic-routing
Co-Authored-By: Ryan Tidwell <ryan.tidwell@hpe.com>
Co-Authored-By: Jaume Devesa <devvesa@gmail.com>
Co-Authored-By: vikram.choudhary <vikram.choudhary@huawei.com>
Co-Authored-By: Numan Siddique <nusiddiq@redhat.com>
Change-Id: Id305d9a583116e155441ac5979bf3f6aa6a8258b
2016-02-12 14:17:57 +05:30
Ryan Tidwell
773a3916ea Add BGP Dynamic Routing DB Model and Basic CRUD
This patch enables basic CRUD on BGP dynamic routing
entities bgp_speaker and bgp_peer, as well as
bgp_speaker-bgp_peer and bgp_speaker-network
bindings.

An admin user can create BgpSpeakers and configure
peering entities (BgpPeers) for BgpSpeakers. BgpSpeaker
to BgpPeer association is n-to-n. An admin user can
also associate networks with BgpSpeakers. Relationship
between BgpSpeaker and Network is 1-to-n.

This patch provides BGP-related functionality only to
the admin users.

Partially-Implements: blueprint bgp-dynamic-routing
Co-Authored-By: Ryan Tidwell <ryan.tidwell@hpe.com>
Co-Authored-By: Jaume Devesa <devvesa@gmail.com>
Co-Authored-By: vikram.choudhary <vikram.choudhary@huawei.com>
Change-Id: I2412c1689683da9d7ec884a4cea506d4eed99453
2016-02-11 14:43:35 -07:00
Jenkins
5479d4b148 Merge "Implement 'get-me-a-network' API building block" 2016-02-10 05:59:28 +00:00
Brian Haley
955fa1c075 Implement 'get-me-a-network' API building block
This patch introduces an API to allocate an externally connected
private tenant network on demand. The API is idempotent in that,
once the topology is provisioned, further API calls keep returning
the same topology to the caller.

The API, as introduced by the patch, is not currently on, and its
design carefully ensures minimal impact on the existing codebase.
In fact the feature depends on and enhances the external-net extension,
but it does so via callbacks.

A subsequent patch in this series will make it available by default,
and API tests will be added to validate the functionality.

Partially-implements: blueprint get-me-a-network

Co-Authored-By: Armando Migliaccio <armamig@gmail.com>
Co-Authored-By: Henry Gessau <HenryG@gessau.net>

Change-Id: I4abd45252026431452f0d2cb2805043489c2f6ad
2016-02-08 18:06:35 -08:00
Ihar Hrachyshka
4398f14a9a Postpone heavy policy check for ports to later
When a port is validated, we check for the user to be the owner of
corresponding network, among other things. Sadly, this check requires a
plugin call to fetch the network, which goes straight into the database.
Now, if there are multiple ports to validate with current policy, and
the user is not admin, we fetch the network for each port, f.e. making
list operation on ports to scale badly.

To avoid that, we should postpone OwnerCheck (tenant_id) based
validations that rely on foreign keys, tenant_id:%(network:...)s, to as
late as possible. It will make policy checks avoid hitting database in
some cases, like when a port is owned by current user.

Also, added some unit tests to avoid later regressions:

DbOperationBoundMixin now passes user context into API calls. It allows
us to trigger policy engine checks when executing listing operations.

Change-Id: I99e0c4280b06d8ebab0aa8adc497662c995133ad
Closes-Bug: #1513782
2016-02-05 10:07:03 +01:00
Henry Gessau
e29975b799 Remove obsolete plugin stuff
Some spring cleaning:
 - Remove obsolete cisco vpn configs
 - Remove obsolete references from UT check script
 - Remove obsolete script for cleaning up plugins
 - Remove obsolete mock of heleosapi module

Change-Id: I0051e0b75b17279ffb61de328d7ccc7a12dc99dc
2016-01-21 23:16:20 +00:00
Michael Krotscheck
3d7ef0400e Added Keystone and RequestID headers to CORS middleware
CORS middleware's latent configuration feature, new in 3.0.0,
allows adding headers that apply to all valid origins.
This patch adds headers commonly used in openstack to neutron's paste
pipeline, so that operators do not have to be aware of additional
configuration magic to ensure that browsers can talk to the API.

For more information:
http://docs.openstack.org/developer/oslo.middleware/cors.html#configuration-for-pastedeploy

Change-Id: Ic08fcb7833563bbeca3e0ba2d03438d4be594418
2016-01-14 09:32:48 -08:00
Jenkins
b6a2a659e4 Merge "Support rootwrap sysctl and conntrack commands for non-l3 nodes" 2016-01-08 11:59:08 +00:00
Carl Baldwin
6a350bf950 Create a routing table manager
The routing table manager maps address scope ids to routing tables.
It uses the rt_tables file specific to each namespace to maintain the
mapping so that id can simply be used as the table name when running
iproute2 commands.  This will be useful when debugging.

Change-Id: Icd5e98c82a070045a50e0c5d3762906b7e159d3d
Partially-Implements:  blueprint address-scopes
2016-01-08 00:36:34 +00:00
rossella
0d5d014955 Support rootwrap sysctl and conntrack commands for non-l3 nodes
Iptables-firewall use commands sysctl and conntrack.
These are missed out in the plugins resulting in (No filter matched) errors in
non-l3 nodes. L3 nodes do not have this problem as l3.filters rootwraps these
commands.

Closes-bug: #1528641

Change-Id: I1167544a41f2ea91781ae2bb7aa208e25fec1524
2016-01-04 20:05:10 +00:00
Jenkins
075dbe99c0 Merge "Decompose OFAgent mechanism driver from neutron tree completely" 2015-12-11 22:37:01 +00:00
fumihiko kakuma
ee78b063c7 Decompose OFAgent mechanism driver from neutron tree completely
All 3rd-party code is required to be removed from the neutron tree.
This change removes definition for ofagent mechanism driver from
neutron repository.

Change-Id: Ia21387eeaed71f38822356e22e4adbd237c1e64c
Closes-Bug: #1524164
Depends-On: I04c741daf12e7628e2c1e2d1b81b2b2ce1310542
2015-12-10 22:36:35 +09:00
Michael Krotscheck
7f65b06033 Added CORS support to Neutron
This adds the CORS support middleware to Neutron, allowing a deployer
to optionally configure rules under which a javascript client may
break the single-origin policy and access the API directly.

For neutron, both the paste.ini and the direct-wrap method of
deploying the middleware were chosen, since neutron is in a state of
migration to pecan. Note that if someone deploys pecan-neutron behind
other middleware, any responses provided by that middleware will not
be CORS-enabled, as these responses would be returned before the
headers could be annotated. This results in a response not readable
by the user agent.

OpenStack CrossProject Spec:
   http://specs.openstack.org/openstack/openstack-specs/specs/cors-support.html
Oslo_Middleware Docs:
   http://docs.openstack.org/developer/oslo.middleware/cors.html
OpenStack Cloud Admin Guide:
   http://docs.openstack.org/admin-guide-cloud/cross_project_cors.html
DocImpact: Add link to CORS configuration in admin cloud guide.

Change-Id: I02acea6124d28370d92e7c94ca2d1d6c5c8937ac
2015-12-09 05:53:59 -08:00
Henry Gessau
24fad53ae5 Final decomposition of the nuage plugin
This removes what's left of the nuage code and artifacts from the
neutron tree. All the vendor code is now in the
nuagenetworks/nuage-openstack-neutron repo on github.

Closes-Bug: #1518643

Change-Id: Ifbb9484f36a3e42c6039c42c7f8d0bcbd482bbf8
2015-12-04 15:08:37 -05:00
Henry Gessau
a050433d0d Final decomposition of Brocade vendor code
This removes what's left of the brocade code and artifacts from the
neutron tree. All the vendor code is now in the
openstack/networking-brocade repo.

Closes-Bug: #1518637

Change-Id: Ia366ec28d0ae9fd7f9fe41c9a82d5d44971d27d8
2015-12-04 14:52:19 -05:00
Martin Hickey
112c8dd11d Remove Neutron core static example configuration files
Oslo config generator was introduced in patch [1] to
automatically generate the sample Neutron core configuration
files.

This patch removes the static example configuration files from
the repository as they are now redundant.

[1] https://review.openstack.org/#/c/204206/

DocImpact

Change-Id: Ic7ae2e038b5bd7b215c65c9c565bfe31ef551520
Partially-Implements: blueprint autogen-neutron-conf-file
Closes-bug: #1199963
Depends-On: Ic37a16b6cf8eb92030649f1fc8b198738a8cc104
2015-11-30 13:06:53 +00:00
Martin Hickey
71190773e1 Automatically generate neutron core configuration files
This adds a new tox environment, genconfig, which generates sample
neutron core configuration file using oslo-config-generator.

Updates to some configuration option help messages to reflect useful
details that were missing in the code but were present in config files.

It also adds details to devref on how to update config files.

Partially-Implements: blueprint autogen-neutron-conf-file

DocImpact

Change-Id: I1c6dc4e7d479f1b7c755597caded24a0f018c712
Closes-bug: #1199963
Co-Authored-By: Louis Taylor <louis@kragniz.eu>
2015-11-27 15:22:59 +00:00
Jenkins
9b531b9e4e Merge "Change instances of Openstack to OpenStack." 2015-11-26 01:43:14 +00:00
Jenkins
66eced0014 Merge "Add availability_zone support for network" 2015-11-25 22:17:43 +00:00
venkatamahesh
bf915b001d Change instances of Openstack to OpenStack.
Change Openstack to OpenStack
as per standards

Change-Id: I10f33c1e70fb5f2d74e6feda0a4a266d7071e1ab
2015-11-25 20:47:58 +00:00
Hirofumi Ichihara
6e50027819 Add availability_zone support for network
This patch adds the availability_zone support for network.

APIImpact
DocImpact

Change-Id: I9259d9679c74d3b3658771290e920a7896631e62
Co-Authored-By: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Partially-implements: blueprint add-availability-zone
2015-11-25 22:34:09 +09:00
Jenkins
13f59c40df Merge "Freescale ML2 driver code complete decomposition." 2015-11-25 10:00:23 +00:00
TrinathSomanchi
9f58496795 Freescale ML2 driver code complete decomposition.
This removes all the artifacts specific to Freescale ML2 driver code
from the Neutron tree. The code is maintained at github repository.

Change-Id: I194a4da49058724766b7fde7343f85d19a75fe8c
Closes-Bug: #1519078
2015-11-25 13:30:31 +05:30
Jenkins
941878240c Merge "Deprecate l3-agent router_id option" 2015-11-24 11:54:32 +00:00
Cedric Brandily
d5ea235865 Deprecate l3-agent router_id option
L3-agent router_id option has been defined in order to associate a
l3-agent to a specific router when use_namespaces=False. The option
use_namespaces has been removed in Mitaka, so router_id option is no
longer needed and can be deprecated in order to prepare its removal in N
cycle.

Closes-Bug: #1518776
Change-Id: Id79499ccbf3ea69ca4cd7e4b2f812f6dbc0406e0
2015-11-23 21:47:21 +01:00
Kanzhe Jiang
862de0d21f Remove BigSwitch plugin and driver
The BigSwitch Vendor plugin and driver are in
openstack/networking-bigswitch repo and will be moved to
Openstack bigtent. This patch removes the duplicated code and
corresponding entry points. It also moves the bigswitch specific
db tables to openstack/networking-bigswitch.
Closes-Bug: #1508781

Change-Id: I180d93f3e7da347c9b042fcc3f79f19e9a471f52
2015-11-21 16:13:44 -08:00
Jenkins
b97fbb2aa5 Merge "Add vhost-user support via ovs capabilities/datapath_type" 2015-11-20 22:13:05 +00:00
James Arendt
6bc53cc7f8 Fix Neutron flavor framework
Make flavor service profile store actual driver instead of
hardcoded dummy driver.  Ensure service type on flavor persisted.

Raise ServiceProfileDriverNotFound if non-empty driver is not part
of ServiceTypeManager providers.

Raise ServiceProfileEmpty if profile has neither a driver nor
any metainfo.

Raise InvalidFlavorServiceType if invalid service type passed.

Show flavors associated with a profile, not just profiles associated
with a flavor, to ease diagnosis when ServiceProfileInUse raised.

Create method to extract provider given a flavor for use with
neutron-lbaas plus tests.

Ensure various boolean forms accepted for enabled flag.

To enable in DevStack, add to local.conf:
enable_plugin neutron https://git.openstack.org/openstack/neutron
enable_service q-flavors

Add associated unit tests. Fix tempest api test that used invalid
LOADBALANCERS service type.

Change-Id: I5c22ab655a8e2a2e586c10eae9de9b72db49755f
Implements: blueprint neutron-flavor-framework
2015-11-19 11:27:05 -08:00
Jenkins
a93b889ae5 Merge "Remove deprecated use_namespaces option" 2015-11-19 14:45:43 +00:00
Jenkins
364abc81c8 Merge "Add a better description for notification_driver" 2015-11-18 20:28:57 +00:00
Terry Wilson
34d4d46c40 Add vhost-user support via ovs capabilities/datapath_type
Adds the ovs 'config' property which returns the contents of the
single row of the Open_vSwitch table. This gives access to certain
OVS capabilities such as datapath_types and iface_types.

Using this information in concert with the datapath_type config
option, vif details are calculated by the OVS mech driver. If
datapath_type == 'netdev' and OVS on the agent host is capable of
supporting dpdkvhostuser, then it is used.

Authored-By: Terry Wilson <twilson@redhat.com>
Co-Authored-By: Sean Mooney <sean.k.mooney@intel.com>

Closes-Bug: #1506127
Change-Id: I5047f1d1276e2f52ff02a0cba136e222779d059c
2015-11-18 14:04:06 -06:00
Cedric Brandily
23b907bc6e Remove deprecated use_namespaces option
The use_namespaces option has been defined as a workaround to kernels
not properly supporting namespaces. This limitation is behind us, it's
time to remove use_namespaces after its deprecation in Kilo in order to
simplify code and remove a poorly tested case (use_namespaces=False).

This change prepares for removal pullup_route method[1] which was only
used when use_namespaces=False.

[1] neutron.agent.linux.ip_lib

DocImpact
UpgradeImpact
Closes-Bug: #1508188
Related-Bug: #1435382
Depends-On: I303038eec560a6d99421140c2822aed8b518470b
Depends-On: I4feb2a15c7e1e4bfdbed2531b18b8e7d798ab3cc
Change-Id: I2fbf65df1250d9f9f1656b3964ee3b6de1ef1118
2015-11-18 19:17:29 +01:00
Jenkins
0b7d947db2 Merge "Remove SysV init script for neutron-server" 2015-11-18 15:39:24 +00:00
Jenkins
ddd13b25e7 Merge "Revert "Move dhcp_lease_duration into DHCP agent config options list"" 2015-11-17 05:29:34 +00:00
Dongcan Ye
6bcac62fc2 Add a better description for notification_driver
Improve description for the notification_driver
property in neutron.conf, so users will understand
how to configure it correctly.

Change-Id: Ib5d4c4b6eea5cabf58708d8201f9ff9c883b6c97
2015-11-17 13:16:29 +08:00
Kevin Benton
3a57401e86 Revert "Move dhcp_lease_duration into DHCP agent config options list"
This reverts commit 3101e2b62f0741baffc61174637486da17dd29bb.

The lease duration isn't DHCP agent specific. DHCP is a feature that
should be provided by whatever plugin is loaded and operators would
still like to set lease times for DHCP.

In the reference implementation we just consume it directly in the
agent, but that doesn't mean it's specific to the agent implementation.

Change-Id: I5efb6aa5e196d4cac5ff7c0c35be5a350401b925
2015-11-16 10:53:24 +00:00
Dongcan Ye
a95edc8980 Trivial fix in ml2 conf
Fix alignment for ml2_type_gre section in ml2_conf.ini, using
two lines instead of one line.

Change-Id: I567b53e442d6393b9efc9c8b1e2d60786fbe584b
2015-11-15 15:41:13 +00:00
Jenkins
d8c07f1933 Merge "Move dhcp_lease_duration into DHCP agent config options list" 2015-11-13 22:31:42 +00:00
Jenkins
772b3e3df3 Merge "Replace subnetpool config options with admin-only API" 2015-11-13 16:08:38 +00:00
Ihar Hrachyshka
1475689dd3 Remove SysV init script for neutron-server
The script has some issues, f.e. it does not read any plugin
configuration file.

I don't believe anyone relies on it these days. The only distro I could
think of that could use it is Debian, but they have their own version of
the script maintained independently.

So it seems easier to remove it not to mislead users.

Change-Id: Ice622402a6261cfed8a8b042d732f39e25aff77c
2015-11-13 12:53:59 +00:00