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
3 files changed
tree: a904e69c0813e4e4731acdacadff0d82ba5ac1c2
  1. neutron/