neutron/neutron/extensions/security_groups_normalized_cidr.py
Slawek Kaplonski 0e0c7fa07e Add normalized_cidr column to SG rules
New API extension was added in [1] to extend security group rules with
"normalized_cidr" read only attribute.
This patch implements this API extension in Neutron ML2 plugin and
extends security group rules with "normalized_cidr" value.

[1] https://review.opendev.org/#/c/743630/

Related-Bug: #1869129

Change-Id: I65584817a22f952da8da979ab68cd6cfaa2143be
2021-01-07 12:23:59 +01:00

21 lines
884 B
Python

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import security_groups_normalized_cidr
from neutron_lib.api import extensions
class Security_groups_normalized_cidr(extensions.APIExtensionDescriptor):
"""Extension class supporting normalized cidr in the SG rules."""
api_definition = security_groups_normalized_cidr