Commit Graph

9 Commits

Author SHA1 Message Date
Boden R a962b20ba9 shim standard_attr db for neutron-lib
This patch shims the attributes of the neutron.db.standard_attr module
to reference neutron-lib's implementation to allow consumers to move
over to lib's standard_attr at their leisure. Once all consumers are
moved over we will remove these neutron shims.

Change-Id: Ie3f55432a772b3e51a45252fa57fe5c9fa9cbe40
2019-07-23 14:17:29 -06:00
Kailun Qin 563a536d02 Support Network Segment Range CRUD as extensions
This patch adds the support for network segment range CRUD. Subsequent
patches will be added to use this network segment range on segment
allocation if this extension is loaded.

Changes include:
- an API extension which exposes the segment range to be administered;
- standard attributes with tagging support for the new resource;
- a new service plugin "network_segment_range" for the feature
  enabling/disabling;
- a new network segment range DB table model along with operation
  logic;
- Oslo Versioned Objects for network segment range data model;
- policy-in-code support for network segment range.

Co-authored-by: Allain Legacy <Allain.legacy@windriver.com>

Partially-implements: blueprint network-segment-range-management
Change-Id: I75814e50b2c9402fe6776229d469745d7a72290b
2019-03-07 08:20:30 +00:00
Thomas Morin 5179896e77 Allow sub-resources to have standard attributes
Prior to this change a DB model with standard
attributes could declare that it was mapping to
an API resource, but not declare a mapping to a
sub-resources (see bug 1763347).

This change allows DB models with standard attributes
to advertise that they map API *sub*-resources, and
modifies the code that extends DB resources to support
these specific declarations.

Closes-Bug: 1763347
Needed-By: I77ce46c0f33e2a366076d51ce6586fb3008dc6b1

Change-Id: I7630aab5e4f38d0fba862adc2426d4a7ca04a679
2018-07-04 20:52:37 +00:00
Hirofumi Ichihara 96f0142b80 Tag mechanism supports resources with standard attribute
Tag mechanism supports network, subnet, port, subnetpool
router resources only. This patch allow tag mechanism to support
 resources with standard attribute.

Two old extenions are kept because of backward compatibility.
They will be removed in Queens release.

APIImpact: Tag is supported by resources with standard attribute
DocImpact: allow users to set tags on resources with standard attribute

Change-Id: Id7bb13b5beb58c313eea94ca03835d3daf5c94bc
Closes-Bug: #1682775
2017-07-25 08:14:04 +09:00
Nguyen Phuong An ae791696b8 [log]: db models and migration rules
This patch includes db models and migration rules for initial
logging object. The implementation bases on logging api for
security group spec[1]

[1] https://goo.gl/t3NUlr

Partially-implements: blueprint security-group-logging
Related-Bug: #1468366

Change-Id: I3f91b3927c33021facc9eb9238555c0e06a918c0
2017-06-13 08:52:12 +07:00
Armando Migliaccio ca751a1486 Spin off context module
NeutronLibImpact

Partially-implements: blueprint neutron-lib

Change-Id: I48cf45dc1b07035d952152eac2548a3bd9fc2832
2017-03-06 16:25:29 +00:00
Kevin Benton b87715d764 Protect against '.delete()' for quota and revisions
The devref was suggesting to do exactly the wrong thing for cases where
we have SQLAlchemy event listeners waiting for deleted objects.
DELETE statements fail to trigger any kind of SQLAlchemy event
listeners and the majority of our delete operations are small
(<10 items at once) so the performance difference is negligible
(especially since we do it so infrequently).

Change-Id: Id142179418a7b94d8d9695871b3fcd5dcc64730c
2017-01-09 09:09:18 -08:00
Ihar Hrachyshka 414f607374 Garbage collect HasStandardAttributes subclasses in StandardAttrTestCase
Otherwise they may affect consequent calls to
get_standard_attr_resource_model_map on next plugin instantiation.

Change-Id: If8030776b3880e8c61980aeb28a65b397cca5ec4
Closes-Bug: #1625973
2016-09-17 07:49:35 +00:00
Kevin Benton 465d22180e Add common way to extend standard attribute models
This adds a way for standard attribute models to declare
the API resources they show up in. It then adds a utility
function to the standard_attr module to grab a map of all
API resources and their corresponding models.

This can be used by any processing code that wants to add
fields to standard attribute resources.

This also adjusts the existing extensions to leverage this
new functionality.

Partially-Implements: blueprint add-neutron-extension-resource-timestamp
Change-Id: Idc8923d0e983fcb0690f8cb5b55a5aff8690154f
2016-09-15 01:42:24 +00:00