neutron_lib.db.standard_attr module¶
- class neutron_lib.db.standard_attr.HasStandardAttributes(*args, **kwargs)¶
Bases:
object
- bump_revision()¶
- created_at¶
A descriptor that presents a read/write view of an object attribute.
- description¶
A descriptor that presents a read/write view of an object attribute.
- classmethod get_api_collections()¶
Define the API collection this object will appear under.
This should return a list of API collections that the object will be exposed under. Most should be exposed in just one collection (e.g. the network model is just exposed under ‘networks’).
This is used by the standard attr extensions to discover which resources need to be extended with the standard attr fields (e.g. created_at/updated_at/etc).
- classmethod get_api_sub_resources()¶
Define the API sub-resources this object will appear under.
This should return a list of API sub-resources that the object will be exposed under.
This is used by the standard attr extensions to discover which sub-resources need to be extended with the standard attr fields (e.g. created_at/updated_at/etc).
- classmethod get_collection_resource_map()¶
- revision_number¶
A descriptor that presents a read/write view of an object attribute.
- standard_attr = <_RelationshipDeclared at 0x7f0030202480; no key>¶
- standard_attr_id = Column(None, BigInteger(), ForeignKey('standardattributes.id'), table=None, nullable=False)¶
- update(new_dict)¶
- updated_at¶
A descriptor that presents a read/write view of an object attribute.
- classmethod validate_tag_support()¶
- class neutron_lib.db.standard_attr.StandardAttribute(**kwargs)¶
Bases:
BASEV2
Common table to associate all Neutron API resources.
By having Neutron objects related to this table, we can associate new tables that apply to many Neutron objects (e.g. timestamps, rbac entries) to this table to avoid schema duplication while maintaining referential integrity.
NOTE(kevinbenton): This table should not have more columns added to it unless we are absolutely certain the new column will have a value for every single type of Neutron resource. Otherwise this table will be filled with NULL entries for combinations that don’t make sense. Additionally, by keeping this table small we can ensure that performance isn’t adversely impacted for queries on objects.
- bump_revision()¶
- created_at¶
- description¶
- id¶
- resource_type¶
- revision_number¶
- updated_at¶
- neutron_lib.db.standard_attr.get_standard_attr_resource_model_map(include_resources=True, include_sub_resources=True)¶
- neutron_lib.db.standard_attr.get_tag_resource_parent_map()¶
- neutron_lib.db.standard_attr.throw_exception_on_bulk_delete_of_listened_for_objects(delete_context)¶