The provider extension is supported by the linuxbridge and openvswitch
plugins and their agents [openvswitch phase 2 implementation is
in-progress, and does not yet support flat networks or multiple
interfaces].
Ranges of VLANs available on named physical networks for normal
allocation are specified in the plugin's config file via the
ListOpt syntax:
The mapping of each named physical network to its physical network
interface is specified (per-agent-host) in the agent's config file via
the ListOpt syntax:
Nachi Ueno [Mon, 13 Aug 2012 08:13:20 +0000 (08:13 +0000)]
Add device_owner attribute to port
in order for firewall logic to be able to poke a hole allowing traffic to/from a DHCP server,
we need to expose the IP being used for DHCP in a subnet to external entities.
This commit adds device_owner attribute, then dhcp-agent will update the device_owner value
of port to dhcp-agent.
The API layer is now able to issue bulk create requests to the plugin,
assuming that the plugin supports them. Otherwise, the API layer will
emulate atomic behavior.
This patch also implements OVS plugin support for bulk requests.
Dan Wendlandt [Mon, 13 Aug 2012 12:20:11 +0000 (05:20 -0700)]
improve test_db_plugin so it can be leveraged by extension tests
prereq for bp quantum-l3-fwd-nat
- load extension middleware as well as core API
- support 'action' requests in addition to CRUD ops
- add helper methods that check API return code
- clean-up places where existing tests where hitting 409s on delete
but ignoring the errors (basically SubnetInUse errors).
This patch allows Quantum to handle public networks. It modifies the
API adding a new attribute to the network resource ('shared')
and enhances the policy engine in order to handle the behaviour of
the service wrt shared networks.
Policy.json specifies a default behaviour which can be changed by
the administrator, even at runtime.
Tests added to test_db_plugin validate 'obvious' behaviour - such as
that only the ports belonging to a given tenant should be returned
even when they are queried on a public network.
Tests added to test_policy instead validate the changes added to the
policy engine.
This plugin supports multiple plugins at same time. This plugin is for L3 connectivility
between networks which are realized by different plugins. This plugin add new attribute 'flavor:id'.
flavor:id correspond to specific plugin. flavor-plugin mapping could be configureable by plugin_list config.
This plugin also support extensions. We can map extension to plugin by using extension_map config.
Dan Wendlandt [Sun, 12 Aug 2012 02:42:59 +0000 (19:42 -0700)]
Linux Agent improvements for L3
prereq for bp quantum-l3-fw-nat
- make init_l3 take cidrs, rather than assuming an augmented port object
- make namespace for agent operations optional and allow the namespace
name to be configured.
- allow plug() operation to take an optional bridge parameter indicating
which bridge to plug into
- add namespace support for iptables manager
- make OVS plug() set the IP address, etc. of a device even if it already
exists.
This fix moves the correct device into the namespace and improves the test
to ensure the proper device was moved. The previous generic check
failed to catch an error during refactoring.
when deleting a port that uses the gateway IP, we were not removing
the IPAllocation entry, which resulted in a depedency issue when we
deleted the port that the IPAllocation entry referenced.
The base mac will now be validated when the configuration file is read.
In addition to this the following has been done:
1. checks validaity of the base mac - for example it cannot be a multicast MAC
2. adds a framework for attributes tests
The original policy framework allowed new policy checks to be created
through inheritance. This is somewhat clunky and unnecessary in
Python. This change refactors policy.py to allow new policy checks
to be registered using an @register() decorator. One consequence is
that HttpBrain is deprecated.
Care has been taken to ensure backwards compatibility; deprecation
warnings will be emitted for uses of HttpBrain or the inheritance-
based checks.
(Pull-up from openstack-common, with deprecation of HttpBrain.)
The openstack-common project already does its own pep8 checks; we
don't need to duplicate the effort. This also avoids issues with
pep8 version skew between projects.
Nachi Ueno [Fri, 3 Aug 2012 01:37:34 +0000 (01:37 +0000)]
Make 4th octet of mac_range configurable.
Fix bug 1022739.
To get OUI per cluster is not realistic. So This commit
make 4th octet of mac_range configurable. By this commit,
the cloud provider can allocate OUI (3 octets) + 1 extra octet
range (4 octets) for each cluster.
The openswitch plugin's in-memory VlanMap is replaced with a vlan_ids
DB table similar to that used by the linuxbridge plugin. This will
prevent conflicting VLAN assignments if multiple server replicas are
run, and also sets the stage for phase 2 of the provider-networks BP
implementation that will add support for multiple physical
networks.
Unlike with the current linuxbridge plugin, the contents of the
openvswitch plugin's vlan_ids table are properly updated at startup in
case the vlan_min or vlan_max configuration variables have changed.
A new test_ovs_db test case has been added.
The primary key of the vlan_bindings table is changed from the vlan_id
to the network_id, which is now a foreign key, and network deletion is
now properly handled.
The net_id has been removed from the VlanIdInUse exception, requiring
a minor update to the linuxbridge plugin. The new NoNetworksAvailable
exception, with ResourceExhausted as its base class, is returned when
no more VLANs are available.
Notification for network/subnet/port create/delete/update.
blueprint quantum-notifications
Add host configuration into conf, which is determined by socket.gethostname()
function by default. Host name is part of publiser id, which is in the format
of 'network'.$host.
We add create/update/delete start and end notification for each kind of resource.
By default, the notification do nothing since the notifier driver is no_op_notifier.
We can define it in quantum.conf.
"from quantum.common import config as logging_config" was missing for
ryu agent.
"from quantum.openstack.common import cfg" was missing for ryu plugin.
And unused imports is eliminated.
The current api-paste.ini does not provide a way to choose a pipeline:
there is no way to switching a pipeline between keystone-enabled and
noauth pipelines without modifying the pipeline directly.
This commit introduces 'auth_strategy' flag to quantum.conf and
a pipeline used is determined depending on the flag. Supported values for
this flag are 'keystone' (default) and 'noauth' at the moment.
Gary Kotton [Tue, 24 Jul 2012 17:15:54 +0000 (13:15 -0400)]
Enable agents and plugins to use the same configuration file.
The change also implements blueprint agent-logging (this
was due to the fact that the existing logging in the agents
did not work with the change)
Devstack support for the above is in
https://review.openstack.org/10267
Notes:
- The service and agent can be run with multiple configuration
files by using the CLI parameters --config-file <filename>
- The agent now makes use of the logging and debugging flags
defined in quantum.conf. This follows the standard common
configuration command line rules.
Gary Kotton [Tue, 24 Jul 2012 06:28:56 +0000 (02:28 -0400)]
Update openstack-common files.
The RPC support requires that the fanout_cast messages enable
the application to set the topic. This was fixed in
https://review.openstack.org/#/c/10125/.
Bob Kukura [Fri, 15 Jun 2012 14:20:05 +0000 (10:20 -0400)]
Initial V2 implementation of provider extension.
Initial provider extension implementation. Specify vlan_id using the
CLI with admin rights via "net-create --tenant_id <tenant-id>
<net-name> --provider:vlan_id <vlan-id>". Also includes
provider:vlan_id in reply messages for admins. The extension is
supported in the linuxbridge and openvswitch plugins.
Bob Kukura [Mon, 16 Jul 2012 00:45:25 +0000 (20:45 -0400)]
Implements data-driven views and extended attributes.
The quantum/api/v2/views.py module is replaced by is_visible
properties in the RESOURCE_ATTRIBUTE_MAP defined in
quantum/api/v2/attributes.py. Extensions are given the ability to add
extended attribute descriptions to this map during initialization,
allowing extended attributes to be implemented similarly to core
attributes in plugins.
Add v2 API support for the Cisco plugin
Blueprint cisco-plugin-v2-api-support
New meta-plugin which makes use of the Quantum db_plugin and supports
the new v2 API
Changes to the Cisco DB model, now reusing quantum DB for core attributes
Changes to the device sub plugins to access the quantum DB for core
resources' state versus Cisco DB
Addition of fake/dummy drivers to support testing of the device sub
plugins even without actual hardware
New v2 unit tests which exercise the meta-plugin and the device sub
-plugins as well
In general creating new v2 modules such that v1.x code can be deprecated
easily by deleting the older modules. The following files are v2
versions of older modules, only the imports have changed, most of the
other code is the same as from the older modules (already reviewed):
quantum/plugins/cisco/common/cisco_credentials_v2.py
quantum/plugins/cisco/db/network_db_v2.py
quantum/plugins/cisco/db/network_models_v2.py
quantum/plugins/cisco/db/nexus_db_v2.py
quantum/plugins/cisco/db/nexus_models_v2.py
quantum/plugins/cisco/db/ucs_db_v2.py
quantum/plugins/cisco/db/ucs_models_v2.py
quantum/plugins/cisco/nexus/cisco_nexus_plugin_v2.py
quantum/plugins/cisco/ucs/cisco_ucs_inventory_v2.py
quantum/plugins/cisco/ucs/cisco_ucs_plugin_v2.py
quantum/plugins/cisco/segmentation/l2network_vlan_mgr_v2.py
fix bug lp:1025526,update iniparser.py to accept empty value.
also,this patch turn off pep8 E125 check,this for now seems to
be unnecessary,it check continuous line split.and update the
latest openstack-common https://review.openstack.org/#/c/9201
which has fix pep8 1.3 issue except for E125 check.
The code enable defining validity checks for input variables. This
is done via callback functions per type. The following types are supported:
- type:values - checks that data is valid according to a list of values
- type:mac_address - checks that data is a valid mac address
- type:ip_address - checks that data is a valid ip address
- type:subnet - checks that data is a valid cidr
- type:regex - checks that data matches a regular expression (for
example checking UUID validity)
Ensures that each attribute which is used by the policy engine is not
removed by the plugin when the 'fields' query parameter is specified.
This could be better achieved by not having the plugin perform this
selection, but as it is part of the plugin interface, it's probably better
not to introduce changes which alter it.
Because the openstack common project does not stick to latest pep8 rules,
I have to exclude some bad-ruled files in the tox.ini and run_tests.sh.
However pep8 does not support exclude option in the format quantum/openstack/common,
so I have to exclude some of openstack common files one by one.
Also, I have changed the Qunatum Context to base on the common context.
I does not update the setup.py in our openstack common dir and the one
under quantum top dir, since it should be maintained in a consistent way
across all of openstack projects.
After this introduction, we are ready for notification feature.
The router will simply use the QuantumManager which stores the instance
of the plugin being used by the Quantum server. Changes to unit tests
are for ensuring plugin instances are recycled across tests.