Files
neutron/neutron/extensions/ip_substring_port_filtering.py
Hongbin Lu 5c601bebeb Support filtering port with IP address substring
Neutron currently supports filtering ports by matching the exact
IP address. This patch adds support for substring matching using
"LIKE" SQL operator.

This patch also added a new API extension to show whether or not
the substring matching capability is available.

APIImpact add IP address substring filtering on listing ports
API-ref: I97259b85a2dce5a54bb6ea2cb9d9779ec0a25504

Co-Authored-By: Zhenyu Zheng <zhengzhenyu@huawei.com>

Change-Id: I9549b2ba676e1bad0812682c3f3f3c97de15f5f6
Closes-Bug: #1718605
2018-01-12 18:22:06 +00:00

24 lines
922 B
Python

# Copyright (c) 2017 Huawei Technology, Inc. All rights reserved.
#
# 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 import extensions
from neutron.extensions import ip_substring_port_filtering_lib as apidef
class Ip_substring_port_filtering(extensions.APIExtensionDescriptor):
"""Extension class supporting IP substring port filtering."""
api_definition = apidef