Commit Graph

10 Commits (e3545991349dd93b707705272e14b45943671f32)

Author SHA1 Message Date
Armando Migliaccio 0e1e93f5c4 Relax bound constraint for trunk parent ports
This patch revisits the is_bound() condition for ports that
are about to be used as parent in a trunk. The existing
logic checked that for a port to be bound it is either an
unbound compute port or it is associated to a host. In pratice
only the latter suffices.

Partially-implements: blueprint vlan-aware-vms

Change-Id: I1c2c877b5cc421e05d97c7f528546a6a2c14aa46
7 years ago
Armando Migliaccio 42f2ba88a5 Allow bound ports to be trunked if the driver can support it
Some drivers, like the Open vSwitch one, may restrict the creation of a
trunk from a bound port (i.e. prevents from creating trunks after a VM
is already booted on the port).

This limitation frees us from worrying about dataplane migrations for OVS
as trunk ports and regular ports are wired differently.

However, other drivers, like the Linux Bridge one, may not be affected by
this limitation, and the existing rule should be relaxed to allow the
operation based on whether not the driver can support it.

Partially-implements: blueprint vlan-aware-vms

Change-Id: Ia938eb7cc845f6f144924acdb0e333d23516fcca
7 years ago
Jenkins 6fef9c7909 Merge "Remove local subports validator" 7 years ago
Armando Migliaccio bfed1675f7 Remove local subports validator
neutron-lib 0.3.0 is released and it includes the required validator.

Change-Id: I4b252ff0f4d8a4d7c8ca54f5704d81fb94dff31e
7 years ago
Takashi NATSUME 50ebf816ee Fix a typo in neutron/services/trunk/rules.py
busines -> business

TrivialFix
Change-Id: I54f48dff5f52cae9777a009c8fb0f6d61181fc0e
7 years ago
Jenkins dcb43cf85e Merge "Prohibit deletion of ports currently in use by a trunk" 7 years ago
Rawlin Peters 620f8a66f9 Prohibit deletion of ports currently in use by a trunk
A port that is currently in use as a trunk port or a subport cannot be
deleted. The trunk or subport that the port is owned by must be deleted
first.

Partially-implements: blueprint vlan-aware-vms
Change-Id: I35aec716b44b85a686c9d0f8f591d7d1ec21a794
7 years ago
Armando Migliaccio 5588f45a6d Improve the segmentation ID validation logic
Segmentation ID is meant to be an Integer as per model,
and as such it is best to attempt a conversion in case
it happens to be sent as string as done in [1]. The
failure mode in this case is not immediately obvious
as the ID range check fails and yet the ID is indeed
in range.

This patch also dedups some logic, clean up and add a
test.

[1] https://review.openstack.org/#/c/340624/7/neutronclient/osc/v2/trunk/subport.py@36

Partially-implements: blueprint vlan-aware-vms

Change-Id: I7ca4c93fdf0ab83088194e9a343448ed511d4cdb
7 years ago
Armando Migliaccio 29500042b6 Add new attributes to trunk model
This patch adds the following attributes to the trunk model:

  * name: this is added for convenience, especially to speed
    up resource lookup via CLI commands. This is also added
    for consistency with other Neutron resources.
  * admin_state_up: this is added for management needs. There
    may be maintenance situations where preventing the user
    from adding/removing subports to a trunk while in disabled
    state is desired.
  * status: this can be used to track the aggregate status
    of all the resources (parent + subports) participating
    into a trunk.

The API extension is modified accordingly, coverage added.
The hash for the trunk object is revised, while the object
version is left as is, since all of this is still unreleased.

The patch leaves the logic to handle the trunk status aggregation
to be added at a later date, whilst minor refactoring
improves readability and use of the database sessions.

Partially-implements: blueprint vlan-aware-vms

Change-Id: Ibe39378d43b1d63c2b006c2da574f52d9934a0df
7 years ago
Ryan Tidwell 9cda319687 Enable CRUD for trunk ports
This patch enables basic CRUD operations on trunk ports and defines
related API extensions. Trunk ports and sub-ports can be persisted
in the Neutron model and are made visible through the API, but the
L2 agent is not notified and no trunk ports or subports are actually
instantiated on compute hosts.

This one of the main patches in the series that implement the end
to end functionality.

Partially-implements: blueprint vlan-aware-vms

Co-Authored-By: Armando Migliaccio <armamig@gmail.com>
Change-Id: I26453eb9a1b25e116193417271400994ac57e4c1
7 years ago