Commit Graph

6 Commits

Author SHA1 Message Date
Brian Haley eaf990b2bc Fix pep8 E128 warnings in non-test code
Reduces E128 warnings by ~260 to just ~900,
no way we're getting rid of all of them at once (or ever).
Files under neutron/tests still have a ton of E128 warnings.

Change-Id: I9137150ccf129bf443e33428267cd4bc9c323b54
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
2019-03-12 21:22:33 +00:00
Brian Haley de243a3513 Fix E402 pep8 errors
Fix E402 (module level import not at top of file) pep8 errors
and no longer ignore new failures.

Trivialfix

Change-Id: If9a202f1f322b5b03966c692e33e94b7c872079b
2018-04-20 18:13:07 +00:00
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
2016-07-19 11:28:45 -07:00
Carl Baldwin eb0861135b Clean up subports model
First, the nullable attribute on port_id was redundant because it is
in the primary key.

Second, trunk_id shouldn't be in the primary key.  Since port_id was
already marked unique, it didn't add any extra uniqueness constraint
and it doesn't help to have it in a primary key index either since
we'll either search the table for a given port_id *or* search for
subports with a given trunk_id.

The original model was not released in Mitaka.  Also, this is
effectively a cosmetic change, it doesn't really effect the operation
of the DB.  So, developers and trunk chasers who have deployed with
the previous model will still work.

Change-Id: Ia43a2a772f654e26c3234e153fd8a5501e585c9b
Partially-Implements: blueprint vlan-aware-vms
2016-06-09 14:41:41 +00:00
Henry Gessau f9019ea014 Annotate alembic migration for VLAN trunking
Add a module comment on the script so that the information is
displayed during alembic upgrade.

Before:
 ...
 7bbb25278f53 -> 89ab9a816d70, Rename ml2_network_segments table
 0e66c5227a8a -> 45f8dd33480b, qos dscp db addition
 45f8dd33480b -> 5abc0278ca73
 5abc0278ca73 -> d3435b514502, Add device_id index to Port

After:
 ...
 7bbb25278f53 -> 89ab9a816d70, Rename ml2_network_segments table
 0e66c5227a8a -> 45f8dd33480b, qos dscp db addition
 45f8dd33480b -> 5abc0278ca73, Add support for VLAN trunking
 5abc0278ca73 -> d3435b514502, Add device_id index to Port

TrivialFix

Change-Id: I53d95773c3a2c4152364f57568a6b2512995802a
2016-05-01 09:01:07 -04:00
Brent Eagles 67b621de73 Data models for vlan-aware-vms
This patch introduces the following:

- data models and related schema migrations
- first stub at DB operations
- trunk module structure

This is a tepid attempt to land the first functional code
for this sorely needed feature.

Partially-implements: blueprint vlan-aware-vms

Change-Id: I84b2a7604b6a282ec7cb953482bf7b567ae2344d
2016-04-24 19:41:54 -07:00